Torii docs#
Docs and a user guide for Torii, separate from the NightWatch guide. English is canonical. The same pages are served in the app at /tw/docs.
Money limits for an AI that already has a record: chain facts, server-confirmed events and work reviewed at NightWatch. A mandate, not a key.
Reading order for people#
- What Torii is
- Sign in and your account
- Money
- Delegate
- Trade
- Record
- Safety
- FAQ and Glossary
- Torii Copilot: the second seat in your cockpit, run by the house; you decide, it helps when you ask
- The menu map: the five places, every screen under one of them, and Trade as the Station
- Putting money in and taking it out: the path of USDC into and out of a Torii Vault, step by step, who does each step, what it costs
Chapter 12 also exists in Korean (12-money-in-and-out.ko.md), machine-drafted too. Chapters 1, 4, 5 and 7 also exist in Korean, Japanese, Simplified Chinese and Vietnamese (*.ko.md, *.ja.md, *.zh-Hans.md, *.vi.md). They are machine-drafted and not yet reviewed by a native speaker. Chapters 1 and 5 in those languages were brought up to date on 2026-11-21 (five places, Trade = Station); The menu map is English only. The words used in the app and in these copies are fixed in the language glossary.
Reading order for agents#
- Connect
- Offers and accept
- Limits discovery
- Reporting events
- Refusals
- Your Hall record
- Console
- One-day integration checklist
- The four doors: the map, and the shortest path for money plus an AI
- Operators: publish signals
- Follow a signal
- House strategy
- Execution spec v0
- The cockpit copilot: seat your own agent as a supervisor; what it can and cannot do
- Keep your copilot listening: answer in the cockpit live, with a small runner on your own computer
- Torii Vault money reference: states, who may call what, minimums, fees and refusal codes for putting money in and taking it out
The plain-text front door for agents is https://toriiwallet.com/llms.txt (also /tw/llms.txt). The one-page bootstrap is GET https://api.nightwatchprotocol.com/torii/skill.md.
Reference#
- API routes (generated; a test keeps it complete)
- Data shapes
- Flags and environment
- Contracts
- Changelog
NightWatch documentation#
Torii runs on the NightWatch API and shares its account. The NightWatch book is in docs/guide/ and its plain-text index is /llms.txt. This paragraph is the only place in this folder that points there.
Folders in this folder#
| Folder | What it holds | Served at /tw/docs |
|---|---|---|
user-guide/, agent-guide/, reference/ | The published pages | Yes |
tw-llms.txt | The plain-text front door for agents | At /tw/llms.txt |
pm/ | Charter, spec, plan, design, QA reports, positioning | No |
ops/ | Runbooks, contract notes, audits and their repro files | No |
design/ | Feature designs before and while they are built | No |
BOUNDARY.md | Where this folder meets the NightWatch repository | No |
Status words used here#
| Word | Meaning |
|---|---|
| Built | Exists in the code on the wallet branch |
| As designed | Specified in the design, not yet merged. Reconciled at merge time |
| Pending | No code yet |
| est. | An estimate, not a quote |
Rules for editing#
- Facts, not conclusions. Never promise a return.
- Amounts are written
12.34 USDC. - Body text may be fuller; headings and intros stay short.
- Tests in
tests/torii_wallet/test_docs_*.pyandfrontend/tests/tw_docs.test.mjscheck routes, tool counts, links, banned words, translations and the boundary with the NightWatch docs (test_docs_boundary.py).
How to split this out#
Full inventory and the reasons for each coupling are in BOUNDARY.md (not published). The short version:
- Move
docs/torii-wallet/as it is. Movescripts/gen_tw_docs_routes.py,frontend/scripts/tw_docs_sync.mjs,frontend/content/tw-docs/,frontend/public/tw-llms.txt,frontend/tests/tw_docs.test.mjsandtests/torii_wallet/test_docs_*.pywith it. History-preserving form:git filter-repo --path docs/torii-wallet --path scripts/gen_tw_docs_routes.py --path frontend/scripts/tw_docs_sync.mjs --path frontend/content/tw-docs --path frontend/public/tw-llms.txt --path frontend/tests/tw_docs.test.mjs --path-glob 'tests/torii_wallet/test_docs_*.py'. - In the NightWatch repository, remove the one index entry: the "Related, outside this book" section of
docs/guide/README.md, and the words "(plus the Torii Wallet tools, documented separately)" indocs/guide/10-connect-your-ai.md. Remove the "Torii Wallet tables" pointer indocs/DB_SCHEMA.mdand the pointer line indocs/pm/LOOP_LANES.md. - In the new repository, delete the "NightWatch documentation" paragraph above (or keep it as a link to the NightWatch repository) and run
node scripts/tw_docs_sync.mjs, then the tests. - The generator and two of the tests read the API code (
svc/api/routes/torii_*.py,svc/api/routes/mcp.py). Keep a checkout of that code next to the docs, or point them at the API repository. - The deposit page
/trade/fund(frontend/app/(torii-wallet)/tw/trade/fund/) imports one part from the NightWatch folder,frontend/app/(site)/torii/BridgeFundWidget.js(the LI.FI and Hyperliquid deposit widget, also used inside the Station tab). LikeStationTab, it must move with the wallet or be copied, together with the files it imports (bridge.js,hl.js,i18n.js). - The Coinbase embedded-wallet project is shared with NightWatch (its id is in the frontend env
NEXT_PUBLIC_CDP_PROJECT_ID). An embedded wallet address is bound to email plus project, so moving the wallet to its own CDP project gives every user a new, empty wallet. Existing vaults stay bound to the old owner address, so a split needs a migration step: users sign in on the new project, stop and withdraw the old vaults (or re-link the old address), then move funds. The new project's domain allowlist must list the Torii origins.