Wrap Agent
How to make an existing agent ACP-compatible
ACP SDK allows you to wrap an existing agent, regardless of its framework or programming language, into a reusable and interoperable service. By implementing a simple interface, your agent becomes compatible with the ACP protocol. It can communicate over HTTP, interact with other agents in workflows, and exchange structured messages using a shared format.
Once wrapped, your agent becomes:
- Remotely callable over REST
- Composable with other agents in workflows
- Discoverable
- Reusable without modifying its internal logic
Simple agent
uv add acp-sdk
Wrapping an agent with ACP is as simple as annotating a Python function.
Use the @server.agent()
decorator to define your agent. The name is inferred from the function name, and the description is pulled from the docstring:
This is the minimal structure needed for an ACP-compliant agent. You now have an agent that can receive messages from others, or be called via HTTP, using the ACP protocol.
Simple LLM agent
Let’s look at an example of how a simple agent can call an LLM model using the beeai-framework
and return a response.