GASP: A Git-Native Protocol for Portable Agent State
Abstract
Agent protocols standardize how agents communicate: with their tools through MCP, and with one another through A2A and related efforts. None standardizes an agent’s own durable state, so an agent is still a process. End the process, swap the harness, or retire the model, and its accumulated identity, skills, memory, and history are lost. We present GASP, the Git Agent State Protocol. In GASP an agent lives in a git repository that holds its identity, its versioned skills, its distilled memory, and an append-only log of typed events: goals, tasks, patches, evaluations, and decisions. The log replays into a queryable graph, so restoring the agent means cloning the repository and replaying the log. The model, loop, and tools reduce to a swappable executor that stores nothing durable. Five rules and a conformance kit (a canonical fixture and seven fail-closed checks) let conformance be tested rather than asserted. We describe the protocol, a Rust reference runtime (yoagent-state), and a production case study. yoyo, a coding agent that has evolved its own source autonomously for 127 days, now emits GASP from every session. To show that its state is independent of the executor, a second, unrelated runtime of about 250 lines both restores yoyo’s live 445-event repository to an identical 152-node graph and drives a further conformant run forward that the reference runtime accepts. The specification, the kit, and the live repository are public.
// Source
Authors: Yuanhao Li