Skip to content

πŸ›οΈ Multi-AI deliberation framework β€” multiple models debate, critique, and vote. Consensus, validated.

License

Notifications You must be signed in to change notification settings

Solvely-Colin/Quorum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

74 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Quorum

Multi-AI deliberation framework β€” diverge, challenge, converge.

Ask a question. Multiple AI providers debate, critique, and refine each other's thinking. Get a synthesized answer that's better than any single model.

npm version License: MIT


Quick Start

npm install -g quorum-ai
quorum init          # auto-detect your AI providers
quorum ask "What's the best approach for error handling in TypeScript?"

That's it. Quorum finds your API keys, runs a 7-phase deliberation across providers, and returns a synthesized answer with confidence scores.

How It Works

Quorum runs a 7-phase deliberation across your configured AI providers:

  1. Gather β€” Each provider responds independently, in isolation
  2. Plan β€” Each sees others' takes and plans their argument
  3. Formulate β€” Formal position statements
  4. Debate β€” Every provider critiques all other positions simultaneously
  5. Adjust β€” Each revises based on critiques received
  6. Rebuttal β€” Final rebuttals or concessions (auto-skipped if consensus reached)
  7. Vote β€” Ranked voting via Borda count (or ranked-choice, approval, Condorcet)

A synthesis phase follows: the runner-up (not the winner, to reduce bias) merges the best thinking into a definitive answer with a minority report.

Features

  • Multi-provider deliberation β€” Claude, GPT, Gemini, Kimi, DeepSeek, Mistral, Ollama, and more
  • Adaptive debate β€” Auto-skip or extend rounds based on disagreement
  • Evidence protocol β€” Providers cite sources; claims are cross-validated
  • Code review β€” Review files, staged changes, PRs, or diffs
  • CI/CD integration β€” Structured output, exit codes, auto-commenting
  • Policy guardrails β€” YAML rules that block, warn, or pause deliberations
  • Deterministic replay β€” SHA-256 hash-chained ledger for auditability
  • Human-in-the-loop β€” Pause at any phase to inject guidance
  • Debate topologies β€” Mesh, star, tournament, pipeline, and more
  • MCP server β€” Use Quorum as a tool in Claude Desktop, Cursor, or any MCP client
  • Red team analysis β€” Adversarial attack packs for robustness testing

Provider Setup

Quorum auto-detects providers from environment variables:

Provider Environment Variable Install
OpenAI OPENAI_API_KEY platform.openai.com
Anthropic (Claude) ANTHROPIC_API_KEY console.anthropic.com
Google (Gemini) GOOGLE_GENERATIVE_AI_API_KEY aistudio.google.com
Kimi (Moonshot) KIMI_API_KEY platform.moonshot.cn
DeepSeek DEEPSEEK_API_KEY platform.deepseek.com
Mistral MISTRAL_API_KEY console.mistral.ai
Groq GROQ_API_KEY console.groq.com
Ollama (local, no key) ollama.com
# Set your keys, then:
quorum init                    # auto-detect everything
quorum providers list          # see what's configured
quorum providers test          # verify they work

Or add manually:

quorum providers add --name deepseek --type deepseek --model deepseek-chat --env DEEPSEEK_API_KEY

See docs/providers.md for detailed setup instructions.

CLI Reference

# Deliberation
quorum ask "question"                        # full 7-phase deliberation
quorum ask --rapid "question"                # 3-phase: gather β†’ debate β†’ synthesize
quorum ask -1 "quick question"               # single provider, no deliberation
quorum ask --evidence strict "question"      # require cited sources
quorum ask --adaptive balanced "question"    # auto-adjust based on disagreement
quorum ask --devils-advocate "question"      # force one provider contrarian
quorum ask --profile decision "question"     # use a named profile
quorum versus claude kimi "tabs vs spaces"   # head-to-head

# Code Review
quorum review src/auth.ts                    # review specific files
quorum review --staged                       # review staged changes
quorum review --pr 42                        # review a GitHub PR
quorum review --diff main                    # review diff against branch

# CI/CD
quorum ci --pr 42 --confidence-threshold 0.7 --post-comment

