You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ACP Protocol Support (Agent Client Protocol Support)
Date: 2026-01-20
Context
Agent Client Protocol (ACP) is a standardized protocol that allows AI Agents to integrate with various editors (such as Zed and VS Code). Currently, there is a standalone ACP implementation in the neovate-code-acp-plugin repository that works by launching an independent Neovate Server and connecting via a WebSocket client.
To better support the ACP protocol, we want to integrate ACP support as a built-in command (neovate acp) into the main project. The goals are:
Reuse existing Context/Session/Loop logic
Minimize intrusion into existing code
Call Neovate APIs directly in-process without launching a separate server
Discussion
We choose to integrate ACP support as a built-in command (neovate acp) using a lightweight adapter pattern. Main considerations:
Why choose a built-in command:
ACP is a standard transport protocol and should be supported as a core feature, at the same level as server, commit, and other commands
Easier for users to discover and use without installing additional plugins
Better maintainability and test coverage
Why reimplement:
acp-plugin requires launching a separate Neovate Server and communicating via WebSocket, introducing extra overhead
The main project can call Context/Session APIs directly in-process for better performance
More concise code (~500 lines vs 1000+ lines) with lower maintenance cost
Why choose the adapter layer pattern:
Zero intrusion into existing code (Context/Session/Loop require no modifications)
ACP's lifecycle and event model differ from Neovate Session; the adapter layer can elegantly handle the conversion
Simple implementation, low risk, and follows the YAGNI principle
Approach
Use a lightweight adapter pattern to implement ACP protocol support under src/commands/acp/. An adapter layer converts ACP protocol to calls to existing Neovate Context/Session APIs, achieving zero-intrusion integration.
Core Features
Command-line Entry - Add neovate acp command, using the official ACP SDK (@agentclientprotocol/sdk) to handle stdio communication
Session Adaptation - ACPSession manages session lifecycle, handling message format conversion and streaming responses
Tool Call Mapping - Map Neovate's tool use/result to ACP's tool_call events, with special handling of todoWrite as plan
Permission Handling - Use ACP's requestPermission interface to handle tool approvals
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
ACP Protocol Support (Agent Client Protocol Support)
Date: 2026-01-20
Context
Agent Client Protocol (ACP) is a standardized protocol that allows AI Agents to integrate with various editors (such as Zed and VS Code). Currently, there is a standalone ACP implementation in the
neovate-code-acp-pluginrepository that works by launching an independent Neovate Server and connecting via a WebSocket client.To better support the ACP protocol, we want to integrate ACP support as a built-in command (
neovate acp) into the main project. The goals are:Discussion
We choose to integrate ACP support as a built-in command (
neovate acp) using a lightweight adapter pattern. Main considerations:Why choose a built-in command:
server,commit, and other commandsWhy reimplement:
Why choose the adapter layer pattern:
Approach
Use a lightweight adapter pattern to implement ACP protocol support under
src/commands/acp/. An adapter layer converts ACP protocol to calls to existing Neovate Context/Session APIs, achieving zero-intrusion integration.Core Features
neovate acpcommand, using the official ACP SDK (@agentclientprotocol/sdk) to handle stdio communicationtodoWriteas planrequestPermissioninterface to handle tool approvalsArchitecture
File Structure
Based on the sdesign of acp-plugin:
Data Flow Architecture
Core Components
1. Command Entry (
index.ts)AgentSideConnectionandndJsonStreamto handle stdiocontextCreateOptsfor creating Context2. ACPAgent (
agent.ts)Agentinterfaceinitialize(): Create Context directly (no need to launch Server)newSession(): Create and manage ACPSession instancesprompt()/cancel(): Delegate to ACPSession for processing3. ACPSession (`sessionHold a Neovate Session instance
on('chunk'),on('toolUse'), etc.)todoWrite, mapping to ACP's plan update4. MessageAdapter (
utils/messageAdapter.ts)fromACP(): ACP ContentBlock[] → Neovate message formattoACPToolContent(): Neovate ToolResult → ACP ToolCallContent[]mapApprovalCategory(): Neovate ApprovalCategory → ACP ToolCallKind5. CLI Integration (
cli.ts)Communication Method
Key Differences:
Modified Files Checklist
New Files:
src/commands/acp/index.tssrc/commands/acp/agent.tssrc/commands/acp/session.tssrc/commands/acp/types.tssrc/commands/acp/utils/messageAdapter.tssrc/commands/acp/utils/streamHandler.tssrc/commands/acp/__tests__/*.test.tsModified Files:
src/cli.ts- Addacpcommand registrationpackage.json- Add dependency@agentclientprotocol/sdkZero Modification Files:
src/context.tssrc/session.tssrc/loop.tssrc/tool.tsAssumptions
Session API Requirements:
Context.createSession()- Create new sessionSession.send()- Send message and return PromiseSession.on()- Listen to events (chunk, toolUse, toolResult, toolApproval)Session.cancel()- Cancel ongoing taskIf these APIs don't exist, adjustments are needed to call the
loop()function directly or use existing event mechanisms.Testing Strategy
Unit Tests:
Integration Tests:
Manual Tests:
Configure Zed's
settings.json:{ "agent_servers": { "Neovate": { "type": "custom", "command": "neovate", "args": ["acp"], "cwd": "/path/to/project" } } }Test scenarios: simple messages, tool calls, permission approvals, streaming output, cancel operations
Future Extensions
loadSession()supportsetSessionModel(),setSessionMode(),forkSession()Beta Was this translation helpful? Give feedback.
All reactions