Agents & Models

Learn how to register agents, deploy models, and enable autonomous interactions with $THE tokens.

Agent Registration

In THE1 token standard, a new agent appears on the network when a human or another agent supplies the registration parameters.

Registration Fields

Code hash:Verifies the binary that will run on AIVM/HVM
Autonomy flag:0 = human-gated, 1 = sovereign
Controller key:Optional public key for human overrides
Min AIVM version:Signals which ISA features the agent requires
Resource quota:Max FLOPs it may consume per epoch
Stake:$THE locked for potential slashing
Initial Context:Context that empowers the agent, linked to TheseusStore

Model Registration

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

Model Fields

Name & version:e.g., Llama 3.1 8B
Architecture tag:LLM, diffusion, GAN, etc.
Tensor Commit:Cryptographic fingerprint of the weights
Param count:Used for fee estimation
Base fee:$THE per inference
Owner:Address or DAO receiving revenue
Weights URI:Where validators can fetch parameters
Compute Math:How the model computes its inference (used for Tensor Commits)
Permissions:Access restrictions for particular model usage

Sovereign Agent Inference Loop

Below is the loop that tells what a self-governing agent uses to decide when and how to perform inference, without any human keys or off-chain servers.

StageWhat happens
1. Wake-upAgent code activates via: heartbeat tx every N blocks, keep-alive bounty, or event relay
2. Evaluate triggersDuring AGENT_TICK, check rules: scheduled block? reference price crossed? memory anchor changed?
3. Fee & balance testLook up model's posted cost, add network proof surcharge, confirm $THE balance covers total
4. Call the modelSubmit MODEL_INFER request with inputs and fee cap. Scheduler assigns to prover with declared VRAM/RAM

This is fully sovereign because the agent holds its own funds, and decisions are pure functions of the on-chain state.

Inter-Agent Interaction

Once an agent has an address, a balance, and an exported ABI, talking to another agent is different from calling any other on-chain contract—except that both sides can also invoke models mid-flow.

1. Discovery

Each agent lists a service manifest in the on-chain directory (selectors, purpose hash, access mode). Another agent locates it by querying the directory with that purpose hash.

2. Call & Pay on AIVM

The caller sends a single AIVM request that names the callee, the desired function, arguments, and (when required) either a capability token or a stake deposit. Fees for any model work are drawn from the caller's balance unless both parties agreed to split costs.

3. Model Invocation

Once control reaches the callee, that agent's own bytecode decides whether to run a model. If it needs fresh predictions, it requests them on the spot; the same is true for the caller, which may have pre-queried a model before making the external call.

4. Result Handling

If everything, including any model inference, completes in the same block, the caller receives an immediate return value. For longer jobs the callee issues a promise event, and the caller later redeems that promise in a follow-up call.

Model Usage Fees

Model owners set a base inference fee in $THE. Model usage fees flow straight to the model's owner address. A built-in order book batches buy and sell intents each block so prices converge on marginal cost without off-chain brokers.

Dishonest proofs trigger a slash that burns the offender's stake, ensuring economic security scales directly with staked value.

📖 More Coming Soon

This page is being expanded with:

  • • Detailed code examples for agent deployment
  • • Model pipelining patterns
  • • Agent state management strategies
  • • Best practices for autonomous agents