Skip to main content

A comprehensive Python framework for building multi-agent AI systems with advanced logging, monitoring, and integrations

Project description

BMasterAI - Advanced Multi-Agent AI Framework

Python 3.8+ License: MIT Version Kubernetes Docker

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

  1. Logging System: Structured, multi-level logging with JSON output
  2. Monitoring Engine: Real-time metrics collection and analysis
  3. Integration Manager: Unified interface for external services
  4. Agent Framework: Base classes for building AI agents
  5. Orchestrator: Multi-agent coordination and workflow management
  6. 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

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

๐Ÿšข Deployment Examples

๐Ÿค 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

๐Ÿ—บ๏ธ 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

bmasterai-0.2.1.tar.gz (166.1 kB view details)

Uploaded Source

Built Distribution

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

bmasterai-0.2.1-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

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

Hashes for bmasterai-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a09b88eb3397a266f483703fdd7e4d30aed9251f92d62c080d36cc1b74601c9d
MD5 8a84e45ece5490475ce0003a6e8388e6
BLAKE2b-256 cfe3a636e446c6cf984f34cc4f10bf97febafa7007cc487a265935cf1735dfa0

See more details on using hashes here.

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

Hashes for bmasterai-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 33ef5aa785d8e580c84a2922a603193c57e09121813941c6e22dc6dd9ca99c9a
MD5 c64de3af1ab2dc45cc2c7c55e560064d
BLAKE2b-256 9155769e5d18ede6c3d3fe4de22a64b56d4ee6b349db7ea1a6e5f36968f18439

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