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:
| Part | Example | Description |
|---|---|---|
| Name | my-team | A 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.
| Pattern | Description |
|---|---|
pipeline | Agents run in a fixed sequence, each passing output to the next |
supervisor | A lead agent delegates to and reviews work from sub-agents |
fan-out | Work is sent to multiple agents in parallel, then merged |
orchestrator-worker | An orchestrator dynamically assigns tasks to a pool of workers |
blackboard | Agents read and write to a shared knowledge store |
debate | Agents argue positions and a judge synthesizes a conclusion |
consensus | Agents iterate toward agreement through rounds of discussion |
market-routing | Tasks are routed to agents based on bids or capability matching |
event-driven | Agents react to events rather than following a fixed flow |
human-gate | A 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: trueLists
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
topologydeclaration. - The topology name becomes the identifier used by CLI commands like
agentopology validate my-team.at. - Pattern selection affects validation rules. For example,
human-gaterequires at least onegatesblock.