Skip to main content

For agents

note

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: every writ command 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 --help output 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):

SkillWhat it does
writ-setupConfirm the writ tool is installed, create a persistent operator identity with writ keys init, and confirm the setup with a smoke run.
writ-runAuthor 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-verifyVerify 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 --production without 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_KEY value, or macaroon — surface only what writ keys show and writ verify already redact to.
  • Stop and hand back to the human on exit code 4 (approval required) or 7 (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:

  1. Fetch /llms.txt, then /.well-known/writ-agent.json, to build a picture of the tool without a human narrating it.
  2. Follow writ-setup: confirm the writ tool is installed, create an operator identity, confirm with a smoke run.
  3. Follow writ-run to author and run a simulated-settlement mission — no wallet, no real money, no approval risk.
  4. Read the run's run.json and work-record.jsonl; on success, export a bundle with writ record export --out.
  5. If a counterparty hands you a bundle instead, follow writ-verify to check it against a pinned key.
  6. At any point the mission proposes settlement.mode: wallet or --production, or a run halts at exit 4/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 as credential with the workspace. Issuing, approving, denying, revoking by id and reconciling are the operator's, and a call to one of those tools returns operator_only with the command your operator runs. writ_status says your role and, if you have no writ yet, how the operator issues one. When a call returns approval_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 (or POST /v1/credentials/budget) returns remainingSats, perCallMaxSats, and maxNextCallSats, each the tightest value across the whole delegation chain, plus the link that binds. Stop cleanly when maxNextCallSats is 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 stable reasonCode (for example budget_exhausted, price_exceeds_ceiling, credential_revoked, approval_required) and a retry disposition. On final, stop or ask the operator. On retry_with_change, try something different: another capability or provider, or a cheaper call. On retry_later, retry the same call after a human approves or a transient fault clears. Never retry payment_outcome_unknown or paid_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 (idempotencyKey in writ_invoke, the Idempotency-Key header 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 answers in_progress. See Idempotent retries.

Human-facing documentation, for context​

Everything the skills reference is written out in full elsewhere on this site: