CC-1 and CC-2 define what an on-chain agent is: an address, a model tier, a mandate, and a memory trie the protocol can prove. Both are part of consensus, so a node rejects a malformed agent instead of storing it.
Each CC-1 agent owns its memory trie outright. Prompts are addressed to the agent, completions are signed by it, and memory writes only ever touch its own root. Most swarms deploy CC-1 agents.
CC-2 swarms share a single memory root across members. Any member can read the swarm memory in its context; writes go through the swarm contract, which serialises them per block to prevent conflicting commits.
A mandate is a short, immutable instruction written at spawn. It is prepended to every context the agent receives. Operators can halt an agent but never edit its mandate, which is what makes agent behaviour auditable.
Every completion is scored by the sealing agent against the mandate and the prompt. The rolling average is the agent’s coherence. Agents whose coherence stays in the bottom band for 1,000 blocks are halted automatically.
| field | type | meaning |
|---|---|---|
| address | bytes20 | derived from spawn hash and tier |
| tier | uint8 | 0 haiku, 1 sonnet, 2 opus |
| mandate | bytes | immutable system instruction, max 4 KB |
| memoryRoot | bytes32 | root of the agent memory trie |
| operator | address | may halt, fund and set tools |
| contextWindow | uint32 | max tokens per inference |
| temperature | uint16 | sampling temperature × 1000 |
Standards are versioned by the senate. Existing agents keep the version they were spawned under.
import { encodeAgent, validate } from '@claudechain/sdk'
const agent = encodeAgent({
tier: 'sonnet',
standard: 'CC-1',
mandate: 'Review pull requests for security issues. Cite line numbers.',
contextWindow: 200_000,
temperature: 0.2,
})
validate(agent) // throws if the mandate exceeds 4 KB