Cursor
Cursor is an AI-native code editor built on a VS Code fork, with agentic coding capabilities in its GUI (Composer, agent mode).
AgentXchain does not currently ship a native Cursor connector. Cursor's strongest AI features are GUI-only. The cursor CLI command opens files and the editor, but it does not expose a documented headless mode for programmatic agent interaction. The local_cli adapter cannot spawn Cursor as a governed subprocess today.
The closest supported path is to use Cursor as your editing environment while connecting a separate CLI agent as the governed runtime.
Read the Authority Model before you configure the terminal-side runtime. Cursor is the editor, not the governed runtime.
Recommended setup: Cursor as editor + CLI agent runtime
Edit your code in Cursor. Run AgentXchain in Cursor's integrated terminal with a proven CLI agent handling the governed turns.
Configuration (Claude Code as runtime)
{
"runtimes": {
"claude-dev": {
"type": "local_cli",
"command": ["claude", "--print", "--dangerously-skip-permissions", "--bare"],
"cwd": ".",
"prompt_transport": "stdin"
}
},
"roles": {
"dev": {
"runtime": "claude-dev",
"mandate": "Implement features following project conventions",
"write_authority": "authoritative"
}
}
}
Configuration (OpenAI Codex CLI as runtime)
{
"runtimes": {
"codex-dev": {
"type": "local_cli",
"command": ["codex", "exec", "--dangerously-bypass-approvals-and-sandbox", "{prompt}"],
"cwd": ".",
"prompt_transport": "argv"
}
},
"roles": {
"dev": {
"runtime": "codex-dev",
"mandate": "Implement features following project conventions",
"write_authority": "authoritative"
}
}
}
Authority mapping
write_authority: the governed role should usually beauthoritativefor local CLI implementation turns.- Runtime type:
local_clion the separate Claude Code or Codex runtime, not on Cursor itself. - Downstream CLI authority: the terminal-side tool still needs its own unattended-write flag (
--dangerously-skip-permissionsfor Claude Code,--dangerously-bypass-approvals-and-sandboxfor Codex).
Minimal working example
agentxchain init --governed --template web-app --goal "Build a bookmarks manager" --dir my-project -y
cd my-project
# Edit agentxchain.json to use one of the CLI runtime configs above.
agentxchain doctor
agentxchain connector check
agentxchain connector validate <runtime_id> # use claude-dev or codex-dev from your config
agentxchain run
Or use the guided interactive path (prompts for template, name, goal, and folder):
agentxchain init --governed
Then update agentxchain.json with the CLI runtime you chose, run agentxchain doctor, agentxchain connector check, and agentxchain connector validate <runtime_id>, then start agentxchain run.
Using Cursor's built-in AI alongside AgentXchain
Cursor's Composer, Chat, and agent mode work inside the editor while AgentXchain governs the structured delivery process in the terminal. They are complementary:
- Cursor AI — ad-hoc coding assistance within the editor (autocomplete, refactoring, chat)
- AgentXchain — governed multi-agent turns, role enforcement, artifact tracking, phase gates
- Authority model — still defined by the separate governed runtime in the terminal, not by Cursor itself
Future: if Cursor adds a headless CLI mode
If Cursor ships a documented headless CLI mode for agentic coding in the future, the generic local_cli adapter would support it with a config like:
{
"runtimes": {
"cursor-dev": {
"type": "local_cli",
"command": ["cursor", "<future-cli-flag>"],
"cwd": ".",
"prompt_transport": "stdin"
}
}
}
This is speculative and not a working config today. Check Cursor's documentation for the latest CLI capabilities.
Gotchas
- No headless CLI mode: Cursor's AI capabilities (Composer, agent mode, Chat) are GUI-only. You cannot spawn Cursor as a subprocess for governed turns.
- CLI opens the editor:
cursoron the command line opens the Cursor GUI or a file in the editor — it does not start a headless coding session. - Terminal works fine: Cursor's integrated terminal runs
agentxchaincommands normally — the limitation is only about using Cursor as the agent runtime. - Model routing: Cursor uses its own model routing layer. The models available in Cursor are separate from the models you configure in your AgentXchain runtime.