What is the Agent Client Protocol (ACP)?
The Agent Client Protocol (ACP) is a standardized communication protocol that enables code editors and IDEs to interact with AI agents. ACP defines how clients (like code editors) and agents (like OpenHands) communicate through a JSON-RPC 2.0 interface.Supported IDEs
Prerequisites
Before using OpenHands with any IDE, you must:- Install OpenHands CLI following the installation instructions
-
Configure your LLM settings using the
/settingscommand:
~/.openhands/settings.json.
How It Works
- Your IDE launches
openhands acpas a subprocess - Communication happens via JSON-RPC 2.0 over stdio
- OpenHands uses your configured LLM and runtime settings
- Results are displayed in your IDE’s interface
The ACP Command
Theopenhands acp command starts OpenHands as an ACP server:
ACP Options
| Option | Description |
|---|---|
--resume [ID] | Resume a conversation by ID |
--last | Resume the most recent conversation |
--always-approve | Auto-approve all actions |
--llm-approve | Use LLM-based security analyzer |
--streaming | Enable token-by-token streaming |
Confirmation Modes
OpenHands ACP supports three confirmation modes to control how agent actions are approved:Always Ask (Default)
The agent will request user confirmation before executing each tool call or prompt turn. This provides maximum control and safety.Always Approve
The agent will automatically approve all actions without asking for confirmation. Use this mode when you trust the agent to make decisions autonomously.LLM-Based Approval
The agent uses an LLM-based security analyzer to evaluate each action. Only actions predicted to be high-risk will require user confirmation, while low-risk actions are automatically approved.Changing Modes During a Session
You can change the confirmation mode during an active session using slash commands:| Command | Description |
|---|---|
/confirm always-ask | Switch to always-ask mode |
/confirm always-approve | Switch to always-approve mode |
/confirm llm-approve | Switch to LLM-based approval mode |
/help | Show all available slash commands |
The confirmation mode setting persists for the duration of the session but will reset to the default (or command-line specified mode) when you start a new session.
Choosing an IDE
Zed
High-performance editor with native ACP support. Best for speed and simplicity.
Toad
Universal terminal interface. Works with any terminal, consistent experience.
VS Code
Popular editor with community extension. Great for VS Code users.
JetBrains
IntelliJ, PyCharm, WebStorm, etc. Best for JetBrains ecosystem users.
Resuming Conversations in IDEs
You can resume previous conversations in ACP mode. Since ACP mode doesn’t display an interactive list, first find your conversation ID:--resume <id> or --resume --last. See each IDE’s documentation for specific configuration.
See Also
- ACP Documentation - Full protocol specification
- Terminal Mode - Use OpenHands in the terminal
- Resume Conversations - Detailed resume guide

