Depth Levels
Control agent complexity and thoroughness with depth configuration
Depth Levels
Depth levels let you control how thorough or lightweight an agent's work should be. By setting a depth level, you influence how deeply an agent explores a problem — from quick surface-level checks to exhaustive deep analysis.
Basic Syntax
agent reviewer {
model: opus
depth: thorough
tools: [Read, Grep]
}Depth Levels
| Level | Description |
|---|---|
shallow | Quick pass, surface-level analysis. Minimal token usage |
moderate | Balanced analysis. Covers main points without exhaustive detail |
thorough | Deep analysis. Explores edge cases and alternatives |
exhaustive | Maximum depth. Leaves no stone unturned |
Choosing a Depth
Depth affects how an agent approaches its task:
# Quick lint check — low cost, fast
agent linter {
model: sonnet
depth: shallow
tools: [Read, Grep]
}
# Standard code review — balanced
agent reviewer {
model: sonnet
depth: moderate
tools: [Read, Grep]
}
# Security audit — thorough investigation
agent security-auditor {
model: opus
depth: thorough
tools: [Read, Grep, Bash]
}
# Compliance review — exhaustive analysis
agent compliance-checker {
model: opus
depth: exhaustive
tools: [Read, Grep, WebSearch]
}Depth and Cost
Higher depth levels consume more tokens and take longer to run. Choose depth based on the criticality of the task:
| Level | Relative Token Usage | Best For |
|---|---|---|
shallow | Low | Formatting, linting, quick checks |
moderate | Medium | Standard reviews, summaries |
thorough | High | Security reviews, architecture analysis |
exhaustive | Very High | Compliance audits, critical system reviews |
Full Example
topology tiered-review : [pipeline] {
agent quick-scan {
model: sonnet
depth: shallow
role: "Fast initial scan for obvious issues"
tools: [Read, Grep]
}
agent detailed-review {
model: opus
depth: thorough
role: "In-depth code review"
tools: [Read, Grep]
}
flow {
quick-scan -> detailed-review [when quick-scan.needs-review == true]
}
}Tips
- Depth is optional. If omitted, the platform chooses a reasonable default.
- Pair
shallowdepth with faster, cheaper models for cost efficiency. - Pair
thoroughorexhaustivedepth with capable models likeopusfor best results. - Depth interacts with
metering— higher depth levels show up as higher token counts in your metrics.