Agent Client Protocol (ACP)
The Agent Client Protocol (ACP) enables IDEs and code editors to communicate with PraisonAI agents using a standardized JSON-RPC 2.0 protocol over stdio.Overview
ACP allows editors like Zed, JetBrains IDEs, VSCode, and Toad to seamlessly integrate with PraisonAI’s AI coding capabilities.Quick Start
Get started in 30 seconds
Editor Setup
Configure your IDE
CLI Reference
All command options
Python API
Embed in your app
Installation
Quick Start
Start the ACP server:With Options
Editor Configuration
Zed
Add to~/.config/zed/settings.json:
JetBrains (IntelliJ, PyCharm, WebStorm)
Add to~/.jetbrains/acp.json:
Toad
VSCode
The ACP extension auto-discovers agents via PATH. Ensurepraisonai is in your PATH:
CLI Reference
| Option | Description |
|---|---|
-w, --workspace PATH | Workspace root directory (default: current) |
-a, --agent NAME | Agent name or config file |
--agents FILE | Multi-agent YAML configuration |
--router | Enable router agent for task delegation |
-m, --model NAME | LLM model to use |
-r, --resume [ID] | Resume session by ID |
--last | Resume the last session |
--approve MODE | Approval mode: manual, auto, scoped |
--read-only | Read-only mode (default: enabled) |
--allow-write | Allow file write operations |
--allow-shell | Allow shell command execution |
--allow-network | Allow network requests |
--debug | Enable debug logging to stderr |
--profile NAME | Use named profile from config |
Python API
For advanced users who want to embed ACP in their applications:Custom Agent
Session Management
Resume Sessions
ACP supports session persistence for continuing conversations:Session Storage
Sessions are stored in~/.praison/acp/sessions/ as JSON files.
Permission Model
ACP is safe by default:| Permission | Default | Flag to Enable |
|---|---|---|
| File Read | ✅ Allowed | - |
| File Write | ❌ Denied | --allow-write |
| Shell Commands | ❌ Denied | --allow-shell |
| Network Requests | ❌ Denied | --allow-network |
Workspace Boundaries
By default, file operations are restricted to:- The workspace directory and subdirectories
~/.praison/configuration directory
Protocol Details
ACP uses JSON-RPC 2.0 over stdio:- stdin: Receives JSON-RPC requests from the client
- stdout: Sends JSON-RPC responses (never polluted with logs)
- stderr: Debug and log output
Supported Methods
Agent Methods (client → agent):| Method | Description |
|---|---|
initialize | Negotiate protocol version and capabilities |
authenticate | Optional authentication |
session/new | Create a new session |
session/load | Load an existing session |
session/prompt | Send user message |
session/cancel | Cancel ongoing operations |
session/set_mode | Change operating mode |
| Method | Description |
|---|---|
session/update | Send progress updates |
session/request_permission | Request user approval |
fs/read_text_file | Read file contents |
fs/write_text_file | Write file contents |
Interactive Mode + ACP
ACP and Interactive Mode are designed to work together without conflicts:Side-by-Side Usage
Run ACP in one terminal while using Interactive Mode in another:~/.praison/.
Key Points
- ACP imports don’t affect Interactive Mode performance
- Both modes use the same session storage (but different sessions)
- Configuration and API keys are shared safely
- No stdout contamination between modes
Troubleshooting
Debug Logging
Enable debug logging to see what’s happening:Common Issues
“agent-client-protocol package not installed”~/.praison/acp/sessions/.
Editor not connecting
- Verify
praisonaiis in PATH:which praisonai - Test manually:
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":1}}' | praisonai acp - Check editor logs for connection errors
Environment Variables
| Variable | Description |
|---|---|
OPENAI_API_KEY | OpenAI API key |
ANTHROPIC_API_KEY | Anthropic API key |
PRAISONAI_WORKSPACE | Default workspace |
PRAISONAI_MODEL | Default model |
PRAISONAI_DEBUG | Enable debug mode (true/false) |