# Session Management
quorum history                               # list past sessions
quorum session last                          # view last session
quorum follow-up last "what about X?"        # continue deliberation
quorum export last --format html             # export as HTML
quorum rerun last --compare                  # re-run and compare

# Provider Management
quorum providers list | add | remove | test | models
quorum auth login | list | logout

# Advanced
quorum workspace                             # real-time deliberation UI
quorum mcp                                   # start MCP server
quorum watch src/*.ts                        # re-run on file changes

See docs/cli.md for the complete reference with all flags.

Configuration

Config lives at ~/.quorum/config.yaml (or project-local quorum.yaml):

providers:
  - name: claude
    provider: anthropic
    model: claude-sonnet-4-20250514
    auth:
      method: env
      envVar: ANTHROPIC_API_KEY
  - name: openai
    provider: openai
    model: gpt-4o
    auth:
      method: env
      envVar: OPENAI_API_KEY

defaultProfile: default

Profiles

Profiles customize deliberation behavior. Built-in: default, brainstorm, code-review, research, decision, panel, quick, thorough, evidence, research-tools.

# ~/.quorum/agents/security-review.yaml
name: security-review
rounds: 1
focus: [security, authentication, authorization]
challengeStyle: adversarial
evidence: strict
adaptive: balanced
roles:
  claude: 'OWASP security expert'
  kimi: 'penetration tester'
votingMethod: condorcet

See docs/configuration.md for all options.

Architecture

src/
β”œβ”€β”€ cli.ts            # CLI entry point (commander.js)
β”œβ”€β”€ council-v2.ts     # 7-phase deliberation engine
β”œβ”€β”€ providers/base.ts # Provider adapter (via pi-ai)
β”œβ”€β”€ adaptive.ts       # Adaptive debate controller
β”œβ”€β”€ evidence.ts       # Evidence protocol & cross-validation
β”œβ”€β”€ policy.ts         # YAML policy guardrails engine
β”œβ”€β”€ topology.ts       # 7 debate topologies (mesh, star, etc.)
β”œβ”€β”€ arena.ts          # Eval arena & reputation system
β”œβ”€β”€ ledger.ts         # Hash-chained audit trail
β”œβ”€β”€ hitl.ts           # Human-in-the-loop checkpoints
β”œβ”€β”€ memory-graph.ts   # Cross-run memory retrieval
β”œβ”€β”€ voting.ts         # Pluggable voting algorithms
β”œβ”€β”€ mcp.ts            # MCP server integration
β”œβ”€β”€ config.ts         # YAML config & auto-detection
β”œβ”€β”€ session.ts        # File-backed session persistence
└── types.ts          # Core TypeScript types

See docs/architecture.md for a detailed walkthrough.

Stability

Quorum follows Semantic Versioning. Starting with v1.0:

  • CLI commands and flags are stable β€” no breaking changes in minor releases
  • Config file format (config.yaml, profile YAML) is stable
  • Programmatic exports marked @experimental may change in minor releases
  • See API.md for the full public API surface

MCP Server

Run Quorum as a tool for AI agents:

quorum mcp

Add to Claude Desktop config:

{
  "mcpServers": {
    "quorum": { "command": "quorum", "args": ["mcp"] }
  }
}

Exposes: quorum_ask, quorum_review, quorum_versus, quorum_providers, quorum_history.

Contributing

  1. Fork the repo
  2. Create a feature branch: git checkout -b feat/my-feature
  3. Make changes with tests: npm test
  4. Use conventional commits: feat:, fix:, docs:, refactor:
  5. Open a PR
git clone https://github.com/Solvely-Colin/Quorum.git
cd Quorum && npm install
npm run dev -- ask "test question"   # run from source
npm test                              # run tests
npm run lint                          # lint
npm run format                        # format

License

MIT Β© Colin Johnson

CI/CD

Managed by solvely-launchpad. Update with:

npx solvely-launchpad migrate --from v1 --to v1.x

About

πŸ›οΈ Multi-AI deliberation framework β€” multiple models debate, critique, and vote. Consensus, validated.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •