AI coding is becoming easier as developers can now work with smart agents directly inside their editors. Zed ACP makes this possible by connecting AI coding agents with Zed, so you can get help without constantly switching between different tools. It gives you more flexibility to choose how you want to code, manage tasks, and work with AI. In this guide, we'll explain how Zed ACP works and how you can use it inside your editor.
What is Zed ACP?
Zed ACP stands for Agent Client Protocol, an open protocol that lets AI coding agents connect directly with the Zed editor. It provides a standardized way for AI coding agents to communicate with the editor, allowing them to access project context, suggest changes, and assist with coding tasks through the editor interface. Instead of using a separate tool, you can work with AI agents through the same interface. This gives developers more freedom to choose and switch between agents based on their needs.
How does Agent Client Protocol (ACP) work?
AI agents need a clear way to communicate with the editor to understand tasks, access the right context, and make changes when needed. ACP provides this connection through a standardized communication process, making it easier for AI agents and editors to exchange information and work together. Here's how Agent Client Protocol works.
ACP connects AI agents and coding environments
The ACP architecture creates a connection between the developer, Zed Editor, and an AI coding agent through the ACP protocol. Zed acts as the client, sending tasks and context to the agent, which can then use an LLM, tools, and the codebase to complete the work. This setup keeps communication between the editor and agent organized, making it easier to handle coding tasks from one place.
Developer
↓
Zed Editor (ACP Client)
↓
ACP Protocol
↓
AI Coding Agent
↓
LLM + Tools + CodebaseACP vs MCP: What is the difference?
ACP and MCP may seem similar because both help AI systems interact with other components, but they serve different roles. ACP focuses on connecting AI coding agents with editors and development environments, while MCP connects AI applications with external tools, data sources, and services. Here's how the two protocols differ:
| Protocol | Main purpose |
|---|---|
| ACP | Connect AI agents with coding environments |
| MCP | Connect AI models/agents with external tools and data sources |
Why use ACP in Zed?
ACP can make the coding experience more flexible by bringing AI agents closer to the tools and files developers already use. It can simplify how agents interact with the editor and help reduce the need to switch between different applications. Here are the main reasons to use ACP in Zed:
Use different AI coding agents in one editor
ACP allows Zed to work with multiple AI coding agents through the same protocol. Developers are no longer limited to the AI features built into a specific editor or required to switch between different coding environments.
With ACP-compatible agents, developers can:
Choose AI agents based on different coding tasks
Switch between agents without changing their editor workflow
Test new AI coding tools as they become available
For example, developers can connect Kimi Code CLI to Zed through ACP and use Kimi Code CLI's coding capabilities directly inside the Zed environment.
Keep AI assistance inside the coding workflow
One of the biggest advantages of ACP is that it brings AI agents closer to the development process. Instead of copying code between a chatbot and an editor, developers can interact with AI agents directly within Zed.
ACP enables AI agents to interact with:
Project context provided by the editor
Open files and code information
Developer instructions from the editor
This creates a smoother workflow for tasks such as:
Explaining unfamiliar code
Generating new features
Refactoring existing files
Debugging issues across a project
Separate the editor from the AI agent
ACP creates a clear separation between the coding environment and the AI model powering the agent.
With this architecture:
Zed focuses on providing a fast and efficient development interface
AI agents handle reasoning, code generation, and task execution
Developers can replace or add agents without changing the editor
This flexibility helps prevent developers from being locked into a single AI coding solution and supports a more open AI development ecosystem.
Build a more flexible agent-based development workflow
Modern AI coding is moving from simple code completion toward autonomous agents that can understand projects, plan tasks, and execute multi-step changes.
ACP provides the connection layer needed for these workflows in Zed. Combined with tools such as MCP (Model Context Protocol), AI agents can access additional tools, external resources, and development services while staying connected to the editor workflow.
For developers, this means Zed can become a central workspace where different AI agents collaborate with code, tools, and project context.
How does Zed work with ACP-compatible agents?
Zed uses ACP (Agent Client Protocol) to connect external AI coding agents through a standardized interface. In this setup, Zed acts as the ACP client, while the connected AI coding tool works as the ACP agent.
When developers begin an AI coding session in Zed, the editor communicates with the agent through ACP. This allows the agent to receive coding requests, access relevant project context, and send responses or code changes back to the editor.
This architecture keeps the editor separate from the AI agent, allowing different ACP-compatible agents to connect with Zed without requiring custom integration for each tool.
With ACP support, developers can connect AI coding agents such as Kimi Code CLI to Zed and use AI-powered coding assistance directly within their existing development workflow.
How to connect Kimi Code CLI to Zed with ACP?
Kimi Code CLI supports ACP integration, letting developers use Kimi's AI coding capabilities directly inside Zed. The setup only requires installing Kimi Code CLI, completing authentication, and adding an ACP agent configuration in Zed.
Prerequisites
Before connecting Kimi Code CLI to Zed, make sure you have:
Installed Kimi Code CLI
Completed Kimi Code CLI login setup
Installed the latest version of Zed with ACP support
Kimi Code CLI exposes the kimi acp command, which starts the CLI in ACP mode. Zed launches this command as an ACP agent and communicates with it through the protocol.
Step 1: Find the Kimi Code CLI path (Optional)
In most cases, you can use kimi directly in the configuration. If Zed cannot find the command, check the installation path:
which kimiCopy the returned path for later use.
This is especially useful on macOS because applications launched from the desktop may not inherit the terminal's PATH environment variables.
Step 2: Configure Kimi Code CLI in Zed
Open the Zed configuration file:
~/.config/zed/settings.jsonAdd the following agent_servers configuration:
{
"agent_servers": {
"Kimi Code CLI": {
"type": "custom",
"command": "kimi",
"args": ["acp"],
"env": {}
}
}
}Configuration details:
type: Set to"custom"for a custom ACP agentcommand: The Kimi Code CLI executable pathargs: Usesacpto start Kimi Code CLI in ACP modeenv: Optional environment variables, usually left empty
If kimi is not available in your system PATH, replace it with the full path:
"command": "/your/path/to/kimi""command": "/your/path/to/kimi"Step 3: Start Kimi Code CLI in Zed
After saving the configuration:
Open Zed
Open the Agent Panel
Create a new conversation
Select Kimi Code CLI as the agent
Zed will automatically launch Kimi Code CLI as an ACP subprocess and establish the connection. You do not need to manually run kimi acp in the terminal.
Step 4: Start Coding with Kimi in Zed
Once connected, you can use Kimi Code CLI inside Zed for tasks such as:
Understanding project code
Generating new features
Refactoring files
Debugging issues
Working across multiple files with project context
With ACP, Kimi Code CLI runs as an integrated coding agent inside Zed, combining Zed's editing experience with Kimi's AI-assisted development capabilities.
Benefits of using Kimi Code in Zed
Kimi Code can make Zed more useful for developers who want AI assistance without leaving their coding environment. By connecting the agent through ACP, developers can handle coding tasks, work with existing projects, and get help using natural language. Here are the key benefits of using Kimi Code in Zed:
Understand and navigate large codebases
Kimi Code can analyze project files and understand how different parts of a codebase are connected. This helps developers find relevant files, functions, and logic more quickly. It can be especially useful when working with large or unfamiliar projects.
Generate and modify code with natural language
Developers can describe what they want in simple language instead of writing every change manually. Kimi Code can generate new code or modify existing code based on the given instructions. This makes common development tasks faster and easier to handle.
Assist with multi-file coding tasks
Many development tasks require changes across several files rather than a single location. Kimi Code can understand the broader task and work across relevant files to make the required updates. This helps keep related changes consistent throughout the project.
Debug and improve existing code
Kimi Code can help identify potential issues by reviewing existing code and explaining what may be causing a problem. It can also suggest fixes, improve code structure, and make changes based on the developer's instructions. This can reduce the time spent manually finding and resolving errors.
Build an agent-based development workflow
Using Kimi Code with Zed allows developers to include an AI agent as part of their regular development process. The agent can support tasks such as coding and project changes from within the editor. This creates a flexible workflow where developers can work alongside an AI agent instead of using it as a separate tool.
Troubleshooting Zed ACP integration
A few setup or configuration issues can prevent ACP agents from working properly in Zed. Most problems are related to the agent configuration, command path, authentication, or connection, and they can usually be fixed with a few simple checks. Here are the common issues and their solutions:
| Issue | Possible cause | Solution |
|---|---|---|
| Kimi Code CLI does not appear in Zed | The agent_servers configuration is missing or contains syntax errors | Check the settings.json file and make sure the Kimi Code CLI configuration is correctly added |
| Zed cannot find the kimi command | Kimi Code CLI is not available in the system PATH | Run which kimi to find the executable path, then replace "command": "kimi" with the full path |
| ACP agent starts but exits immediately | Kimi Code CLI installation or authentication is incomplete | Run kimi acp in the terminal to verify that ACP mode starts correctly, then complete the login process if needed |
| Authentication errors occur when starting the agent | Kimi Code CLI account authentication has expired or is not configured | Log in to Kimi Code CLI again and restart Zed |
| Changes to settings.json do not take effect | Zed has not reloaded the updated configuration | Restart Zed after modifying the configuration file |
| Agent responses are slow or fail during coding tasks | Network connection issues or large project context | Check your network connection and try working with a smaller project scope |
Conclusion
Zed ACP gives developers a flexible way to bring AI assistance into their everyday coding workflow. It also makes it easier to work with different agents while keeping the editor at the center of development. As AI coding continues to evolve, this approach can help make development more efficient and adaptable. If you want to explore this workflow, try Kimi Code with Zed and see how it fits your coding needs. Start using Kimi today to experience a more natural AI-assisted development workflow.