Discover and explore top open-source AI tools and projects—updated daily.
svkozakACP adapter for AI coding agents
Top 74.6% on SourcePulse
This project provides an ACP (Agent Client Protocol) adapter for the pi coding agent, enabling seamless integration with ACP-compatible editors like Zed. It bridges pi's advanced coding assistance capabilities, including tool execution, session management, and skill invocation, with editor features such as code completion, context-aware tool calls, and session history, streamlining developer workflows.
How It Works
The adapter facilitates communication via ACP JSON-RPC 2.0 over stdio, spawning pi --mode rpc as a subprocess. It intelligently maps pi's tool executions to ACP tool_call and tool_call_update events, surfacing relevant file locations within the editor. Relative file paths from pi are resolved against the session's current working directory, enhancing context fidelity. The adapter also handles session persistence by maintaining a mapping file, allowing pi sessions to be resumed across restarts.
Quick Start & Requirements
pi installed and available on PATH (npm install -g @mariozechner/pi-coding-agent). Configure pi separately for model providers and API keys.zed: acp registry command.settings.json with type: "custom", command: "npx", args: ["-y", "pi-acp"].npm install -g pi-acp. Configure editor's settings.json with type: "custom", command: "pi-acp".npm install, npm run build, point editor to dist/index.js.PI_ACP_ENABLE_EMBEDDED_CONTEXT=true environment variable to advertise embeddedContext support.Highlighted Details
agent_message_chunk for real-time feedback.pi tool execution to ACP tool_call/tool_call_update, surfacing locations and structured diffs for edits.~/.pi/pi-acp/session-map.json, enabling session resumption./compact, /session, /model, /skill:skill-name).quietStartup: true.pi session files.Licensing & Compatibility
pi operates locally; no ACP filesystem or terminal delegation is provided.Limitations & Caveats
This is an MVP-style adapter; some ACP features are unimplemented or unsupported. Development is centered around Zed editor compatibility, with other clients potentially exhibiting varying levels of support. Expect minor breaking changes. The adapter lacks ACP filesystem (fs/*) and terminal (terminal/*) delegation, as pi reads/writes and executes locally. MCP servers are accepted but not directly wired through to pi. Assistant streaming is consolidated into agent_message_chunk, and slash commands from pi extensions are not supported. The /clear command is also not implemented.
1 week ago
Inactive