Introduction to Writ
Writ is in private preview. To request access, write to support@lightningenable.com. The core loop works end to end and is covered by an extensive test suite. This documentation describes the preview behavior, captured directly from the running CLI. See Security model and preview limitations for what's still open.
Writ is bounded autonomy for agents that spend money. It's a self-hosted .NET runtime that runs an agent mission under a cryptographic writ — a budget cap, a scope list, a deadline, and delegation rules, enforced at the credential layer — paying for the capabilities it needs over Lightning (L402 / HTTP 402) as it works, and producing a signed, independently verifiable work record when it's done.
You bring the model and the task. Writ supplies the parts that make letting an agent spend money safe: pay, bound, delegate, and prove.
Writ does not hold funds. Your own wallet (LND, NWC, or Strike) makes the Lightning payments; the capability providers settle directly with that wallet. Writ issues and verifies authority, and records what happened — it never sits in the money path.
Four words you'll see everywhere
- Writ: historically, a sealed written order granting someone authority to act. Here, the cryptographic credential a mission runs under.
- Sat (satoshi): the smallest unit of bitcoin, one hundred-millionth of a coin. Budgets and prices in Writ are in sats. In the default
simulatedmode, no sats move. - L402: a protocol in which a web API answers
HTTP 402 Payment Requiredwith a Lightning invoice, and the client pays per call. Writ pays these on your mission's behalf. - Macaroon: a bearer credential whose restrictions ("caveats") can only be added to, never removed. Writ's delegated credentials are macaroons, which is why a sub-agent's authority can only narrow.
Why Writ exists
Agents can now call APIs, buy data, and hire other agents. What's missing is the seatbelt: a way to let an agent act on its own and keep it from overspending or wandering outside the job, and leaves evidence you can check without trusting its own report.
Writ closes that gap with three ideas:
- Authority that only narrows. When a mission delegates a sub-task, the sub-agent's credential can only ever carry less authority than its parent — a smaller budget slice, a narrower capability, a shorter expiry, one less level of delegation. Widening isn't a policy choice you could get wrong; macaroon caveats intersect, and an unknown caveat fails closed.
- A budget that's real and atomic. Every sat is reserved against the credential-chain root (the top of the chain of delegated credentials) before a call, then settled or released after, so concurrent calls are checked against one shared cap. A revoked credential stops spending immediately, and the revocation cascades to the whole delegated subtree.
- A work record you can verify offline. Every completed action appends a BIP-340–signed, hash-chained receipt committing to what was authorized, what it cost, and that it completed — never a raw prompt, key, or preimage. Anyone with the signer's public key can run
writ verifyand check the chain with zero access to the machine that ran it.
Sub-cent per-call settlement over Lightning, with no processor fee (only the network's routing fee, which your wallet pays outside the budget), makes a 3-sat data call economical.
Who this documentation is for
This site covers two audiences:
- People who run Writ, author mission manifests, and operate keys and approvals. Start at Get access.
- Agents — coding assistants and autonomous agents that need to set up and run Writ with little human intervention. Start at For agents, which points at the llms.txt index, the machine-readable agent manifest, and the Claude Skills shipped alongside Writ.
The shape of a mission
A mission is one YAML file: a goal, a budget, the capabilities the mission is allowed to call, one or more delegated workers, a settlement mode, and how the work record gets signed.
mission:
name: vendor-dossier
goal: "Produce a due-diligence dossier on {{target_name}} ({{target_domain}})"
budget:
total_sats: 200 # cumulative, enforced atomically at the credential-chain root
per_call_max_sats: 25 # ceiling for any single call
settlement:
mode: simulated # simulated (zero-config) | wallet (real Lightning)
capabilities:
- { id: dns.whois, kind: l402-http, base_url: https://…/dns-and-whois, path: /whois, max_sats_per_call: 5 }
- { id: compliance.search, kind: l402-http, base_url: https://…/compliance-suite, path: /search, max_sats_per_call: 12 }
- { id: compose.dossier, kind: internal }
workers:
- name: infra-researcher # gets a delegated credential scoped to DNS only
scope: [dns.whois]
budget_sats: 40
steps: [{ type: call, capability: dns.whois, input: { domain: "{{target_domain}}" } }]
work_record:
signing: dev-ephemeral
output_dir: runs/
The runner mints a root credential bounded by the manifest, delegates a strictly-narrower child credential to each worker, runs the steps — every capability call goes through one pipeline (verify authority → reserve budget → approval gate → execute → settle-or-release → sign a receipt) — and writes the outputs, the signed work record, and a human-readable report to runs/<run-id>/.
Continue to Get access, or jump straight to Your first mission for a full walkthrough with real command output.
Next steps
- Get access — request access and confirm the
writtool works. - Your first mission — a complete, simulated, end-to-end run.
- Manifest reference — every field a mission file can declare.
- Command reference — every
writcommand, its options, and its exit codes. - For agents — how an agent sets up and drives Writ on its own.