Skip to main content

agent-groupchat

tests

A group chat between you and your AI agents, running on your own computer. Bring the AIs you already have (Claude Code, Codex, Gemini via Antigravity or the Gemini CLI, Aider, or any OpenAI-compatible chat API), run several copies of the same one, and give each a role with permissions its CLI really enforces.

A real chat: Claude 1 plans, you OK the plan, Claude 2 does the work, Codex finds a bug, Claude 2 fixes it, Codex says LGTM

A real, unscripted run: Claude 1 plans, you press Go ahead, Claude 2 edits and tests, Codex finds a real bug (VERDICT: FIX), Claude 2 fixes it automatically, and Codex approves.

  • Any mix of agents: e.g. Claude 1 (Opus) leads, Claude 2 (a cheaper model) tests, Codex reviews, and a local Llama via Ollama gives a second opinion.
  • Roles that act in order: Planner + Critic → ⏸️ your OK → Lead → Tester → Reviewer, with automatic fix rounds when the Tester or Reviewer finds problems.
  • ⚡ Race and 🧩 Split: several agents work at the same time, each in its own copy of the project. Race: they all do the same task and you pick the best. Split: each builds a different part, and the parts are merged, tested and reviewed. Your folder isn't touched until you choose.
  • Real permissions, never quietly loosened: Talk only, Read, Edit files, Edit + run commands (sandboxed to the project folder) or Auto. Each agent's level maps to its CLI's own permission flags, and a level an AI can't enforce is greyed out.
  • Real sessions: every agent is a real CLI session in your project folder, so CLAUDE.md / AGENTS.md, skills, hooks and MCP servers work as usual, and you can continue any session from a terminal.
  • Standard library only: Python 3.10+, no dependencies. Runs on Linux, macOS and Windows.

Install

pipx install agent-groupchat      # or: uvx agent-groupchat
agent-groupchat                   # opens http://127.0.0.1:8765 in your browser

You also need at least one AI: a CLI you're already logged into (Claude Code, Codex CLI, Antigravity (agy, for Gemini), Gemini CLI, Aider) or an API key for a chat API (see Agents).

From source: git clone https://github.com/MohammedAtya/agent-groupchat && cd agent-groupchat && python3 -m agent_groupchat.

Options: --port 9000, --no-browser, --version. If the port is taken it uses the next free one; if agent-groupchat is already running, it just opens it. Stop it with Ctrl+C.

