Skip to content

The Log is the Agent: Event-Sourced Reactive Graphs for Auditable, Forkable Agentic Systems

🕒 Published (v1): 2026-05-21 04:55 UTC · Source: Arxiv · link

Why this paper was selected

Event-sourced reactive graphs; log-first design for auditable forkable agentic systems

Ask a follow-up

Open an assistant pre-loaded with this paper's context.

💬 Ask ChatGPT✦ Ask Claude

TL;DR

ActiveGraph inverts the conventional agent architecture by making an append-only event log the primary source of truth, with the working graph as a deterministic projection of that log and agent behaviors as reactive subscriptions to graph-shape changes. This yields three properties absent from retrieval-based memory systems: exact deterministic replay, cheap forking at any event, and end-to-end lineage from goal to individual model call. The paper is a systems/architecture contribution; no task-performance benchmarks are claimed or reported.

Problem

Conventional agent frameworks treat the log as a byproduct: state lives in prompts, code, framework internals, transcripts, and a lossy vector-memory store. This fragmentation makes full-run replay impossible, forking prohibitively expensive (requires re-executing the shared prefix including paid model calls), and provenance of any fact in context at best partial. Memory-layer systems (MemGPT, Zep, Mem0) improve carry-over but remain derived-state layers atop an agent whose authoritative representation lives elsewhere—provenance is still incomplete.

Method

Event-sourced reactive graph runtime. Graph state \(G_t\) is computed as a deterministic fold over the ordered event log \(L = (e_1, e_2, \ldots, e_t)\):

\[G_t = \mathrm{fold}(L_{1:t})\]

Every agent action—rule changes, tool calls, LLM requests/responses, object creation, relation creation—is an event appended to the log; nothing mutates graph state directly.

Behaviors are reactive units that declare a subscription (event type + optional predicate + a Cypher-subset graph-shape pattern) and a body. When a matching graph change occurs, the runtime fires the body; the body may create objects/relations, call tools, or call an LLM. All outputs are logged as new events. Coordination is emergent: one behavior's output event triggers another behavior's subscription, with no orchestrator script.

Determinism contract for replay. Model calls are nondeterministic at first execution; the framework records both the request (content-addressed by hashing system message, user messages, model id, tool definitions, output schema) and the response as llm.requested/llm.responded events. On replay, matching-hash requests are served from this content-addressed cache—no new model calls. Replay runs in permissive mode (cache hits served, mismatches re-executed) or strict mode (event-by-event comparison; divergence raises a pinned error, functioning as an enforcement mechanism for the determinism contract).

Forking. A fork copies the parent log up to a cutoff event, then proceeds with an independent log. The shared prefix is replayed from cache (zero new model/tool calls); live execution resumes only from the cutoff. A structural diff then reports which objects, relations, and patches differ between parent and fork. A lighter frame primitive handles short-lived parallel sub-contexts that reconverge within one run.

Packs bundle object types, behaviors, tools, prompts, and policies for a domain; the shipped diligence pack runs fully offline against recorded fixtures.

Key Contributions

  • Event-sourced agent model: graph state is a deterministic fold over an append-only log; all agent action expressed as behaviors emitting events.
  • Determinism contract + content-addressed cache: makes any run byte-reproducible from its log; LLM/tool responses recorded under hash of request; replay serves them without new calls.
  • Forking + structural diff primitive: branches at any event; shared-prefix cost is cache-only (no re-execution); diff reports topology changes between runs.
  • End-to-end lineage: every object carries a provenance block (creating behavior, causing event, model-request event); typed relations link claims to questions, documents, and evidence—lineage is reconstructable from the log alone without side-channel metadata.
  • Worked reproducible example: diligence pack (3 companies, 671 events, 93 objects, 76 relations, 103 model calls, 48 tool calls) ships with fixtures; activegraph quickstart reproduces byte-identical logs offline.

Results

The paper makes no empirical task-performance claims. Reported figures are from the diligence demo:

  • 671 events; 93 objects (3 companies, 24 questions, 9 documents, 25 claims, 25 evidence items, 1 contradiction, 3 risks, 3 memos); 76 relations.
  • 103 model calls, 48 tool calls—all without orchestration code.
  • Run completes in under 30 seconds against pre-recorded fixtures; two runs produce byte-identical logs.
  • Full strict-replay baseline: comparison with conventional agent loops and memory-layer systems shown in architecture-property table (Table 1); ActiveGraph is the only system with "yes" across all seven properties (deterministic state reconstruction, exact replay, fork, cached fork prefix, structural diff).

Limitations

  • No performance/accuracy evaluation: contribution is architectural; whether the substrate improves task outcomes is undemonstrated.
  • Runaway cascade risk: reactive event loops can diverge or loop; the only defense is a per-run budget (event/behavior/model-call/cost caps)—a blunt instrument, not a static termination guarantee.
  • Replay cost scales with log length: no checkpointing or compaction yet; a million-event run replays in full.
  • Schema evolution burden: changing event or object types after events exist on disk requires migration tooling; acknowledged as an operational burden.
  • External-tool side effects: tools that mutate the outside world still mutate it on first execution; only the recorded response replays deterministically.
  • Concurrent/distributed writers: the append-only log is well-ordered for a single run; multi-agent contention over a shared graph raises unresolved ordering questions.
  • Determinism contract not statically enforced: a violating behavior is caught at replay/fork as a divergence error, not at write time.

Relevance to Harnesses / Meta-Harnesses

ActiveGraph is directly relevant as a runtime substrate for meta-harnesses: its append-only log with reactive behaviors is itself a generalized harness execution model where the "harness" is not a script but an emergent property of subscriptions. The fork-and-diff primitive operationalizes a key meta-harness need—cheap counterfactual evaluation of alternative orchestration strategies without re-paying for prior model calls—which is the core cost driver in multi-agent pipeline tuning. End-to-end lineage (goal → behavior → model call → artifact) addresses observability gaps common in harnesses that compose multiple LLM stages with lossy intermediate state. The self-improving agent affordance discussed in §7 maps directly to the meta-harness goal of harnesses that modify their own pipelines based on run outcomes, with fork-and-diff as the evaluation primitive.