Skip to main content

Intelligent AI task orchestration for applications

Project description

🤖 AIOrchestrator

PyPI version License: MIT Python 3.8+

AI Orchestrator is a powerful, easy-to-use library that helps you integrate and manage AI capabilities in your applications. It provides intelligent orchestration of AI tasks using advanced language models like Claude 3.5 Sonnet.

🌟 Features

  • 🔌 Plug-and-Play Integration: Easy integration with existing applications
  • 🧠 Intelligent Task Management: Automatic task analysis and orchestration
  • 🔄 Flexible Execution Modes: Sequential, parallel, or adaptive execution
  • 💾 Built-in State Management: Session-based context and history tracking
  • 🛠️ Customizable: Extensible for different AI models and use cases
  • 🔐 Error Handling: Robust error recovery mechanisms
  • 📈 Scalable: Async support for high-performance applications

🚀 Quick Start

Installation

pip install orchestrator

Basic Usage

from ai_orchestrator import AIOrchestrator

# Initialize orchestrator
orchestrator = AIOrchestrator(
    api_key="your-api-key",
    base_config={
        "default_model": "claude-3-5-sonnet-20241022",
        "default_temperature": 0.7
    }
)

# Use in async context
async def process_task():
    result = await orchestrator.process_input(
        session_id="unique-session-id",
        user_input="Analyze this text for sentiment",
        context_updates={"domain": "sentiment-analysis"}
    )
    print(result)

# Run the task
import asyncio
asyncio.run(process_task())

FastAPI Integration Example

from fastapi import FastAPI
from ai_orchestrator import AIOrchestrator

app = FastAPI()
orchestrator = AIOrchestrator(api_key="your-api-key")

@app.post("/analyze")
async def analyze_text(text: str):
    result = await orchestrator.process_input(
        session_id="unique-session-id",
        user_input=text
    )
    return result

🎯 Use Cases

  • 📊 Data Analysis: Intelligent processing of complex datasets
  • 📝 Content Generation: Orchestrated content creation and modification
  • 🔍 Research Assistance: Coordinated research and analysis tasks
  • 🤝 Customer Support: Intelligent routing and handling of support queries
  • 🎨 Creative Tasks: Coordinated creative content generation
  • 📈 Business Intelligence: Complex analysis and reporting

🛠️ Advanced Configuration

Custom Agent Configuration

from ai_orchestrator import AIOrchestrator, AgentConfig

custom_agents = {
    "analyst": AgentConfig(
        role="data_analyst",
        capabilities=["statistical_analysis", "visualization"],
        model="claude-3-5-sonnet-20241022",
        temperature=0.3,
        context_window=100000,
        max_tokens=4000
    )
}

orchestrator = AIOrchestrator(
    api_key="your-api-key",
    custom_agents=custom_agents
)

Execution Modes

# Sequential Execution
result = await orchestrator.process_input(
    session_id="session-id",
    user_input="Complex task requiring steps",
    context_updates={"mode": "sequential"}
)

# Parallel Execution
result = await orchestrator.process_input(
    session_id="session-id",
    user_input="Multiple independent subtasks",
    context_updates={"mode": "parallel"}
)

# Adaptive Execution (Default)
result = await orchestrator.process_input(
    session_id="session-id",
    user_input="Dynamic task",
    context_updates={"mode": "adaptive"}
)

📚 Documentation

For detailed documentation, visit our documentation site.

Key Concepts

  • Sessions: Maintain context and state across multiple interactions
  • Execution Modes: Different strategies for task execution
  • Agents: Specialized AI models for specific tasks
  • Context Management: State and history tracking
  • Error Handling: Recovery and fallback mechanisms

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Anthropic for Claude 3.5 Sonnet
  • The open-source community

📮 Contact

  • Create an issue for bug reports or feature requests
  • Connect with me on LinkedIn
  • Star the repository if you find it helpful!

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

ai_orchestrator-0.1.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

ai_orchestrator-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file ai_orchestrator-0.1.0.tar.gz.

File metadata

  • Download URL: ai_orchestrator-0.1.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for ai_orchestrator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0820133716e2f3f1537eef91fddffd8bb3db6aa7817e746a760e71a9d12fca20
MD5 f62d6cb009ee4bf850d4f41d4a7b4cda
BLAKE2b-256 04e662dc3180f15d9f7d8a481a4bae63c208efd97ab5781a545928b4ce6f71f5

See more details on using hashes here.

File details

Details for the file ai_orchestrator-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_orchestrator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc4ae53728bc5581bd3e0455e1692d8da26125c0b5879575981b7188bb50abfe
MD5 85afb2cdb39a490d1c1207d2d7b67b8b
BLAKE2b-256 50c71b08e3cf9bbb1da60d6ef8e88dd57f72a36f6ab087e30d60433a039ba9f7

See more details on using hashes here.

Supported by

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