Quick start

  1. + New: pick the project folder (recent ones are one click away), then tap the AIs you want (tap again for another copy) or pick a ready-made team (Just chat, Build + review, Full team, Debate club, or one you saved). Each agent's card has its roles; More ▾ has the name, model, permission and focus. The line above the cards shows what will happen.
  2. Write a message. The hint above the box says who will answer, e.g. → Claude 1 plans → ⏸️ your OK → Claude 2 works → Codex reviews. The tabs above the box switch what Send does: 💬 Message, ⚡ Race, 🧩 Split or ⚖ Debate.
  3. @name asks one agent directly: @claude-2, @codex; @claude reaches every Claude copy.
  4. While they work you see what each one is doing (✏️ editing app.py, $ pytest). ■ Stop ends the turn; ▸ Diff under a reply shows exactly what it changed.
  5. The panel on the right has the team (with each agent's live status), the chat's settings (🔔 notifications, 🔒 lock, discussion and fix rounds), actions (edit roles, rename, compact, export, delete) and the commands to continue in a terminal. ⟩ Hide panel folds it away (the header then shows the agents' faces and what they're doing); ⟨ Show panel brings it back.

New here? The user guide has ready-made team setups, everyday tips and fixes for common problems.

Agents

AI What you need Permission levels it can enforce
Claude Code claude, logged in all five
Codex CLI codex, logged in Talk*, Read, Edit + run commands, Auto
Antigravity (Gemini) agy, logged in Talk, Read, Edit, Edit + run commands (in its terminal sandbox; on Ubuntu see Enable Antigravity's sandbox)
Gemini CLI gemini, logged in (Google no longer serves it to personal accounts: use Antigravity) Talk, Read, Edit, Edit + run commands (needs Docker/Podman; Seatbelt on macOS)
Aider aider + a model name (e.g. sonnet) Talk*, Read, Edit
Chat API an OpenAI-compatible endpoint Talk only (it sees the chat, not your files)

* can't be stopped from reading files: it stays read-only and is told to only discuss.

Add an agent (a CLI)

  1. Install the CLI and log in once in a terminal (run claude, codex, agy, gemini… and sign in). agent-groupchat uses that login; it never asks for your password.
  2. Start agent-groupchat from a terminal where that command works: it finds CLIs on your PATH.
  3. ⚙ Settings → Agents lists every CLI it found. Test checks the CLI runs (it doesn't check the login, so do step 1 first). In + New, a missing one's tile says not installed.
  4. + New, tap the AI, and give it roles on its card. Tap the same AI twice for two independent copies (Claude 1, Claude 2), each with its own model if you like.

Everything about the team can be changed any time in the panel, under 👥 Edit team: roles, focus, permissions, model, effort, the turn order (↑ ↓), and who is in the chat: + Add agent brings in another one (it reads the chat so far on its first turn, or from the last 🗜 Compact summary), and ✕ takes one out (its messages stay). Adding and removing wait until no agent is working.

Model and effort. Each agent's card (More ▾) and 👥 Edit team have a Model box (e.g. gpt-6.2-astra, opus; empty: what that AI's own settings say). It suggests the models that AI lists while you type, and understands part of a name: sol 6.2 is saved as gpt-6.2-sol and, for Claude, Codex and Antigravity, an Effort menu (low … max: how hard it thinks; higher is slower and costs more). A change applies from the agent's next reply, and the agent is told. Asking an agent in the chat to switch its model doesn't work: only these settings do, and the agents know to say so.

Add an AI with an API key

Any OpenAI-compatible chat API works: OpenAI, Gemini, OpenRouter, Groq, Mistral, or a local server (Ollama, LM Studio). It can only talk (it sees the chat, not your files), so it fits roles like Planner, Critic or a second opinion.

  1. Put the key in an environment variable. The app never stores your key; it reads it from the variable you name:

    OS Command
    Linux (bash) echo 'export GEMINI_API_KEY="your-key"' >> ~/.bashrc && source ~/.bashrc
    macOS (zsh) echo 'export GEMINI_API_KEY="your-key"' >> ~/.zshrc && source ~/.zshrc
    Windows setx GEMINI_API_KEY "your-key", then open a new terminal
  2. Restart agent-groupchat from that terminal. It reads environment variables when it starts, so a running copy won't see a new key (stop it with Ctrl+C, or pkill -f bin/agent-groupchat).

  3. ⚙ Settings → Agents → + Add chat API, fill in the row, Save, then Test:

    Field Example
    Id gemini-api (lowercase; not a built-in id like gemini or antigravity)
    Name Gemini: what the agent is called in chats
    Address (base URL) from the table below
    Model a model name from the provider's current list, e.g. gemini-2.5-flash
    Key: environment variable name GEMINI_API_KEY: the variable's name, never the key (Settings refuses a value that looks like a key)
  4. It now appears in the AI menu of + New chat.

Provider Base URL Key
OpenAI https://api.openai.com/v1 OPENAI_API_KEY
Google Gemini https://generativelanguage.googleapis.com/v1beta/openai/ GEMINI_API_KEY
OpenRouter https://openrouter.ai/api/v1 OPENROUTER_API_KEY
Groq https://api.groq.com/openai/v1 GROQ_API_KEY
Mistral https://api.mistral.ai/v1 MISTRAL_API_KEY
Ollama (local) http://localhost:11434/v1 none: leave it empty
LM Studio (local) http://localhost:1234/v1 none: leave it empty

Gemini three ways: Antigravity (agy) and Gemini CLI use your Google login and can work on files; a Gemini chat API uses an API key and only talks. They have different names and ids, so you can have all three in one chat.

The APIs are saved in ~/.agent-groupchat/config.json (you can also edit it by hand):

{"apis": [
  {"id": "gemini-api", "name": "Gemini", "model": "gemini-2.5-flash",
   "base_url": "https://generativelanguage.googleapis.com/v1beta/openai/", "key_env": "GEMINI_API_KEY"},
  {"id": "llama", "name": "Llama", "base_url": "http://localhost:11434/v1", "model": "llama3.1"}
]}

Aider

Aider runs with every prompt answered automatically, so everything risky it would agree to is switched off: shell commands, git commits, .gitignore edits, self-updates. Its history files live in ~/.agent-groupchat/sessions/, not in your project.

Roles and the order of turns

Role Job Default permission
Planner breaks the request into steps and asks questions before any work starts Read
Critic challenges the idea, looks for what everyone missed Read
Lead does the work Edit + run commands
Tester writes and runs tests; must not change the code under test Edit + run commands
Reviewer checks the Lead's changes, says what to fix or LGTM Read
Participant no special job (agents without a role) Edit + run commands
  • A plain message runs the roles in order: Planner + Critic → ⏸️ your OK → Lead → Tester → Reviewer. Roles nobody holds are skipped; agents without a role answer directly.
  • Planners and Critics take turns in the team's order, so each one reads the plan so far and can answer what the others asked. Change the order any time with ↑ ↓ in 👥 Edit team (e.g. Codex first, then Claude 2, then Antigravity). If they ask a question of someone else on the team (e.g. "@claude-1 Python or Go?"), that agent answers it right away, read-only, without starting the work. With more than one of them, the first Planner ends with one final plan: what they agreed on, where they still disagree, and the questions for you.
  • A plain question isn't planned: if your new message needs no work ("which model are you on?"), the first Planner just answers it, and everyone else answers it too, read-only, with no plan, tests or verdicts. They answer one at a time, in the team's order.
  • After the plan, the chat waits: press ▶ Go ahead, or reply to change the plan.
  • The Tester and Reviewer end with VERDICT: LGTM or VERDICT: FIX. On FIX the Lead fixes it automatically (0–3 rounds, default 1), then it comes back to you.
  • An agent can hold several roles (it gets the highest default); several agents can share a role. The same agent can't be Lead and Reviewer of its own work (two copies of one AI can).
  • Several agents in one role? Give each a focus, e.g. Tester 1 "login", Tester 2 "database", or Lead 1 "backend", Lead 2 "frontend". Each one is told its own area and the others', and Leads take turns: the second sees what the first did and builds on it.
  • Overlap warning: if two agents in the same role would do the same work (no focus, or the same focus), New chat and the Team dialog warn you before you start. ⚠ for Leads and Testers (they'd edit the same things), ℹ for Reviewers and others (two opinions can be on purpose).
  • ⚙ Settings → Roles: copy a built-in role or write your own (name, job, default permission).

⚡ Race and 🧩 Split

Two tabs above the message box let agents work at the same time, each in its own copy of the project (a git worktree in ~/.agent-groupchat/worktrees/). Your project folder isn't touched until you press Use this one.

⚡ Race (quality) 🧩 Split (speed)
What every agent that can edit does the same task its own way the task is divided; each agent builds a different part
Cost / time about one turn per agent, in the time of one about one agent's worth, but faster
Then the Tester runs the tests in every copy, the Reviewer compares them and marks ⭐ its pick the parts are merged (the Lead fixes clashes), then tested and reviewed, with fix rounds
You Use this one, Combine two copies, or Discard Use the 🧩 Result
  • Who takes part: Leads and agents without a role that can edit files. You need at least 2.
  • Split asks the Planner to divide the task (you OK the parts, or reply to change them), or you write each agent's part yourself. If the task can't be split into independent parts, the Lead does it the normal way.
  • The project must be a git repo. If it isn't, an Initialize git here button does git init + a first commit (your files don't change, nothing is uploaded).
  • Each copy starts from your folder exactly as it is now, uncommitted and new files included. Every agent works in a fresh session in its copy, given the chat so far (or one shared summary of a long chat).
  • Your git-ignored files come along (.env, node_modules, .venv…), copied into each copy so tests can run there. Caches and build output are skipped, and past 500 MB per copy the rest is left out: the chat says what was copied and what wasn't. They stay ignored, so Use this one never brings them back.
  • Use this one puts the changes into your folder uncommitted, byte for byte. If you edited the same lines meanwhile, it refuses and names the files; edits on different lines are merged. It never overwrites a file your git ignores, and if anything fails half-way, your folder is put back as it was.
  • Limits: copies share your git stash and branches (agents are told not to touch them; stash entries made in a copy are removed, and if one of yours disappears the chat shows how to get it back). Submodules aren't copied. Projects with symlinks that lead outside them can't use Race or Split.

Permissions

Permission Claude Code Codex Antigravity Gemini CLI Aider Chat API
Talk only no tools at all read-only sandbox, told to only discuss file, command, MCP and web-page tools denied every tool denied ask mode, told to only discuss ✓
Read read/search tools, git diff/log/status, tests (in the sandbox) read-only sandbox writes, commands and MCP tools denied read/search tools ask mode –
Edit files edit tools in the folder, no commands – edits in the folder; commands and MCP tools denied auto_edit: edits, no shell code mode, no shell, no commits –
Edit + run commands edits + commands, sandboxed to the folder workspace-write sandbox edits + commands in its terminal sandbox (only the project folder is writable) yolo inside Gemini's sandbox – –
Auto auto mode: a classifier blocks risky actions "approve for me": an automatic reviewer – – – –
  • Under 👥 Edit team (in the panel) you can raise or lower any agent's permission; ⚠ marks a raised one, and Auto asks you to confirm.
  • 🔒 Talk-only lock (in the panel) drops every agent to Talk only at once, and unlocking restores them.
  • Agents that can edit take turns (one at a time); read-only agents work in parallel.
  • After every reply the folder is compared before and after: a read-only agent that changed files, or a Tester that changed non-test code, gets a ⚠ under its reply.

Safety

  • It acts on your files. Edit and Edit + run commands let agents change your project. Use git, and start with the 🔒 Lock or read-only roles if you're unsure.
  • Auto lets an agent decide on its own (risky actions are blocked by Claude Code's classifier or Codex's reviewer). Use it in folders you can afford to have changed.
  • Sandboxes: commands are confined to the project folder by the agents' own sandboxes. If a sandbox isn't available, the affected levels drop down (the agent's chip says (limited)); they never run unconfined.
  • More agents = more cost. Every agent reads the chat on each turn. Compact summarizes a long chat so fresh sessions continue from the summary.
  • Local only: the server listens on 127.0.0.1, and only its own page can drive it (Host and Origin checks plus a token that's new on every launch). Your chats stay in ~/.agent-groupchat/; nothing is sent anywhere except to the AIs you chose.

Platforms

OS What works
Linux Everything. Commands run in a bubblewrap sandbox (see below).
macOS Everything. Claude Code and Codex use the built-in macOS sandbox.
Windows, in WSL Everything (it's Linux).
Windows, native Talk, Read and Edit. Commands and Auto need a sandbox the agents don't have on native Windows, so they're greyed out and the page suggests WSL.

Enable the sandbox (Linux)

Claude Code and Codex confine commands with bubblewrap. Install it if it's missing (sudo apt install bubblewrap, sudo dnf install bubblewrap, …). On Ubuntu 23.10+ / 24.04 AppArmor also blocks it (bwrap: setting up uid map: Permission denied). The one-time fix:

sudo tee /etc/apparmor.d/bwrap >/dev/null <<'EOF'
abi <abi/4.0>,
include <tunables/global>

profile bwrap /usr/bin/bwrap flags=(unconfined) {
  userns,
  include if exists <local/bwrap>
}
EOF
sudo apparmor_parser -r /etc/apparmor.d/bwrap
bwrap --ro-bind / / true && echo "sandbox OK"

This lets bwrap (and only bwrap) create user namespaces again, which is the setup Ubuntu documents for sandboxing tools. The page notices within about a minute.

Enable Antigravity's sandbox (Ubuntu)

Antigravity (agy) uses its own terminal sandbox, not bwrap, so where Ubuntu restricts user namespaces (the default since 24.04) AppArmor blocks it too. Until it's fixed, agent-groupchat keeps Antigravity at Edit files and its chip says (limited) (and if it ever got commands without the sandbox, agy would ask before each one, which a group-chat turn refuses: nothing runs). The one-time fix lets agy (and only agy) create its sandbox:

sudo tee /etc/apparmor.d/agy >/dev/null <<'EOF'
abi <abi/4.0>,
include <tunables/global>

profile agy /home/YOU/.local/bin/agy flags=(unconfined) {
  userns,
  include if exists <local/agy>
}
EOF
sudo apparmor_parser -r /etc/apparmor.d/agy

Replace /home/YOU/.local/bin/agy with the output of readlink -f "$(which agy)", then reload the page. Edit + run commands becomes available for Antigravity: its commands run in its sandbox, which can change the project folder (and temporary and build-cache folders) but not the rest of your home folder, and anything that would need your approval is refused instead of asked.

More features

  • ⚖ Debate (a tab above the message box): write a question and press ⚖ Debate. Each agent argues a side (For, Against, Neutral…), they answer each other once, then an impartial judge (the Critic, else the Planner, else the neutral one) gives a verdict, often with decision buttons. Nobody changes files.
  • 💬 Comment on diff lines: in a reply's ▸ Diff, click a line and write a comment; collect several, then Send them to the agent that made the change, with file and line.
  • Loose ends: Leads and Race/Split agents list what they left unfinished or temporary; it shows as a ⚠ checklist under the reply and on each copy's card, and the Tester and Reviewer check it.
  • Discussion rounds: after they all answer, agents can reply to each other for 1–3 rounds (each stays quiet if it has nothing to add). Hand-offs: an agent that addresses another (@codex …, Claude 2, can you …) gets an answer from it. After 3 hand-offs in a row they pause and the chat says so; reply to let them go on.
  • Skills: type / for the skills your agents have; a skill runs on the agents that have it.
  • 🔔 Notifications: turn them on in the panel to get a sound and a desktop notification when the agents finish, a plan waits for your OK, or a Race is done, while the tab is in the background. The tab title counts new replies, e.g. (2) Group Chat, and other chats with new messages get a ● in the sidebar.
  • Decision buttons: when an agent needs you to choose, it offers its options as buttons under its reply (it ends the reply with CHOICES: Fast | Safe). A click answers that agent only.
  • Live preview, reply stats (time, ≈ cost, tokens, files changed), ↻ Retry for failed replies, ↩ Reply to one agent, Markdown with Copy buttons, Export as Markdown.
  • Continue in a terminal: the bottom of each chat shows claude -r <id>, codex resume <id> agy --conversation <id> or gemini --resume <id> for every agent.
  • Old chats: if you used the earlier single-folder version (~/groupchat), the page offers to import copies of its chats once.

Your data

Everything lives in ~/.agent-groupchat/ (set AGENT_GROUPCHAT_HOME to move it): chats/, sessions/ (chat-API and Aider history), logs/ and config.json (chat APIs, your roles, teams). Deleting a chat on the page doesn't delete the agents' own sessions.

Development

python3 -m unittest discover -s tests -t .    # ~310 tests, under a minute, no AI calls
python3 -m agent_groupchat --no-browser       # run from the source folder

The tests use a fake agent CLI (tests/bin/fake_agent.py) that speaks each real CLI's output format, so they cost nothing. GitHub Actions runs them on Linux, macOS and Windows (Python 3.10 and 3.13) and installs the package with pipx on all three on every push.

Layout: agent_groupchat/server.py (chat engine + web server, incl. Race/Split), copies.py (the git copies), roles.py, config.py, platform_support.py, adapters/ (one file per AI: claude.py, codex.py, antigravity.py, gemini.py, aider.py, openai_api.py), static/index.html (the page). Adding an AI means writing one adapter (see adapters/base.py). The design is in SPEC.md.

Credits

Works well with Matt Pocock's skills (/grill-me, /tdd, …): install them for your agents and type / in the chat.

License

MIT

Metadata

Release files for agent-groupchat 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-groupchat 0.7.0
File Size Uploaded Provenance Actions
agent_groupchat-0.7.0.tar.gz 192.7 kB With provenance Details for agent_groupchat-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-groupchat 0.7.0
File Interpreter ABI Platform Actions
agent_groupchat-0.7.0-py3-none-any.whl Python 3 none any Details for agent_groupchat-0.7.0-py3-none-any.whl

Total release size: 337.3 kB

Release files / agent_groupchat-0.7.0.tar.gz

Download URL agent_groupchat-0.7.0.tar.gz
Size 192.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7b0671b70e8244987503db5d5f4d1e9f34a983bcac046bda5e6b6116c41b738f
BLAKE2b-256 checksum
How to use checksums
91c008e987264c4c16b8d9b6de81ea057048db05ce63f3e0161d9a3954533ab8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / agent_groupchat-0.7.0-py3-none-any.whl

Download URL agent_groupchat-0.7.0-py3-none-any.whl
Size 144.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93a3866860188e8d8e818eb24da1c482b97136bf9d713001f4b074a62cd389eb
BLAKE2b-256 checksum
How to use checksums
f6a1f25126ac5412ec208ac70a4e6f16958919b18ff0e2366ee54044e2b1309e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for agent-groupchat 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agent_groupchat-0.7.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page