Skip to main content

A production-grade multi-agent AI orchestration framework

Project description

Agentic AI Framework

A production-grade multi-agent AI orchestration framework built with Python, featuring MCP (Model Context Protocol) integration, LangGraph workflows, and extensible agent architectures.

Architecture Overview

┌─────────────────────────────────────────────────────────────────┐
│                    Agentic AI Framework                         │
├─────────────────────────────────────────────────────────────────┤
│  ┌─────────────────────────────────────────────────────────┐   │
│  │              Orchestration Layer (LangGraph)             │   │
│  │  ┌─────────────┐  ┌──────────────┐  ┌──────────────┐   │   │
│  │  │  Supervisor │──│   Router     │──│   Executor   │   │   │
│  │  └─────────────┘  └──────────────┘  └──────────────┘   │   │
│  └─────────────────────────────────────────────────────────┘   │
│                              │                                  │
│  ┌─────────────────────────────────────────────────────────┐   │
│  │                    Agent Layer                           │   │
│  │  ┌─────────────┐  ┌──────────────┐  ┌──────────────┐   │   │
│  │  │ Math Agent  │  │  Text Agent  │  │ Custom Agent │   │   │
│  │  └─────────────┘  └──────────────┘  └──────────────┘   │   │
│  └─────────────────────────────────────────────────────────┘   │
│                              │                                  │
│  ┌─────────────────────────────────────────────────────────┐   │
│  │                    MCP Layer                             │   │
│  │  ┌─────────────┐  ┌──────────────┐  ┌──────────────┐   │   │
│  │  │ MCP Server  │  │  MCP Client  │  │ Tool Bridge  │   │   │
│  │  └─────────────┘  └──────────────┘  └──────────────┘   │   │
│  └─────────────────────────────────────────────────────────┘   │
│                              │                                  │
│  ┌─────────────────────────────────────────────────────────┐   │
│  │                    Tools Layer                           │   │
│  │  ┌─────────────┐  ┌──────────────┐  ┌──────────────┐   │   │
│  │  │ Math Tools  │  │  Text Tools  │  │   Registry   │   │   │
│  │  └─────────────┘  └──────────────┘  └──────────────┘   │   │
│  └─────────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────────┘

Features

  • Multi-Agent Orchestration: Coordinate multiple specialized agents using LangGraph state machines
  • MCP Protocol Support: Industry-standard Model Context Protocol for tool serving
  • Extensible Tool System: Plugin-based architecture for adding custom tools
  • Type-Safe Design: Full type hints with Pydantic validation
  • Production Logging: Structured logging with configurable levels
  • Async-First: Built on asyncio for high-performance concurrent execution
  • Comprehensive Testing: Unit and integration tests with pytest

Installation

From PyPI (Recommended)

pip install agentic-ai-mcp

From Source (For Development)

# Clone the repository
git clone https://github.com/hasanjawad001/agentic-ai-mcp.git
cd agentic-ai-mcp

# Create virtual environment
uv venv env --python 3.13
source env/bin/activate

# Install dependencies
pip install -e ".[dev]"

# Set up environment variables
cp .env.example .env
# Edit .env with your API keys

Quick Start

1. Start the MCP Server

python -m agentic_ai_mcp.mcp.server

2. Run a Multi-Agent Workflow

from agentic_ai_mcp import AgenticWorkflow

async def main():
    workflow = AgenticWorkflow()
    result = await workflow.execute(
        "Calculate 15 + 27, then convert the result to uppercase"
    )
    print(result)

import asyncio
asyncio.run(main())

3. Create Custom Agents

from agentic_ai_mcp.core import BaseAgent
from agentic_ai_mcp.tools import tool

class MyCustomAgent(BaseAgent):
    name = "custom_agent"
    description = "A custom agent for specific tasks"

    @tool
    def my_custom_tool(self, input_data: str) -> str:
        """Process input data in a custom way."""
        return f"Processed: {input_data}"

Project Structure

code_agentic_ai_mcp/
├── src/
│   └── agentic_ai_mcp/
│       ├── core/           # Core abstractions and base classes
│       ├── tools/          # Tool definitions and registry
│       ├── mcp/            # MCP server, client, and bridge
│       ├── agents/         # Specialized agent implementations
│       ├── orchestration/  # LangGraph workflows and routing
│       └── config/         # Configuration management
├── tests/
│   ├── unit/              # Unit tests
│   └── integration/       # Integration tests
├── examples/              # Usage examples
└── docs/                  # Documentation

Key Concepts

Agents

Agents are autonomous entities that can reason, plan, and execute actions. Each agent has:

  • A set of tools it can use
  • A specific domain of expertise
  • The ability to communicate with other agents through the orchestrator

Tools

Tools are atomic operations that agents can invoke. They are:

  • Defined with type hints and descriptions
  • Served via MCP protocol for language-agnostic access
  • Validated at runtime using Pydantic schemas

Orchestration

The orchestration layer coordinates multiple agents:

  • Supervisor: Decides which agent should handle a task
  • Router: Routes requests based on task requirements
  • Executor: Manages the execution flow and state

Configuration

# config/settings.py
from pydantic_settings import BaseSettings

class Settings(BaseSettings):
    anthropic_api_key: str
    mcp_server_host: str = "0.0.0.0"
    mcp_server_port: int = 8888
    log_level: str = "INFO"
    max_agent_iterations: int = 10

    class Config:
        env_file = ".env"

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=agentic_ai_mcp --cov-report=html

# Run specific test file
pytest tests/unit/test_tools.py -v

Examples

See the examples/ directory for comprehensive usage examples:

  • basic_workflow.py: Simple single-agent workflow
  • multi_agent_workflow.py: Multi-agent coordination
  • custom_tools.py: Creating and registering custom tools

License

MIT License - see LICENSE for details.

Contributing

  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

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

agentic_ai_mcp-0.2.0.tar.gz (28.6 kB view details)

Uploaded Source

Built Distribution

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

agentic_ai_mcp-0.2.0-py3-none-any.whl (36.5 kB view details)

Uploaded Python 3

File details

Details for the file agentic_ai_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: agentic_ai_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 28.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentic_ai_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 121a03891513809a9f64d19e1d0dcbdb7aa70fbee0a1cb19bfd584f365fc1056
MD5 3b94fbe0d2d945d3a3cdb21d7663f2d8
BLAKE2b-256 7155a6c52753a63391a8d9e6dfc1be7630e00789b8096a028c067777d338c53a

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_ai_mcp-0.2.0.tar.gz:

Publisher: cd.yml on hasanjawad001/agentic-ai-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentic_ai_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: agentic_ai_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 36.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentic_ai_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3998c8ec63c8de74a989135038415c542dc5f7d34a5b6a7f73dd51a7ca1cca51
MD5 2eb2d10f17e785a1d7593c9f4358c35b
BLAKE2b-256 f9236a9434f53b6738d697bceda6eba7c9648c9fa385c97d4849a98bacff69b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_ai_mcp-0.2.0-py3-none-any.whl:

Publisher: cd.yml on hasanjawad001/agentic-ai-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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