Runtime reference
Pallets, extrinsics, and network parameters as configured at alpha. Authoritative source, taken directly from the runtime.
Versioning
Pallets
Theseus is built on Substrate. The runtime composes several Theseus-specific FRAME pallets alongside standard ones (balances, transaction_payment, timestamp, aura, grandpa). The Theseus pallets decouple inference verification from the higher-level callers via the OnInferenceVerified hook on pallet_aivm.
pallet_aivm
Inference job queue and verification kernel. Receives model and agent calls, emits InferenceQueued, verifies proofs via the native KZG host function, routes results to higher pallets via a generic OnInferenceVerified hook.
pallet_models
Model registry. Stores metadata (id, tag, weights root, pricing). Exposes call_model.
pallet_agents
Agent registry and ABG runtime. Stores agent state, behavior graphs, loop positions. Manages lifecycle, wake triggers, and seus balances. Exposes call_agent.
pallet_tools
Tool dispatch. Queues off-chain tool calls (web search, authenticated HTTP) and accepts results via submit_tool_result from the registered enclave identity.
pallet_store
TheseusStore anchoring. Maintains content-addressed roots (weights_root, context_root) for off-chain data with on-chain integrity verification.
pallet_ship
Intent execution and economics. Validates and applies SHIP intents (transfers, context updates, cross-chain messages, contract calls) emitted by agents at ABG terminal nodes.
pallet_contracts
Standard Substrate Wasm contracts. Agents interact via chain extension.
Extrinsics
The minimal set of extrinsics exposed to users, agent deployers, provers, and the registered enclave operator. Caller column shows who can submit each extrinsic.
| Pallet | Extrinsic | Description | Caller |
|---|---|---|---|
| models | register_model | Register a new model with tag and weights root | Root |
| models | update_model | Update model metadata | Root |
| models | call_model | Queue a direct model inference job | Any user |
| agents | register_agent | Deploy agent with ABG, system prompt, tools, initial funding | Any user |
| agents | call_agent | Invoke agent with entrypoint and input | Any user |
| agents | update_agent | Update agent configuration | Controller |
| aivm | submit_inference_result | Submit inference output with proof or signature | Prover |
| tools | submit_tool_result | Submit tool execution result (web search, authenticated HTTP) | Enclave operator |
Network parameters
Configured limits and constants from the alpha runtime. Use these when sizing agent designs and estimating job throughput.
| Category | Parameter | Value |
|---|---|---|
| Block | Slot duration | 6 s |
| Block hash count | 2400 | |
| Max block weight | 2 s ref time | |
| Max block size | 5 MB | |
| Normal dispatch ratio | 75% | |
| AIVM | Max input size | 400 KB |
| Max output size | 1 MB | |
| Job expiry | 600 blocks | |
| Max expired per block | 32 | |
| Agents | Max ABG nodes | 256 |
| Max node size | 128 KB | |
| Max system prompt | 10 KB | |
| Agent name length | 64 bytes | |
| Max input size | 400 KB | |
| Max state fields | 64 | |
| Max messages per run | 10 | |
| Max steps per run | 64 | |
| Sync steps per tick | 16 | |
| Max call depth | 2 | |
| Inference retries / node | 2 | |
| Tool retries / node | 2 | |
| Tools | Max tools per agent | 16 |
| Max calls per message | 8 | |
| Tool name length | 64 bytes | |
| Max tool arguments | 64 KB | |
| Max tool result size | 128 KB | |
| Job expiry | 600 blocks | |
| Max expired per block | 10 | |
| Models | Model name length | 64 bytes |
| Consensus | Max authorities | 32 |
| SS58 prefix | 42 | |
| Economics | Token symbol | THE |
| Token decimals | 12 | |
| Existential deposit | 10⁹ (1 milli-unit) |
Cryptographic primitives
Theseus uses BLS12-381 for proof verification on-chain. Tensor Commits compose these into a single succinct proof per inference.
BLS12-381
Pairing-friendly elliptic curve. Used for KZG commitment verification on-chain via a native host function.
KZG (tiled, multivariate)
Polynomial commitment scheme. Tensors are tiled and committed using a product-power Structured Reference String.
Sumcheck (Fiat–Shamir)
Verifies linear operations (matrix multiplications) over committed tensors. Made non-interactive via Fiat–Shamir.
Plookup-style lookups
Proofs for nonlinear activations (GELU, SiLU, ReLU, softmax/exp) against precomputed tables.
VRF
Verifiable random function used to assign provers to inference jobs without manipulation.
Aura + GRANDPA
Block production (Aura, slot-based round-robin) and BFT finality (GRANDPA, ≥2/3 agreement).