Agent Development Kit for building intelligent agents with LangGraph and MCP integration, Support Agent Async in jupyter notebook/IPython
Project description
AgentDK - Agent Development Kit for LangGraph + MCP Integration
A powerful Python framework for building intelligent agents using LangGraph and Model Context Protocol (MCP) integration. AgentDK simplifies the creation of multi-agent systems with MCP support and runs seamlessly in Jupyter/IPython environments.
🚀 Key Features
- 🤖 Multi-Agent Architecture: Build sophisticated agent systems using LangGraph supervisor patterns
- 🔌 MCP Integration: Seamless integration with Model Context Protocol servers for standardized tool access
- 🔄 Async Support: Full async/await support for scalable agent operations with Jupyter/IPython compatibility
- 🎯 Production Ready: Comprehensive testing, logging, and error handling
📦 Installation
# Install from PyPI
pip install agentdk[all]
🏁 Quick Start
Building Custom Multi-Agent Workflows
See examples/ directory for complete implementation details.
Define Custom Agents
from agentdk import SubAgentInterface
class EDAAgent(SubAgentInterface):
def _get_default_prompt(self) -> str:
return "You are a specialized agent for exploratory data analysis..."
async def _create_agent(self) -> None:
# Custom agent initialization
pass
class ResearchAgent(SubAgentInterface):
def _get_default_prompt(self) -> str:
return "You are a specialized agent for research and analysis..."
async def _create_agent(self) -> None:
# Custom agent initialization
pass
from agentdk.prompts import get_supervisor_prompt
# Create specialized agents
eda_agent = EDAAgent(
llm=llm,
mcp_config_path="mcp_config.json", ## see below for MCP conf set up
name="data_analyst"
)
research_agent = ResearchAgent(
llm=llm,
tools=[web_search_tool],
name="researcher"
)
# Create supervisor with custom routing
supervisor = Agent(
llm=llm,
agents=[eda_agent, research_agent],
prompt=get_supervisor_prompt() # Intelligent routing logic
)
# Complex multi-step analysis
result = supervisor("""
Analyze our customer transaction data and research industry benchmarks
to provide insights on our performance compared to competitors.
""")
🔧Set up MCP Servers
MCP (Model Context Protocol) servers provide standardized tool access. Here's how to configure them:
MySQL MCP Server Example
Create a mcp_config.json file with your MCP server configuration. Note: Relative paths in configuration are resolved relative to the config file's location.
{
"mysql": {
"command": "uv",
"args": [
"--directory",
"../mysql_mcp_server",
"run",
"mysql_mcp_server"
],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_PORT": "3306",
"MYSQL_USER": "agentdk_user",
"MYSQL_PASSWORD": "agentdk_user_password",
"MYSQL_DATABASE": "agentdk_test"
},
"transport": "stdio"
}
}
The relative path ../mysql_mcp_server is automatically resolved to the absolute path based on the config file's location, making your configuration portable across different systems.
Examples and Tutorials
Check out the examples/ directory for:
- Basic Agent Setup: Simple agent configuration and usage
- Database Integration: EDA agents with SQL database connectivity
- Multi-Agent Workflows: Supervisor patterns with multiple specialized agents
- MCP Server Integration: Various MCP server configurations
- Jupyter Notebooks: Interactive examples and tutorials
🔧 Running Examples
Environment Setup
git clone https://github.com/breadpowder/agentdk.git
cd agentdk/examples
sh setup.sh
The setup script automatically creates your .env file from env.sample. Configure your environment variables:
# LLM Configuration
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_key
# Database Configuration (for EDA agents)
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=your_username
MYSQL_PASSWORD=your_password
MYSQL_DATABASE=your_database
# Logging
LOG_LEVEL=INFO
UV Environment Setup (Alternative)
If you prefer using uv for faster package management:
# 1. Install Python 3.11 (if not already available)
uv python install 3.11
# 2. Create virtual environment with Python 3.11
uv venv --python 3.11
# 3. Activate environment and install project with all dependencies
source .venv/bin/activate && uv pip install -e .[all]
# 4. Install Jupyter and ipykernel
uv pip install jupyter ipykernel
# 5. Register the environment as a Jupyter kernel
python -m ipykernel install --user --name agentdk --display-name "AgentDK (Python 3.11)"
# 6. Verify kernel installation
jupyter kernelspec list
# 7. Launch Jupyter Lab
jupyter lab
Then run agentdk_testing_notebook.ipynb
License
MIT License - see LICENSE file for details.
Links
- Homepage: https://github.com/breadpowder/agentdk
- Documentation: Coming soon
- Bug Reports: GitHub Issues
- Contributing: See CONTRIBUTING.md
Support
For questions and support:
- Check the examples/ directory
- Review the documentation in the repository
- Open an issue on GitHub
- Join our community discussions
Built with ❤️ for the LangGraph and MCP community.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentdk-0.1.0.tar.gz.
File metadata
- Download URL: agentdk-0.1.0.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
200f50a580d61b31d72fc2b060c97a69c37ba99b04a96b73f3fedec80d6a404d
|
|
| MD5 |
5cd4513cc72d8027d8cf54ed3ffa8fbc
|
|
| BLAKE2b-256 |
82017bfd0d2a12d774f08ea780326e1fbf8f526acdc19f9252d8bab83176367d
|
File details
Details for the file agentdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08559ca5b37edafc97fc4ecccfcb16745be79ef5c459c155fc3798e0d7ae7860
|
|
| MD5 |
d3453bbe10d68a19c8ca49f3137d3730
|
|
| BLAKE2b-256 |
d27bf25bd1541ee746a451cf8972aca1239276f063194cdb8c8d2be88700ae31
|