MACP Examples

This repository includes illustrative transcripts for each standards-track mode and for policy-governed sessions.

Status: Non-normative (explanatory). In case of conflict, RFC-MACP-0001 is authoritative.

This repository includes illustrative transcripts for each standards-track mode and for policy-governed sessions.

Available example transcripts

FileModeWhat it shows
examples/decision-mode-session.jsonmacp.mode.decision.v1initialization, SessionStart, proposal, evaluations, objection, votes, and terminal Commitment
examples/proposal-mode-session.jsonmacp.mode.proposal.v1offer, counteroffer, dual acceptance, and bound agreement
examples/task-mode-session.jsonmacp.mode.task.v1bounded delegation, progress, completion, and bound task outcome
examples/handoff-mode-session.jsonmacp.mode.handoff.v1responsibility transfer with context handoff and acceptance
examples/quorum-mode-session.jsonmacp.mode.quorum.v1threshold approval leading to a final commitment
examples/policy-decision-session.jsonmacp.mode.decision.v1policy-governed Decision Mode with supermajority voting, quorum, and critical-severity veto (RFC-MACP-0012)
examples/policy-registration-exchange.jsonN/A (gRPC exchange)dynamic policy registration request and response (RFC-MACP-0012 Section 7)

Single-envelope examples

Standalone Envelope examples, one per Core message type, each validating against its $defs entry in schemas/json/macp-envelope.schema.json:

FileMessage type$defs entryRFC
examples/json/signal.jsonSignalSignalPayloadRFC-MACP-0001 §6
examples/json/progress_ambient.jsonProgress (ambient form)ProgressPayloadRFC-MACP-0001 §6
examples/json/session_start.jsonSessionStartSessionStartPayloadRFC-MACP-0001 §7.1
examples/json/session_suspend.jsonSessionSuspendSessionSuspendPayloadRFC-MACP-0001 §7.5
examples/json/session_resume.jsonSessionResumeSessionResumePayloadRFC-MACP-0001 §7.5
examples/json/session_cancel.jsonSessionCancelSessionCancelPayloadRFC-MACP-0001 §7.3
examples/json/commitment.jsonCommitmentCommitmentPayload (whose optional supersedes/CommitmentRef fields are described in RFC-MACP-0001 §7.3.1)RFC-MACP-0001 §7.3

SessionSuspendPayload/SessionResumePayload, CommitmentPayload's supersedes/ CommitmentRef fields, and SessionStartPayload.max_suspend_ms (not exercised by the example above, which relies on the runtime default) were all added to the envelope schema this reconciliation window (#162/#172, #161/#171, #156/#163 respectively).

Discovery, lifecycle, and runtime examples

Single-document examples that exercise non-transcript schemas:

FileSchemaWhat it shows
examples/discovery/agent_manifest.jsonmacp-agent-manifest.schema.jsonagent identity, supported modes, transport endpoints
examples/discovery/mode_descriptor.jsonmacp-mode-descriptor.schema.jsonmode advertisement with message types and schema URIs
examples/discovery/policy_descriptor.jsonmacp-policy-descriptor.schema.jsongovernance policy advertisement (RFC-MACP-0012)
examples/discovery/policy_descriptor_decline.jsonmacp-policy-descriptor.schema.jsoncritical_objection_action: finalize_decline — a vote-gated decline finalized on critical objection
examples/discovery/session_metadata.jsonmacp-session-metadata.schema.jsonSessionMetadata returned by GetSession
examples/discovery/session_lifecycle_event.jsonmacp-session-lifecycle-event.schema.jsonSessionLifecycleEvent emitted by WatchSessions
examples/discovery/run_descriptor.jsonmacp-run-descriptor.schema.jsonscenario-agnostic run descriptor for a control-plane POST /runs
examples/discovery/agent_bootstrap.jsonmacp-agent-bootstrap.schema.jsonbootstrap payload written to MACP_BOOTSTRAP_FILE before the initiator agent starts

Example shape

The canonical field mapping and payload encoding for every Envelope in these transcripts is defined in RFC-MACP-0001 §10.1 (Field Mapping), §10.2 (Payload Encoding) — this document does not restate it. The one repository-local convention: each transcript's messages array is ordered, and that order is the replay order.

Note: The policy-governed examples (policy-decision-session.json, policy-registration-exchange.json) use a simplified transcript array with sequence numbers (seq) and condensed message representations. This format is intended to illustrate governance evaluation flow rather than serve as a wire-format reference. For canonical Envelope structure, refer to the standard mode transcripts. The simplification is cosmetic only for the Envelope framing: these two examples' rules objects are still validated in CI against decision-rules.schema.json by the policy-rules extractor (see docs/policy.md), so the governance rules themselves are held to the same standard as everywhere else.

What the examples demonstrate

Across the transcripts, the examples demonstrate:

  • explicit initialization and capability negotiation,
  • explicit SessionStart,
  • session-scoped mode messages,
  • version binding suitable for replay,
  • a terminal Commitment that resolves the Session,
  • policy resolution, governance evaluation, and deterministic commitment decisions (RFC-MACP-0012).

The important property is not the specific business scenario in each example. It is that every bound coordination event exists as a bounded transcript with a start, a lifecycle, and a terminal message.

The examples above are illustrative. For machine-checked message sequences with per-message accept/reject expectations — consumed by SDK projection harnesses and the runtime conformance suite — see the canonical fixture pack in schemas/conformance/. Fixtures exist for every standards-track mode plus the ext.multi_round.v1 extension mode, and CI validates each fixture against the fixture-format schema and lints it for internal consistency.