Skip to main content

Multi-agent LLM communication system with ensemble orchestration

Project description

LLM Orchestra

A multi-agent LLM communication system for ensemble orchestration and intelligent analysis.

Overview

LLM Orchestra lets you coordinate multiple AI agents for complex analysis tasks. Run code reviews with security and performance specialists, analyze architecture decisions from multiple angles, or get systematic coverage of any multi-faceted problem.

Mix expensive cloud models with free local models - use Claude for strategic insights while Llama3 handles systematic analysis tasks.

Key Features

  • Multi-Agent Ensembles: Coordinate specialized agents for different aspects of analysis
  • Cost Optimization: Mix expensive and free models based on what each task needs
  • CLI Interface: Simple commands with piping support (cat code.py | llm-orc invoke code-review)
  • Secure Authentication: Encrypted API key storage with easy credential management
  • YAML Configuration: Easy ensemble setup with readable config files
  • Usage Tracking: Token counting, cost estimation, and timing metrics

Installation

For End Users

pip install llm-orchestra

For Development

# Clone the repository
git clone https://github.com/mrilikecoding/llm-orc.git
cd llm-orc

# Install with development dependencies
uv sync --dev

Quick Start

1. Set Up Authentication

Before using LLM Orchestra, configure authentication for your LLM providers:

# Interactive setup wizard
llm-orc auth setup

# Or add providers individually
llm-orc auth add anthropic --api-key YOUR_ANTHROPIC_KEY
llm-orc auth add google --api-key YOUR_GOOGLE_KEY

# List configured providers
llm-orc auth list

# Test authentication
llm-orc auth test anthropic

Security: API keys are encrypted and stored securely in ~/.config/llm-orc/credentials.yaml.

2. Create an Ensemble Configuration

Create ~/.config/llm-orc/ensembles/code-review.yaml:

name: code-review
description: Multi-perspective code review ensemble

agents:
  - name: security-reviewer
    role: security-analyst
    model: llama3
    timeout_seconds: 60

  - name: performance-reviewer
    role: performance-analyst  
    model: llama3
    timeout_seconds: 60

coordinator:
  synthesis_prompt: |
    You are a senior engineering lead. Synthesize the security and performance 
    analysis into actionable recommendations.
  output_format: json
  timeout_seconds: 90

3. Invoke an Ensemble

# Analyze code from a file
cat mycode.py | llm-orc invoke code-review

# Or provide input directly
llm-orc invoke code-review --input "Review this function: def add(a, b): return a + b"

# JSON output for integration
llm-orc invoke code-review --input "..." --output-format json

# List available ensembles
llm-orc list-ensembles

Use Cases

Code Review

Get systematic analysis across security, performance, and maintainability dimensions. Each agent focuses on their specialty while synthesis provides actionable recommendations.

Architecture Review

Analyze system designs from scalability, security, performance, and reliability perspectives. Identify bottlenecks and suggest architectural patterns.

Product Strategy

Evaluate business decisions from market, financial, competitive, and user experience angles. Get comprehensive analysis for complex strategic choices.

Research Analysis

Systematic literature review, methodology evaluation, or multi-dimensional analysis of research questions.

Model Support

  • Claude (Anthropic) - Strategic analysis and synthesis
  • Gemini (Google) - Multi-modal and reasoning tasks
  • Ollama - Local deployment of open-source models (Llama3, etc.)
  • Custom models - Extensible interface for additional providers

Configuration

Ensemble configurations support:

  • Agent specialization with role-specific prompts
  • Timeout management per agent and coordinator
  • Model selection with local and cloud options
  • Synthesis strategies for combining agent outputs
  • Output formatting (text, JSON) for integration

Cost Optimization

  • Local models (free) for systematic analysis tasks
  • Cloud models (paid) reserved for strategic insights
  • Usage tracking shows exactly what each analysis costs
  • Intelligent routing based on task complexity

Development

# Run tests
uv run pytest

# Run linting and formatting
uv run ruff check .
uv run ruff format --check .

# Type checking
uv run mypy src/llm_orc

Research

This project includes comparative analysis of multi-agent vs single-agent approaches. See docs/ensemble_vs_single_agent_analysis.md for detailed findings.

Philosophy

Reduce toil, don't replace creativity. Use AI to handle systematic, repetitive analysis while preserving human creativity and strategic thinking.

License

MIT License - see LICENSE for details.

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

llm_orchestra-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.

llm_orchestra-0.2.1-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file llm_orchestra-0.2.1.tar.gz.

File metadata

  • Download URL: llm_orchestra-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.9

File hashes

Hashes for llm_orchestra-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7a8325ceaecc282edf2454870bf79bbb567f65ce9b29b7bf6bb5e458bd1d8bf3
MD5 8e6691b535873e11d9558891bc072970
BLAKE2b-256 a1387fc1be7c0933043934b082af0e52acfce292672da6a5cca9bc4a11a257ba

See more details on using hashes here.

File details

Details for the file llm_orchestra-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: llm_orchestra-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for llm_orchestra-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 46d8cb7e70371976e3a2c9c1dce9fbe67d477e522345d57d00d07fd48dacbb0d
MD5 e4258b0291917ae04ab8728e57e10bf1
BLAKE2b-256 b5d12e7b9282f16e4f8cb6007ca7d5e3610e5bab4db4c3d29f530d020245566d

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