MACP Examples

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)

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/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

Each transcript is an ordered JSON document with:

  • top-level metadata such as description, protocol_version, mode, and session_id,
  • an ordered messages array containing full Envelope objects in replay order,
  • envelopes and initialization payloads written in replay order.

The ordering of the messages array 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.

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.