A simple demonstration of the Agent Communication Protocol (ACP), showcasing how two agents built using different frameworks (CrewAI and Smolagents) can collaborate seamlessly to generate and verify a research summary.
-
Install Ollama:
# Setting up Ollama on linux curl -fsSL https://ollama.com/install.sh | sh # Pull the Qwen2.5 model ollama pull qwen2.5:14b
-
Install project dependencies:
Ensure you have Python 3.10 or later installed on your system.
First, install
uvand set up the environment:# MacOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh # Windows powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Install dependencies:
# Create a new directory for our project uv init acp-project cd acp-project # Create virtual environment and activate it uv venv source .venv/bin/activate # MacOS/Linux .venv\Scripts\activate # Windows # Install dependencies uv add acp-sdk crewai smolagents duckduckgo-search ollama
You can also use any other LLM providers such as OpenAI or Anthropic. Create a .env file and add your API keys
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_key
Start the two ACP servers in separate terminals:
# Terminal 1
uv run crew_acp_server.py
# Terminal 2
uv run smolagents_acp_server.pyRun the ACP client to trigger the agent workflow:
uv run acp_client.pyOutput:
A general summary from the first agent
A fact-checked and updated version from the second agent