For agents
Writ is in private preview. To request access, write to support@lightningenable.com. See Get access. This site serves the Claude Skills and the mission schema.
Writ was built for agents to eventually run autonomously — it follows that setting Writ up and operating it should also work with an agent doing the driving, not just a human typing commands. This page is the index for that: what a coding agent (or an autonomous one) should read, in what order, and where the guardrails are.
Start here: the machine-readable index
/llms.txt— a concise, curated index of every documentation page, with a one-line description and an absolute URL for each, following the llms.txt convention. Read this first to decide what else to fetch./llms-full.txt— the entire documentation corpus concatenated into one plain-text file, generated from the same source these pages render from on every build. Fetch this when you want the whole thing in one shot instead of paging through individual URLs./.well-known/writ-agent.json— a structured JSON manifest: everywritcommand with its arguments, options, and exit codes; the setup checks; the mission manifest schema URL; the list of Claude Skills below; and the verification procedure. This is the file to parse programmatically instead of scraping prose. Its command list is checked against the CLI's own--helpoutput on every build of this site.
Claude Skills
Three Claude Skills are published on this site under /skills/, in the same SKILL.md format used by lightning-enable-skills (and, per the agentskills.io standard those follow, loadable unmodified by Claude Code, Claude Desktop, Cursor, and other compatible hosts):
| Skill | What it does |
|---|---|
writ-setup | Confirm the writ tool is installed, create a persistent operator identity with writ keys init, and confirm the setup with a smoke run. |
writ-run | Author a mission manifest from a task description, validate it, plan it with --dry-run, run it in simulated settlement, read the result, and export a shareable bundle. |
writ-verify | Verify a work-record bundle received from a counterparty against a pinned public key or head attestation, and interpret every warning writ verify can print. |
Every skill carries the same hard guardrails, stated up front in its SKILL.md:
- Never enable wallet settlement or
--productionwithout explicit, current-turn human confirmation. These are the two things that make a run capable of spending real money or refusing to run without a durable key — an agent proposes; a human decides. - Never print a private key,
WRIT_RECEIPT_KEYvalue, or macaroon — surface only whatwrit keys showandwrit verifyalready redact to. - Stop and hand back to the human on exit code
4(approval required) or7(pending reconciliation) — these are the two outcomes where an agent proceeding on its own is precisely the failure mode Writ's approval gate and reconciliation hold exist to prevent.
The mission schema, for generation
If you're generating a mission manifest programmatically, validate it against /schema/mission.schema.json (JSON Schema draft 2020-12) before handing it to writ validate — catching a schema violation locally is faster than round-tripping through the CLI. The manifest reference documents every field the schema declares, with real examples.
JSON-LD
Every page on this site carries SoftwareApplication, HowTo, and FAQPage schema.org structured data in its <head>, injected via Docusaurus's headTags config. A crawler or agent that reads structured data rather than prose can get the setup steps and the top FAQ answers from that alone.
The shape of an autonomous session
A reasonable order of operations for an agent setting up and running Writ with minimal human intervention:
- Fetch
/llms.txt, then/.well-known/writ-agent.json, to build a picture of the tool without a human narrating it. - Follow
writ-setup: confirm thewrittool is installed, create an operator identity, confirm with a smoke run. - Follow
writ-runto author and run asimulated-settlement mission — no wallet, no real money, no approval risk. - Read the run's
run.jsonandwork-record.jsonl; on success, export a bundle withwrit record export --out. - If a counterparty hands you a bundle instead, follow
writ-verifyto check it against a pinned key. - At any point the mission proposes
settlement.mode: walletor--production, or a run halts at exit4/7: stop, explain the situation, and ask a human.
Driving the engine with no human in the loop
When your agent host calls the engine directly through writ-mcp or writ-api instead of running a mission, it has to make its own decisions without a person reading prose. The service, MCP, and HTTP reference is written for that case:
- Spend under the writ you were given. A service host serves you the agent role: you run calls, narrow your writ for sub-agents, revoke the writs you delegated (
writ_revoke_delegated, presenting the parent writ), and read. To read your own receipts and held spends in a workspace other than the host's, pass your writ ascredentialwith theworkspace. Issuing, approving, denying, revoking by id and reconciling are the operator's, and a call to one of those tools returnsoperator_onlywith the command your operator runs.writ_statussays yourroleand, if you have no writ yet, how the operator issues one. When a call returnsapproval_required, tell your operator which request is waiting and retry the same call (same idempotency key) after they decide. - Ask what remains before you spend.
writ_budget(orPOST /v1/credentials/budget) returnsremainingSats,perCallMaxSats, andmaxNextCallSats, each the tightest value across the whole delegation chain, plus the link that binds. Stop cleanly whenmaxNextCallSatsis below the price of the next call, instead of learning it from a refusal. - Branch on
reasonCode, not on prose. Every refused invoke carries a stablereasonCode(for examplebudget_exhausted,price_exceeds_ceiling,credential_revoked,approval_required) and aretrydisposition. Onfinal, stop or ask the operator. Onretry_with_change, try something different: another capability or provider, or a cheaper call. Onretry_later, retry the same call after a human approves or a transient fault clears. Never retrypayment_outcome_unknownorpaid_execution_failed: money may have moved. The full table is in Refusal reason codes. - Retry with the same idempotency key. Generate a key per unit of work and pass it on the call and on every retry of it (
idempotencyKeyinwrit_invoke, theIdempotency-Keyheader over HTTP). A retry after a timeout or a lost response then never pays twice: a finished call replays its original outcome and receipt id, and one still in flight answersin_progress. See Idempotent retries.
Human-facing documentation, for context
Everything the skills reference is written out in full elsewhere on this site: