Skip to main content

Multi-LLM debate CLI for confident answers

Project description

verd

Multi-LLM debate for confident answers. Takes any content + a question, runs it through multiple AI models in a structured multi-round debate, and returns a confidence-weighted verdict with strengths, issues, and fixes.

Instead of asking one AI "are you sure?", verd spawns multiple models from different families, has them challenge each other across rounds, then a stronger judge synthesizes the final verdict.

Install

pip install verd

Setup

verd works with any OpenAI-compatible API. Pick one:

Option 1: OpenRouter (easiest, all models, one key)

Sign up at openrouter.ai, get an API key, then:

export OPENAI_API_KEY=sk-or-...
export OPENAI_BASE_URL=https://openrouter.ai/api/v1

Option 2: Direct OpenAI

export OPENAI_API_KEY=sk-...
export OPENAI_BASE_URL=https://api.openai.com/v1

Note: only OpenAI models will work. Edit verd/models.py to use only OpenAI models.

Option 3: LiteLLM proxy (use native keys from any provider)

If you have API keys from multiple providers (Anthropic, Google, OpenAI, etc.):

pip install litellm
litellm --config litellm_config.yaml  # starts local proxy on port 4000

Example litellm_config.yaml:

model_list:
  - model_name: claude-sonnet-4-6
    litellm_params:
      model: anthropic/claude-sonnet-4-20250514
      api_key: sk-ant-...
  - model_name: gpt-5-mini
    litellm_params:
      model: openai/gpt-5-mini
      api_key: sk-...
  - model_name: gemini-2.5-flash
    litellm_params:
      model: gemini/gemini-2.5-flash
      api_key: AIza...

Then point verd at it:

export OPENAI_API_KEY=sk-anything
export OPENAI_BASE_URL=http://localhost:4000/v1

Option 4: Any OpenAI-compatible provider

Azure OpenAI, Together, Groq, Fireworks, etc. — just set the base URL and API key.

Save to .env

Or create a .env file in your working directory:

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

Custom models

Edit verd/models.py to match whatever models your provider supports. The default config uses models available through LiteLLM proxies and OpenRouter.

Usage

# Auto-scan current directory
cd backend && verd "is this production-ready?"

# Single file
verd "is this JWT implementation secure?" -f auth.py

# Multiple files
verd "any issues?" -f auth.py middleware.py routes.py

# Directory
verd "is this codebase sound?" -d src/ --ext .py

# Inline question
verdl "is O(n^2) acceptable for n=1000?"

# Git diffs
verd "are these changes safe?" -g              # unstaged
verd "ready to commit?" -gs                    # staged
verdh "should we merge this?" -gb main         # branch diff

# Pipe
cat auth.py | verd "is this secure?"

# Quiet mode (verdict only, no transcript)
verd "any bugs?" -f app.py -q

# JSON output
verd "any bugs?" -f app.py --json

Modes

Command Models Rounds Speed Cost
verdl 2 1 ~10s ~$0.01
verd 4 2 ~30s ~$0.05
verdh 5 + web search 3 ~70s ~$0.30

Flags

claim                  the question to evaluate (required)

Content input (pick one, or auto-scans current dir):
  -c, --context TEXT     inline content string
  -f FILE [FILE ...]     one or more files
  -d [DIR]               directory (default: current dir)
  -g, --git              unstaged git diff
  -gs, --git-staged      staged git diff
  -gb, --git-branch REF  git diff REF...HEAD

Directory filters:
  --ext EXT [EXT ...]    filter by extension (.py .ts)
  --exclude PATTERN      glob pattern to exclude (test_*)

Output:
  -q, --quiet            hide debate transcript, show only verdict
  --json                 raw JSON output
  --timeout SECONDS      override timeout per model call
  --version              show version

Exit Codes

  • 0 — PASS
  • 1 — FAIL
  • 2 — UNCERTAIN

Useful for scripting: verd "are tests passing?" -f test.py && deploy

MCP — Claude Code / Cursor

Add to ~/.claude.json or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "verd": {
      "command": "verd-mcp",
      "env": {
        "OPENAI_API_KEY": "your-key",
        "OPENAI_BASE_URL": "https://openrouter.ai/api/v1"
      }
    }
  }
}

Then use verd, verdl, or verdh as tools directly in chat.

Slack

Install with Slack dependencies:

pip install verd[slack]

Create a Slack app with Socket Mode, add bot scopes (app_mentions:read, channels:history, chat:write, reactions:write, im:history, im:write, users:read), then:

export SLACK_BOT_TOKEN=xoxb-...
export SLACK_APP_TOKEN=xapp-...
export SLACK_SIGNING_SECRET=...
verd-slack

Usage in Slack:

  • @verd what do you think? — reads thread/channel context, debates, replies
  • @verd deep is this secure? — uses verdh (5 models + web search)
  • @verd quick is this right? — uses verdl (fast)
  • @verd last 50 what's the consensus? — reads last 50 messages
  • /verd should we use Kafka? — slash command with progress updates
  • /verdl is this correct? — quick slash command
  • /verdh any security issues? — deep slash command

How it works

  1. Your question + content gets sent to multiple AI models in parallel
  2. Each model gives its independent assessment (PASS/FAIL/UNCERTAIN)
  3. Models see each other's responses and cross-examine for 1-3 rounds
  4. A stronger judge model synthesizes the debate into a final verdict
  5. You get: verdict, confidence %, strengths, issues, and actionable fixes

The key insight: different models catch different things. Claude spots security issues GPT misses. Gemini catches logic errors DeepSeek overlooks. The debate format forces them to challenge each other rather than just agreeing.

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

verd-0.1.1.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

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

verd-0.1.1-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file verd-0.1.1.tar.gz.

File metadata

  • Download URL: verd-0.1.1.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for verd-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2076eafa6b1a774727d9421054cd86be2283f75fc63313257bdaf45ec3528cad
MD5 c8b5e56132cd66cb8022626a108dbb5b
BLAKE2b-256 0dc54ca2a1492a84a5f155df41a1edb0402a4e20a911391edb2f157f1afb4bb5

See more details on using hashes here.

File details

Details for the file verd-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: verd-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for verd-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b59acbe671c30d73d339b8edafe69bb982f655471dcc56507525be3e1a8007eb
MD5 3090a65206745087ec96dccdfd760c1a
BLAKE2b-256 410e557de4ba3438dfeaa35040765f11ce88c834feaafdd3eb7a81505a5c9b05

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