🤖 AIOrchestrator
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!
Metadata
Release files for ai-orchestrator 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ai_orchestrator-0.1.0.tar.gz | 15.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ai_orchestrator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.3 kB
Release files / ai_orchestrator-0.1.0.tar.gz
| Download URL | ai_orchestrator-0.1.0.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0820133716e2f3f1537eef91fddffd8bb3db6aa7817e746a760e71a9d12fca20
|
|
BLAKE2b-256 checksum How to use checksums |
04e662dc3180f15d9f7d8a481a4bae63c208efd97ab5781a545928b4ce6f71f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / ai_orchestrator-0.1.0-py3-none-any.whl
| Download URL | ai_orchestrator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc4ae53728bc5581bd3e0455e1692d8da26125c0b5879575981b7188bb50abfe
|
|
BLAKE2b-256 checksum How to use checksums |
50c71b08e3cf9bbb1da60d6ef8e88dd57f72a36f6ab087e30d60433a039ba9f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|