
ag2a
AG2A: AutoGen Agent-to-Agent - A library for AutoGen (AG2) agents with MCP capabilities exposed as A2A agents
Repository Info
About This Server
AG2A: AutoGen Agent-to-Agent - A library for AutoGen (AG2) agents with MCP capabilities exposed as A2A agents
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
AG2A: AutoGen Agent-to-Agent
A framework for creating AG2 (formerly AutoGen) agents that communicate using the A2A Protocol and leverage tools via MCP.
Overview
AG2A makes it simple to:
- Define agents using JSON specifications
- Connect AG2 agents with MCP-powered tools
- Expose agents via the standardized A2A protocol
- Build multi-agent systems that communicate seamlessly
Installation
# Install from PyPI
pip install ag2a
# Install with dev dependencies
pip install ag2a[dev]
Quick Start
Define an Agent Specification
Create a JSON file with your agent's specification:
{
"name": "MyAssistant",
"system_message": "You are a helpful assistant that answers questions concisely.",
"model": "gpt-4o",
"temperature": 0.7
}
Run the Agent
Start the agent server:
# Export your API key
export OPENAI_API_KEY=your-api-key-here
# Run the agent with your specification
python -m ag2a --spec agent_spec.json --port 8080
Connect to the Agent
The agent now exposes an A2A protocol endpoint at http://localhost:8080. You can connect to it using any A2A-compatible client.
Adding MCP Tools
To use MCP tools, add an mcp_command to your agent spec:
{
"name": "YoutubeAssistant",
"system_message": "You can help with analyzing YouTube videos.",
"model": "gpt-4o",
"mcp_command": "mcp-youtube"
}
Using Structured Response Models
For agents that need structured output, you can specify a Pydantic response model:
python -m ag2a --spec agent_spec.json --response-model my_module.ResponseModel
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Quick Start
Clone the repository
git clone https://github.com/niechen/ag2aInstall dependencies
cd ag2a
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.