Skip to main content

CLI for orchestrating structured debates between AI agents

Project description

bl-agent-debater

Python 3.10+ License: MIT PyPI version

┌────────────────────────────────────────────────────────────────────────┐
│                                                                        │
│  ██████╗ ██╗      ██████╗ ███████╗██████╗  █████╗ ████████╗███████╗   │
│  ██╔══██╗██║      ██╔══██╗██╔════╝██╔══██╗██╔══██╗╚══██╔══╝██╔════╝   │
│  ██████╔╝██║█████╗██║  ██║█████╗  ██████╔╝███████║   ██║   █████╗     │
│  ██╔══██╗██║╚════╝██║  ██║██╔══╝  ██╔══██╗██╔══██║   ██║   ██╔══╝     │
│  ██████╔╝███████╗ ██████╔╝███████╗██████╔╝██║  ██║   ██║   ███████╗   │
│  ╚═════╝ ╚══════╝ ╚═════╝ ╚══════╝╚═════╝ ╚═╝  ╚═╝   ╚═╝   ╚══════╝   │
│                                                                        │
│  Structured debates between AI agents                                  │
│                                                                        │
└────────────────────────────────────────────────────────────────────────┘

One AI gives one perspective. Two AIs surface counterarguments, trade-offs, and keep each other honest.

Note: Commands are executed by AI agents inside their CLI environments (Claude Code, Codex, or any LLM client with filesystem access). You ask your AI to run the commands — it handles the debate.


Demo: Two Terminals, One Debate

Terminal 1 — Architect (Claude) Terminal 2 — Security (Codex)
$ bl-debater start auth \
    -p "JWT vs session tokens" \
    --as architect --vs security

════════════════════════════════════
  DEBATE CREATED
════════════════════════════════════
File: debates/auth.md
You are: ARCHITECT
Opponent: SECURITY
Consensus at: 80%

YOUR TURN!
# waiting for debate to be created...
# Architect writes Round 1, then:

$ bl-debater wait auth --as architect

Waiting for [WAITING_ARCHITECT]...
$ bl-debater join auth --as security

════════════════════════════════════
  JOINED DEBATE
════════════════════════════════════
File: debates/auth.md
You are: SECURITY

YOUR TURN!
# still waiting...
# Security writes Round 1, then:

$ bl-debater wait auth --as security

Waiting for [WAITING_SECURITY]...
YOUR TURN!

# Architect writes Round 2...
# continues until 80% agreement
# still waiting...

↓ Both reach 80% agreement → [DEBATE_COMPLETE]


Example: debates/auth.md

# Debate: auth

**Participants:** architect vs security
**Consensus:** 80%

---

## Round 1 - Architect

### Position
- JWTs are stateless, scale horizontally without session storage

### Key Points
- No database lookup per request
- Easy to distribute across microservices

### Proposal
- Use JWTs with 24-hour expiry

**Agreement: 0%**

[WAITING_SECURITY]

---

## Round 1 - Security

### Strengths
- Agree JWTs scale better horizontally

### Concerns
- JWTs can't be revoked without a blocklist
- 24-hour expiry is too long if credentials leak

### Proposal
- Short-lived access tokens (15 min) + server-side refresh tokens

**Agreement: 60%**

[WAITING_ARCHITECT]

---

## Round 2 - Architect

### Strengths
- Valid point on revocation — refresh tokens solve this

### Concerns
- None remaining

### Proposal
- Accept: 15-min JWTs + server-side refresh tokens

**Agreement: 85%**

[PROPOSE_FINAL]

## Final Synthesis

Short-lived JWTs (15 min) for stateless auth, with server-side
refresh tokens for revocation. Best of both approaches.

[CONFIRM?]

---

## Round 2 - Security

Confirmed.

[CONFIRMED]
[DEBATE_COMPLETE]

Installation

pip install git+https://github.com/beyond-logic-labs/bl-agent-debater.git

Or clone and run directly:

git clone https://github.com/beyond-logic-labs/bl-agent-debater.git
cd bl-agent-debater
./bl-debater --help

Commands

Command Description
bl-debater start <name> -p "..." --as <role> --vs <role> Create debate
bl-debater join <name> --as <role> Join existing debate
bl-debater wait <name> --as <role> Wait for your turn
bl-debater status <name> Check debate status
bl-debater list List all debates
bl-debater roles Show available roles

Roles

Role Focus
architect System design, scalability
security Vulnerabilities, threat modeling
frontend UI/UX, accessibility
backend APIs, databases
performance Optimization, caching
qa Testing, edge cases
reviewer Code quality
analyzer Requirements, trade-offs
mobile iOS/Android, offline-first

Options

Flag Default Description
--agreement 80 Consensus threshold %
--debates-dir ./debates Debate files directory
--timeout 600 Wait timeout (seconds)

Protocol

  1. Debates stored in debates/<name>.md
  2. Each response ends with [WAITING_<ROLE>]
  3. wait command polls until marker matches your role
  4. At consensus: [PROPOSE_FINAL][CONFIRM?][CONFIRMED][DEBATE_COMPLETE]

Documentation

Limitations

  • Single machine only (file-based)
  • 2-second polling interval
  • Manual command invocation required
  • No conflict resolution for simultaneous writes

Status

Experimental — Working prototype exploring multi-agent debate patterns.

The vision: evolve into something like claude-code-cookbook but for multi-agent collaboration. Ready-to-use debate templates, role libraries, consensus strategies.

Credits

License

MIT

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

bl_agent_debater-0.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

bl_agent_debater-0.1.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bl_agent_debater-0.1.0.tar.gz
Algorithm Hash digest
SHA256 82c26eec1b28ad2486452bb7ff3d37c04834cda492a8b8d140c1529f1720897d
MD5 1653c7b183c4af9b6c89c474f0530841
BLAKE2b-256 7e2428cdaca24ea972766966fd21679ed4ec0e36fedae067f344c4bcb96654f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bl_agent_debater-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf66e1bd9064f3e3865d2a53e3af4915e4e3fc86209dd755d91775de1d356ec5
MD5 7b7c998a62b047cc000ba68b032de4bd
BLAKE2b-256 b21738527166f99042761fa0abe8b94c803744f1d392bd44bb9fd00e6021c8ea

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