Defaults
Set topology-wide default values for agents and configuration
Defaults
The defaults block sets topology-wide default values. Instead of repeating the same field on every agent, define it once in defaults and let agents inherit it automatically.
Basic Syntax
defaults {
model: sonnet
permissions: supervised
depth: moderate
}How Defaults Work
Any field set in defaults applies to all agents that do not explicitly override it:
topology dev-team : [pipeline] {
defaults {
model: sonnet
permissions: supervised
depth: moderate
}
# Inherits model: sonnet, permissions: supervised, depth: moderate
agent researcher {
tools: [Read, WebSearch]
}
# Inherits permissions: supervised, depth: moderate
# Overrides model
agent reviewer {
model: opus
tools: [Read, Grep]
}
# Inherits model: sonnet, depth: moderate
# Overrides permissions
agent deployer {
permissions: autonomous
tools: [Bash]
}
}Common Default Fields
| Field | Description |
|---|---|
model | Default model for all agents |
permissions | Default permission level |
depth | Default depth level |
isolation | Whether agents run in isolated contexts |
retry | Default retry count on failure |
behavior | Default behavior mode (blocking or advisory) |
Multiple Defaults
Set as many defaults as you want:
defaults {
model: sonnet
permissions: supervised
depth: moderate
retry: 2
isolation: true
}Overriding Defaults
An agent can override any default by specifying the field explicitly. The agent-level value always wins:
defaults {
model: sonnet
retry: 1
}
agent critical-agent {
model: opus
retry: 3
# model and retry are overridden; other defaults still apply
}Full Example
topology content-pipeline : [pipeline] {
defaults {
model: sonnet
permissions: supervised
depth: moderate
retry: 1
}
agent researcher {
role: "Researches topics and gathers sources"
tools: [WebSearch, Read]
}
agent writer {
role: "Writes content based on research"
tools: [Write]
depth: thorough
}
agent editor {
model: opus
role: "Reviews and polishes content"
tools: [Read, Write]
depth: thorough
}
flow {
researcher -> writer -> editor
}
}Tips
- Use
defaultsto reduce repetition and keep your topology DRY. - Agent-level fields always override defaults. There is no conflict — the most specific value wins.
- The
defaultsblock is optional. Topologies work fine without it. - Defaults apply only to agents, not to other blocks like
gatesorhooks.