# The Log Is The Agent
<!--
ref: @knowledge/frameworks/log-is-the-agent
type: framework
tags: [agent design, state management, multi-worker systems, resumability, logging]
triggers: [designing long-running agents, need for session sharing, handling crashes, implementing multi-worker systems]
trigger_prompt: When designing an agent system that requires durability and the ability to recover from interruptions or share sessions among multiple workers.
version: 6
updated_at: 2026-07-18T22:55:12.342Z
-->

An agent's durable identity is its append-only event log; the model, runtime, and tools are just interpreters that read the log and append to it, and every other view of the agent is a projection of that log.

*Synthesized from Ishaan Sehgal, The Log Is The Agent (AI Engineer World's Fair 2026).*

**The model.** Most people locate an agent in its model or its execution environment. Neither is durable. The durable thing is the log: an append-only history of every state transition — user inputs, model outputs, tool calls, tool results, permission prompts, failures. The model reads the log and proposes the next step; the tool runner executes and appends the result; the loop repeats. Because state is reconstructed from the log on each turn, the loop is disposable: a worker can claim a session, advance it one step, write the result, and disappear, and any other worker can resume. This mirrors databases — underneath every serious database is a log, and tables, indexes, and materialized views are projections of it. For agents, the fed context, the rendered UI, debugging/audit trails, and compaction are all projections; only the raw log is primary.

**When to apply.** Designing any long-running, resumable, or multi-worker agent system where crashes, provider swaps, forking, or session sharing must be survivable. Treat the log as the first-class, owned artifact rather than as fire-and-forget side-effect exhaust.

**Consequences that follow structurally.** Reliability — a permission prompt or paused state survives a crashed worker because a new worker reconstructs it from the log. Scalability — one process can advance thousands of agents with no sticky sessions or state migration. Forking — branch the log and run divergent branches on different models. Multiplayer — sharing an agent means granting access to its history, not copying a transcript. Migration — moving providers is an adapter problem, not an identity problem.

**Gotchas.** Compaction is lossy; treat a compacted summary as a best-effort fork you resume as a new log, and never discard the raw log or you lose part of the agent. The log is the agent's view of the world, not the world — forking back cannot unsend an email or revert an externally changed file; the log only records what the agent did, saw, and needs to continue.

---

*Related: `@content/youtube/dan-martell/you-re-not-behind-yet-how-to-build-your-first-ai-agent-full` · `@knowledge/frameworks/frontier-plans-local-executes` · `@protocol/observability`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*