Writ
Private preview
Authorized delegation for agents

A governance runtime for agent commerce

Delegation with receipts.

Writ is a self-hosted runtime that lets you hand an AI agent a budget and a narrowly scoped grant of authority. The agent can then pay for the APIs and services you approve, over Lightning, and each completed call becomes a signed receipt you can verify offline: what it did, on whose authority, and what it cost. Writ checks each call against what you granted. The agent can pass a strictly narrower slice to a worker you declare, and when it reaches past its bounds, Writ refuses the call and can sign the refusal into the record โ€” evidence, not a silent failure.

$ writ run mission.yaml

Agents can already pay. The missing piece is trust.

Agents can browse, decide, and transact today. What's holding real agent commerce back isn't capability โ€” it's authorization and audit. Before you hand an autonomous agent a payment method, you need clear answers to three questions: what exactly can it do, how much did you authorize it to spend, and what does the record show it did?

Writ is built to be that layer. It turns "let an agent spend money" into "delegate the authority you intend, check every call routed through Writ against it, and keep a signed receipt for each completed call and each recorded refusal."

It's designed for agents that work unattended. You set the grant before the work starts and read the record after it ends. In between, Writ applies the limits on every call routed through it, whether or not anyone is watching.

Powers granted

What Writ does

Scoped, revocable authority
A credential limited to specific capabilities, a total budget, a per-call cap, and an expiry. Delegation can only narrow those limits, never widen them, and revoking a credential blocks any new spending under it.
Budgets checked before money moves
Before a call routed through Writ reserves funds, the ledger checks the sats cap atomically across every credential up the delegation chain, along with the per-call cap and expiry. An invoice above the authorized ceiling is refused. The limit lives in Writ, not in trusting the model to behave.
Multi-hop delegation
You declare the workers in a mission manifest, and each one receives a strictly narrower slice of its parent's authority, across as many hops as you define. Authority shrinks as work moves down the chain. The same issue, delegate, invoke, and revoke operations are available through a library, an MCP server, and an HTTP API, which are built from source and are not in the Writ package.
Lightning payments, simulated by default
Writ pays L402 endpoints over Lightning for the paid APIs and services in your capability catalog, by telling your wallet which invoices to pay. Simulated mode, the default, moves no money and still produces real signed receipts.
Your model, your provider
Run the agent's reasoning on the model you choose. By default, Writ calls a model API over HTTP with your API key, and OpenAI-compatible and Anthropic-compatible endpoints work. If you prefer, use a CLI subscription you already have: the Claude Code CLI or the Codex CLI.
Approvals, when you want them
Optional. Set a threshold, and a call at or above it is held before it reserves or pays anything. In a manifest run, the run stops; you approve and continue it with writ resume. Through the MCP server or HTTP API (built from source), the caller gets "approval required" and retries once a person approves.
Refusals with teeth
When an agent reaches past its bounds, Writ refuses the call. Mark the step as an expected refusal, and the denial becomes a signed line in the record, so you can show the guardrail held, not just that the happy path worked.
Verifiable evidence
Each completed call gets a BIP-340-signed, hash-chained receipt that holds hashes and identifiers only โ€” never prompts, keys, or preimages. Anyone with your public key can check the chain offline: that it's intact and that your key signed it.

Standing

Self-hosted, Lightning-native

You run it. You own the evidence. No platform to lock you in.

AWS AgentCore Payments and Google's AP2 are platform-owned cloud control planes. Writ is a self-hosted runtime you control, and it pays over Lightning using L402 from your own wallet, so paying an L402 API takes no card and no account with that API's provider.

Private preview

Request access

Writ is in private preview. To request access, write to support@lightningenable.com and tell us what you want your agents to pay for.

Request access

Once you have the writ tool, the access guide takes you to a first simulated run, and the Writ docs cover the rest.

Writ comes from Lightning Enable. The Lightning Enable docs cover its payment tools; Writ has its own documentation.

Notes & limitations

  1. Writ never holds your funds. Your wallet or payment provider does. Writ decides whether a call is authorized and, if it is, tells your wallet to pay the invoice, up to the authorized ceiling.
  2. Receipts show authorization, not correctness. A receipt is your signed record of what was authorized and paid โ€” not proof that the output was right or that anything outside the record is true, and not a ruling on who is liable.
  3. Operator identity is self-asserted. Persistent signing keys ship today, with rotation, revocation, and pinned-head checks, but a key tells a verifier which key signed, not who you are. The default is still an ephemeral development key.
  4. Private preview. Delegation, budgets, approvals, refusals, and receipts work and are tested. Writ hasn't had an external security review yet; this page is shared for feedback, not as a GA claim.
The fine print, in full
  • What the budget covers. Capability calls routed through Writ. It doesn't cover Lightning routing fees, the agent's own model usage (tracked separately in tokens and USD), or anything an agent does outside Writ or with another wallet. Revoking a credential blocks new holds; a hold already reserved can still settle.
  • How limits are enforced. Narrowing is built into the credential: macaroon caveats for capability, budget, per-call cap, expiry, and depth can only tighten. Budget arithmetic and revocation are enforced by a local database ledger, not by cryptography.
  • What gets a receipt. Each completed capability call, plus each recorded refusal. Model calls, approval decisions, and suspended calls don't. Offline verification checks signatures and chain integrity, and optionally a pinned head, key rotations, and revocations.
  • Who signed. Each receipt is the operator's own signed attestation. There's no hosted identity registry or transparency log. A developer test of a real 15-sat purchase, on 2026-08-16, was signed with the ephemeral development key.
  • Approvals stop the run. In writ run, a call at or above the threshold suspends the run. Approve it, then continue the same run with writ resume.
  • Availability. Private preview, by request. L402 over Lightning is the only payment rail.