Skip to main content

Next-Generation Multi-Agent System Builder with MCP Protocol Integration

Project description

Nexagen - Next-Generation Multi-Agent System Builder

Nexagen Logo

PyPI version Python License: MIT GitHub stars

Build sophisticated multi-agent systems effortlessly with MCP protocol integration

๐Ÿš€ Quick Start โ€ข ๐Ÿ“š Documentation โ€ข ๐ŸŽฏ Examples โ€ข ๐Ÿค Contributing


๐ŸŒŸ 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

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

pip install nexagen

Create Your First Multi-Agent System

  1. Initialize a new project
nexagen create my_agent_system
cd my_agent_system
  1. Configure environment variables
# Edit .env file
BASE_URL=https://api.your-llm-provider.com
API_KEY=your-api-key-here
model_name=your-model-name
  1. Develop your MCP agents Create individual agents in the mcp_agents/ directory. Each agent should be a separate folder with its MCP implementation.

  2. Configure MCP agents Edit mcp.json to register your agents:

{
  "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"]
    }
  }
}
  1. Build the multi-agent system
nexagen build
  1. Run and test
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

# 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

# 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:

{
  "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:

# 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:

# 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

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 file for details.

๐Ÿข About

Nexagen is developed by Chongqing Taoxiang Network Technology Co., Ltd.

๐Ÿš€ 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

โญ Star this project if it helps you build better multi-agent systems!

Report Bug โ€ข Request Feature โ€ข Join Community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nexagen-1.0.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexagen-1.0.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file nexagen-1.0.0.tar.gz.

File metadata

  • Download URL: nexagen-1.0.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for nexagen-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3b6985e5ab735854d3b980c7bd0ef6e82cde25f432f10d0f1f952aed13a5f5ca
MD5 c4b0212fe006edcbd43b41c40b69d583
BLAKE2b-256 97e133b0cec6a0a732415ffac28959abea6da969e6d36703bb1524f70435a84f

See more details on using hashes here.

File details

Details for the file nexagen-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: nexagen-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for nexagen-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b53c669a60bcbc9d3e8e4fbb9d64557c3cd2b2c0c09e6e30db48f9b795cb8165
MD5 3c2a9d5d67f733beb5512a1ee2c18d00
BLAKE2b-256 fb288b18a13bc681c2a21b6d05d938e4e0ac970cdcad1ceaa8c52df259accdf6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page