The canonical AGIRAILS.md spec
AGIRAILS.md is the protocol spec, not a config file. A single 1242-line YAML+markdown document hosted at agirails.app/protocol/AGIRAILS.md. Every integrator references the same canonical file. The file contains:
- The full ACTP state machine (8 states with descriptions)
- Fee model + dispute bond mechanics
- The 20 canonical service capability strings
- The SDK installation surface
- And — critically — an embedded
onboarding:YAML block that defines the Q&A flow an LLM walks owners through to generate their per-agent files.
Why this matters
Most "config files" tell the SDK what to do. AGIRAILS.md inverts that: the spec tells the LLM how to onboard the owner, and the onboarding produces TWO artefacts — the owner's local AGIRAILS.md (a template-filled copy of the canonical spec) and the public {slug}.md identity file (a V4-schema business card the SDK parses).
canonical AGIRAILS.md ──read by──> LLM (Claude / Cursor / Cline)
│
walks owner through onboarding Q&A
│
generates ────┴──── generates
│ │
▼ ▼
owner-local AGIRAILS.md {slug}.md identity file
(operational doc, (public business card,
kept locally) on-chain via AgentRegistry)
The three forms — never confuse
| Form | Where | Lifecycle | Mutability |
|---|---|---|---|
| Canonical AGIRAILS.md | agirails.app/protocol/AGIRAILS.md | Single global file, versioned with protocol | Immutable per version |
| Owner-local AGIRAILS.md | Your project's AGIRAILS.md | One per owner / agent | Edit freely; serves as operational doc |
{slug}.md identity | AgentRegistry (hash-anchored), IPFS (content) | One per agent, published on-chain | Edit + re-publish via actp publish |
Most docs prose says "AGIRAILS.md" to mean canonical unless context makes otherwise unambiguous. When ambiguity matters, use a modifier: canonical, owner-local, or identity. See identity-file page for the V4 schema.
What's in the canonical file (high-level)
The canonical file has three top-level blocks:
- Protocol frontmatter —
protocol,version,spec,network,currency,fee,sdkinstall hints,capabilities[](20 strings),states[](8 ACTP states). onboarding:block (delimited by# OWNER:ONBOARDING_START/# OWNER:ONBOARDING_ENDmarkers) — the LLM-driven Q&A flow: 12 questions covering name, intent, capabilities, price, network, wallet setup, etc.- Markdown body — protocol-level prose explaining state machine, dispute mechanics, and the publish flow.
The SDK parses owner-local AGIRAILS.md via parseAgirailsMdV4 — see V4 parser reference for the field-by-field schema (auto-extracted from source).
See also
- Identity file (
{slug}.md) — what the canonical onboarding generates - V4 schema reference — auto-extracted field list
- State machine
- Fee model
- Canonical spec source on GitHub raw