A comprehensive Python framework for building multi-agent AI systems with advanced logging, monitoring, and integrations
Project description
BMasterAI - Advanced Multi-Agent AI Framework
A comprehensive Python framework for building multi-agent AI systems with advanced logging, monitoring, and integrations. BMasterAI provides enterprise-ready features for developing, deploying, and managing AI agents at scale.
โก NEW: Kubernetes Deployment Support for AWS EKS
๐ BMasterAI now includes full production-ready Kubernetes deployment support!
Deploy BMasterAI on Amazon EKS with enterprise features:
- ๐ณ Production Docker images with security best practices
- โ๏ธ Complete Kubernetes manifests for EKS deployment
- ๐ Helm charts for easy installation and management
- ๐ง Auto-scaling with Horizontal Pod Autoscaler
- ๐ Monitoring & observability with Prometheus and Grafana
- ๐ Enterprise security with RBAC, Pod Security Standards, and IAM integration
โ Quick Start with Kubernetes | โ Complete Deployment Guide
๐ Features
Core Framework
- Multi-Agent Orchestration: Coordinate multiple AI agents working together
- Task Management: Structured task execution with error handling and retries
- LLM Integration: Support for multiple language models (OpenAI, Anthropic, etc.)
- YAML Configuration: No-code setup for common workflows
Advanced Monitoring & Logging
- Comprehensive Logging: Structured logging with JSON output and multiple levels
- Real-time Monitoring: System metrics, agent performance, and custom metrics
- Performance Tracking: Task duration, LLM usage, and resource consumption
- Alert System: Configurable alerts with multiple notification channels
Enterprise Integrations
- Slack Integration: Real-time notifications and alerts
- Email Notifications: SMTP support for reports and alerts
- Discord Integration: Community and team notifications
- Microsoft Teams: Enterprise communication
- Database Storage: SQLite, MongoDB, and custom database connectors
- Webhook Support: Generic webhook integration for any service
๐ข Production Deployment
- Kubernetes Native: Complete EKS deployment with Helm charts
- Docker Ready: Production-optimized container images
- Auto-scaling: Horizontal Pod Autoscaler with custom metrics
- Monitoring Stack: Prometheus, Grafana, and CloudWatch integration
- Security First: RBAC, Pod Security Standards, and secrets management
- CI/CD Pipeline: GitHub Actions for automated deployment
Developer Experience
- Easy Installation: Simple pip install with optional dependencies
- Rich Examples: Comprehensive examples and tutorials
- Type Hints: Full type annotation support
- Testing Suite: Built-in testing framework
- Documentation: Extensive documentation and API reference
๐ฆ Installation
Basic Installation
pip install bmasterai
With All Integrations
pip install bmasterai[all]
Kubernetes Deployment
# Quick start with automated scripts
git clone https://github.com/travis-burmaster/bmasterai.git
cd bmasterai
./eks/setup-scripts/01-create-cluster.sh
./eks/setup-scripts/02-deploy-bmasterai.sh
# Or using Helm
helm install bmasterai ./helm/bmasterai --namespace bmasterai --create-namespace
Development Installation
git clone https://github.com/travis-burmaster/bmasterai.git
cd bmasterai
pip install -e .[dev]
๐ Quick Start
1. Basic Agent Setup
from bmasterai.logging import configure_logging, LogLevel
from bmasterai.monitoring import get_monitor
from bmasterai.integrations import get_integration_manager, SlackConnector
# Configure logging and monitoring
logger = configure_logging(log_level=LogLevel.INFO)
monitor = get_monitor()
monitor.start_monitoring()
# Setup integrations
integration_manager = get_integration_manager()
slack = SlackConnector(webhook_url="YOUR_SLACK_WEBHOOK")
integration_manager.add_connector("slack", slack)
# Create and run an agent
from bmasterai.examples import EnhancedAgent
agent = EnhancedAgent("agent-001", "DataProcessor")
agent.start()
# Execute tasks with full monitoring
result = agent.execute_task("data_analysis", {"dataset": "sales.csv"})
print(f"Task result: {result}")
# Get performance dashboard
dashboard = monitor.get_agent_dashboard("agent-001")
print(f"Agent performance: {dashboard}")
agent.stop()
2. Kubernetes Deployment
# Deploy on EKS with monitoring
./eks/setup-scripts/01-create-cluster.sh # Create EKS cluster
./eks/setup-scripts/02-deploy-bmasterai.sh # Deploy BMasterAI
./eks/setup-scripts/03-install-monitoring.sh # Install Prometheus/Grafana
# Check deployment status
kubectl get pods -n bmasterai
kubectl get svc -n bmasterai
# Access monitoring dashboard
kubectl port-forward svc/prometheus-operator-grafana 3000:80 -n monitoring
3. Multi-Agent Coordination
from bmasterai.examples import MultiAgentOrchestrator, EnhancedAgent
# Create orchestrator
orchestrator = MultiAgentOrchestrator()
# Create specialized agents
data_agent = EnhancedAgent("data-agent", "DataProcessor")
analysis_agent = EnhancedAgent("analysis-agent", "DataAnalyzer")
report_agent = EnhancedAgent("report-agent", "ReportGenerator")
# Add agents to orchestrator
orchestrator.add_agent(data_agent)
orchestrator.add_agent(analysis_agent)
orchestrator.add_agent(report_agent)
# Start all agents
for agent in orchestrator.agents.values():
agent.start()
# Coordinate complex task across agents
task_assignments = {
"data-agent": ("data_analysis", {"dataset": "sales_data.csv"}),
"analysis-agent": ("trend_analysis", {"period": "monthly"}),
"report-agent": ("generate_report", {"format": "pdf"})
}
results = orchestrator.coordinate_task("monthly_analysis", task_assignments)
print(f"Coordination results: {results}")
๐ฅ๏ธ Command Line Interface
BMasterAI includes a powerful CLI for project management, monitoring, and system administration.
Installation & Setup
The CLI is automatically available after installation:
pip install bmasterai
bmasterai --help
Available Commands
1. Initialize New Project
Create a new BMasterAI project with proper structure and templates:
bmasterai init my-ai-project
This creates:
my-ai-project/
โโโ agents/my_agent.py # Working agent template
โโโ config/config.yaml # Configuration file
โโโ logs/ # Log directory
2. System Status
Monitor your BMasterAI system in real-time:
bmasterai status
3. Real-time Monitoring
Start continuous system monitoring:
bmasterai monitor
4. Test Integrations
Verify all configured integrations are working:
bmasterai test-integrations
๐ข Kubernetes Features
Enterprise-Ready Deployment
- High Availability: Multi-replica deployment with pod anti-affinity
- Auto-scaling: HPA with CPU/memory metrics and custom metrics support
- Rolling Updates: Zero-downtime deployments
- Health Checks: Comprehensive liveness, readiness, and startup probes
Security & Compliance
- RBAC: Minimal required permissions with service accounts
- Pod Security: Non-root execution, read-only filesystem, dropped capabilities
- Network Policies: Traffic isolation and egress control
- Secrets Management: Encrypted storage of API keys and credentials
Monitoring & Observability
- Prometheus Metrics: System and application metrics collection
- Grafana Dashboards: Pre-built dashboards for BMasterAI monitoring
- CloudWatch Integration: AWS native logging and metrics
- Distributed Tracing: Request flow tracking across services
Cost Optimization
- Resource Right-sizing: Optimized CPU/memory requests and limits
- Spot Instances: Support for cost-effective compute
- Auto-scaling: Dynamic scaling based on workload
- Storage Optimization: GP3 volumes with encryption
๐ Monitoring & Analytics
BMasterAI provides comprehensive monitoring out of the box:
System Metrics
- CPU and memory usage
- Disk space and network I/O
- Agent performance metrics
- Task execution times
Custom Metrics
- LLM token usage and costs
- Task success/failure rates
- Agent communication patterns
- Custom business metrics
Kubernetes Monitoring Commands
# Check deployment status
kubectl get pods -n bmasterai
kubectl get hpa -n bmasterai
# View logs
kubectl logs -f deployment/bmasterai-agent -n bmasterai
# Scale manually
kubectl scale deployment bmasterai-agent --replicas=5 -n bmasterai
# Port forward for direct access
kubectl port-forward svc/bmasterai-service 8080:80 -n bmasterai
# Access Grafana dashboard
kubectl port-forward svc/prometheus-operator-grafana 3000:80 -n monitoring
๐ Integrations
Slack Integration
from bmasterai.integrations import SlackConnector
slack = SlackConnector(webhook_url="YOUR_WEBHOOK_URL")
slack.send_message("Agent task completed successfully!")
slack.send_alert(alert_data)
Email Integration
from bmasterai.integrations import EmailConnector
email = EmailConnector(
smtp_server="smtp.gmail.com",
smtp_port=587,
username="your-email@gmail.com",
password="your-app-password"
)
email.send_report(["admin@company.com"], report_data)
Database Integration
from bmasterai.integrations import DatabaseConnector
db = DatabaseConnector(db_type="sqlite", connection_string="agents.db")
db.store_agent_data(agent_id, name, status, metadata)
history = db.get_agent_history(agent_id)
๐๏ธ Architecture
BMasterAI is built with a modular architecture:
bmasterai/
โโโ logging/ # Structured logging system
โโโ monitoring/ # Metrics collection and alerting
โโโ integrations/ # External service connectors
โโโ agents/ # Agent base classes and utilities
โโโ orchestration/ # Multi-agent coordination
โโโ k8s/ # Kubernetes manifests
โโโ helm/ # Helm chart for deployment
โโโ eks/ # EKS-specific configuration
โโโ examples/ # Usage examples and templates
Key Components
- Logging System: Structured, multi-level logging with JSON output
- Monitoring Engine: Real-time metrics collection and analysis
- Integration Manager: Unified interface for external services
- Agent Framework: Base classes for building AI agents
- Orchestrator: Multi-agent coordination and workflow management
- Kubernetes Operator: Native Kubernetes deployment and management
๐ Performance & Scalability
BMasterAI is designed for production use:
- Async Support: Non-blocking operations for high throughput
- Resource Management: Automatic cleanup and resource monitoring
- Horizontal Scaling: Multi-process and distributed agent support
- Kubernetes Native: Auto-scaling with HPA and cluster autoscaler
- Caching: Built-in caching for improved performance
- Load Balancing: Intelligent task distribution
๐งช Testing
Run the test suite:
# Install development dependencies
pip install -e .[dev]
# Run tests
pytest
# Run with coverage
pytest --cov=bmasterai
# Test Kubernetes deployment
kubectl apply --dry-run=client -f k8s/
helm template bmasterai ./helm/bmasterai | kubectl apply --dry-run=client -f -
๐ Examples
Check out the examples/ directory for comprehensive examples:
๐ค Core Framework Examples
- Basic Agent: Simple agent with logging and monitoring
- Enhanced Examples: Advanced multi-agent system with full BMasterAI integration
- Multi-Agent System: Coordinated agents working together
- Integration Examples: Using Slack, email, and database integrations
๐ง RAG (Retrieval-Augmented Generation) Examples
- Qdrant Cloud RAG: Advanced RAG system with Qdrant Cloud vector database
- Interactive RAG UI: Gradio web interface for RAG system with chat, document management, and monitoring
๐ Web Interface Examples
- Gradio Anthropic Chat: Interactive chat interface with Anthropic Claude models
- RAG Web Interface: Full-featured RAG system with web UI
๐ข Deployment Examples
- Docker Deployment: Production-ready container image
- Kubernetes Manifests: Complete Kubernetes deployment configuration
- Helm Chart: Helm chart for easy deployment and management
- EKS Setup Scripts: Automated EKS cluster creation and deployment
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
git clone https://github.com/travis-burmaster/bmasterai.git
cd bmasterai
pip install -e .[dev]
pre-commit install
Running Tests
pytest
black .
flake8
mypy src/
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Support
- Documentation: GitHub Wiki
- Kubernetes Guide: Complete Deployment Guide
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: travis@burmaster.com
๐บ๏ธ Roadmap
Version 0.3.0 (Coming Soon)
- Kubernetes deployment support โ COMPLETED
- Web dashboard for monitoring
- Advanced multi-agent communication protocols
- Plugin system for custom integrations
Version 0.4.0
- Visual workflow builder
- Advanced scheduling and cron support
- Machine learning model integration
- Multi-cloud deployment (GKE, AKS)
Version 1.0.0
- Production-ready enterprise features
- Advanced analytics and reporting
- Multi-cloud deployment support
- Enterprise security and compliance
๐ Why BMasterAI?
BMasterAI bridges the gap between simple AI scripts and enterprise-grade AI systems:
- Developer Friendly: Easy to get started, powerful when you need it
- Production Ready: Built-in monitoring, logging, and error handling
- Cloud Native: Kubernetes-ready with enterprise security features
- Extensible: Plugin architecture and custom integrations
- Community Driven: Open source with active community support
- Enterprise Features: Security, compliance, and scalability built-in
๐ Get Started
Choose your deployment method:
Local Development
pip install bmasterai
bmasterai init my-project
Kubernetes Production
git clone https://github.com/travis-burmaster/bmasterai.git
cd bmasterai
./eks/setup-scripts/01-create-cluster.sh
./eks/setup-scripts/02-deploy-bmasterai.sh
Helm Deployment
helm repo add bmasterai https://travis-burmaster.github.io/bmasterai
helm install bmasterai bmasterai/bmasterai
Ready to build production-scale AI systems? ๐
โ Start with Kubernetes | โ Local Development | โ View Examples
Made with โค๏ธ by the BMasterAI community
Star โญ this repo if you find it useful!
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
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 bmasterai-0.2.1.tar.gz.
File metadata
- Download URL: bmasterai-0.2.1.tar.gz
- Upload date:
- Size: 166.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a09b88eb3397a266f483703fdd7e4d30aed9251f92d62c080d36cc1b74601c9d
|
|
| MD5 |
8a84e45ece5490475ce0003a6e8388e6
|
|
| BLAKE2b-256 |
cfe3a636e446c6cf984f34cc4f10bf97febafa7007cc487a265935cf1735dfa0
|
File details
Details for the file bmasterai-0.2.1-py3-none-any.whl.
File metadata
- Download URL: bmasterai-0.2.1-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33ef5aa785d8e580c84a2922a603193c57e09121813941c6e22dc6dd9ca99c9a
|
|
| MD5 |
c64de3af1ab2dc45cc2c7c55e560064d
|
|
| BLAKE2b-256 |
9155769e5d18ede6c3d3fe4de22a64b56d4ee6b349db7ea1a6e5f36968f18439
|