Building Multi-Agent Systems with A2A Inbound Adapter
What We're Buildingā
In this hands-on guide, we'll build a multi-agent system that exposes specialized Agentverse uAgents through the A2A protocol. By the end, you'll have:
Note: Use a unique agent name and description when starting your adapters/bridges. Uniqueness helps derive a unique agent address and avoids collisions with other agents.
- Multiple A2A endpoints running on different ports
- Specialized agents accessible to A2A clients
- Real-world examples of agent coordination and discovery
- Production-ready configuration for deployment
We'll create two specialized agents:
- Perplexity Search Agent - AI-powered web search and research
- Finance Q&A Agent - Financial analysis and planning assistance
Architectureā

Each agent will run as a separate A2A server, allowing A2A clients to discover and use them independently or in coordination.
š ļø Step 1: Installationā
Install the A2A Inbound adapter package:
pip install "uagents-adapter[a2a-inbound]==0.6.2"
This installs all required dependencies including:
a2a-sdk[all,sqlite]>=0.2.11- A2A SDK with all features + SQLite supportuvicorn>=0.27.0- ASGI server for running the A2A bridge serverhttpx>=0.25.0- Async HTTP clientclick>=8.0.0- CLI framework for command-line interfacepython-dotenv>=1.0.0- Environment variable management
Step 2: Choose Your Agentsā
You have two options for agents:
Option A: Use Existing Agents from Agentverse Marketplaceā
- Visit Agentverse.ai
- Browse the marketplace for agents that match your needs
- Copy the agent address from the agent's profile page
- Ensure the agent is active and responding to messages
Option B: Build Your Own Agentsā
- Create uAgents using the uAgents framework
- Register on Agentverse and get them running
- Copy the agent addresses from your agent profiles
- Test that they respond to chat messages
For this tutorial, we'll use pre-configured agents from the marketplace:
- Perplexity Search Agent:
agent1qgzd0c60d4c5n37m4pzuclv5p9vwsftmfkznksec3drux8qnhmvuymsmshp - Finance Q&A Agent:
agent1qdv2qgxucvqatam6nv28qp202f3pw8xqpfm8man6zyegztuzd2t6yem9evl
Step 3: Build the Multi-Agent Systemā
Agent 1: Perplexity Search Agentā
Create a file called perplexity_adapter.py:
import os
import sys
import time
from uagents_adapter.a2a_inbound.adapter import A2ARegisterTool
def main():
"""Start A2A bridge for Perplexity Search Agent."""
# Set bridge seed for consistent agent identity (required in production)
os.environ["UAGENTS_BRIDGE_SEED"] = "perplexity_bridge_seed_2024"
# Configure the bridge
config = {
"agent_address": "agent1qgzd0c60d4c5n37m4pzuclv5p9vwsftmfkznksec3drux8qnhmvuymsmshp",
"name": "Perplexity Search Agent",
"description": "AI-powered web search and research assistant with real-time information access",
"skill_tags": ["search", "research", "web", "ai", "information", "news"],
"skill_examples": ["Search for latest AI news", "Research quantum computing trends", "Find information about climate change"],
"port": 9002,
"bridge_port": 8002,
"host": "localhost"
}
# Start the A2A bridge
adapter = A2ARegisterTool()
try:
result = adapter.invoke(config)
if result.get("success"):
# Keep the server running
while True:
time.sleep(1)
else:
print(f"ā Failed to start bridge: {result}")
return 1
except KeyboardInterrupt:
print("\nš Shutting down Perplexity bridge...")
return 0
except Exception as e:
print(f"ā Error: {e}")
return 1
if __name__ == "__main__":
sys.exit(main())
Agent 2: Finance Q&A Agentā
Create a file called finance_adapter.py:
import os
import sys
import time
from uagents_adapter.a2a_inbound.adapter import A2ARegisterTool
def main():
"""Start A2A bridge for Finance Q&A Agent."""
# Set bridge seed for consistent agent identity (required in production)
os.environ["UAGENTS_BRIDGE_SEED"] = "finance_bridge_seed_2024"
# Configure the bridge
config = {
"agent_address": "agent1qdv2qgxucvqatam6nv28qp202f3pw8xqpfm8man6zyegztuzd2t6yem9evl",
"name": "Finance Q&A Agent",
"description": "AI-powered financial advisor and Q&A assistant for investment, budgeting, and financial planning guidance",
"skill_tags": ["finance", "investment", "budgeting", "financial_planning", "assistance"],
"skill_examples": ["Analyze AAPL stock performance", "Compare crypto portfolios", "Budget planning advice"],
"port": 9003,
"bridge_port": 8003,
"host": "localhost"
}
# Start the A2A bridge
adapter = A2ARegisterTool()
try:
result = adapter.invoke(config)
if result.get("success"):
# Keep the server running
while True:
time.sleep(1)
else:
print(f"ā Failed to start bridge: {result}")
return 1
except KeyboardInterrupt:
print("\nš Shutting down Finance bridge...")
return 0
except Exception as e:
print(f"ā Error: {e}")
return 1
if __name__ == "__main__":
sys.exit(main())