AgenTopology

Agents

Define agents with models, roles, tools, permissions, and behavioral configuration

Agents

The agent block defines a single AI agent in your topology. Each agent has a model, an optional role, and a set of capabilities and constraints.

Basic Syntax

agent researcher {
  model: sonnet
  role: "Finds relevant information and summarizes findings"
  tools: [Read, Grep, WebSearch]
}

Field Reference

FieldTypeRequiredDescription
modelidentifierYesThe model to use (e.g. sonnet, opus, gpt-4o)
rolestringNoDescription of what this agent does
permissionsidentifierNoOne of supervised, autonomous, interactive, unrestricted
promptstring or blockNoSystem prompt — inline string or multi-line block
phaseidentifierNoAssigns agent to a named phase
toolslistNoTools this agent can use
disallowed-toolslistNoTools explicitly denied
readslistNoData sources this agent can read from
writeslistNoData destinations this agent can write to
outputslist or blockNoStructured outputs this agent produces
skipconditionNoCondition under which to skip this agent
retrynumberNoNumber of retry attempts on failure
isolationbooleanNoWhether to run in an isolated context
invocationidentifierNoauto (default) or manual
behavioridentifierNoblocking (default) or advisory
memorylistNoMemory domains this agent accesses
skillslistNoSkills available to this agent
mcp-serverslistNoMCP servers this agent connects to
backgroundbooleanNoWhether agent runs in the background

Permissions

LevelDescription
supervisedAgent actions require approval
autonomousAgent acts freely within its tool set
interactiveAgent can prompt the user for input
unrestrictedNo constraints on agent behavior
agent deployer {
  model: opus
  permissions: supervised
  tools: [Bash, Write]
}

Prompt Blocks

Short prompts use an inline string. Longer prompts use a prompt block:

agent writer {
  model: sonnet
  prompt {
    "You are a technical writer."
    "Always use active voice."
    "Keep paragraphs under 3 sentences."
  }
}

Tools

List tools by name. Use the mcp.server.* wildcard to grant all tools from an MCP server:

agent analyst {
  model: sonnet
  tools: [Read, Grep, mcp.postgres.*]
  disallowed-tools: [Bash]
}

Outputs

Define what structured data an agent produces:

agent classifier {
  model: sonnet
  outputs: [category, confidence]
}

Or use a block for richer output definitions:

agent classifier {
  model: sonnet
  outputs {
    category: "The document category"
    confidence: "0.0 to 1.0 confidence score"
  }
}

Skip Conditions

Skip an agent based on a prior agent's output:

agent formatter {
  model: sonnet
  skip: reviewer.verdict == "approved"
}

Tips

  • Every topology needs at least one agent.
  • The model field is the only required field.
  • Use disallowed-tools to deny specific tools while granting broad access via wildcards.
  • invocation: manual means the agent only runs when explicitly triggered (e.g. by a slash command or another agent).

On this page