Open-source IDE for intelligent Multi-LLM orchestration
Project description
Orchesity IDE OSS
An open-source Integrated Development Environment for Multi-LLM Orchestration, built with FastAPI and modern web technologies. Save 25-40% on API costs while improving performance and reliability through intelligent provider selection.
Features
- Multi-LLM Orchestration: Seamlessly integrate and orchestrate multiple Large Language Models (OpenAI, Anthropic, Gemini, Grok)
- Dynamic Weight Algorithm (DWA): Intelligent provider selection based on performance metrics, cost optimization, and reliability
- Redis Caching: High-performance caching for LLM responses, session data, and workflow results
- PostgreSQL Database: Persistent storage for orchestration history, user sessions, workflows, and analytics
- Intelligent Routing: Advanced load-based routing with failure detection and automatic fallback
- Real-Time Monitoring: Live health checks, performance metrics, and provider analytics
- Web-Based IDE: Visual workflow builder for designing LLM orchestration pipelines
- Custom Weighting Strategies: Configurable algorithms for cost, speed, accuracy, or balanced optimization
- Developer-Friendly: Simple setup with Docker Compose and comprehensive documentation
- Extensible Architecture: Plugin system for adding new LLM providers and custom strategies
๐๏ธ Architecture
graph TB
A[Web UI] --> B[FastAPI Backend]
B --> C[DWA Engine]
B --> D[Redis Cache]
B --> E[PostgreSQL DB]
C --> F[LLM Providers]
F --> G[OpenAI]
F --> H[Anthropic]
F --> I[Gemini]
F --> J[Grok]
subgraph "Core Features"
C
D
E
end
subgraph "Intelligence Layer"
K[Provider Selection]
L[Performance Tracking]
M[Cost Optimization]
N[Failure Detection]
end
C --> K
K --> L
L --> M
M --> N
Key Components:
- DWA (Dynamic Weight Algorithm): Intelligent provider selection and performance optimization
- Redis Cache: High-speed caching for responses and session data
- PostgreSQL: Persistent storage for analytics and workflow management
- FastAPI Backend: Async orchestration engine with real-time monitoring
Prerequisites
- Python 3.9+ (Required for async SQLAlchemy and modern typing)
- Docker & Docker Compose (Recommended for full stack deployment)
- PostgreSQL 15+ (or use Docker Compose setup)
- Redis 7+ (or use Docker Compose setup)
- API keys for LLM providers (OpenAI, Anthropic, Gemini, Grok)
Quick Start
Option 1: Docker Compose (Recommended)
Full stack with PostgreSQL, Redis, and DWA enabled:
# Clone the repository
git clone https://github.com/Kolerr-Lab/Orchesity_IDE_OSS.git
cd orchesity-ide-oss
# Create environment file
cp .env.example .env
# Add your LLM API keys to .env
# Start full stack
docker-compose up -d
# View logs
docker-compose logs -f orchesity-ide-oss
Option 2: Docker Build
Build and run with Docker:
# Build image
docker build -t orchesity-ide-oss:latest .
# Run with basic setup (no persistence)
docker run -p 8000:8000 --env-file .env orchesity-ide-oss:latest
Option 3: Local Development
For development with external Redis/PostgreSQL:
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your API keys and database URLs
# Run application
uvicorn src.main:app --reload
Option 4: PyPI Installation
pip install orchesity-ide-oss
Access Points:
- Web Interface:
http://localhost:8000 - API Documentation:
http://localhost:8000/docs - Health Check:
http://localhost:8000/api/health
๐ API Documentation
Once running, visit http://localhost:8000/docs for interactive API documentation.
๐ง Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
| LLM Providers | ||
OPENAI_API_KEY |
OpenAI API key | - |
ANTHROPIC_API_KEY |
Anthropic API key | - |
GEMINI_API_KEY |
Google Gemini API key | - |
GROK_API_KEY |
xAI Grok API key | - |
| Database & Cache | ||
DATABASE_URL |
PostgreSQL connection string | postgresql://orchesity:orchesity@localhost:5432/orchesity_db |
REDIS_URL |
Redis connection string | redis://localhost:6379 |
REDIS_DB |
Redis database number | 0 |
CACHE_EXPIRE_SECONDS |
Default cache expiration | 3600 |
| Orchestration | ||
ROUTING_STRATEGY |
Provider selection strategy | load_balanced |
MAX_CONCURRENT_REQUESTS |
Max concurrent requests | 5 |
REQUEST_TIMEOUT |
Request timeout in seconds | 30 |
| Application | ||
LOG_LEVEL |
Logging level | INFO |
HOST |
Server host | 0.0.0.0 |
PORT |
Server port | 8000 |
Dynamic Weight Algorithm (DWA)
Orchesity IDE OSS features an intelligent Dynamic Weight Algorithm that automatically optimizes provider selection based on real-time performance metrics:
Selection Strategies:
max_accuracy- Prioritize providers with highest success ratesmin_cost- Optimize for lowest cost per tokenmin_latency- Select fastest responding providersweighted_composite- Balanced optimization across all metricsround_robin- Simple rotation between providers
Custom Weighting:
# Example: Cost-optimized strategy
def cost_strategy(provider):
return (provider.accuracy * provider.availability) / provider.cost
# Apply custom strategy
orchestrator.set_custom_dwa_weighting(cost_strategy)
Automatic Learning:
- Tracks response times, accuracy, and failure rates
- Learns from every request to improve future selections
- Automatically excludes failing providers
- Provides detailed analytics and metrics
Redis Caching
Intelligent Caching System:
- LLM Response Caching: Automatic caching based on prompt+provider+model hash
- Session Storage: User session data with configurable expiration
- Workflow Results: Temporary storage for complex orchestration results
- Performance Metrics: Cache hit rates and optimization statistics
PostgreSQL Database
Persistent Storage Features:
- Request History: Complete audit trail of all orchestration requests
- Performance Analytics: Provider metrics, response times, and costs
- User Sessions: Persistent user data and preferences
- Workflow Management: Save and execute complex multi-step workflows
- Error Tracking: Detailed error logs and failure analysis
Building and Publishing
Build for PyPI
# Install build tools
pip install build twine
# Build distribution
python -m build
# Test locally (optional)
pip install dist/orchesity_ide_oss-1.0.0.tar.gz
Publish to PyPI
# Upload to PyPI
twine upload dist/*
Test on TestPyPI First
# Upload to test PyPI
twine upload --repository testpypi dist/*
# Install from test PyPI
pip install -i https://test.pypi.org/simple/ orchesity-ide-oss
๐ Project Structure
orchesity-ide-oss/
โโโ README.md # This file
โโโ LICENSE # MIT License
โโโ requirements.txt # Python dependencies
โโโ .env.example # Environment template
โโโ src/ # Source code
โ โโโ main.py # FastAPI application
โ โโโ config.py # Configuration settings
โ โโโ models.py # Pydantic models
โ โโโ routers/ # API endpoints
โ โ โโโ llm.py # LLM orchestration routes
โ โ โโโ user.py # User management routes
โ โ โโโ health.py # Health check routes
โ โโโ services/ # Business logic
โ โ โโโ llm_orchestrator.py # Core orchestration logic
โ โ โโโ user_service.py # User/session handling
โ โโโ utils/ # Utilities
โ โโโ logger.py # Logging utilities
โ โโโ helpers.py # Helper functions
โโโ tests/ # Test suite
โ โโโ test_llm.py # LLM tests
โ โโโ test_health.py # Health check tests
โโโ web/ # Web interface
โโโ static/
โโโ index.html # Basic HTML interface
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Make your changes and add tests
- Run the test suite:
pytest - Submit a pull request
Adding New LLM Providers
- Create a new provider class in
src/services/ - Implement the
LLMProviderinterface - Add configuration in
src/config.py - Update tests and documentation
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- Built on the powerful orchestration concepts from the original Orchesity platform
- Inspired by the need for accessible multi-LLM development tools
- Thanks to the open-source community for amazing libraries and frameworks
๏ฟฝ Documentation
Comprehensive documentation is available in the docs/ directory:
- LLM Orchestration Benefits - Detailed analysis of cost savings, performance improvements, and ROI from multi-LLM orchestration
- API Documentation - Complete API reference and usage examples
- Database Setup - PostgreSQL configuration and schema details
- Docker Deployment - Containerized deployment guide
- Migration Guide - Upgrading from previous versions
๏ฟฝ๐ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: See the
docs/directory for comprehensive guides
Happy orchestrating! ๐ญ๐ค
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 orchesity_ide_oss-1.0.0.tar.gz.
File metadata
- Download URL: orchesity_ide_oss-1.0.0.tar.gz
- Upload date:
- Size: 46.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
224953b8880a6eefe6b6158a6e9e7f752c9f1707624b517ddafefeb0679cee7f
|
|
| MD5 |
49fa05469364428559023d4182e81321
|
|
| BLAKE2b-256 |
93e7695441dd3949b31edc2cd0798cd35cd05cdd2fe6e4a08ef21b59df9bd398
|
File details
Details for the file orchesity_ide_oss-1.0.0-py3-none-any.whl.
File metadata
- Download URL: orchesity_ide_oss-1.0.0-py3-none-any.whl
- Upload date:
- Size: 52.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27388a1af65a48b9f4659180c46ca2b2f72751708a98d54e6bbe995dd6380e48
|
|
| MD5 |
ab6a4316f8fd5ec835b24261bca4ce2a
|
|
| BLAKE2b-256 |
b89f3b838ed604db0d60ab0a5d0ff8baa7f6adfce8f72970e828b89791e0701b
|