Source-linked AI summary

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

Yohei Nakajima

arXiv:2605.21997v1cs.AIcs.MA

TL;DR

Conventional agents scatter state across prompts, code, tool records, transcripts, outputs, and lossy memory, making important history and counterfactual questions awkward or impossible to recover. ActiveGraph makes an append-only event log the source of truth and derives a reactive graph from it. A worked investment-diligence example shows a reproducible causal chain from goal to memo, while the paper presents no large-scale task-performance evaluation.

  • Problem

    Agent state is fragmented across prompts, code, framework state, transcripts, outputs, and lossy memory, making key history and counterfactual questions awkward or impossible to recover.

    Source: §2 · pp. 2–3
  • Method

    ActiveGraph stores agent state and actions as events in an append-only log, then deterministically projects the log into a graph that reactive behaviors read and update.

    Source: §1 · p. 2
  • Results

    The worked investment-diligence pack is fully reproducible, with its entire causal chain from goal to memo recoverable from the event log.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The paper demonstrates architectural mechanisms rather than measurable downstream task-performance advantages.

    Source: §9 · p. 11

    The paper reports no large-scale empirical evaluation of task performance; its quantitative artifacts demonstrate the mechanism rather than benchmark results.

    Source: §9 · p. 11

Abstract

from arXiv · show

Most agent frameworks are built around the language model: a conversation loop comes first, then tools, then rules, and finally a logging layer bolted on for observability, with state persisted as retrievable "memory." We describe ActiveGraph, a runtime that inverts this arrangement. The append-only event log is the source of truth; the working graph is a deterministic projection of that log; and behaviors--ordinary functions, classes, LLM-backed routines, or logic attached to typed edges--react to changes in the graph and emit new events. No component instructs another; coordination happens entirely through the shared graph. This single design decision yields three properties that retrieval-and-summarization memory systems do not provide: deterministic replay of any run from its log, cheap forking that branches a run at any event without re-executing the shared prefix, and end-to-end lineage from a high-level goal down to the individual model call that produced each artifact. We present the architecture, a determinism contract that makes replay sound, and a worked diligence example whose full causal structure is reconstructable from the log alone. We discuss--without claiming to demonstrate--why this substrate is unusually well suited to self-improving agents, and how it extends the BabyAGI lineage and prior graph-memory research.

1 Introduction

Conventional agents treat logs as audit byproducts, while ActiveGraph makes an append-only event log the source of truth and derives graph state through deterministic replay. The paper presents this architecture and its replay and forking mechanisms, illustrates lineage in a reproducible diligence example, and does not claim task-accuracy improvements.

Architecture

  • ActiveGraph replaces transient agent state with reactive behaviors over a shared graph, whose state is a deterministic projection of the append-only event log.This re-expresses the BabyAGI task loop as reactive behaviors and makes transient state durable, inspectable, and replayable.Source: §1 · p. 2

Replay

  • A determinism contract and content-addressed cache make runs byte-reproducible from their logs without new model or tool calls during replay.The cache records model and tool responses; replay uses those recorded responses rather than assuming model calls are reproducible.Source: §1 · p. 2

Forking

  • Forking branches a run at any event and supports structural comparison without re-executing the shared prefix.The primitive supports counterfactual questions about changing an earlier action.Source: §1 · p. 2

Worked example

  • The worked investment-diligence example is fully reproducible, with its entire causal chain from goal to memo recoverable from the event log.The authors present lineage as a first-class deliverable.Source: §1 · p. 2

Scope

  • The paper presents architectural contributions, not evidence that ActiveGraph improves task accuracy over a baseline.Self-improving agents are discussed as an architectural affordance, not demonstrated or evaluated.Source: §1 · p. 2

2 Motivation: built around the model versus built on the log

Conventional agent architectures scatter state across prompts, code, framework state, transcripts, outputs, and lossy memory, leaving key history and counterfactual questions awkward or impossible to recover. ActiveGraph puts these elements in one ordered event log and treats the graph as its projection.

