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)
  • 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. Create an Ensemble Configuration

Create ~/.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

2. 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
uv run ruff check .
uv run black --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.1.2.tar.gz (144.5 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.1.2-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_orchestra-0.1.2.tar.gz
  • Upload date:
  • Size: 144.5 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.1.2.tar.gz
Algorithm Hash digest
SHA256 e3fb392eef5df54dc483b6dd8adfb4cdeffc1f8d33cc9d8b31a9c07c95f93613
MD5 b336fd7842e696b188aad32fe595b6c1
BLAKE2b-256 92cd3326b1a3557731b049b3e5919555e9a8653ec0634b68e913db4f600a8902

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llm_orchestra-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.0 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bd2ba0146f7863f148b3283f4e4a6006002609d3c2c6d7fa4bdcd0ea9f644cd3
MD5 52f90a9d227d49108ae02e43de558806
BLAKE2b-256 745b6dec19e870b4e2e9e96e1b493ff164c65c0dc8f8f08ced7475abc18974ef

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