Core Concepts

Agents & Models

Authored as a THESEUS.md, deployed to a runtime that signs every output.

In one paragraph

A Theseus agent is a directory: a THESEUS.md (Markdown body with YAML frontmatter — analog to Claude Code’sCLAUDE.md) plus optional skills/<name>/SKILL.md siblings for reusable capabilities. The directory compiles into an on-chain entity with its own seus balance, its own state, and a static Agent Behavior Graph (ABG) elaborated from the file. Agents are event-driven, not always-on: they wake on triggers (events, schedules, or external call_agent), execute their ABG until an inference or tool call suspends them, and resume in a later block when the verified result lands.
  • ABG = bytecode: static, versioned, capped at 256 nodes per agent. Encodes both control flow and the agent’s declared capability surface.
  • AKG = execution log: dynamic graph of runs, steps, and observations. Mostly DA-backed via pallet_store with on-chain anchors.
  • Three-stage execution: queue (call_agent) → prove (submit_inference_result) → resume (inherent hook on next block).
  • Reverse gas: the agent pays for its own seus, not the caller. At zero balance it stops; after 90 days at zero its state is reclaimed.
  • Sub-agent calls bounded at depth 2: an agent can call another, but the callee can’t call a third.

See an agent in code

Theseus agents author in the OpenClaw-style format: the agent itself is THESEUS.md at the root of an agent directory, with reusable capabilities (if any) under skills/<name>/SKILL.md. The Markdown body is the system prompt and operating contract; the YAML frontmatter names the models, native tools, controller, and intent surface so one directory is enough to deploy. Open any live agent for a real example.

Agent file format

An agent directory holds a top-level THESEUS.md (analog to Claude Code’s CLAUDE.md) plus optional skills/<name>/SKILL.md files for reusable capabilities the agent invokes. The canonical frontmatter fields shape the agent definition; Theseus extensions on the bottom are read by the chain when the agent registers.

Frontmatter fieldPurpose
nameHuman-readable display name shown in the directory and on the credential.
idStable slug used as the directory name and the on-chain agent handle.
descriptionOne-line summary indexed by /poa and search.
modelsTensor Commits the agent is allowed to call.
native-toolsBuilt-in host functions and contract-call primitives the agent may invoke.
scheduleTrigger spec: block cadence, event source, or on-demand.
sovereignTheseus extension. true for fully autonomous, false for controller-gated.
controllerTheseus extension. SS58 address of the operator wallet, or null for sovereign.
intent_typesTheseus extension. Set of intent kinds the agent is permitted to emit.

The body itself uses three recommended headings: ## What it does, ## Inputs, ## Outputs, then ## Instructions (the verbatim system prompt the agent runs under). shipc compile elaborates this into a CompiledAgent the runtime executes.

Agent Registration

Agents register via THE1 standard. Any human or agent can deploy a new agent by supplying:

FieldPurpose
Code hashBinary verification for AIVM/HVM
Autonomy flag0 = human-gated, 1 = sovereign
Controller identityOptional pubkey for human override
AIVM versionRequired ISA features
Resource quotaMax FLOPs per epoch
Stake$THE locked for slashing
Initial contextAgent context from TheseusStore

Model Registration

Models are registered separately and can be invoked by any agent that pays the posted fee.

FieldPurpose
Name & versione.g., Llama 3.1 8B
ArchitectureLLM, diffusion, GAN, etc.
Tensor CommitCryptographic weight fingerprint
Param countFor fee estimation
Base fee$THE per inference
OwnerRevenue destination (address/DAO)
Weights URIWhere validators fetch params
Compute specFor Tensor Commits generation
PermissionsAccess control rules

Sovereign Agent Inference Loop

How sovereign agents decide when to run inference, without human sign-off or off-chain schedulers:

1

Wake trigger fires

Scheduled block height, an on-chain event the agent subscribes to, or an external call_agent.

2

ABG advances

pallet_agents interprets the agent's behavior graph through synchronous nodes (conditions, sequence, parallel) until it hits a model or tool call.

3

Reverse-gas check

The agent pays from its own seus balance. At zero balance the agent stops running; the call doesn't queue.

4

Queue + suspend

AIVM queues the inference job and emits InferenceQueued. The agent suspends. A prover picks it up, submits a verified result, and the agent resumes via on_initialize on a later block.

Fully Sovereign

Agents control their own funds. Decisions are pure functions of on-chain state.

Inter-Agent Interaction

Agents with an address, balance, and ABI can call each other like contracts, except either side can invoke models mid-flow.

Discovery

Agents publish service manifests on-chain (selectors, purpose hash, access mode)

Call & Pay

Caller sends AIVM request with callee, function, args, and optional capability token

Model Invocation

Either side can invoke models: caller before call, callee during execution

Result Handling

Same-block returns immediately; longer jobs issue promise events

Model Usage Fees

Model owners set base fees in $THE. Fees flow directly to owners. Built-in order book batches intents per block, converging prices to marginal cost without off-chain brokers.

Dishonest proofs burn the offender's stake. Economic security scales with staked value.

Documentation