The `agent-client-protocol` is a Python implementation of the Agent Client Protocol (ACP) by Zed Industries, designed to facilitate communication between AI agents and clients. It provides classes for building agents, clients, and handling protocol messages with schema validation. Currently at version 0.9.0, the library releases updates driven by upstream ACP schema changes and SDK improvements, typically every few months.
pip install agent-client-protocolVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to define a basic `Agent` that responds to text messages. In a production environment, this agent would be instantiated and registered with an `AgentServer` which handles the underlying communication transport (e.g., standard I/O, sockets) to an ACP client. The `send_message` method is overridden here for demonstration purposes; normally it would leverage the server's transport.
Update import paths (e.g., `from acp.sdk import Agent` to `from acp.agents import Agent`) and refactor method calls to use `snake_case` (e.g., `handleMessage` to `handle_message`).
If previously `my_resource = embedded_text_resource(...)`, now ensure it's `my_resource = resource_block(embedded_text_resource(...))` when embedding resources within a message.
Ensure your project's Python interpreter is within the `3.10-3.14` range. Consider using `pyenv`, `conda`, or `venv` for environment management.
Review changelogs for 'upgrade ACP' entries and consult the official ACP specification if unexpected behavior occurs after an update, especially when interacting with agents or clients on different protocol versions.