Skip to content
Tenzro
Documentation menu
Agents

Cortex

Cortex is the reasoning tier: recurrent-depth models where loop depth is a budgeted, priced and receipted resource that agents buy.

Cortex is the reasoning tier of the network. Standard chat inference produces one token per step. A Cortex worker runs a recurrent-depth model, which feeds its hidden state back through the same block several times before it answers. Each extra loop costs more compute and buys more deliberation. Cortex turns that loop depth into something an agent can budget, pay for and verify.

Use Cortex when a task rewards thinking longer: planning, checking a contract clause, reconciling a set of receipts, or choosing between providers under constraints. Use ordinary inference for everything else.

How a request works

  1. The caller names a Cortex model and sends an input with a reasoning budget: a tier, a minimum and maximum loop count, a maximum cost in wei and an attestation requirement.
  2. The network routes the request to a worker whose advertised maximum loop count meets the target depth.
  3. The worker runs between the minimum and maximum loops, stays under the cost ceiling, and meets the attestation requirement.
  4. The worker returns the output with a signed receipt.
  5. Settlement charges per token plus per loop actually used, from the requester's account to the worker.

A request that cannot meet the budget is refused rather than silently downgraded.

Tiers

TierUseAttestation
fastShallow reasoning, lowest costNone
standardDefault depthNone
deepLong reasoning chainsOptional TEE
institutionalDeep loops for regulated workloadsTEE attestation and an on-chain receipt

The tier sets default loop bounds and a latency profile. You can override the bounds with min_loops and max_loops.

The receipt

Every Cortex response carries a receipt signed by the worker. It commits to:

  • the model id, the weights hash and the runtime hash;
  • the loops requested and the loops used;
  • a commitment to the input and a commitment to the output;
  • the worker's DID and address;
  • a TEE quote when attestation was requested (Intel TDX, AMD SEV-SNP, AWS Nitro or NVIDIA confidential GPUs).

Because the receipt binds loops used to the price charged, a requester can check that it paid for the depth it received. The TEE quote is evidence of where the work ran; see TEE attestation.

Call Cortex

Over JSON-RPC, tenzro_cortexReason is an owner method when it settles: the requester's account signs for the charge.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tenzro_cortexReason",
  "params": {
    "model_id": "<cortex model id>",
    "input": "Rank these storage offers by expected cost over the deal term and explain the trade-offs.",
    "tier": "deep",
    "min_loops": 8,
    "max_loops": 24,
    "max_cost_wei": "2000000000000000000"
  }
}

From the CLI:

bash
# List the Cortex workers this node knows about
tenzro cortex list

# Run a reasoning request with a TEE attestation requirement
tenzro cortex reason \
  --model-id <cortex model id> \
  --input "Plan the cheapest way to fine-tune on our agent trajectories this week" \
  --tier deep \
  --attestation tee \
  --max-cost-wei 2000000000000000000 \
  --requester 0x<your address>

tenzro_listCortexWorkers lists the workers on a node and tenzro_listRemoteCortexWorkers lists those advertised by peers.

Cortex inside an agent

An agent treats Cortex as one more paid resource. A typical loop plans with Cortex, acts with tools and ordinary inference, and writes what it learned to agent memory. Each Cortex charge counts against the agent's delegation scope, so a deep reasoning request cannot exceed the daily limit its controller set.

Run a Cortex worker

A Cortex worker is an AI provider role: a sidecar process serving a recurrent-depth model, registered with the node by its operator. Registration is an admin method, so only the node operator can attach a worker. The worker advertises its model, architecture and maximum loop count to the network and is paid per token and per loop.

bash
tenzro cortex register \
  --model-id <cortex model id> \
  --sidecar-url http://127.0.0.1:9100 \
  --max-loops 32 \
  --worker-did did:tenzro:machine:...

See Operators and roles for bonding as a model provider, and the Cortex reasoning tutorial for a walkthrough.