Agent Session Record (ASR) is an open, vendor-neutral format for keeping a record of an agent session. It covers coding agents such as Claude Code and Codex, apps that run other agents such as T3 Code, and personal assistants on messaging apps such as OpenClaw and Hermes Agent. Version 0.1 is fitted first to Claude Code, T3 Code, Codex and OpenClaw. A record states who asked for what and what started each turn, what the model received and produced, which tools ran and with what results, which approvals and questions went to a person, what the agent wrote to memory, which replies were delivered and which files changed. It also states which sessions spawned, forked, continued or ran which, how context was compacted or rewound, what the session cost, and which commits and pull requests resulted. ASR is the archival counterpart of the Agent Client Protocol (ACP). ACP is the live protocol between an editor and an agent; ASR is the record that remains after the session. The relationship is like that between SARIF, a format for storing static analysis results, and the diagnostics that the Language Server Protocol carries live.
Status: 0.1 draft. ASR is open for review. Feedback from teams that build coding agents, assistants, editors, evaluation pipelines and observability tools is the most useful contribution right now. See Contributing.

What a record looks like

One session is one stream of JSON objects, one per line. Line 1 is the session header; every later line is an immutable record ordered by seq. Examples on this site are expanded for reading.
The quick tour walks through a coding session, record by record. An assistant’s stream uses the same record types and adds who sent each message in a group chat, what started each turn and whether each reply was delivered; the white paper has an example.

Why it exists

Every agent harness keeps its own session log, with its own layout and its own identifiers. Tools that search, review, attribute or learn from sessions have to reverse-engineer each one. Many logs also leave out facts that people need later: which person in a group chat asked for something, whether a person or a schedule started a turn, who approved an action, and where a remembered fact came from. Related formats each cover one slice of the problem: a live protocol, an evaluation trajectory, a telemetry trace, line attribution. None of them is a lasting record of a whole session that works across harnesses. Why ASR compares them. ASR is designed so that:
  • the native logs of existing harnesses can be converted now, with losses stated and without vendor help;
  • a harness can adopt it with little implementation work;
  • an app that runs other agents and the agents it runs can each keep their own stream, linked so that work is counted once;
  • a live ACP v2 stream can be recorded into it, with declared and tested losses;
  • ATIF trajectories, OpenTelemetry spans and Agent Trace or Git AI attribution can be generated from it, instead of being captured separately.

How it works

  • One stream per session. A stream is UTF-8 JSON Lines, one record per line. Line 1 is the session header. Records are immutable: a later fact or a correction is a new record.
  • Native IDs are kept. A session is identified by its agent, an optional namespace and the harness’s own session ID, kept verbatim.
  • A small required core, plus profiles. The core, coding, lineage, usage and messaging profiles are promises about what a stream records. A producer that claims a profile emits the corresponding record, or an explicit capture state, whenever an event covered by that profile happens. Coding is one of these profiles, and nothing in the core depends on it.
  • Fitted to real tools. A field or record type is standard when at least two of Claude Code, T3 Code, Codex and OpenClaw record it. Other facts these tools record get a documented place in the agent registry, so nothing is dropped. There is no experimental tier.
  • Gaps are stated. A missing field means unknown, and nothing is made up. Capture states, gap records and declared losses say what a record does not contain.
  • Links need evidence. Lineage, copies and links between sessions are recorded only from evidence in the source, never inferred from similar text or timing.
  • Room for vendor data. Vendor data goes under _meta with reverse-DNS keys. Vendor record types and enum values are namespaced, and every enum is open.

What it is for

  1. Search and memory across harnesses and assistants.
  2. Portable handoff: starting a new session, in any harness, with information from a prior record.
  3. Review and audit: who asked for what, what started each turn, who or what approved each action, what was sent and what was written to memory.
  4. Attribution and blame evidence: finding the session that produced a change.
  5. Evaluation and training export.
  6. Cost and usage analytics.
  7. Replay viewers.
A field or record type joins the format when one of these uses needs it and at least two of the four tools above record it. Governance describes the rule and its few exceptions.

What it does not do

  • A record does not restore processes, credentials, sandboxes or provider-private continuation state. An adapter may support running a session again in its original harness; the adapter’s capabilities are stated for each harness.
  • Replaying a record for display never re-executes tools.
  • ASR is not a live protocol and does not replace ACP. It does not replace telemetry or evaluation formats either; it can feed them.
  • Some assistant features are not in 0.1, such as payments, on-behalf-of identity and live voice. The roadmap lists them.
  • Conformance does not make a record safe to share. Records can contain source code, secrets and personal data. See Privacy and security.

Where to start

Specification

The format: records, identity, structure, lineage, messaging and conformance.

White paper

The problem, the design decisions, and what we are asking reviewers.

For harness authors

For coding agents, assistants and apps that run other agents: converters today, an export command next, a conformant native log last.

For tool builders

What readers, converters and exporters must do with a stream.