Papers
Topics
Authors
Recent
Search
2000 character limit reached

Experience Graphs: The Data Foundation for Self-Improving Agents

Published 29 Jun 2026 in cs.DB, cs.AI, and cs.MA | (2606.29823v1)

Abstract: The database community has repeatedly advanced the state of the art by recognizing that new workloads demand new system architectures. We argue that long-horizon agentic tasks -- code generation, scientific discovery, hardware design -- are such a workload. These agents explore: they generate artifacts, execute tools, observe failures, branch, and repair over hundreds of steps. This search produces a structured object we call an experience graph: executable artifacts, tool outputs, rewards, sibling comparisons, and causal lineage. Yet existing agent frameworks treat this experience as disposable state -- JSON checkpoints and session logs that cannot be recovered after a crash, queried across users, or materialized into training data. We propose Trellis: a data foundation that treats the experience graph as first-class, governed, queryable database state. The core insight is that search over experience graphs is a database access pattern. Frontier selection is a query, cross-session reuse is vector-seeded graph retrieval, training-data extraction is a materialized view, and reconstructing what an agent knew at any past step is a time-travel query. When the database owns the experience graph, agents become stateless compute, and crash recovery, horizontal scaling, and a closed-loop training flywheel emerge as architectural byproducts. We ground the design in KernelEvolve, a production accelerator-kernel optimizer at Meta, where cross-session reuse reaches a target speedup roughly 10x faster at 52% lower token cost. More broadly, Trellis turns inference-time search from disposable computation into a durable institutional asset: logs made databases reliable; experience graphs may make agents cumulative.

Summary

  • The paper introduces Trellis, a database architecture that treats agents’ causal experience graphs—artifacts, rewards, failures, and search statistics—as governed, queryable state rather than disposable logs.
  • The paper shows that persistent experience graphs enable crash recovery, cross-session reuse, vector-seeded graph retrieval, time-travel queries, and database-generated SFT, DPO, and GRPO training views.
  • The paper reports 10× faster convergence and 52% lower token costs in KernelEvolve, while showing that excessive memory reuse can reduce exploration and anchor agents away from the best solution.

The case for experience graphs as database state

The paper argues that long-horizon agentic workloads—code generation, scientific discovery, hardware design, security research—constitute a new class of data management problem, and that the field's current treatment of agent exploration state as disposable logs is an architectural mistake. The authors, from Meta Platforms and the University of Maryland, propose Trellis, a data foundation that elevates what they call the experience graph—the causal tree of attempts, artifacts, tool outputs, rewards, sibling comparisons, and mutable search statistics produced by agentic search—to first-class, governed, queryable database state. Their central thesis is stated crisply: search over experience graphs is a database access pattern. Frontier selection is a query; cross-session reuse is vector-seeded graph retrieval; training-data extraction is a materialized view; replaying what an agent knew at any past step is a time-travel query. Once the database owns the graph rather than the agent process, crash recovery, horizontal scaling, and a closed training loop emerge as byproducts of the architecture rather than engineered features.

The argument follows the classic "one size does not fit all" lineage: transaction processing, warehousing, streaming, and graphs each became distinct research areas once their access patterns were named precisely. The authors position long-horizon agentic search as the next such workload, grounded in production evidence from KernelEvolve, Meta's accelerator-kernel optimizer.

Self-improving agentic systems as two loops over shared state

The paper defines a self-improving agentic system—a concrete instantiation of recursive self-improvement (RSI)—as three components: an inner loop of skill-driven agent sessions (Claude Code, Codex, or any tool-using LLM) that consume context, generate candidate artifacts, execute them in sandboxes, and persist structured results before terminating statelessly; an outer loop that selects frontier nodes according to a search policy (one-shot, linear, greedy, MCTS, evolutionary), assembles ancestor/sibling/failure context, invokes the inner loop, and records results; and a persistent data substrate holding everything both loops produce.

A notable conceptual contribution is the reframing of the outer loop as a control plane rather than any single algorithm. One-shot, greedy, MCTS, and evolutionary strategies are policies over the same substrate, differing only in how they decide which node to expand next; heterogeneous harnesses collaborating on one tree are another point on the same spectrum. What is invariant is the data interface through which every policy reads frontiers and writes results.

The architectural payoff mirrors storage–compute disaggregation: because every node, reward, and frontier pointer lives in the store, agents become disposable serverless compute. Any worker can claim any frontier node; a crashed worker loses at most one inner-loop invocation. The paper sharpens this by treating externalization granularity as a tuning knob—the inner-loop session itself becomes resumable state referenced by each node, so interrupted sessions are reattached rather than restarted—and recovery holds at either extreme.