Conventional architecture

  • Conventional agents scatter objectives, rules, tool calls, traces, outputs, and lossy memory across separate stores.The log is typically an audit byproduct rather than the substrate of computation.Source: §2 · p. 2

One substrate

  • ActiveGraph represents rules, tool calls and responses, produced claims, and evidence links as events in one ordered log.Replay folds the log into a graph projection of typed objects and relations.Source: §2 · p. 2, Figure 1 · p. 3

Queries over history

  • Questions about why a fact entered the working set, what preceded a rule change, or what another branch would yield become queries or re-projections of the log.These questions are awkward or impossible in the conventional architecture.Source: §2 · p. 3

Architectural motivation

  • The contribution recombines established event-sourcing and reactive-recomputation ideas for long-running agents, where model calls complicate replay and counterfactual forks.The paper describes this application as non-obvious and argues that its payoff is unusually valuable.Source: §2 · p. 3

3 Architecture

ActiveGraph treats an append-only event log as the source of truth and rebuilds graph state by deterministic replay. Behaviors react to graph changes and emit events, making coordination data-driven rather than script-sequenced.

  • The graph is a projection of the event log, rebuilt by folding events forward so repeated replays produce identical state.Source: §3 · pp. 3–4
  • In the captured run, each created object’s provenance identifies the behavior and event that caused it.Source: §3 · p. 5
  • Behaviors subscribe to event and graph patterns, then run as functions, classes, LLM-backed routines, or logic attached to typed edges.Source: §3 · p. 5
  • Graph-shape subscriptions, relation-behaviors, and topology diffs make the graph useful for reactivity and comparison, while the log supplies reproducible state.Source: §3 · p. 5
  • Coordination emerges when one behavior’s output matches another’s subscription, replacing an external control-flow script without eliminating coordination.Source: §3 · p. 6
  • The determinism contract bars behaviors from using unrecorded randomness, time, UUIDs, external I/O, or changing global state; model responses are recorded for deterministic replay.Source: §3 · p. 6

4 Replay and determinism

Replay reconstructs graph state from the event log, with deterministic identity guaranteed for a given log. Recorded model and tool responses, alongside replay modes, let the runtime check reproducibility without assuming model calls are deterministic.

  • Given a log, replay deterministically reconstructs identical graph state on every run.Source: §4 · pp. 6–7
  • Content-addressed model and tool responses are served from the log during replay, avoiding new calls when request hashes match.Source: §4 · p. 7
  • The recorded response makes replay deterministic, but the paper does not claim that live agent execution or model inference is reproducible.Source: §4 · p. 7
  • Strict replay compares re-fired behaviors’ events against the recorded stream and reports the first divergence; permissive replay can make fresh calls when hashes differ.Source: §4 · p. 7

5 Forking and structural diff

A fork branches a run at a chosen event, retaining the shared prefix and continuing in an independent log. Replaying rather than re-executing that prefix makes forks inexpensive, while shared event IDs and structural diffs make lineage verifiable.

  • A fork copies the parent’s events through a chosen cutoff, then continues independently so the runs can be configured and compared without changing the parent.Source: §5 · p. 8
  • Forks replay the shared prefix from cache rather than rerunning behaviors or making model and tool calls, so only post-cutoff execution is new.For a 200-step run forked at step 150, the first 149 steps, including model calls, are free.Source: §5 · p. 8
  • Matching event IDs through the cutoff verify parent-fork lineage, and structural diff reports changed objects, relations, and patches.Source: §5 · p. 8
  • Frames suit short-lived branches that reconverge within one run; forks suit branches needing independent persistence, inspection, or diffing.Source: §5 · p. 8

6 Worked example: a diligence pack

