Your first mission
This walkthrough runs a real mission end to end in simulated settlement mode. No wallet, no API key, no model, no real money. Each step shows the command to run, then the output you should see.
Before you start: finish Get access, so that writ works in your shell. Then make an empty directory, save the manifest below in it as mission.yaml, and run every command on this page from that directory. The walkthrough uses this vendor due-diligence mission because it needs nothing configured; scaffolding your own mission with writ init comes at the end. In a source checkout, the same mission is examples/vendor-dossier/mission.yaml.
mission:
name: vendor-dossier
goal: >
Produce a vendor due-diligence dossier on {{target_name}} ({{target_domain}}) from paid data
sources: domain registration/DNS posture and regulatory/compliance footprint.
vars:
- target_domain
- target_name
budget:
total_sats: 200 # cumulative cap, enforced atomically at the credential-chain root
per_call_max_sats: 25 # ceiling for any single capability call
settlement:
mode: simulated # simulated (no real money) | wallet (real Lightning)
approvals: {} # empty = fully autonomous within the bounds above
capabilities:
- id: dns.whois
kind: l402-http
base_url: https://api.lightningenable.com/l402/proxy/dns-and-whois-afae
path: /whois
method: GET
max_sats_per_call: 5
- id: compliance.search
kind: l402-http
base_url: https://api.lightningenable.com/l402/proxy/compliance-suite-e352
path: /search
method: GET
max_sats_per_call: 12
- id: compose.dossier
kind: internal # deterministic assembly of the paid outputs, no model
workers:
- name: infra-researcher
scope: [dns.whois]
budget_sats: 40
expires_minutes: 30
steps:
- type: call
capability: dns.whois
input:
domain: "{{target_domain}}"
output: infra.json
- name: compliance-researcher
scope: [compliance.search]
budget_sats: 60
expires_minutes: 30
steps:
- type: call
capability: compliance.search
input:
q: "{{target_name}}"
output: compliance.json
- name: writer
scope: [compose.dossier]
budget_sats: 0 # internal-only worker: no external spend authority
expires_minutes: 20
steps:
- type: call
capability: compose.dossier
input:
instruction: |
# Vendor Due-Diligence Dossier — {{target_name}} ({{target_domain}})
Compiled autonomously by Writ from paid data sources. Each section below is the
response of a capability the mission paid for over L402 under a scoped, delegated credential.
include_prior_outputs: true
output: dossier.md
work_record:
signing: dev-ephemeral
output_dir: runs/
In simulated mode, Writ never contacts the api.lightningenable.com URLs: each paid call is answered in-process with fixed sample data.
Command blocks contain only the command, so the Copy button gives you something you can paste. Output blocks are what the CLI printed on the author's machine. Your run id (vendor-dossier-<date>-<time>-<hex>), timestamps, and hashes will differ, and wherever a command below contains one of the author's values, replace it with yours.
Validate before you run
writ validate parses the manifest through the same validator run uses and never spends anything:
writ validate mission.yaml
OK — mission 'vendor-dossier': 3 worker(s), 3 capabilities.
Worst-case total spend: 100 sats (budget cap 200 sats; sum of worker slices 100 sats).
Settlement: simulated. Signing: dev-ephemeral.
"Worst-case total spend" is every worker's budget slice charged at its most expensive capability ceiling: a pessimistic number you can compare with the budget cap before anything runs. A "sat" is a satoshi, one hundred-millionth of a bitcoin; in simulated mode no sats move. "dev-ephemeral" means the run signs with a throwaway key generated for this run only.
Plan first with --dry-run
--dry-run prints which capability each worker would call and at what ceiling price. It mints no credential, calls nothing, and writes nothing:
writ run mission.yaml --var target_domain=example.com --var target_name="Example Corp" --dry-run
Running mission 'vendor-dossier' (run vendor-dossier-20261117-002809-06f257b3e1d94e1799d95bf179c4570d) — dry run, no spend...
· infra-researcher/mission.dns.whois 5 sats planned
· compliance-researcher/mission.compliance.search 12 sats planned
· writer/mission.compose.dossier 0 sats planned
Run vendor-dossier-20261117-002809-06f257b3e1d94e1799d95bf179c4570d: Planned
Spent 0 / 200 sats · settlement simulated · 0 receipt(s)
Every {{var}} the manifest references must be supplied, or run refuses to start. Leave the two --var flags off to see that:
writ run mission.yaml --dry-run
Manifest invalid: Manifest references variable '{{target_name}}' but no --var target_name=... was supplied.
Run it for real
Drop --dry-run:
writ run mission.yaml --var target_domain=example.com --var target_name="Example Corp"
Running mission 'vendor-dossier' (run vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d)...
19:28:10 warn: Writ.Engine.Runner.MissionRunner[0] No WRIT_ROOT_KEY is set — using an EPHEMERAL per-run authority root key. Credentials minted this run cannot be re-verified after the process exits, so this run cannot be resumed. Never rely on this for production authority.
19:28:16 warn: Writ.Engine.Runner.MissionRunner[0] Signing work records with a DEV-EPHEMERAL receipt key ('writ-receipt-vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d'). Receipts cannot be re-verified after this process exits; never use this signer for production evidence.
· infra-researcher/mission.dns.whois 5 sats Executed (simulated)
· compliance-researcher/mission.compliance.search 12 sats Executed (simulated)
· writer/mission.compose.dossier 0 sats Executed
Run vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d: Completed
Spent 17 / 200 sats · settlement simulated · 3 receipt(s)
Outputs:
- runs/vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d/infra.json
- runs/vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d/compliance.json
- runs/vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d/dossier.md
- runs/vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d/work-record.jsonl
- runs/vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d/usage.json
- runs/vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d/run.json
- runs/vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d/report.html
Verify: writ verify runs/vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d --pubkey 93178da572906641b34888d269d5ed2eefab89ba4202c729fa3f8d9f6a579e4c --signer-mode dev-ephemeral
Things to know about that output:
- The two
warn:lines are expected. This manifest setswork_record.signing: dev-ephemeral: a throwaway authority key and a throwaway receipt-signing key per run, which is the zero-configuration way to try Writ. The keys are never written to disk. You can still verify this run afterwards (below) because the run's public key is recorded inrun.json, but for evidence you can stand behind, use a persistent key: Keys and verification. (simulated)means no money moved. The pipeline (credential, budget reservation, payment, settlement, signed receipt) ran against an in-process Lightning endpoint. Setsettlement.mode: walletto pay real invoices: Settlement.- No model was involved. All three steps are deterministic
callsteps;compose.dossierassembles the dossier from the earlier outputs.usage.jsonreports zero model tokens and zero model cost. - The CLI prints absolute paths on your machine (shortened above). The run directory also holds
writ.db(the run's local state database),progress.jsonl(the journalwrit resumereads), andrun.lock. None of them is part of the exportable evidence. - The last line is a ready-to-paste
Verify:command for this run. You will use it below.
The outputs
infra.json and compliance.json are the two paid capabilities' simulated responses:
{"simulated":true,"domain":"example.com","registrar":"IANA Reserved","created":"1992-01-01","updated":"2025-08-14","status":["clientTransferProhibited"],"nameservers":["a.iana-servers.net","b.iana-servers.net"],"dnssec":"unsigned"}
Simulated responses are fixed sample data: they come back the same whatever target_domain you pass. dossier.md is the writer worker's deterministic assembly of both:
# Vendor Due-Diligence Dossier — Example Corp (example.com)
Compiled autonomously by Writ from paid data sources. Each section below is the
response of a capability the mission paid for over L402 under a scoped, delegated credential.
--- Prior worker outputs ---
[infra-researcher/mission.dns.whois]
{"simulated":true,"domain":"example.com", ...}
[compliance-researcher/mission.compliance.search]
{"simulated":true,"query":"Example Corp", ...}
Read the record back
writ record show prints a summary of a completed run. Replace the run id with the one your run printed:
writ record show vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d
Mission: vendor-dossier (run vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d)
Outcome: Completed
Spent: 17 / 200 sats
Settle: simulated (no real money moved)
Spend by capability:
- mission.compliance.search: 12 sats over 1 call
- mission.dns.whois: 5 sats over 1 call
- mission.compose.dossier: 0 sats over 1 call
Evidence: 3 of 3 receipts verified · head 2:488827ea923b46b63824c23404de16fdf3bd02f830b7432c1ceee52794672ba2
WARNING: signed with a dev-ephemeral key — not production evidence.
Terminal commitment: 3 receipt(s) signed, ending at 488827ea923b46b63824c23404de16fdf3bd02f830b7432c1ceee52794672ba2 — tail truncation of this export is detectable.
Verify the work record offline
writ verify checks every receipt's signature and hash-chain link using a public key alone. It needs no database and no access to the machine that ran the mission.
Paste the Verify: line your run printed (without the Verify: prefix). It already contains your run directory and your run's public key, which is also stored as SignerPublicKeyHex in runs/<your-run-id>/run.json. The key is 64 hex characters, passed without quotes or angle brackets:
writ verify runs/vendor-dossier-20261117-002810-53a59cab5a76490480b2142075b6cb2d --pubkey 93178da572906641b34888d269d5ed2eefab89ba4202c729fa3f8d9f6a579e4c --signer-mode dev-ephemeral
WARNING: this work record is signed with a dev-ephemeral (throwaway) key — it is NOT production evidence.
OK — verified 3 receipt(s).
Chain head: 2:488827ea923b46b63824c23404de16fdf3bd02f830b7432c1ceee52794672ba2
Terminal commitment verified — this export cannot be truncated undetected.
WARNING: no signer identity record — the chain is not bound to a named operator (pass --require-identity to fail instead).
If you use the author's run id or key from this page instead of your own, verification fails, which is the point: the record and the key must match.
Now tamper with any signed field in work-record.jsonl (change one character of a hash) and run the same command again. Verification fails and names the row instead of passing silently. The exact number of problems depends on which field you changed, since a changed hash also breaks the link from the next receipt:
WARNING: this work record is signed with a dev-ephemeral (throwaway) key — it is NOT production evidence.
FAILED — 2 problem(s) across 3 receipt(s):
[row 0] dd51a7e21eb244ae89955bcf9b95ff68: receiptHash does not match the recomputed canonical hash (tampered field)
[row 1] 382c4711a64640b786f9495aafe04ff7: broken hash-chain link: previousReceiptHash does not match the predecessor's receiptHash
That exits with code 5.
What you just showed
- The receipts record 17 sats spent of a 200-sat budget, and in simulated mode no real sats moved.
- Each worker could only call the capability its delegated credential scoped it to.
- Anyone holding the public key can check, with
writ verifyalone, that the recorded steps were signed by that key and that the chain is intact and complete.
With a throwaway dev-ephemeral key, the public key you checked against came from the run itself, so the check shows the record was not altered after signing, not which operator signed it. A persistent, named signer identity adds that: Keys and verification.
Scaffold your own mission
Now that the walkthrough mission works, writ init writes a runnable manifest, a README, and a .gitignore for a mission of your own:
writ init my-mission
Scaffolded mission at my-mission/mission.yaml
Next: edit the goal/vars, then `writ validate my-mission/mission.yaml` and `writ run my-mission/mission.yaml --var target_domain=example.com --var target_name="Example Corp"`.
The scaffold uses model.provider: anthropic, so `run` needs ANTHROPIC_API_KEY set in this shell.
Unlike the example above, the scaffold has an agent step and an llm.write capability, so its run calls a model. writ validate and --dry-run say so, and pass:
OK — mission 'vendor-dossier': 2 worker(s), 3 capabilities.
Worst-case total spend: 40 sats (budget cap 200 sats; sum of worker slices 40 sats).
Settlement: simulated. Signing: dev-ephemeral.
Note: This mission calls a model: provider 'anthropic' needs ANTHROPIC_API_KEY at run time (not set in this shell).
Without ANTHROPIC_API_KEY set, run stops before any capability is invoked, with exit code 3. It still writes a run directory with the failed run's summary and report. The last line says why:
Pre-flight check failed: model provider 'anthropic' needs an API key, but ANTHROPIC_API_KEY is not set in this shell. Export ANTHROPIC_API_KEY (or set `model.provider: claude-cli` to use your installed Claude Code CLI instead). No capability was invoked and nothing was settled.
Model usage is billed to your provider account and is not part of the sats budget; the run summary and report.html show the call count and list-price cost. See the manifest reference, model.
Running writ init my-mission a second time refuses to overwrite your work (exit code 2):
Refusing to overwrite existing manifest: my-mission/mission.yaml
Next steps
- Keys and verification: move from a throwaway key to a persistent, named signer, and see what
writ verifyshows. - Manifest reference: every field a mission file can declare, including
agentsteps that use a model. - Command reference: every command, in depth.
- Approvals and budgets: what happens when a call crosses a human-approval threshold.