The Log Is The Agent: Shifting Agent Identity to Data

AI Engineergo watch the original →

Agents should be defined by their append-only session logs rather than their runtime or model, enabling durability, portability, and true ownership of agent state.

The Log as the Primary Primitive

Most current agent architectures treat the agent as a combination of a model, a prompt, and a runtime loop. This is a flawed abstraction because it ties the agent's identity to ephemeral compute resources. Instead, an agent should be defined by its session log, which serves as an append-only record of every user input, model output, tool call, and result. By treating the log as the primary data structure, the execution loop becomes disposable, allowing any worker to reconstruct the agent's state and resume progress from any machine or runtime.

Structural Advantages of Log-Centric Design

When the log is treated as the system rather than a side effect, several properties emerge naturally:

  • Reliability: Because the state is reconstructed from the log, processes can fail or crash without losing the agent's progress or pending permission prompts.
  • Scalability: A single worker process can manage thousands of agents by loading their state from the log on demand, eliminating the need for sticky sessions or machine-bound execution.
  • Forkability: Timelines can branch for parallel exploration, allowing different models or strategies to be tested against the same historical context.
  • Portability: Since the log is the source of truth, agents can migrate between different model providers or runtimes by simply adapting the log projections to the new environment.

Ownership and Compaction

Compaction is a necessary engineering task for managing finite context windows, but it should be treated as a lossy, best-effort projection of the raw log. The raw log remains the durable source of truth. This distinction is critical for ownership: if a model provider owns the log, they effectively own the agent. Because agents contain intimate personal or corporate data, developers must ensure they retain control over the log to prevent vendor lock-in and ensure long-term data sovereignty.

  • #ai
  • #dev-tooling
  • #infrastructure

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.