Why existing memory tiers are insufficient

Production agents have converged on three persistent memory tiers: declarative facts (CLAUDE.md, MEMORY.md), procedural skills, and episodic transcripts, often with distillation pipelines ("dreaming" passes, curators). The paper's claim is that these tiers capture knowledge—what the agent knows—while long-horizon search produces a structurally different object: a reward-bearing causal tree of what search tried. The distinction is made concrete across seven dimensions:

Dimension Episodic memory Experience graph
Records Transcripts Executable artifacts + objective rewards
Structure Flat text chunks Tree/DAG with parent links, rewards, siblings
Retrieval Keyword/vector similarity Graph traversal + vector + structured filters
Mutability Append-only Mutable visit counts, UCB scores, island IDs
Time travel None CDC changelog → AS-OF reconstruction
Training Not extracted SFT/DPO/GRPO views
Sharing Per-agent, per-machine Governed, cross-user, cross-session

Three intrinsic properties distinguish RSI traces from retrieved documents: causality (a failure's value depends on its parent plan and successful sibling—a path query, not similarity search), executability (memories are programs and test cases to be replayed and diffed), and reward (every node carries objective feedback, making memory an experience buffer for both search and training). Two substrate requirements complete the picture: collectivity (one engineer's discovery should seed all future sessions across all tiers) and governance (policies must propagate to derived artifacts—embeddings, distilled skills, training views).

The resulting access pattern is genuinely novel: append-heavy writes mixed with localized multi-hop path updates (MCTS backpropagation), plus four read modalities—ordered scans, multi-hop traversal, vector similarity, and full scans. No existing OLTP, OLAP, graph, or vector system targets this combination. A vector store cannot answer which sibling approach succeeded where this one failed; a JSON checkpoint cannot support ten concurrent workers on one tree.

The Trellis architecture

Trellis separates a unified logical model from heterogeneous physical backends. The logical model is a four-level relational hierarchy—tasks, sessions, nodes, prompt histories—with algorithm-agnostic metadata fields (UCB scores coexisting with evolutionary generation/island fields), task-description embeddings for similarity search, and large artifacts in object storage linked by reference. Context is managed substrate state: the prompt-history table supports both trajectory replay and cheap parent-session inheritance or graph-based ancestor reconstruction, making context durable and shared rather than trapped in a live process.

Physically, a stateless engine (Axiom, a cost-based optimizer over Velox) plans SQL, Cypher, and vector retrieval into single physical plans routed to an operational store (sub-50 ms frontier queries), a vector index, and a columnar warehouse—all over one schema. Cypher exposes virtual parent–child edges over foreign keys, avoiding a separate edge table. Skills and declarative memory live as versioned FUSE-mounted artifacts, converting machine-local distillation into governed, audited updates with provenance.

Two mechanisms deserve emphasis. First, vector-seeded graph expansion: approximate nearest-neighbor retrieval over task embeddings seeds relational joins to sessions and high-fitness nodes, then variable-length traversal expands top-kk candidates into full trajectories—one optimizable statement replacing the four service calls (vector RPC, filter query, traversal, scope check) that today's agents stitch per step. Second, multi-version state via CDC: since backpropagation mutates visit counts and UCB scores in place, every field-level mutation is logged against a logical step number (evaluation order, not wall-clock time). This is not merely observability—it is a correctness requirement for training, since reconstructing trajectories from final state would leak future information into examples.

On concurrency, the paper observes a mixed isolation profile: durability required on node insertion, eventual consistency tolerable on UCB statistics (stale scores cause suboptimal selection, not incorrectness). It concedes this profile does not map cleanly to standard OLTP levels and leaves formalizing it open.

Training data as queries

Training-data collection becomes view materialization rather than log scraping. Root-to-leaf paths through non-buggy high-fitness nodes yield SFT trajectories, read AS-OF each node's own step. DPO preference pairs fall out of a sibling pattern match where fitness differs by a margin. Most strikingly, GRPO group-relative training collapses multi-turn rollout cost: instead of generating many full trees (hours to days each), the system samples a state from the persistent buffer, generates NN children, evaluates, computes group-normalized advantages via SQL window functions, trains, and appends one canonical node back. The same store also defines the state space for learned value models over the outer loop itself, conditioning on graph features—ancestor rewards, sibling diversity, failure signatures, artifact diffs—rather than token sequences. The closed loop raises a governance obligation the paper flags but does not solve: retractions of source nodes must propagate through derived training views under potentially divergent access policies.

