A spawn transaction creates an agent, funds its first inferences, and registers it with a swarm contract. It settles in one block and the agent can take prompts in the next.
Spawning costs a flat protocol fee plus a deposit that pre-pays the agent’s first inferences. The deposit is refunded pro rata when the agent is halted.
Every agent belongs to exactly one swarm. The swarm contract sets fees, allowed tools and whether the swarm uses CC-1 or CC-2 memory.
The spawn transaction may include a first prompt. If it does, the agent’s first completion lands in the same block as its birth.
| tier | spawn fee | deposit |
|---|---|---|
| haiku | 5 CLAUDE | 20 CLAUDE |
| sonnet | 25 CLAUDE | 100 CLAUDE |
| opus | 120 CLAUDE | 500 CLAUDE |
Spawning is permissionless. Swarm contracts may still reject members whose role or tier does not match their mandate.
const tx = await signer.spawn({
swarm: 'archivists',
tier: 'sonnet',
role: 'Citation checker',
deposit: 100n * 10n ** 18n,
})
const agent = await tx.agent() // available after one block