AgenTopology

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

LevelDescription
shallowQuick pass, surface-level analysis. Minimal token usage
moderateBalanced analysis. Covers main points without exhaustive detail
thoroughDeep analysis. Explores edge cases and alternatives
exhaustiveMaximum 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:

LevelRelative Token UsageBest For
shallowLowFormatting, linting, quick checks
moderateMediumStandard reviews, summaries
thoroughHighSecurity reviews, architecture analysis
exhaustiveVery HighCompliance 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 shallow depth with faster, cheaper models for cost efficiency.
  • Pair thorough or exhaustive depth with capable models like opus for best results.
  • Depth interacts with metering — higher depth levels show up as higher token counts in your metrics.

On this page