AgenTopology

Copilot CLI

Generate GitHub Copilot CLI instructions from AgenTopology definitions

Copilot CLI Binding

The Copilot CLI binding generates GitHub Copilot CLI instruction files from your .at topology.

Scaffolding

agentopology scaffold my-topology.at --target copilot-cli

Generated File Structure

.github/
  copilot/
    agents/
      researcher.md       # Agent instruction file
      writer.md
      reviewer.md
    instructions.md       # Top-level Copilot instructions
    topology.json         # Topology metadata

Agent Instruction Files

Each agent produces a markdown instruction file following Copilot's conventions:

# Researcher

You are the researcher agent in the code-review topology.

## Responsibilities
- Analyze the codebase using file reading and search tools
- Gather context about code structure, patterns, and dependencies
- Produce a structured research summary

## Tools Available
- Read: Read file contents
- Grep: Search for patterns across the codebase
- WebSearch: Look up external documentation

## Output Format
Provide your findings as a structured summary with:
1. Relevant files identified
2. Key patterns found
3. Dependencies and relationships

Top-Level Instructions

The instructions.md file provides Copilot with the overall topology context:

# Code Review Topology

This workspace uses a pipeline pattern for code review with three agents.

## Agents
1. **Researcher** - Gathers context (see agents/researcher.md)
2. **Writer** - Produces changes (see agents/writer.md)
3. **Reviewer** - Reviews output (see agents/reviewer.md)

## Flow
The agents execute in sequence: researcher -> writer -> reviewer.
If the reviewer requests revisions, the writer re-executes (max 2 iterations).

Topology Metadata

The topology.json stores structured metadata about the topology:

{
  "name": "code-review",
  "pattern": "pipeline",
  "agents": ["researcher", "writer", "reviewer"],
  "flow": [
    { "from": "researcher", "to": "writer" },
    { "from": "writer", "to": "reviewer" },
    {
      "from": "reviewer",
      "to": "writer",
      "condition": "verdict == 'revise'",
      "maxIterations": 2
    }
  ]
}

Model Mapping

Copilot CLI manages its own model selection. The binding includes model tier hints in the agent instructions:

AgenTopologyCopilot Hint
opusHigh-capability model recommended
sonnetStandard model recommended
haikuFast/lightweight model recommended

Limitations

  • Copilot CLI does not support multi-agent orchestration natively. The binding generates instruction files that provide context but rely on manual or scripted execution.
  • Tool access is advisory. Copilot manages its own tool permissions.
  • Hooks are not supported. Hook definitions are documented in the instructions file.
  • MCP server configurations are not generated. Copilot uses its own extension model.
  • Permission and metering blocks are included as documentation only.

On this page