Skip to content

About

LLM Council works together to answer your hardest questions

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

LLM Council

llmcouncil

A multi-LLM deliberation system that queries multiple language models, has them anonymously review each other's responses, and synthesizes a final answer. Instead of relying on a single LLM, get the collective wisdom of your "council."

How It Works

When you submit a query, the system runs a 3-stage deliberation process:

  1. Stage 1: Independent Responses — Your query is sent to all council members in parallel. Each LLM responds independently without seeing others' answers. You can inspect each response in a tabbed view.

  2. Stage 2: Anonymous Peer Review — Each LLM reviews and ranks all responses. Crucially, responses are anonymized ("Response A", "Response B", etc.) so models can't play favorites. Rankings are aggregated to show which responses the council collectively preferred.

  3. Stage 3: Synthesis — A designated "Chairman" model receives all responses plus the aggregate rankings and synthesizes a final, comprehensive answer.

The key innovation is anonymous peer review — by hiding model identities during evaluation, we get more honest assessments of response quality.

Quick Start

Prerequisites

Installation

# Clone the repository
git clone https://github.com/your-org/llm-council.git
cd llm-council

# Install backend dependencies
uv sync

# Install frontend dependencies
cd frontend && npm install && cd ..

# Configure your API key
echo "OPENROUTER_API_KEY=sk-or-v1-your-key-here" > .env

Running

# Start both servers (recommended)
./start.sh

# Or run manually in separate terminals:
# Terminal 1: uv run python -m backend.main
# Terminal 2: cd frontend && npm run dev

Open http://localhost:5173 in your browser.

Configuration

Edit backend/config.py to customize your council:

COUNCIL_MODELS = [
    "openai/gpt-5.1",
    "google/gemini-3-pro-preview",
    "anthropic/claude-sonnet-4.5",
    "x-ai/grok-4",
]

CHAIRMAN_MODEL = "google/gemini-3-pro-preview"

You can use any models available on OpenRouter.

Architecture

┌─────────────────────────────────────────────────────────────┐
│                        User Query                           │
└─────────────────────────┬───────────────────────────────────┘
                          ▼
┌─────────────────────────────────────────────────────────────┐
│  Stage 1: Parallel Queries                                  │
│  ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐           │
│  │ GPT-5.1 │ │ Gemini  │ │ Claude  │ │  Grok   │           │
│  └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘           │
└───────┼───────────┼───────────┼───────────┼─────────────────┘
        └───────────┴─────┬─────┴───────────┘
                          ▼
┌─────────────────────────────────────────────────────────────┐
│  Stage 2: Anonymous Peer Review                             │
│  Responses anonymized as "Response A", "Response B", etc.   │
│  Each model ranks all responses → Aggregate rankings        │
└─────────────────────────┬───────────────────────────────────┘
                          ▼
┌─────────────────────────────────────────────────────────────┐
│  Stage 3: Chairman Synthesis                                │
│  Final answer informed by all responses + rankings          │
└─────────────────────────────────────────────────────────────┘

Tech Stack

Component Technology
Backend FastAPI, Python 3.10+, async httpx
Frontend React 19, Vite
LLM Gateway OpenRouter API
Storage JSON files (local)
Package Management uv (Python), npm (JavaScript)

Project Structure

llm-council/
├── backend/
│   ├── config.py      # Model configuration
│   ├── council.py     # 3-stage orchestration logic
│   ├── main.py        # FastAPI endpoints
│   ├── openrouter.py  # OpenRouter API client
│   └── storage.py     # Conversation persistence
├── frontend/
│   └── src/
│       ├── App.jsx           # Main application
│       ├── api.js            # Backend client
│       └── components/       # Stage1, Stage2, Stage3 views
├── CLAUDE.md          # Developer documentation
└── start.sh           # Launch script

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT

Acknowledgments

Originally created by Andrej Karpathy as a weekend hack project. Now maintained as a community project.

About

LLM Council works together to answer your hardest questions

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages