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
gemini-cli Local Gemini CLI (gemini -p) No API key needed. Requires gemini CLI installed and logged in.

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.2.1.tar.gz (62.2 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.2.1-py3-none-any.whl (49.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: whalecouncil-0.2.1.tar.gz
  • Upload date:
  • Size: 62.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for whalecouncil-0.2.1.tar.gz
Algorithm Hash digest
SHA256 81e1e17dbf15154888349c1827263e618205253d6f7818f077c3533ca802b7df
MD5 5180d9a09b5ed8e247f93c101dd1274d
BLAKE2b-256 c08d03e9577ff5ac663372b0026491fd8342d81d765eeb193defb447a83335d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for whalecouncil-0.2.1.tar.gz:

Publisher: publish.yml on openwhale-labs/whalecouncil

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: whalecouncil-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 49.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for whalecouncil-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98ab6bf44b248590cc2c6cf9e6e0f5ee524fc87070190818cc78f128621b1012
MD5 b476b528ed1749b71ae70eece2be185f
BLAKE2b-256 eefeea861504edd04ba74fb9fd9d3c8e387dcb1d63cdd7c59b78dc6ebdfb2735

See more details on using hashes here.

Provenance

The following attestation bundles were made for whalecouncil-0.2.1-py3-none-any.whl:

Publisher: publish.yml on openwhale-labs/whalecouncil

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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