EDGAR: Experience- and Graph-Guided Recovery for Tool-Using Agents

EDGAR (Experience- and Graph-guided Agent Recovery, arXiv:2612.05065) equips frozen LLM agents with an execution dependency graph, persistent fact ledger, and learned budget-aware recovery controller. Across ALFWorld, WebShop, CronQ, GAIA, FRAMES, and ToolMaze, EDGAR reaches 49.6% average offline success and 66.3% full-pipeline success, transferring cleanly across model backbones.
EDGAR: Experience- and Graph-Guided Recovery for Tool-Using Agents: EDGAR (Experience- and Graph-guided Agent Recovery, arXiv:2612.05065) equips frozen LLM agents with an execution dependency graph, persistent fact ledger, and learned budget-aware recovery controller. Across ALFWorld, WebShop, CronQ, GAIA, FRAMES, and ToolMaze, EDGAR reaches 49.6% average offline success and 66.3% full-pipeline success, transferring cleanly across model backbones. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.
- Highest 6-Benchmark Average With Frozen Weights: Reaches 49.6% average offline success (vs 41.7% ExpeL, 37.2% ReAct) and 66.3% full-pipeline success.
- Execution Dependency Graph Scope Selection: Computes downstream affected closure A_t(r) to prune corrupted branches without wiping valid upstream work.
- Persistent Fact Ledger Across Restarts: Retains verified observations across rollback, guided continuation, or reflective restart attempts.
- Cross-Backbone Experience Transfer: Memories and the 5-fold ensemble recovery controller transfer directly across different LLM backbones.
import { createAgent } from '@smoke-monkey/harness';// Configure a Smoke Monkey agent with explicit fact-ledger checkpointing & bounded recoveryconst agent = createAgent({agentId: 'edgar-recovery-worker',provider: 'openai-compatible',baseUrl: 'http://127.0.0.1:8000/v1',model: 'Qwen/Qwen3-32B',workspacePath: process.cwd(),permissions: {read_file: 'allow',write_file: 'ask',run_command: 'ask',},});async function main() {const result = await agent.run('Maintain a verified fact ledger across tool steps; if a dependency fails, roll back only the corrupted subgraph rather than restarting from scratch.');console.log('EDGAR Recovery Run:', result.summary);}main().catch(console.error);
Watch: Related Video Guides
GraphRAG for Law: Building Legal Reasoning Agents with Neo4j and LLMs
LangGraph: Planning Agents
How EDGAR Combines Execution Dependency Graphs With Episode Experience
EDGAR (arXiv:2612.05065, WWW ’27) is a frozen-model recovery framework that diagnoses mid-episode tool failures and selects among four actions: guided continuation, targeted dependency rollback, full restart, or reflective restart. Rather than discarding an entire conversation or replaying flat text logs, EDGAR constructs an execution dependency graph $V_t$ where each candidate revision root $r$ defines its affected closure $A_t(r) = \{r\} \cup \{j \in V_t : r \leadsto j\}$.
A verifier retrieves the closest positive ($\mathcal{M}^+$) and negative ($\mathcal{M}^-$) training episodes via BM25Plus to pinpoint whether an error originated in an upstream tool argument or a local reasoning step. Meanwhile, a persistent fact ledger preserves confirmed entities across recovery branches. Across six agent benchmarks under matched per-episode budgets, EDGAR outperforms ReAct, Reflexion, ExpeL, LATS, ReasoningBank, and AgentDebug:
| Method (Full-Pipeline / FP) | ALFWorld | WebShop | CronQ | GAIA | ToolMaze-val | ToolMaze-test | 6-Suite Avg. |
|---|---|---|---|---|---|---|---|
| ReAct | 95.3% | 42.2% | 87.3% | 47.9% | 42.3% | 41.7% | 59.4% |
| Reflexion | 95.6% | 42.5% | 87.3% | 50.9% | 42.3% | 41.7% | 60.1% |
| ReasoningBank | 95.7% | 41.5% | 92.0% | 49.1% | 43.0% | 42.8% | 60.7% |
| ExpeL | 96.4% | 46.2% | 92.6% | 49.7% | 45.3% | 46.2% | 62.7% |
| LATS (Search) | 83.3% | 43.2% | 86.9% | 48.5% | 38.8% | 36.4% | 56.2% |
| AgentDebug | 95.4% | 42.4% | 82.8% | 46.1% | 42.5% | 39.4% | 58.1% |
| EDGAR (Learned Controller) | 97.0% | 47.6% | 93.7% | 51.5% | 45.7% | 46.1% | 63.6% (66.3% Off.) |
Why Dynamic Recovery Scope Beats Fixed Retry or Full-Restart Policies
EDGAR's ablations explain why hard-coded retry rules stall on long-horizon tasks: removing episode experience drops CronQ offline accuracy from 80.5% to 64.7%, while forcing a fixed whole restart drops WebShop from 35.8% to 28.8%. The learned controller scores candidate recovery scopes using remaining LLM call budget $r(c) = Y(c) - \lambda_{\text{cost}} \max\{0, N_{\text{llm}}(c) - N_{\text{llm}}(\textsc{Stop})\}$ so the agent only rolls back when expected gain justifies remaining calls.
You can model dependency-closure rollback in Python before integrating with your agent orchestrator:
from collections import deque
def affected_closure(edges: dict[str, list[str]], root: str) -> set[str]:
"""Compute EDGAR A_t(r) = {r} union reachable downstream nodes."""
visited = {root}
q = deque([root])
while q:
node = q.popleft()
for nxt in edges.get(node, []):
if nxt not in visited:
visited.add(nxt)
q.append(nxt)
return visited
# Example: step_2 failed; step_1 fact ledger stays intact while step_2..step_4 roll back
graph = {"step_1": ["step_2", "step_5"], "step_2": ["step_3"], "step_3": ["step_4"]}
print("Prune nodes:", sorted(affected_closure(graph, "step_2")))Preserve Verified Facts Outside Mutable History
Storing verified tool outputs in a separate append-only fact ledger ensures dependency rollback never forces an agent to re-fetch already confirmed state.
Frequently Asked Questions
Q:Does EDGAR require fine-tuning the underlying LLM?
No. EDGAR operates on a frozen base language model by combining an execution dependency graph, BM25Plus episode memory retrieval, a verifier, and a lightweight 5-fold recovery controller.
Q:What recovery modes can the EDGAR controller choose?
The controller evaluates the diagnosis, remaining step budget, and prior outcomes to choose guided continuation, targeted dependency rollback, full restart, or reflective restart.
Q:How does EDGAR outperform LATS and Reflexion?
On matched per-episode budgets across ALFWorld, WebShop, CronQ, GAIA, FRAMES, and ToolMaze, EDGAR reaches 49.6% offline average (vs 39.4% Reflexion and 38.0% LATS FP) and 66.3% full-pipeline average.
Q:Can EDGAR episode memories transfer across different LLMs?
Yes. The paper demonstrates that episode experiences and controller policies learned on one backbone transfer to improve recovery on distinct LLM backbones.
Related Alternatives & Comparisons
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.