Cursor
Generate Cursor IDE agent configurations from AgenTopology definitions
Cursor Binding
The Cursor binding generates a .cursor/ directory with rules and agent configurations for the Cursor IDE.
Scaffolding
agentopology scaffold my-topology.at --target cursorGenerated File Structure
.cursor/
rules/
researcher.mdc # Cursor rule file per agent
writer.mdc
reviewer.mdc
topology.mdc # Top-level orchestration rules
agents.json # Agent registry and configurationRule Files
Each agent generates a .mdc (Markdown Cursor) rule file. These files use Cursor's rule format with frontmatter:
---
description: Research specialist that gathers context from the codebase
globs:
alwaysApply: false
---
# Researcher
## Role
You are the researcher agent in the code-review topology.
## Tools
Use the following tools to gather context:
- Read files to understand code structure
- Grep to search for patterns
- WebSearch for external documentation
## Instructions
Analyze the codebase thoroughly. Identify relevant files, patterns, and
dependencies before passing your findings to the writer agent.Topology Rule
The topology.mdc file provides the orchestration context so Cursor understands the multi-agent flow:
---
description: Code review topology - orchestrates researcher, writer, and reviewer agents
globs:
alwaysApply: true
---
# Code Review Topology
This workspace uses a pipeline pattern with three agents:
1. **Researcher** - Gathers context from the codebase
2. **Writer** - Produces code changes based on research
3. **Reviewer** - Reviews changes and requests revisions if needed
## Flow
researcher -> writer -> reviewer -> writer (on revision, max 2 iterations)Agent Registry
The agents.json file maps agent names to their configurations:
{
"topology": "code-review",
"pattern": "pipeline",
"agents": {
"researcher": {
"rule": "rules/researcher.mdc",
"tools": ["Read", "Grep", "WebSearch"]
},
"writer": {
"rule": "rules/writer.mdc",
"tools": ["Read", "Write"]
},
"reviewer": {
"rule": "rules/reviewer.mdc",
"tools": ["Read", "Grep"]
}
}
}Model Mapping
Cursor manages its own model selection, so the binding embeds model preferences as hints in the rule files rather than hard configuration:
| AgenTopology | Cursor Hint |
|---|---|
opus | Recommended: Claude Opus or equivalent |
sonnet | Recommended: Claude Sonnet or equivalent |
haiku | Recommended: fast model for simple tasks |
Limitations
- Cursor does not have native multi-agent orchestration. The binding generates rule files that provide context but cannot enforce execution order.
- Flow definitions are included as documentation in
topology.mdcbut are not executable. - Permission mappings are advisory. Cursor manages its own permission model.
- Hooks are not supported. Hook definitions are included as comments in the topology rule file.
- MCP server configs are not generated since Cursor manages MCP through its own settings UI.