# Nexagen - Next-Generation Multi-Agent System Builder
<div align="center">

[](https://badge.fury.io/py/nexagen)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/taoxiang-org/nexagen/stargazers)
**Build sophisticated multi-agent systems effortlessly with MCP protocol integration**
[🚀 Quick Start](#quick-start) • [📚 Documentation](#documentation) • [🎯 Examples](#examples) • [🤝 Contributing](#contributing)
</div>
---
## 🌟 What is Nexagen?
Nexagen (Next-Generation Agent) is a revolutionary framework that simplifies the creation of multi-agent systems by leveraging the **Model Context Protocol (MCP)**. Instead of manually orchestrating complex agent interactions, Nexagen automatically handles agent scheduling, communication, and coordination.
### ✨ Key Features
- 🔧 **MCP-Based Architecture**: Build agents using standardized MCP protocol
- 🤖 **Automatic Agent Discovery**: Auto-detect and integrate MCP agents
- 🎯 **Intelligent Orchestration**: Multi-level task scheduling and agent coordination
- 📋 **Industry Compatible**: Generate standard agent cards
- 🚀 **Zero-Configuration**: Focus on individual agents, not system complexity
- 🌐 **Scalable Design**: From single agents to complex multi-agent networks
## 🏗️ Architecture Overview
```mermaid
graph TD
A[User Task] --> B[Orchestrator Agent]
B --> C[Task Splitting]
C --> D[Agent Selection]
D --> E[Parameter Generation]
E --> F[MCP Agent Execution]
F --> G[Result Aggregation]
G --> H[Final Output]
I[MCP Agent 1] --> F
J[MCP Agent 2] --> F
K[MCP Agent N] --> F
```
## 🚀 Quick Start
### Installation
```bash
pip install nexagen
```
### Create Your First Multi-Agent System
1. **Initialize a new project**
```bash
nexagen create my_agent_system
cd my_agent_system
```
2. **Configure environment variables**
```bash
# Edit .env file
BASE_URL=https://api.your-llm-provider.com
API_KEY=your-api-key-here
model_name=your-model-name
```
3. **Develop your MCP agents**
Create individual agents in the `mcp_agents/` directory. Each agent should be a separate folder with its MCP implementation.
4. **Configure MCP agents**
Edit `mcp.json` to register your agents:
```json
{
"mcpServers": {
"chart": {
"command": "uv",
"args": [
"--directory", "/path/to/your/chart-agent",
"run", "server.py"
]
},
"data_processor": {
"command": "python",
"args": ["/path/to/your/data-agent/main.py"]
}
}
}
```
5. **Build the multi-agent system**
```bash
nexagen build
```
6. **Run and test**
```bash
nexagen run
```
## 📁 Project Structure
After initialization, your project will have this structure:
```
my_agent_system/
├── mcp_agents/ # Your individual MCP agents
│ ├── chart_agent/
│ ├── data_agent/
│ └── mcp_cards.json # Auto-generated agent details
├── agent_cards/ # Nexagen-compatible agent cards
├── .env # Environment configuration
├── mcp.json # MCP server configuration
├── orchestrator_agent.py # Auto-generated orchestrator
├── mcp_client.py # Auto-generated MCP client
├── agent_executor.py # Auto-generated executor
├── pipeline.py # Auto-generated pipeline
└── test_demo.py # Auto-generated demo
```
## 🎯 Examples
### Example 1: Chart Generation System
```python
# After building your system with chart agents
from pipeline import agent_pipeline
# The orchestrator automatically handles:
# 1. Task analysis
# 2. Agent selection
# 3. Parameter generation
# 4. Execution coordination
result = agent_pipeline(
"Create two line charts: "
"Jan: 89, Feb: 98, Mar: 56. "
"Second chart: 90, 90, 90"
)
print(result)
```
### Example 2: Multi-Modal Data Processing
```python
# With multiple agents (chart, data, file processors)
result = agent_pipeline(
"Process the sales data from Q1, "
"calculate growth rates, and "
"create visualization charts"
)
```
## 🔧 Advanced Configuration
### Custom Agent Cards
Nexagen automatically generates compatible agent cards, but you can customize them:
```json
{
"name": "Chart Agent",
"description": "Handles chart-related operations",
"url": "http://localhost:3000/",
"version": "1.0.0",
"capabilities": {
"streaming": false,
"pushNotifications": false,
"stateTransitionHistory": false
},
"skills": [
{
"id": "draw_chart",
"name": "draw_chart",
"description": "Generate charts from data arrays",
"tags": ["visualization", "charts"],
"examples": []
}
]
}
```
### Custom Orchestration Logic
The auto-generated `orchestrator_agent.py` can be modified to implement custom task splitting and agent selection logic.
## 🛠️ Development
### Building Individual MCP Agents
Each agent should implement the MCP protocol. Here's a minimal example:
```python
# server.py
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("Chart Agent")
@mcp.tool()
def draw_chart(data: list, title: str = "Chart") -> str:
"""Generate a chart from data array"""
# Your chart generation logic here
return f"chart_{title}.png"
if __name__ == "__main__":
mcp.run()
```
### Testing Your Agents
Nexagen provides automatic testing capabilities:
```bash
# Test individual agent
python auto_find_mcp_agents.py
# Test full system
nexagen run
```
## 📊 System Components
| Component | Purpose | Auto-Generated |
|-----------|---------|----------------|
| **Orchestrator Agent** | Task planning and agent selection | ✅ |
| **MCP Client** | Communication with MCP agents | ✅ |
| **Agent Executor** | Execute individual agent tasks | ✅ |
| **Pipeline** | End-to-end task processing | ✅ |
| **Agent Cards** | Compatible agent metadata | ✅ |
| **MCP Cards** | Detailed agent capability info | ✅ |
## 🤖 How It Works
1. **Agent Discovery**: Nexagen scans your MCP configuration and connects to each agent to discover their capabilities
2. **Card Generation**: Creates both detailed MCP cards and standardized agent cards
3. **Orchestration Setup**: Builds an intelligent orchestrator that can:
- Split complex tasks into subtasks
- Select appropriate agents for each subtask
- Generate proper parameters for agent calls
- Coordinate execution and aggregate results
4. **Pipeline Creation**: Generates a unified pipeline interface for seamless multi-agent coordination
## 🌍 Use Cases
- **Data Processing Pipelines**: Combine data extraction, transformation, and visualization agents
- **Content Generation**: Orchestrate text, image, and multimedia generation agents
- **Business Automation**: Chain together agents for complex workflow automation
- **Research Systems**: Coordinate agents for data collection, analysis, and reporting
- **Creative Workflows**: Combine agents for design, writing, and multimedia creation
## 📚 Documentation
### CLI Reference
- `nexagen create <project_name>` - Initialize a new multi-agent project
- `nexagen build` - Build the multi-agent system from MCP configuration
- `nexagen run` - Execute the test demo
### Configuration
- `.env` - Environment variables (API keys, model configuration)
- `mcp.json` - MCP server definitions and connection parameters
- `agent_cards/` - Compatible agent metadata
- `mcp_agents/mcp_cards.json` - Detailed agent capabilities
## 🤝 Contributing
We welcome contributions! Here's how you can help:
1. **Fork** the repository
2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)
3. **Commit** your changes (`git commit -m 'Add amazing feature'`)
4. **Push** to the branch (`git push origin feature/amazing-feature`)
5. **Open** a Pull Request
### Development Setup
```bash
git clone https://github.com/taoxiang-org/nexagen.git
cd nexagen
pip install -e .
```
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 🏢 About
Nexagen is developed by **Chongqing Taoxiang Network Technology Co., Ltd.**
- 🌐 Website: [www.taoxiang.org](https://www.taoxiang.org)
- 📧 Contact: [contact@taoxiang.org](mailto:contact@taoxiang.org)
- 🐙 GitHub: [github.com/taoxiang-org](https://github.com/taoxiang-org)
## 🚀 What's Next?
- [ ] GUI interface for visual agent orchestration
- [ ] Advanced agent templates and examples
- [ ] Cloud deployment support
- [ ] Performance monitoring and analytics
- [ ] Integration with popular AI frameworks
---
<div align="center">
**⭐ Star this project if it helps you build better multi-agent systems!**
[Report Bug](https://github.com/taoxiang-org/nexagen/issues) • [Request Feature](https://github.com/taoxiang-org/nexagen/issues) • [Join Community](https://github.com/taoxiang-org/nexagen/discussions)
</div>
Raw data
{
"_id": null,
"home_page": "https://github.com/taoxiang-org/nexagen",
"name": "nexagen",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "multi-agent, MCP, automation, AI, orchestration, agent-framework",
"author": "Chongqing Taoxiang Network Technology Co., Ltd.",
"author_email": "wei@taoxiang.org",
"download_url": "https://files.pythonhosted.org/packages/15/80/09f96965df72d1582f6fceeddc4fa09ec5779a5b36e2b374e7416b649ef2/nexagen-1.0.1.tar.gz",
"platform": null,
"description": "# Nexagen - Next-Generation Multi-Agent System Builder\n\n<div align=\"center\">\n\n\n\n[](https://badge.fury.io/py/nexagen)\n[](https://www.python.org/downloads/)\n[](https://opensource.org/licenses/MIT)\n[](https://github.com/taoxiang-org/nexagen/stargazers)\n\n**Build sophisticated multi-agent systems effortlessly with MCP protocol integration**\n\n[\ud83d\ude80 Quick Start](#quick-start) \u2022 [\ud83d\udcda Documentation](#documentation) \u2022 [\ud83c\udfaf Examples](#examples) \u2022 [\ud83e\udd1d Contributing](#contributing)\n\n</div>\n\n---\n\n## \ud83c\udf1f What is Nexagen?\n\nNexagen (Next-Generation Agent) is a revolutionary framework that simplifies the creation of multi-agent systems by leveraging the **Model Context Protocol (MCP)**. Instead of manually orchestrating complex agent interactions, Nexagen automatically handles agent scheduling, communication, and coordination.\n\n### \u2728 Key Features\n\n- \ud83d\udd27 **MCP-Based Architecture**: Build agents using standardized MCP protocol\n- \ud83e\udd16 **Automatic Agent Discovery**: Auto-detect and integrate MCP agents\n- \ud83c\udfaf **Intelligent Orchestration**: Multi-level task scheduling and agent coordination \n- \ud83d\udccb **Industry Compatible**: Generate standard agent cards\n- \ud83d\ude80 **Zero-Configuration**: Focus on individual agents, not system complexity\n- \ud83c\udf10 **Scalable Design**: From single agents to complex multi-agent networks\n\n## \ud83c\udfd7\ufe0f Architecture Overview\n\n```mermaid\ngraph TD\n A[User Task] --> B[Orchestrator Agent]\n B --> C[Task Splitting]\n C --> D[Agent Selection]\n D --> E[Parameter Generation]\n E --> F[MCP Agent Execution]\n F --> G[Result Aggregation]\n G --> H[Final Output]\n \n I[MCP Agent 1] --> F\n J[MCP Agent 2] --> F\n K[MCP Agent N] --> F\n```\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\n```bash\npip install nexagen\n```\n\n### Create Your First Multi-Agent System\n\n1. **Initialize a new project**\n```bash\nnexagen create my_agent_system\ncd my_agent_system\n```\n\n2. **Configure environment variables**\n```bash\n# Edit .env file\nBASE_URL=https://api.your-llm-provider.com\nAPI_KEY=your-api-key-here\nmodel_name=your-model-name\n```\n\n3. **Develop your MCP agents**\nCreate individual agents in the `mcp_agents/` directory. Each agent should be a separate folder with its MCP implementation.\n\n4. **Configure MCP agents**\nEdit `mcp.json` to register your agents:\n```json\n{\n \"mcpServers\": {\n \"chart\": {\n \"command\": \"uv\",\n \"args\": [\n \"--directory\", \"/path/to/your/chart-agent\",\n \"run\", \"server.py\"\n ]\n },\n \"data_processor\": {\n \"command\": \"python\",\n \"args\": [\"/path/to/your/data-agent/main.py\"]\n }\n }\n}\n```\n\n5. **Build the multi-agent system**\n```bash\nnexagen build\n```\n\n6. **Run and test**\n```bash\nnexagen run\n```\n\n## \ud83d\udcc1 Project Structure\n\nAfter initialization, your project will have this structure:\n\n```\nmy_agent_system/\n\u251c\u2500\u2500 mcp_agents/ # Your individual MCP agents\n\u2502 \u251c\u2500\u2500 chart_agent/\n\u2502 \u251c\u2500\u2500 data_agent/\n\u2502 \u2514\u2500\u2500 mcp_cards.json # Auto-generated agent details\n\u251c\u2500\u2500 agent_cards/ # Nexagen-compatible agent cards\n\u251c\u2500\u2500 .env # Environment configuration\n\u251c\u2500\u2500 mcp.json # MCP server configuration\n\u251c\u2500\u2500 orchestrator_agent.py # Auto-generated orchestrator\n\u251c\u2500\u2500 mcp_client.py # Auto-generated MCP client\n\u251c\u2500\u2500 agent_executor.py # Auto-generated executor\n\u251c\u2500\u2500 pipeline.py # Auto-generated pipeline\n\u2514\u2500\u2500 test_demo.py # Auto-generated demo\n```\n\n## \ud83c\udfaf Examples\n\n### Example 1: Chart Generation System\n\n```python\n# After building your system with chart agents\nfrom pipeline import agent_pipeline\n\n# The orchestrator automatically handles:\n# 1. Task analysis\n# 2. Agent selection \n# 3. Parameter generation\n# 4. Execution coordination\n\nresult = agent_pipeline(\n \"Create two line charts: \"\n \"Jan: 89, Feb: 98, Mar: 56. \"\n \"Second chart: 90, 90, 90\"\n)\nprint(result)\n```\n\n### Example 2: Multi-Modal Data Processing\n\n```python\n# With multiple agents (chart, data, file processors)\nresult = agent_pipeline(\n \"Process the sales data from Q1, \"\n \"calculate growth rates, and \"\n \"create visualization charts\"\n)\n```\n\n## \ud83d\udd27 Advanced Configuration\n\n### Custom Agent Cards\n\nNexagen automatically generates compatible agent cards, but you can customize them:\n\n```json\n{\n \"name\": \"Chart Agent\",\n \"description\": \"Handles chart-related operations\",\n \"url\": \"http://localhost:3000/\",\n \"version\": \"1.0.0\",\n \"capabilities\": {\n \"streaming\": false,\n \"pushNotifications\": false,\n \"stateTransitionHistory\": false\n },\n \"skills\": [\n {\n \"id\": \"draw_chart\",\n \"name\": \"draw_chart\", \n \"description\": \"Generate charts from data arrays\",\n \"tags\": [\"visualization\", \"charts\"],\n \"examples\": []\n }\n ]\n}\n```\n\n### Custom Orchestration Logic\n\nThe auto-generated `orchestrator_agent.py` can be modified to implement custom task splitting and agent selection logic.\n\n## \ud83d\udee0\ufe0f Development\n\n### Building Individual MCP Agents\n\nEach agent should implement the MCP protocol. Here's a minimal example:\n\n```python\n# server.py\nfrom mcp.server.fastmcp import FastMCP\n\nmcp = FastMCP(\"Chart Agent\")\n\n@mcp.tool()\ndef draw_chart(data: list, title: str = \"Chart\") -> str:\n \"\"\"Generate a chart from data array\"\"\"\n # Your chart generation logic here\n return f\"chart_{title}.png\"\n\nif __name__ == \"__main__\":\n mcp.run()\n```\n\n### Testing Your Agents\n\nNexagen provides automatic testing capabilities:\n\n```bash\n# Test individual agent\npython auto_find_mcp_agents.py\n\n# Test full system\nnexagen run\n```\n\n## \ud83d\udcca System Components\n\n| Component | Purpose | Auto-Generated |\n|-----------|---------|----------------|\n| **Orchestrator Agent** | Task planning and agent selection | \u2705 |\n| **MCP Client** | Communication with MCP agents | \u2705 |\n| **Agent Executor** | Execute individual agent tasks | \u2705 |\n| **Pipeline** | End-to-end task processing | \u2705 |\n| **Agent Cards** | Compatible agent metadata | \u2705 |\n| **MCP Cards** | Detailed agent capability info | \u2705 |\n\n## \ud83e\udd16 How It Works\n\n1. **Agent Discovery**: Nexagen scans your MCP configuration and connects to each agent to discover their capabilities\n\n2. **Card Generation**: Creates both detailed MCP cards and standardized agent cards\n\n3. **Orchestration Setup**: Builds an intelligent orchestrator that can:\n - Split complex tasks into subtasks\n - Select appropriate agents for each subtask \n - Generate proper parameters for agent calls\n - Coordinate execution and aggregate results\n\n4. **Pipeline Creation**: Generates a unified pipeline interface for seamless multi-agent coordination\n\n## \ud83c\udf0d Use Cases\n\n- **Data Processing Pipelines**: Combine data extraction, transformation, and visualization agents\n- **Content Generation**: Orchestrate text, image, and multimedia generation agents \n- **Business Automation**: Chain together agents for complex workflow automation\n- **Research Systems**: Coordinate agents for data collection, analysis, and reporting\n- **Creative Workflows**: Combine agents for design, writing, and multimedia creation\n\n## \ud83d\udcda Documentation\n\n### CLI Reference\n\n- `nexagen create <project_name>` - Initialize a new multi-agent project\n- `nexagen build` - Build the multi-agent system from MCP configuration\n- `nexagen run` - Execute the test demo\n\n### Configuration\n\n- `.env` - Environment variables (API keys, model configuration)\n- `mcp.json` - MCP server definitions and connection parameters\n- `agent_cards/` - Compatible agent metadata\n- `mcp_agents/mcp_cards.json` - Detailed agent capabilities\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Here's how you can help:\n\n1. **Fork** the repository\n2. **Create** a feature branch (`git checkout -b feature/amazing-feature`)\n3. **Commit** your changes (`git commit -m 'Add amazing feature'`)\n4. **Push** to the branch (`git push origin feature/amazing-feature`)\n5. **Open** a Pull Request\n\n### Development Setup\n\n```bash\ngit clone https://github.com/taoxiang-org/nexagen.git\ncd nexagen\npip install -e .\n```\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83c\udfe2 About\n\nNexagen is developed by **Chongqing Taoxiang Network Technology Co., Ltd.**\n\n- \ud83c\udf10 Website: [www.taoxiang.org](https://www.taoxiang.org)\n- \ud83d\udce7 Contact: [contact@taoxiang.org](mailto:contact@taoxiang.org)\n- \ud83d\udc19 GitHub: [github.com/taoxiang-org](https://github.com/taoxiang-org)\n\n## \ud83d\ude80 What's Next?\n\n- [ ] GUI interface for visual agent orchestration\n- [ ] Advanced agent templates and examples\n- [ ] Cloud deployment support\n- [ ] Performance monitoring and analytics\n- [ ] Integration with popular AI frameworks\n\n---\n\n<div align=\"center\">\n\n**\u2b50 Star this project if it helps you build better multi-agent systems!**\n\n[Report Bug](https://github.com/taoxiang-org/nexagen/issues) \u2022 [Request Feature](https://github.com/taoxiang-org/nexagen/issues) \u2022 [Join Community](https://github.com/taoxiang-org/nexagen/discussions)\n\n</div>\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Next-Generation Multi-Agent System Builder with MCP Protocol Integration",
"version": "1.0.1",
"project_urls": {
"Bug Reports": "https://github.com/taoxiang-org/nexagen/issues",
"Documentation": "https://github.com/taoxiang-org/nexagen#readme",
"Homepage": "https://www.taoxiang.org",
"Source": "https://github.com/taoxiang-org/nexagen"
},
"split_keywords": [
"multi-agent",
" mcp",
" automation",
" ai",
" orchestration",
" agent-framework"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8846fc67ea9675b0da23ee6d9d93200ea66991640028b84fcee848cc98aa76ca",
"md5": "457f56288dfaf6728ea320fc089592ff",
"sha256": "b08f4c389b005c3b62e4f7fa7d25ab6ea5d14c89e3df76f3370ea9489689165f"
},
"downloads": -1,
"filename": "nexagen-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "457f56288dfaf6728ea320fc089592ff",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 19809,
"upload_time": "2025-08-10T06:57:56",
"upload_time_iso_8601": "2025-08-10T06:57:56.323153Z",
"url": "https://files.pythonhosted.org/packages/88/46/fc67ea9675b0da23ee6d9d93200ea66991640028b84fcee848cc98aa76ca/nexagen-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "158009f96965df72d1582f6fceeddc4fa09ec5779a5b36e2b374e7416b649ef2",
"md5": "19723b280eee3f366aef6c45c674642a",
"sha256": "1475980d7d395f766b05b57b006dba7acb9c6b07de35261b1f99674915a36e4f"
},
"downloads": -1,
"filename": "nexagen-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "19723b280eee3f366aef6c45c674642a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 15677,
"upload_time": "2025-08-10T06:57:58",
"upload_time_iso_8601": "2025-08-10T06:57:58.160962Z",
"url": "https://files.pythonhosted.org/packages/15/80/09f96965df72d1582f6fceeddc4fa09ec5779a5b36e2b374e7416b649ef2/nexagen-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-10 06:57:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "taoxiang-org",
"github_project": "nexagen",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "click",
"specs": [
[
">=",
"8.0.0"
]
]
},
{
"name": "jinja2",
"specs": [
[
">=",
"3.0.0"
]
]
},
{
"name": "httpx",
"specs": [
[
">=",
"0.24.0"
]
]
},
{
"name": "requests",
"specs": [
[
">=",
"2.28.0"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
">=",
"0.19.0"
]
]
},
{
"name": "a2a-sdk",
"specs": [
[
">=",
"0.1.0"
]
]
},
{
"name": "mcp",
"specs": [
[
">=",
"0.1.0"
]
]
},
{
"name": "uvicorn",
"specs": [
[
">=",
"0.18.0"
]
]
}
],
"lcname": "nexagen"
}