Production measurements from KernelEvolve

KernelEvolve, built on Trellis, optimizes kernels across NVIDIA, AMD, MTIA, and CPU targets and has delivered over 60% inference throughput improvement on production ranking/recommendation workloads. Three preliminary results are reported (averaged over three independent sessions per configuration):

  • Recovery: crashed sessions resume automatically on other workers with zero lost nodes—inherited from database-native state rather than engineered.
  • Cross-session reuse: with model, step budget (100 steps), workers, and greedy strategy fixed, injecting similar prior nodes at rate pp cuts buggy-node rates from 55% to 34% (p=0.1p{=}0.1) and 21% (p=0.5p{=}0.5), raises valid-node fractions from 79.5% to 90.8% and 100%, and reaches a 1.2× speedup within ~5 steps versus 51 cold-start steps—a 10× convergence acceleration at 52% lower token cost per valid solution, driven largely by avoiding expensive debug-retry loops.
  • The exploration–anchoring tradeoff: this is the paper's most candid finding. At p=0.5p{=}0.5, reuse suppresses diversity—the agent collapses onto 8 strategy combinations versus 20 cold-start, and the single best solution comes from no memory (1.49× vs. 1.36×). Memory accelerates and stabilizes search but unbounded reuse anchors it away from the global optimum, making injection policy a first-class retrieval-planning question.

The generality claim is exercised, not merely asserted: retargeting Trellis from kernel optimization to MTIA silicon validation required changing only the fitness function and skills, with coverage-guided bug-hunting tracked via an ISA coverage matrix; the infrastructure carried over unchanged.

Limitations and open problems

The paper is explicit about its evidentiary boundaries: measurements are preliminary, averaged over only three sessions per configuration given LLM sampling variance, with a fuller evaluation deferred. Several research questions are left open, and the authors frame them as an agenda for the data management community:

  • Multi-modal query planning: no existing planner has a cost model composing vector selectivity, join fan-out, and traversal cost; cross-modal statistics do not exist.
  • Consistency semantics: formalizing the mixed isolation profile of concurrent tree search, and bounding how relaxed consistency degrades search quality.
  • Physical design: no row/column/LSM/graph-native layout is optimized for the combined workload.
  • Governed view maintenance: propagating retractions through derived views under divergent policies.
  • Retrieval policy: whether injection should be fixed, decayed, or chosen per query from match confidence; how to score memory quality and detect stale entries that reinforce past mistakes.
  • Bi-temporal memory: the change log versions along evaluation order only; separating valid time from transaction time would enable late corrections and distillation audit.
  • Multi-agent institutions: transactional semantics for "scientific societies" of ideator/builder/reviewer/distiller agents remain undesigned.

Relation to prior work

The positioning is careful. Against MemGPT, Trellis claims the complementary role: MemGPT is a transport layer between context and external memory; Trellis is the storage engine underneath. Graphiti is acknowledged as closest in spirit but aimed at enterprise conversational memory without CDC, training views, or a fused graph-native query layer. RSI systems (AlphaEvolve, FunSearch, AIDE, AI Scientist-v2, OpenEvolve) are cited as proof that long-horizon exploration works while keeping traces as application state. Experiment trackers (MLflow, ModelDB, Goods) are distinguished as offline sidecar registries that cannot serve sub-50 ms frontier queries, model mutable search statistics, or provide AS-OF reconstruction. Meta-harness orchestrators (Omnigent, Sakana Fugu) operate at the control plane; the data plane they presuppose is precisely the gap claimed here.

Conclusion

This paper makes a disciplined systems argument: the experience graph generated by self-improving agents has properties—causality, executability, reward-bearing mutability, temporal versioning—that no existing memory abstraction or database system serves, and naming it as a database workload yields concrete architectural dividends demonstrated in production. Its strongest quantitative result (10× faster convergence, 52% lower token cost) is tempered by its own honest disclosure of the anchoring tradeoff and thin statistical support. Whether the proposed agenda—multi-modal planning, tree-search consistency, bi-temporal semantics, institutional databases for agent societies—matures into a distinct database research area, as the authors intend, remains the question the paper poses to the community.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Tweets

Sign up for free to view the 6 tweets with 4 likes about this paper.