Agent Session Protocol (ASP) is the storage and migration protocol for agent sessions — the session-layer counterpart to ACP. ACP handles the live present (editor↔agent interaction); ASP handles the durable past and cross-runtime migration of sessions.
ASP describes only the protocol layer: how a session is modeled, how events are structured, how fidelity is declared, and how opaque payloads round-trip. It is not a storage engine, a conversion tool, or a live control protocol — those belong to the implementation layer.
ASP defines the canonical schema, event semantics, fidelity matrix, and opaque-payload round-trip conventions for agent sessions, so that any session produced by any harness can be persisted, replayed, and migrated across harnesses.
asp/
├── schema/
│ ├── agent-session-contracts.ts # canonical schema: envelope, event types, content blocks, validation (TS reference)
│ └── agent-session-materializer.ts # evidence → snapshot projection semantics
└── spec/
├── overview.md # session model, events, correlation, lineage, identity
├── content-blocks.md # content blocks + opaque passthrough
├── fidelity.md # fidelity matrix + loss declarations + resume profiles
└── acp-mcp.md # relationship and mapping to ACP / MCP
- Correctness comes from the append log + evidence alone. The event log is the single source of truth; snapshots are always re-derivable from it.
- Opaque payloads are first-class. Bytes that cannot be parsed but must round-trip verbatim (e.g. Claude's thinking
signature, Codex'sencrypted_content) are carried in a typedunknownblock — never normalized away. - Round-trip fidelity comes from the evidence layer. Converters replay the native payloads recorded by the importer verbatim, and only synthesize (with declared loss) when those are absent.
See agent-session-protocol/universal-session-log (USL: usl-core storage engine + usl-capture + usl-convert).
Draft (schema v1.0). The schema currently ships as a TypeScript reference; a JSON Schema artifact and SDK generation are on the roadmap.