Active Graph Agent Runtime (BabyAGI 4) — Yohei Nakajima, Untapped Capital

Yohei Nakajima, creator of BabyAGI, introduces ActiveGraph, a novel agent architecture that builds around an immutable event log rather than the LLM. This log-centric approach enables auditable agents with native replay, rollback, and self-improvement capabilities, drawing inspiration from blackboard systems and Kafka.

5 min read
Active Graph Agent Runtime (BabyAGI 4) — Yohei Nakajima, Untapped Capital
source: https://www.youtube.com/watch?v=khVX_BUnEwU

Yohei Nakajima introduces ActiveGraph, an open-source, experimental approach to building agents that fundamentally shifts the architectural paradigm from LLM-centric to log-centric. Building on insights from three years of iterating on BabyAGI, Nakajima argues that current long-running agents break, and the goal should be to build the simplest thing that can build itself.

The “Log is the Agent” Paradigm

Unlike conventional agent designs that build around the LLM and then bolt on memory and logging, ActiveGraph proposes building around an immutable event log. This log serves as the single source of truth, flattening every action and every change to the agent into a sequence of typed events. This ground truth then projects a graph representing the agent’s state. Key characteristics and benefits of this approach include:

  • Ground Truth and Auditability: The immutable event log provides a complete, auditable history of the agent’s actions and changes, giving replayability, rollbacks, and the ability to fork agent states natively.
  • Shared State Communication: LLMs within ActiveGraph do not directly communicate with each other; instead, they interact exclusively through this shared, global state—an idea inspired by 1970s blackboard systems and modern distributed systems like Kafka.
  • Typed Event Log: The log is typed and clean, ensuring clarity and structure for all events.

Core Components of ActiveGraph

ActiveGraph is built upon several foundational components:

  • Behaviors: These react to graph changes (events) and, in turn, emit new events, updating the agent’s state. Behaviors can be deterministic or incorporate LLMs, forming the building blocks of the agent’s intelligence.
  • Policies: These define rules for how the graph can be modified. Policies dictate whether a change requires human intervention, specific tests (e.g., contradiction checks for facts), or is permissible for the agent to enact autonomously. This allows for controlled self-modification.
  • Views: Context management is handled programmatically as graph queries, allowing behaviors to access relevant subsets of the graph as their context.
  • Packs: Object schemas, tools, and behaviors can be assembled into modular “packs” with associated policies. These packs (e.g., memory pack, chat pack, tool pack) define the agent’s capabilities and can be swapped or combined, offering a different form of modularity than traditional “skills.”

Experimental Validations and Self-Improvement

Nakajima conducted several experiments to validate ActiveGraph’s efficacy:

  • Memory as Log: The log itself can serve as memory, leveraging its structured nature alongside embeddings. An unexpected benefit was the resilience to API key failures during long runs, as the agent could roll back and resume from the exact point of interruption, eliminating the need to restart lengthy evaluations.
  • Reference Agents: Coding and research agents built on ActiveGraph natively produced detailed event logs and evidence graphs, providing inherent transparency without explicit design for these features.
  • Regimes (Controlled Self-Modification): This experiment involved an agent classifying failure types, proposing self-modifications, and then subjecting these proposed changes to sandbox tests across many trials. Only changes that demonstrated a statistically significant improvement in accuracy were accepted, leading to modest but real gains and a clear understanding of what worked and what didn’t.
  • ActiveGraph Lab: A self-improving agent that reads blog posts, proposes experiments, runs them, and even identified and fixed a bug in its own codebase by submitting a pull request. It also discovered the modularity of ActiveGraph packs across different repositories.
  • Pokémon Card Competition: Using ActiveGraph, an agent iteratively improved its deck-building strategy by simulating thousands of games for each proposed change and only accepting those that increased its win rate above a certain statistical threshold. This systematic approach provided detailed reports and, crucially, tracked failed experiments, a significant improvement over typical YOLO (You Only Live Once) agent development.

Surprises and Future Hypotheses

Nakajima highlights several unexpected benefits and a new hypothesis:

  • AI’s Architectural Preference: AI appears to be better at architecting agents using this log-centric, shared-state approach, possibly because decades of data on blackboard and Kafka-like systems are in its training data, in contrast to the nascent field of LLM-based agent architectures.
  • Debugging Shift: Debugging naturally shifted from session logs to querying the ActiveGraph database, as all relevant information is cleanly logged and typed within the system.
  • Experiential World Model: Long-running agents might require not just a predictive world model (like priors) but an “experiential world model” derived from their own immutable event log, akin to how the hippocampus processes experiences and integrates them back into our priors through replay and dreaming. This suggests that the agent’s identity and beliefs could be fundamentally derived from its own log, rather than solely its reasoning capabilities.

Share post

Stay In The Loop! Subscribe to Our Newsletter.

Get updates straight to your inbox. No spam, just useful content.

Recommended for You

Your agent architecture has a half-life of 6 months — Dan Farrelly, CTO, Inngest

Your agent architecture has a half-life of 6 months — Dan Farrelly, CTO, Inngest

Dan Farrelly, CTO of Inngest, addresses the rapid obsolescence of AI agent architectures (a 6-month half-life) caused by fast-evolving models and frameworks. He proposes a solution: decouple agent systems into three conceptual layers (Execution, Context, Compute) and prioritize a stable, durable Execution Layer. This 'brain' layer, responsible for flow, state, and retries, offers resumability, flexible invocation patterns, and comprehensive observability, allowing the 'knowledge' and 'hands' layers to change frequently without necessitating full architectural rewrites.

Fable 5 as Advisor: Anthropic's Two-Model Pattern for Smarter, Cheaper Agents (Ep. 1010)

Fable 5 as Advisor: Anthropic's Two-Model Pattern for Smarter, Cheaper Agents (Ep. 1010)

The episode explores Anthropic's "advisor strategy," a novel AI agent pattern that combines a fast, cheap "executor" model with a frontier-class "advisor" model. This allows for mid-task consultation within a single API call, resolving the tension between cost and capability. Benchmarks show simultaneous improvements in quality and cost reduction, demonstrating that AI progress is shifting towards intelligent model composition rather than just larger models.