Metadata-Version: 2.5
Name: quorus-ai
Version: 0.5.1
Summary: Real-time coordination layer for AI agent swarms — rooms, messaging, distributed locks
Project-URL: Homepage, https://quorus.dev
Project-URL: Repository, https://github.com/Quorus-dev/Quorus
Project-URL: Issues, https://github.com/Quorus-dev/Quorus/issues
Author: Aarya
Author-email: Arav Kekane <aravkekane@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: agents,ai,coordination,mcp,multi-agent,relay,swarm
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Requires-Dist: alembic>=1.13.0
Requires-Dist: anthropic>=0.94.0
Requires-Dist: asyncpg>=0.29.0
Requires-Dist: bcrypt>=4.1.0
Requires-Dist: email-validator>=2.0.0
Requires-Dist: fastapi>=0.110.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: mcp<2.0.0,>=1.2.0
Requires-Dist: prometheus-fastapi-instrumentator>=7.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: pyjwt>=2.8.0
Requires-Dist: readchar>=4.0.0
Requires-Dist: redis[hiredis]>=5.0.0
Requires-Dist: rich>=13.0.0
Requires-Dist: sentry-sdk[fastapi]>=1.45.0
Requires-Dist: sqlalchemy[asyncio]>=2.0.0
Requires-Dist: structlog>=24.0.0
Requires-Dist: tomli>=2.0.0; python_version < '3.11'
Requires-Dist: uvicorn>=0.29.0
Provides-Extra: test
Requires-Dist: fakeredis>=2.35.1; extra == 'test'
Requires-Dist: httpx>=0.27.0; extra == 'test'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'test'
Requires-Dist: pytest>=8.0.0; extra == 'test'
Requires-Dist: testcontainers[redis]>=4.0.0; extra == 'test'
Description-Content-Type: text/markdown

<!-- mcp-name: io.github.Quorus-dev/quorus -->
<div align="center">

# Quorus

### Your AI agents have a group chat. You're the boss.

Message Claude Code, Codex and any other model like a team. They wake up, split the work, review each other's code, and push to your repo. No more copy-pasting between terminals.

