LedgerAgent: Structured State for Policy-Adherent Tool-Calling Agents

Md Nayem Uddin, Amir Saeidi, Eduardo Blanco, Chitta BaralarXiv 2026

Building reliable LLM agents for complex, multi-turn tasks—like customer service—is notoriously difficult. Even the most capable models often trip over their own feet, forgetting a crucial piece of information from five turns ago or confidently executing a tool call that violates a clear business policy.

A new paper from researchers at Arizona State University and the University of Arizona introduces LedgerAgent, an inference-time framework that moves away from the "implicit state" paradigm of standard agents toward a more structured, deterministic approach to state management and policy adherence.

TL;DR

LedgerAgent improves tool-calling reliability by maintaining an explicit, structured "ledger" of task state and enforcing a deterministic "policy gate" before any environment-changing actions are executed. It significantly boosts consistency ($pass^k$) across multiple domains and models without requiring additional training or extra LLM calls.

What Problem Does This Paper Address?

Most current LLM agents rely on a "prompt-only" approach: they append tool outputs and user messages to a growing transcript. This forces the model to implicitly reconstruct the current state of the world (e.g., "Is this order refundable?") from a messy history every time it needs to act.

This leads to two primary failure modes:

  1. State Grounding Failures: The agent retrieves the correct information but later makes a decision based on stale, missing, or misremembered data buried in the context window.
  2. Policy Violations: An agent might issue a syntactically perfect tool call (e.g., cancel_reservation(id="123")) that is logically forbidden by domain rules (e.g., the flight is less than 24 hours away).
Figure 1: A standard agent retrieves a reservation record but later issues a policy-violating cancellation because the relevant state remains implicit in the prompt. LedgerAgent stores successful tool returns in a schema-anchored ledger and checks proposed environment-changing calls against this observed state before execution. In this example, the stored reservation state allows the gate to block the cancellation and return policy-grounded feedback.

Methods

LedgerAgent introduces two deterministic components into the agent loop:

  • The Ledger: Instead of just letting tool returns sit in the transcript, LedgerAgent projects successful "read" tool outputs into a schema-anchored, typed dictionary. This ledger acts as a "source of truth" that is rendered back into the prompt at every turn, ensuring the model always sees a clean, structured view of the current task state.
  • The Policy Gate: This is a "bouncer" for environment-changing (write) actions. Before a tool like issue_refund is executed, the gate evaluates the proposed call against a set of deterministic predicates (code-based rules) using the data currently in the ledger. If a rule is violated, the gate can either BLOCK the action entirely or return a REVISE verdict, giving the model feedback to correct its plan.

Crucially, these components are deterministic and require no additional LLM calls, making the method highly token-efficient compared to "multi-agent" or "reflection" based scaffolds.

Datasets

The authors evaluated LedgerAgent across four customer-service domains:

  • $\tau^2$-bench: Includes Airline, Retail, and Telecom domains. These involve complex multi-turn interactions and, in the case of Telecom, "dual-control" settings where the user can also change the state.
  • $\tau$-Trait: Includes a Telehealth domain, testing the agent's ability to handle structured tool use in a medical context.

Key Insights and Ideas

  • State Grounding is the Bottleneck: The error analysis reveals that agents often fail not because they can't use tools, but because they lose track of the facts. By making the state explicit, LedgerAgent removes the cognitive load of "reconstruction" from the LLM.
  • Consistency Matters More Than Accuracy: The paper highlights that standard agents are often inconsistent—they might succeed in one trial but fail in the next three. LedgerAgent’s biggest gains appear in $pass^4$ metrics, indicating it makes agents much more predictable.
  • Policy as Code, Not Just Prose: While LLMs are good at following instructions, they are not perfect. Moving policy enforcement to a deterministic code layer (the Policy Gate) provides a hard safety boundary that natural language prompts cannot guarantee.

Key Results

LedgerAgent was tested across a variety of models, including GPT-4, GPT-5 (preview), Kimi K2.5, GLM-5, and MiniMax M2.5.

  • GPT Performance: For GPT-4.1 and GPT-5.2, LedgerAgent improved average $pass^1$ by 12.2 and 15.5 points, respectively.
  • Consistency Gains: The improvements were even more pronounced for $pass^4$, showing that the structured state helps the model arrive at the correct answer more reliably across independent runs.
  • Environment-Changing Tasks: On tasks requiring at least one "write" action (where the stakes are highest), LedgerAgent consistently outperformed the baseline across all models.
Figure 2: Pass^k results for GPT backbones. Higher pass^k indicates that the agent solves the same task more consistently across independent trials.
Figure 3: Performance on tasks that require at least one environment-changing tool call, defined as a tool call that modifies external system state, such as updating an order, issuing a refund, changing a reservation, or modifying an account. LEDGERAGENT improves both pass^1 and pass^4 on this write-action subset, indicating better reliability when task success depends on modifying external state.

Limitations and Future Work

While powerful, LedgerAgent is currently designed for structured tool-use domains. It assumes that tool returns can be mapped to a stable schema (like users, orders, or reservations). It is less directly applicable to tasks involving primarily unstructured data (like long-form documents or images) or latent states that aren't observable via tools.

Furthermore, the "Policy Gate" currently relies on manually defined predicates. A promising future direction is the automatic induction of these policy rules from natural language documentation, which would make the system easier to deploy in new, complex domains.

Summary updated

BibTeX
@misc{uddin2026ledgeragent,
  author = {Md Nayem Uddin and Amir Saeidi and Eduardo Blanco and Chitta Baral},
  title = {{LedgerAgent: Structured State for Policy-Adherent Tool-Calling Agents}},
  year = {2026},
  eprint = {2606.20529},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.20529},
}
Figure