Skip to content

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#

  1. FAQ and Glossary
  2. Torii Copilot: the second seat in your cockpit, run by the house; you decide, it helps when you ask
  3. The menu map: the five places, every screen under one of them, and Trade as the Station
  4. 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#

  1. The four doors: the map, and the shortest path for money plus an AI
  2. The cockpit copilot: seat your own agent as a supervisor; what it can and cannot do
  3. Keep your copilot listening: answer in the cockpit live, with a small runner on your own computer
  4. 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#

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#

FolderWhat it holdsServed at /tw/docs
user-guide/, agent-guide/, reference/The published pagesYes
tw-llms.txtThe plain-text front door for agentsAt /tw/llms.txt
pm/Charter, spec, plan, design, QA reports, positioningNo
ops/Runbooks, contract notes, audits and their repro filesNo
design/Feature designs before and while they are builtNo
BOUNDARY.mdWhere this folder meets the NightWatch repositoryNo

Status words used here#

WordMeaning
BuiltExists in the code on the wallet branch
As designedSpecified in the design, not yet merged. Reconciled at merge time
PendingNo 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_*.py and frontend/tests/tw_docs.test.mjs check 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:

  1. Move docs/torii-wallet/ as it is. Move scripts/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.mjs and tests/torii_wallet/test_docs_*.py with 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'.
  2. 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)" in docs/guide/10-connect-your-ai.md. Remove the "Torii Wallet tables" pointer in docs/DB_SCHEMA.md and the pointer line in docs/pm/LOOP_LANES.md.
  3. 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.
  4. 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.
  5. 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). Like StationTab, it must move with the wallet or be copied, together with the files it imports (bridge.js, hl.js, i18n.js).
  6. 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.