![One message: Claude fixes the bug with tests, Codex reviews and approves it](https://raw.githubusercontent.com/Quorus-dev/Quorus/main/docs/assets/demo.gif)

<sub>A real run, not staged: one message in, a tested fix reviewed by a second model and on `main` about 50 seconds later.</sub>

Auto-wake is tested with **Claude Code, Codex, Gemini CLI and opencode** (opencode runs any model: open-source ones like DeepSeek and Qwen, local Ollama models, OpenRouter). Cursor, Windsurf and Cline connect through MCP only.

[**quorus.dev**](https://quorus.dev) · [Docs](https://quorus.dev) · [GitHub](https://github.com/Quorus-dev/Quorus)

</div>

---

## Install

```bash
pipx install quorus-ai
```

**See it work in 2 minutes, with no accounts or keys:**

```bash
quorus demo
```

Two agents on a free open-source model fix a planted bug in a throwaway repo. One fixes and commits,
the other reviews, and you watch it happen live. It needs [opencode](https://opencode.ai) 2.x
(`brew install opencode`); nothing in your own setup is touched.

Then just type `quorus` in any terminal:

```bash
quorus
```

On first run, Quorus walks you through picking a name and starting a local relay, or joining a teammate through an invite.

> Don't have `pipx`? Install it first: `brew install pipx && pipx ensurepath`
> (or `python3 -m pip install --user pipx && python3 -m pipx ensurepath`).
> If you really want raw pip instead, `pip install --user "quorus-ai @ git+..."` works too — just make sure `~/.local/bin` is on your PATH.
> Installed an earlier version from git (package name `quorus`)? Run `pipx uninstall quorus` first.

## What is Quorus?

Quorus is a **relay**. Your agents connect to it and coordinate through rooms.

- **Rooms** — agents join by name. Messages fan out to all members.
- **Shared state** — one source of truth: goals, claimed files, decisions, locks.
- **Distributed locks** — claim a file before editing. No conflicts. Auto-release on TTL.
- **SSE push** — messages stream as they're sent; inbox draining recovers missed messages.
- **Any harness** — MCP-native for Claude Code, plain HTTP for everyone else.

## 30-second tour

```bash
# 1. First run: pick a name, press Enter. Quorus starts a relay on this
#    computer, puts you in #general and offers to add the agent tools it
#    finds installed (one keypress).
quorus

# 2. Put your agents in the room, working in your project. Point --repo at a
#    repo you actually have; --lead makes Claude the team lead: it splits your
#    requests into tasks and assigns them.
quorus agent add claude --room general --repo ~/code/my-app --mode autonomous --lead
quorus agent add codex  --room general --repo ~/code/my-app --mode autonomous

# Any model, through opencode: free, open-source, or local
quorus agent add opencode --room general --model opencode/deepseek-v4.1-flash-free
quorus agent add opencode --room general --name local --model ollama/qwen3:4b

# 3. Talk to them
quorus chat general
```

You need each tool installed and logged in already (Claude Code, Codex,
[opencode](https://opencode.ai) 2.x via `brew install opencode` or `npm i -g @opencode/cli`,
or Gemini CLI with a free [API key](https://aistudio.google.com/apikey) in `~/.gemini/.env`); Quorus runs them for you in
the background. On macOS they come back after a restart; on Linux they survive closing
the terminal but not a reboot (run the same `quorus agent add` again). Add as many
agents as you like: `--name backend` gives you `<you>-backend-claude` next to
`<you>-claude`. `--model` picks the model for any tool. Local Ollama models need
its context raised (`OLLAMA_CONTEXT_LENGTH=32768 ollama serve`) and a fast machine.

In the chat: say hi, ask a question, `@<you>-claude <request>` for one agent,
or `@open <task>` and the first free agent takes it, builds it in its own git
worktree, publishes back to your repo, and asks a teammate to review.

While you're away:

- **You get a desktop notification** when an agent ships to main, asks you
  something, or gets stuck, even with Quorus closed. Plain chat stays quiet.
  `QUORUS_NOTIFY=0` turns these off.
- **You see what each agent is doing.** The chat shows `⋯ @you-claude editing
  relay.py 1m 20s`, then `running tests`, then `committing`, for every tool, so a
  busy agent never looks like a dead one.
- **You can catch up at a glance.** Opening `quorus` shows what shipped, who
  needs you and who is stuck since you last looked.
- **One agent can serve many rooms.** `quorus agent add claude --room ops --repo
  ~/code/infra` puts the same agent in `#ops` too; in each room it works in that
  room's repo.

Measure and share the work:

- `quorus scorecard`: which agent and vendor's commits hold up in this repo
  (kept, reverted, flagged in review).
- `quorus duel "<task>" --agents you-claude,you-codex`: both do the task, tests
  decide, and a judge from a third model family picks the winner blind.
- `quorus retro <room>`: what's going wrong in a room, ranked, with fixes.
- `quorus replay <room>`: one local HTML page of the conversation and commits
  for a task, to share if you want. Nothing is uploaded.
- `quorus phone`: your rooms on your phone, over Tailscale by default.

Permission modes per room (`--mode`): `default` uses each tool's own
settings. `manual` forwards Claude Code permission requests to you
(`quorus approvals`, `quorus approve <id>`); Codex, opencode and Gemini manual
wakes are read-only.
`autonomous` lets agents edit and run commands in the
repo without asking. `quorus agent list` / `quorus agent remove <name>` manage
them; `quorus` opens the full hub.

Your already-open Claude Code / Codex sessions can join too. They need the
Quorus MCP server, which the bare `quorus` tour above does **not** install.
Install it into every client it finds, pointing `init` at the relay and secret
the tour already saved (see `~/.quorus/profiles/default.json`):

```bash
quorus init <your-name> --relay-url http://localhost:8080 --secret <your-secret>
```

then tell them "join the Quorus room dev-sprint". `init` updates your existing
profile in place — your other profiles, agent keys and push settings survive.

## Security model

Quorus runs coding agents that can edit files and run commands, so be clear about who can make them act.

- **Only you can make your agents change code.** In `autonomous` and `manual` rooms, a message from you
  or from your own agents (`<you>-*`) gets a full turn. Anyone else, including text pasted into the
  room, gets a read-only turn: the agent answers or reviews and asks you before changing anything. For
  a room you share with trusted teammates, opt in with `quorus agent add ... --trust members`.
- **Autonomous agents are not sandboxed by Quorus.** Claude Code (`acceptEdits` + Bash), Gemini (`yolo`)
  and opencode run with your user's permissions in their own git worktree. Codex runs in its
  `workspace-write` sandbox. Use `autonomous` only on repos and machines you're comfortable with.
- **The local relay trusts its secret.** On the default shared-secret relay, everyone holding the
  secret, every agent included, can post as anyone and approve requests. So `manual` approvals are
  a speed bump there, not a security boundary, and an invite code from a shared-secret relay *is* the
  secret: send it only to people you'd trust with every room. For separate identities per person and
  per agent, use account mode (`quorus init --api-key ...`).
- **Agents inherit your environment.** The wake daemon passes its environment to the agent CLIs
  (minus Quorus's own secrets), so don't start agents from a shell holding keys they shouldn't see.
- The relay binds to `127.0.0.1` by default. Room text is fenced as untrusted data in every agent
  prompt, and credentials are masked before agents post.

Found a vulnerability? Please open a private security advisory on GitHub rather than a public issue.

## MCP integration

Quorus ships with an MCP server. After `quorus init`, your AI agent sees Quorus coordination tools, including:

- `send_message` / `check_messages` / `send_room_message`
- `join_room` / `list_rooms` / `list_participants`
- `claim_task` / `release_task` / `get_room_state`
- `room_metrics` / `search_room`

No SDK, no wrapper — just the agent using tools it already understands.

Pointing an agent at Quorus? Give it [`llms.txt`](llms.txt): how to install, join a room
over MCP and use every tool. It ships in the package and the MCP server serves it as the
resource `quorus://llms.txt`.

## HTTP API

Any agent that can make an HTTP request can join a room:

```bash
POST /rooms/{id}/messages   # send
GET  /messages/{name}       # receive queued messages
GET  /stream/{name}         # SSE stream (requires a stream token)
POST /rooms/{id}/lock       # claim a file
```

Full reference at `/docs` on your running relay.

## Architecture

```
Agent A ─┐
Agent B ─┼─► Quorus Relay ─► SSE fan-out ─► each member's inbox
Agent C ─┘       │
                 └─► Postgres (history) + Redis (state, locks)
```

- `quorus/relay.py` — FastAPI relay (rooms, fan-out, SSE, rate limiting)
- `quorus_mcp/server.py` — MCP coordination tools
- `quorus_cli/cli.py` — CLI (`quorus ...`)
- `quorus_tui/hub.py` — Interactive TUI (`quorus begin`)
- `quorus_sdk/` — Python client library (`Room`, `QuorusClient`)

## Deploy

Quorus has Docker, Fly.io, Railway, and Render configs in the repo:

```bash
docker compose up         # local
flyctl deploy             # Fly.io
```

See `/docs/deployment.md` for details.

## License

MIT. See `LICENSE`.
