Editor Integration (ACP)
Agent Client Protocol (ACP) integration for editors — VS Code, Cursor, Windsurf, Zed, JetBrains — without editor-specific logic in core runtime.
3 min read
This is a migrated reference document from the original Anvio source repo. Content is preserved as-is; canonical documentation lives in the sections above in the sidebar.
Original path: docs/39-editor-integration.md
Agent Client Protocol (ACP) integration for editors — VS Code, Cursor, Windsurf, Zed, JetBrains — without editor-specific logic in core runtime.
Principles
- Editors interact via ACP APIs or MCP
- Core runtime remains editor-agnostic
- Editor adapters live in
packages/acpandpackages/runtimes - Progressive enhancement: local runtime works without any editor
Supported Editors (Target)
Status (2026-10-25):
packages/acpcontains onlysrc/acp-server.tsandsrc/protocol/. The per-editor packages listed below (packages/acp/vscode,windsurf,zed,jetbrains) do not exist. Cursor integration goes through thecursorruntime. Audit finding G-07 / T-015 records that this server is a proprietary prompt/response bridge and is not compatible with the standard Agent Client Protocol.
| Editor | Protocol | Package |
|---|---|---|
| Cursor | ACP + MCP | packages/runtimes/cursor |
| VS Code | ACP extension | packages/acp/vscode |
| Windsurf | ACP | packages/acp/windsurf |
| Zed | ACP | packages/acp/zed |
| JetBrains | ACP plugin | packages/acp/jetbrains |
Architecture
ACP Server
# workspace/anvio.yaml
spec:
acp:
enabled: true
port: 8765
host: 127.0.0.1
editors:
cursor:
enabled: true
vscode:
enabled: falseSequence: Editor Request via ACP
MCP as Alternative Path
Editors with native MCP support can connect directly:
# Editor MCP config points to Anvio MCP server
{
"mcpServers": {
"anvio": {
"command": "anvio",
"args": ["mcp", "serve"]
}
}
}Anvio exposes workspace tools, agents, and goals via MCP — editor uses Anvio as MCP server.
Bidirectional Modes
| Mode | Direction | Use Case |
|---|---|---|
| Anvio → Editor | Anvio uses editor as runtime | runtime.provider: cursor |
| Editor → Anvio | Editor uses Anvio as backend | anvio mcp serve |
Configuration per Agent
# workspace/agents/software-engineer.yaml
spec:
runtime:
provider: cursor
acp:
workspaceFolder: ${EDITOR_WORKSPACE}
permissions:
- filesystem
- terminalExtension Guide
- Implement ACP handler for new editor in
packages/acp/\{editor\}/ - No changes to
packages/coreorpackages/agents - Register in
packages/runtimesfactory
CLI
anvio acp serve # Start ACP server (POST /prompt, POST /prompt/stream)
anvio acp status # Server status
anvio runtime test cursor # Test Cursor runtime connection (requires ANVIO_ACP_ENDPOINT)Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /health | Health check |
| POST | /prompt | Run agent, return full response JSON |
| POST | /prompt/stream | SSE stream of \{ type: 'chunk', delta \} events |
Set ANVIO_ACP_ENDPOINT=http://127.0.0.1:8765 for agents with runtime.provider: cursor.
Operational Runbook
| Scenario | Action |
|---|---|
| Editor not connecting | Check anvio acp status, firewall on port 8765 |
| Wrong workspace | Set EDITOR_WORKSPACE env var |
| Fallback to local | Agent spec.runtime.fallback: local |
Design Constraint
Zero editor imports in packages/core, packages/agents, packages/platform.
All editor-specific code isolated to packages/acp and packages/runtimes.
Package Boundaries
- ACP Server:
packages/acp/src/acp-server.ts - Protocol:
packages/acp/src/protocol/ - Editor adapters:
packages/acp/src/editors/\{cursor,vscode,zed\}/ - Runtime bridge:
packages/runtimes/src/cursor/cursor-runtime.ts
Last updated on
Integration Architecture
Vendor-agnostic integration framework for external services. **MCP-first** — use MCP servers whenever possible; fall back to direct adapters only when MCP is unavailable.
Subagent Delegation
Native multi-agent delegation with task assignment, result aggregation, failure handling, and progress tracking.