AgenTopology

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

FieldDescription
modelDefault model for all agents
permissionsDefault permission level
depthDefault depth level
isolationWhether agents run in isolated contexts
retryDefault retry count on failure
behaviorDefault 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 defaults to reduce repetition and keep your topology DRY.
  • Agent-level fields always override defaults. There is no conflict — the most specific value wins.
  • The defaults block is optional. Topologies work fine without it.
  • Defaults apply only to agents, not to other blocks like gates or hooks.

On this page