activegraph β€” A persistent world for long-running agents

Wednesday, May 20, 2026 AI
Read original

Scraped Article

v1.0 Β· open sourceMIT Β· Python 3.11+ # activegraph A persistent world for long-running agents. A shared graph of beliefs, tasks, evidence, decisions, and dependencies β€” derived from an append-only event log. Replay, fork, and diff any run. [$ pip install activegraph && activegraph quickstartrun β†’](https://github.com/yoheinakajima/activegraph) [Read the paper β†’](https://arxiv.org/abs/2605.21997) [Docs β†’](https://docs.activegraph.ai/) [Star on GitHub](https://github.com/yoheinakajima/activegraph) Get release notes Subscribe From [Yohei Nakajima](https://x.com/yoheinakajima), creator of BabyAGI (2023). activegraph is the architectural answer that years of agent infrastructure work kept pointing toward. relation\_behavior.py ``` from activegraph import Graph, Runtime, behavior, relation_behavior graph = Graph() runtime = Runtime(graph, budget={"max_events": 200, "max_seconds": 60}) # Behaviors react to events and write back to the graph. @behavior(name="planner", on=["goal.created"]) def planner(event, graph, ctx): research = graph.add_object("task", {"title": "Research", "status": "open"}) memo = graph.add_object("task", {"title": "Draft memo", "status": "blocked"}) graph.add_relation(research.id, memo.id, "depends_on") # Edges carry logic. This one knows how to unblock its target. @relation_behavior(name="unblock", relation_type="depends_on", on=["task.completed"]) def unblock(relation, event, graph, ctx): if event.payload["task_id"] == relation.source: graph.patch_object(relation.target, {"status": "open"}) runtime.run_goal("Evaluate this idea") runtime.print_trace() # Fork the run at any historical event. The shared prefix # replays from cache β€” no duplicate LLM calls. fork = runtime.fork(at_event=4) ``` relation\_behavior The differentiated primitive. Coordination logic lives on the edge, where the meaning is β€” not duplicated across every node that might emit a relevant event. runtime.fork(at\_event=…) Branches the run. The shared prefix replays from cache. Forks don't re-pay for LLM calls already made. // Try it through your AI assistant ## Paste this into Claude, ChatGPT, or your coding agent. ActiveGraph is designed to be learned by agents as well as humans. The docs, quickstart, trace, and fork/diff primitives give an assistant enough structure to build something real in minutes β€” not just agent-legible infrastructure, but infrastructure that an agent can pick up and use. prompt.txt ``` Look up activegraph.ai and docs.activegraph.ai. Install the activegraph Python package. Build and run a small experiment that shows why an event-sourced reactive graph is useful. Use fork/diff or replay if possible. Explain what happened and what the trace proves. ``` Works with any agent that can read a webpage, install a pip package, and run Python. // Agents need more than memory ## The event log is the agent. The graph is its world. Memory Stores what an agent might want to recall. Workflows Define what should happen next. Logs Record what happened afterward. ActiveGraph Collapses these into one substrate: anappend-only event logprojected into a live graph. The graph is the agent's world β€” what exists, what depends on what, what was produced, what was approved, what changed, and why. ## Latest - [2026-05-25/paper\\ \\ The Log is the Agent: Event-Sourced Reactive Graphs for Auditable, Forkable Agentic Systemsβ†—](https://arxiv.org/abs/2605.21997) - [2026-05-25/announcement\\ \\ activegraph 1.0 β€” agents that coordinate through replayable stateβ†—](https://x.com/yoheinakajima/status/2057099245430222926) [All posts β†’](https://activegraph.ai/blog) // Where it fits ## Not another agent framework. The world beneath one. Bring your model, tools, prompts, and workflows. ActiveGraph gives them durable state. Workflows model computation. ActiveGraph models the world that computation acts on. Memory remembers conversations. ActiveGraph holds beliefs, evidence, contradictions, decisions, and their lineage. ActiveGraph is where agent state becomes inspectable infrastructure. 1. Models Reasoning and generation 2. Tool frameworks Calling external systems 3. Workflows Sequencing work 4. Memory Retrieval and recall 5. ActiveGraphthis layer The shared world: objects, relations, events, lineage, replay, forks, diffs // What you can build ## Primitives the loop doesn't give you. Replay, fork, diff, lineage, edge logic β€” concrete things that become possible once the event log is the substrate, not a debugging artifact. 01 ### Auditable agents Every object, claim, decision, and tool result traces back to the event that created it. 02 ### Forkable runs Ask β€œwhat if we changed the threshold, policy, prompt, model, or approval rule?” without destroying the original run. 03 ### Reactive systems Behaviors fire when the graph changes. Coordination happens through shared state, not brittle chains of direct calls. 04 ### Edges with meaning A depends\_on, cont