Concepts / MVP

Spawning agents

Agents with can_spawn can create other agents at runtime, within limits on tools, models and depth. Spawning is declared in the file, not left to a prompt.

View .md

A swarm can grow while it runs. The overseer and any agent with can_spawn = true can call create_agent(hcl) with one agent block. The server parses it, validates it against the swarm, and creates it in Pending with the caller as its parent.

Declared, not prompted

Whether a team may grow is an attribute in the file:

HCL
agent "lead" {
  provider  = provider.anthropic
  model     = "claude-opus-5"
  prompt    = file("prompts/lead.md")
  can_spawn = true
}

can_spawn defaults to false. A prompt that says “create helpers” does nothing without it: the server rejects create_agent from an agent whose spec lacks it (spawn_not_allowed), and the tool is not registered for it. Putting the permission in the language means you can read from the file alone who can add agents, and a prompt injection cannot grant it. The overseer’s can_spawn is set on the swarm block and defaults to true.

Limits

RuleError
The caller must have can_spawnspawn_not_allowed
Spawn depth: declared agents and the overseer are depth 0; a chain may go to depth 3depth_limit
The child’s tools must be a subset of the parent’stools_not_allowed
The child’s provider and model must be the parent’s, or be used by a declared agentmodel_not_allowed
The block must be valid: no count or for_each, a free name, inputs and depends_on that resolveinvalid_agent

For the overseer, which has no tools of its own, the subset rule is replaced by the swarm-wide union: the child’s tools, provider and model must each appear on some declared agent. A child may itself set can_spawn = true, subject to the same rules and the depth limit.

There is no limit on the number of agents. --max-processes protects the machine, and max_cost_usd bounds the cost of spawning too many. See budgets.

Parents and children

  • A parent may stop only agents it created, with stop_agent(name, reason). The overseer may also stop a Stuck agent. convoy stop may stop any.
  • Stopping a parent stops its children first, depth-first.
  • A parent that Fails also stops its children.
  • Created agents exist only in the server. They do not appear in your .cvy files.

Why bounds matter

A web page read by one agent can carry instructions. Because a child can use at most what its parent has, and the overseer cannot change the goal, an injected instruction cannot widen the swarm’s reach. See also the overseer and agents.

Last updated 2026-11-05
esc
    ↑↓ to move · ↵ to open
    Menu
    Get started
    IntroductionInstallQuickstartYour first swarm
    Concepts
    Swarms and runsAgents and turnsTopics and the boardThe overseerSpawning agentsBudgets and limits
    DSL
    Language rulesswarmprovidertopicagentReferences and functionsValidation rules
    Providers
    Provider typesUsing a provider typeWriting a provider type
    CLI
    Overviewconvoy goalconvoy validateconvoy runconvoy statusconvoy watchconvoy sayconvoy stopconvoy uiconvoy provider
    Runtime
    convoydControllerMessage boardRunnerSwarm tools (MCP)Web UIDurability
    Architecture
    OverviewRepository layoutSeams and contractsHTTP API
    Examples
    OverviewWriter and criticResearch teamCode teamPaperBench replicationCommit0 libraryVending-BenchSWE-Lancer bountyτ²-bench loop
    Inspiration
    What we borrowedThe harness landscape