Skip to main content

Independent second opinions for AI agent workflows.

Project description

WhaleCouncil

Independent second opinions for AI agent workflows.

When you use a single AI model, you get a single perspective — one that can anchor on wrong assumptions, miss edge cases, or confidently hallucinate. WhaleCouncil sends your task to multiple models in parallel, collects independent responses, surfaces disagreements, and synthesizes a final report.

$ council review "Should I use Redis or Postgres for this session store?"

WhaleCouncil — reviewing with: claude, codex, gemini
────────────────────────────────────────────────────
claude   ✓  Redis for session data. Low latency reads, built-in TTL...
codex    ✓  Postgres if you already have it. Avoid infra complexity...
gemini   ✓  Depends on scale. Redis at >10k concurrent sessions...
────────────────────────────────────────────────────
⚡ Disagreement: Redis vs Postgres — codex flags infra cost, others favor Redis.
→ Key question to resolve: Do you already run Postgres in this stack?

Why

Heavy AI users constantly switch between Claude, GPT, Gemini — manually copying context, pasting outputs back, comparing results by eye. This is slow, error-prone, and easy to skip under pressure.

WhaleCouncil automates the loop:

  • One task in → multiple independent opinions out
  • No anchoring — models don't see each other's responses in the first round
  • Structured diff — disagreements are extracted, not buried in prose
  • Actionable output — synthesis points to the next decision, not a summary of summaries

The core insight: one AI versus two AI is a qualitative difference, not a quantitative one.


Install

pip install whalecouncil

Or from source:

git clone https://github.com/openwhale-labs/whalecouncil
cd whalecouncil
pip install -e ".[dev]"

Set your API keys in .env (copy from .env.example):

cp .env.example .env
# edit .env with your keys

Usage

Review a task

# inline
council review "Is this approach correct: use a global dict as a cache in a FastAPI app?"

# from file
council review --file mycode.py

# choose models
council review --models claude,codex "Review this SQL query for performance issues"

# output to markdown file
council review --output markdown --file plan.md > report.md

Pipe input

cat diff.patch | council review --models claude,gemini
git diff HEAD~1 | council review "Any bugs introduced in this diff?"

List available models

council models

Configuration file

Persistent defaults can be set in ~/.council.toml (copy from council.toml.example):

[defaults]
models = ['claude-cli']
output = 'terminal'

[models.claude]
model = 'claude-sonnet-4-6'

CLI flags always override the config file, which overrides the built-in defaults. Per-provider [models.*] entries set the model each adapter uses.


Supported Models

Key Provider Notes
claude Anthropic Requires ANTHROPIC_API_KEY
claude-cli Local Claude subscription (Claude Code CLI) No API key needed. Requires claude CLI installed and logged in.
codex OpenAI Requires OPENAI_API_KEY
codex-cli Local Codex CLI (codex exec) No API key needed. Requires codex CLI installed and logged in.
gemini Google Requires GEMINI_API_KEY

How It Works

Input task
    │
    ├──► Claude  (independent, no other model's output)
    ├──► Codex   (independent)
    └──► Gemini  (independent)
         │
         ▼
   Collect opinions
         │
         ▼
   Extract disagreements
         │
         ▼
   Synthesize + surface next question
         │
         ▼
   Markdown or terminal report

Round 1 — Independent: Each model receives only the task and a neutral system prompt. No model sees another's output.

Round 2 — Synthesis (optional): A judge model receives all opinions and produces a structured diff: what they agree on, where they diverge, what the divergence reveals, and what question to resolve next.


Roadmap

  • CLI skeleton
  • Parallel model dispatch (asyncio)
  • Model adapters: Claude, OpenAI, Gemini
  • Disagreement extraction
  • Synthesis / judge layer
  • Markdown report output
  • Pipe / stdin support
  • Config file (~/.council.toml)
  • WhaleTrace — save and replay council runs
  • WhaleBench — structured benchmark tasks for agent evaluation

Design Philosophy

  • CLI-first — works in any terminal, composable with pipes
  • Independent opinions — first round is always blind; no anchoring
  • Disagreement over consensus — the value is in the diff, not the summary
  • Minimal infra — no server, no database, no account required
  • Extensible — add any OpenAI-compatible model endpoint

Contributing

See CONTRIBUTING.md.


License

MIT © noetherly

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

whalecouncil-0.1.0.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

whalecouncil-0.1.0-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file whalecouncil-0.1.0.tar.gz.

File metadata

  • Download URL: whalecouncil-0.1.0.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for whalecouncil-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c71a17852fff196a449af2c90ca25f8dea7421794b1400eb53d11ba21ccc453e
MD5 46c9cc9d652f5a4d0ad837e93fd3bb2a
BLAKE2b-256 be27cd6810d4b2c413768ddb80d9018e0c10ac4b36ec70af2eae7d089be18a69

See more details on using hashes here.

File details

Details for the file whalecouncil-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: whalecouncil-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for whalecouncil-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65fefc2d5a17428852935aa14b69a3c379b8c3731cd76e2ac2f49c933ff55171
MD5 d3e0b227cc6569f19b7808f9732443dc
BLAKE2b-256 d564335e25dab618f43b11d46a2b677dd76835444b0f342495bf83824e67bc2b

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