The diligence pack runs due diligence from a company name through questions, research, claims, evidence, risks, and a memo. Its recorded-fixture demonstration is reproducible, and its central deliverable is a log-reconstructable chain from goal to each claim’s source.

  • The bundled quickstart runs offline against recorded fixtures, needs no API key, and produces byte-identical logs across runs.It completes in under thirty seconds; these counts are specific to the bundled quickstart pack.Source: §6 · p. 8
  • 671 events produced 93 objects and 76 relations across three companies, using 103 model calls and 48 tool calls without orchestration code.Source: §6 · p. 9
  • Each memo claim links its creating behavior and model request to the triggering event, question, source document, and supporting evidence.Source: §6 · p. 9

7 An architectural affordance for self-improving agents

ActiveGraph makes self-modification part of logged state, enabling audit, rollback, and fork-and-diff comparisons. The paper presents these as affordances, not evaluated self-improvement results.

7 An architectural affordance for self-improving agents

  • The paper does not present or measure a self-improving agent; turning these affordances into a working system remains future work.The authors claim only that the substrate removes specific obstacles to self-improvement.Source: §7 · p. 9
  • Logged rules and behaviors make self-modification replayable, allowing audit and rollback to a run before the change.Strict replay also reveals how behavior diverged after modification.Source: §7 · p. 9
  • Fork-and-diff can compare a proposed change with its parent without repaying for the shared history.The proposed change is applied in a fork that is run forward and structurally diffed against the parent.Source: §7 · p. 9

8 Related work

ActiveGraph draws on event sourcing, reactive dataflow, blackboard systems, and the BabyAGI lineage, while treating the log—not a memory layer—as the agent’s primary substrate. Its related-work discussion locates the contribution in applying these ideas to agentic systems that include nondeterministic model calls.

8 Related work

  • Unlike layered memory systems [2], [3], [4], [5], ActiveGraph makes the log primary, yielding total provenance and exact replay; prior graph-memory research motivated this inversion.The cited systems improve personalization and context carry-over but retain a dedicated memory layer feeding an otherwise stateless model.Source: §8 · pp. 9–10
  • ActiveGraph applies event sourcing and reactive dataflow to agents with nondeterministic model calls, handled through a content-addressed response cache.The paper identifies the underlying mechanisms as established data-systems patterns rather than new contributions.Source: §8 · p. 10
  • Blackboard systems share the model of independent sources reading and writing shared state; ActiveGraph adds an event-sourced substrate for replay, forks, and traceability.The paper argues that LLM-backed behaviors and natural-language or generated coordinating logic address constraints of older blackboard systems.Source: §8 · p. 10
  • ActiveGraph is a direct architectural successor to BabyAGI, replacing its mutated global task list with state projected from an append-only event log.It preserves BabyAGI’s task-generating, self-extending character while making steps durable, inspectable, and replayable.Source: §8 · p. 10

9 Limitations and conclusion

The authors identify operational limits and costs, including replay overhead and unresolved ordering for concurrent or distributed writers. They conclude that the log-based design provides replay, counterfactual forks, and lineage for long-running agents that must be explained, reproduced, and revised.

9 Limitations and conclusion

  • A per-run budget halts runaway cascades but does not guarantee termination; replay currently processes the full log, and concurrent or distributed writer ordering is unresolved.Schema evolution remains an operational burden, and recording side-effecting tool responses makes replay deterministic without undoing the tool’s initial external effect.Source: §9 · p. 10
  • The determinism contract burdens behavior authors and is enforced dynamically; recording responses consumes storage, and prompt-changing forks re-execute affected calls.The paper reports no large-scale task-performance evaluation; its quantitative artifacts demonstrate mechanisms rather than benchmark performance.Source: §9 · p. 11
  • For long-running agents that must explain, reproduce, and revise their actions, the log-based design combines deterministic replay, counterfactual forks, and lineage from goal to output.The authors present these properties as the point of the architecture, not as measured downstream task advantages.Source: §9 · p. 11
Loading 2605.21997v1…