AgenTopology

Topology Declaration

The root topology block, pattern catalog, and syntax fundamentals of the .at language

Topology Declaration

Every .at file begins with a single topology declaration. This is the root of your multi-agent system — it names the topology, declares its coordination patterns, and contains all agents, flows, gates, and configuration.

Syntax

topology my-team : [pipeline, human-gate] {
  # agents, flow, gates, and other blocks go here
}

The declaration has three parts:

PartExampleDescription
Namemy-teamA lowercase-with-hyphens identifier
Patterns[pipeline, human-gate]One or more coordination patterns
Body{ ... }All blocks for this topology

Patterns Catalog

Patterns tell AgenTopology how your agents coordinate. You can combine multiple patterns.

PatternDescription
pipelineAgents run in a fixed sequence, each passing output to the next
supervisorA lead agent delegates to and reviews work from sub-agents
fan-outWork is sent to multiple agents in parallel, then merged
orchestrator-workerAn orchestrator dynamically assigns tasks to a pool of workers
blackboardAgents read and write to a shared knowledge store
debateAgents argue positions and a judge synthesizes a conclusion
consensusAgents iterate toward agreement through rounds of discussion
market-routingTasks are routed to agents based on bids or capability matching
event-drivenAgents react to events rather than following a fixed flow
human-gateA human must approve before work continues past a checkpoint

Combine patterns with commas:

topology review-team : [pipeline, human-gate, fan-out] {
  # ...
}

Syntax Basics

The .at language uses a small set of primitives across all blocks.

Comments

Lines starting with # are comments:

# This is a comment
topology demo : [pipeline] {
  # Another comment
}

Identifiers

All names use lowercase letters and hyphens:

topology my-team : [pipeline] { }
agent code-reviewer { }

Strings

Strings are double-quoted:

role: "Senior code reviewer"

Numbers and Booleans

retry: 3
isolation: true

Lists

Square brackets delimit lists:

tools: [Read, Write, Grep]
patterns: [pipeline, fan-out]

Blocks

Curly braces delimit blocks. Blocks can be nested:

agent planner {
  model: sonnet
  prompt {
    "You are a project planner."
  }
}

Tips

  • A file must contain exactly one topology declaration.
  • The topology name becomes the identifier used by CLI commands like agentopology validate my-team.at.
  • Pattern selection affects validation rules. For example, human-gate requires at least one gates block.

On this page