← All papers
First page of Agenra: A Language and Verified Core for Stateful LLM Agent Authorization

Agenra: A Language and Verified Core for Stateful LLM Agent Authorization

Basavesh Ammanaghatta Shivakumar, Swarn Priya, Peng Gao

cs.CR Aug 24, 2026 · v2
Implements the agent authorization monitor as a compiled Lean core with proofs of client preservation under policy revisions, and Lean-checked simulation certificates for finite-quota revisions.
Applications that deploy LLM agents keep revising the permissions their agents use. When authority is consumable, even widening a permission can break a legitimate workflow, because an early call may use up a grant that a later call needs. Checking individual requests, or watching one run succeed, misses this. We present Agenra, a policy language with a Lean enforcement core that tracks the values each call uses, resources discovered at run time, and authority consumed by earlier calls. Agenra treats safety and workflow preservation as separate properties. Our key idea is to certify a revision with a simulation between the old and new permission ledgers. Quota increases, appended grants and independent reorderings admit such simulations by construction, and Lean checks proposed simulations for other finite-quota revisions. The proofs use the deployed matching predicates and extend through the full monitor, covering discovered resources, payloads that are never enumerated, failed calls and approvals. They assume serialized calls and identical service results under both policies, and they trust the Python translation layer. On 51 authored revisions, the checks certify all 21 that preserve their clients and none of the 30 that do not, and every lost workflow is confirmed by replay. They also certify a real quota increase from an open-source agent application. In a report-delivery application, raising the send quota preserves every client yet permits a second approved send, so preservation does not imply safety.

Applications deploying LLM agents frequently revise agent permissions. With consumable authority such as quotas, even widening a permission can break legitimate workflows or admit forbidden effects. Checking individual requests or single runs does not detect these failures.

Agenra is a policy language covering effects, usage limits, trusted lookups, data-flow labels and argument origins. Every call is checked by a compiled Lean enforcement core before Python invokes the tool. Revisions are certified by simulations between old and new permission ledgers. Quota increases, appended grants and independent reorderings admit such simulations by construction; for other finite-quota revisions, Lean checks a proposed simulation. A bounded workflow analyzer explores executions using the deployed Lean transitions, and a second implementation encodes a restricted fragment in Z3.

On 51 authored revisions, the checks certify all 21 client-preserving revisions and none of the 30 that lose workflows; every lost workflow is confirmed by replay. The checks also certify a real quota increase from an open-source agent application. A report-delivery case shows that a revision can preserve every client while still permitting an extra approved send, so preservation does not imply safety.

CandidateObligationResult
Public summary to bound Alice addressFlow and contractAllow
Raw report to AliceConfidentialityReject
Second send, including retry after failureConsumed quotaReject
Public body from another producerArgument originReject
Edited summary with old approvalExact value identityReject
Report-delivery candidate calls and monitor outcomes