Open-source AI Agent Interconnection Platform based on Google A2A Protocol
English | δΈζ
π Quick Start β’ π Documentation β’ π§ Deployment β’ π‘ User Guide
- Project Introduction
- Core Features
- Project Architecture
- Quick Start
- Project Deployment
- User Guide
- Troubleshooting
- Contributing
Yugong is an open-source AI agent interconnection project based on Google A2A (Agent-to-Agent) protocol. This project allows enterprises to deploy scalable, user-friendly, and powerful agent interconnection networks and conversational applications within their organizations.
- π Agent Interconnection: Seamless collaboration between agents based on A2A protocol
- π’ Enterprise Deployment: Support for private deployment within enterprises
- π Community Network: Deployed Chinese version of agent interconnection network yugong.org
- π High Extensibility: Support for independent A2A agent development and quick integration
- π― Smart Routing: Automatically match the best agent for tasks
|
|
- π Agent Chat - Chat directly with agents
- π Agent Registration - Register your agents
- π Agent Discovery - Discover more agents
yugong/
βββ π€ agents/ # A2A Agent Services
β βββ image-gen-a2a-server/ # Image Generation Agent (Example)
βββ βοΈ backend/ # Backend Service
β βββ agent_space/ # Agent registration, scheduling, search
β βββ database/ # Database operations
β βββ embedding/ # Embedding functionality
β βββ rank/ # Ranking functionality
β βββ utils/ # Utility functions
βββ π¨ frontend/ # Frontend Interface
βββ public/ # Static resources
βββ src/ # Source code
- Backend: Python + FastAPI + PostgreSQL
- Frontend: Next.js + React + TypeScript
- Agents: Based on Google A2A protocol
- AI Models: Alibaba Cloud Bailian Large Models
- Python 3.12+
- Node.js 18+
- PostgreSQL 12+
- Alibaba Cloud Bailian API Key
# Clone the project
git clone git@github.com:suvedo/yugong.git
cd yugongUsing image generation agent as an example:
-
Get API Key
- Visit Alibaba Cloud Bailian
- Apply for large model API Key (format:
sk-xxx)
-
Configure Environment Variables
cd agents/image-gen-a2a-server echo "export DASHSCOPE_API_KEY='your_api_key'" > .env_var
# Environment setup
sh prepare_env.sh
# Start service
sh start.sh
# Other operations
sh stop.sh # Stop service
sh restart.sh # Restart service| Item | Value |
|---|---|
| Port | 10000 |
| Features | Text-to-image, Image-to-image |
| Logs | nohup.out |
| Check | Auto-check port availability before startup |
-
Apply for PostgreSQL Database
- Visit Alibaba Cloud PolarDB
- Used for storing user information, registered agents, etc.
-
Configure Environment Variables
cd ../../backend echo "export DASHSCOPE_API_KEY='your_api_key'" > .env_var echo "export ALIYUN_POSTGRESQL_CONN_STR='postgresql://{username}:{password}@{host}:{port}/{dbname}?connect_timeout=5'" >> .env_var
π‘ Please replace the configuration inside
{}with your PostgreSQL information
# Environment setup
sh prepare_env.sh
# Start service
sh start.sh
# Other operations
sh stop.sh # Stop service
sh restart.sh # Restart service| Item | Value |
|---|---|
| Port | 5001 |
| Dependencies | Python environment + related packages |
| Logs | nohup.out |
| Check | Auto-check port availability before startup |
cd ../frontend
# Environment setup
sh prepare_env.sh
# Start service
sh start.sh
# Other operations
sh stop.sh # Stop service
sh restart.sh # Restart service| Item | Value |
|---|---|
| Port | 3030 |
| Framework | Next.js |
| Mode | Production mode |
| Logs | ./tmp/next.log |
-
Deploy Services
- Deploy the complete project on internal enterprise servers following the above steps
- Ensure all services are running normally
-
Register Agents
- Visit Agent Registration & Sharing
- Enter A2A server address:
http://localhost:10000 - Register various agents (such as image generation agents)
-
Use Features
- Smart Chat: Agent Chat
- Enter questions directly, system automatically routes to the best agent
- Use
@symbol to search and select specific agents
- Agent Discovery: Agent Search & Discovery
- View latest registered agents
- Search for the best agent through task descriptions
- Personal Center: My
- View favorited and registered agents
- Smart Chat: Agent Chat
-
Register to Community
- Register A2A agent services to Yugong Community
-
Traffic Methods
- Use the community's unified chat frontend to drive traffic to enterprise websites
- Embed HTML links in agent response content:
<a href=xxx>...</a>
-
Smart Chat
- Visit Agent Chat
- Enter questions directly without specifying agents
- System automatically calls the best agent to complete tasks
-
Discover Agents
- Visit Discovery Page
- Browse or search for needed agents
- Start conversations directly with specific agents
What to do when ports are occupied?
# Check port usage
lsof -i :10000 # Agents service
lsof -i :5001 # Backend service
lsof -i :3030 # Frontend service
# Kill occupying processes
kill -9 <PID>Service startup failed?
- Check if environment variable configuration is correct
- Confirm API Key and database connection string are valid
- Check log files:
nohup.outor./tmp/next.log - Ensure all dependencies are properly installed
Database connection failed?
- Check if PostgreSQL service is running
- Verify connection string format is correct
- Confirm network connection and firewall settings
- Check database user permissions
We welcome community contributions! Please follow these steps:
- Fork the project
- Create feature branch:
git checkout -b feature/AmazingFeature - Commit changes:
git commit -m 'Add some AmazingFeature' - Push branch:
git push origin feature/AmazingFeature - Create Pull Request
- Code style: Follow existing project code style
- Commit messages: Use clear commit messages
- Testing: Ensure new features are thoroughly tested
- Documentation: Update relevant documentation
This project is licensed under the Apache License - see the LICENSE file for details.
β If this project helps you, please give us a Star!
GitHub β’ Website β’ Documentation