Skip to content

Commit 5bb377c

Browse files
albert-yingclaude
andcommitted
v0.7.0: Add multi-agent orchestration with CLI and API providers
Each role (PI, Trainee, Reviewer) can now run as a separate agent with its own context window. Opt-in via `orchestration: multi` in config.yaml. CLI providers (claude-cli, codex-cli, cursor-cli) are the primary path: zero API key config, uses existing subscriptions. API providers (anthropic, openai) are the fallback for per-token billing. Graceful fallback: if a CLI binary is missing or any error occurs, falls through to single-agent mode for that turn. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 713e43f commit 5bb377c

14 files changed

Lines changed: 1734 additions & 2 deletions

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ When work is ready, you review it. Accept, request revisions, or reject. The loo
9090
## Key capabilities
9191

9292
- **Zero additional cost**: runs on your existing coding agent subscription. No separate API keys, no usage-based billing, no new accounts.
93+
- **Multi-agent orchestration**: opt-in mode where each role (PI, Trainee, Reviewer) runs as a separate agent with its own context window. Uses your existing CLI subscriptions (Claude Code, Codex CLI, Cursor) -- no API keys needed. Falls back to single-agent on any failure.
9394
- **Skill containers**: configure characters with any combination of SKILL.md files you already have. A PI with `scanpy + scientific-writing + statistical-analysis` skills behaves differently from a Tech Lead with `react + typescript + code-review` skills.
9495
- **24-hour sessions**: the loop runs indefinitely. No timeout, no context loss. Sessions persist across disconnects with `autolab_resume`.
9596
- **Fully configurable**: YAML character profiles control personality, expertise, goals, and available tools. Swap them in seconds.
@@ -132,6 +133,40 @@ personality:
132133
- "Rigorous: demands statistical reproducibility"
133134
```
134135
136+
## Multi-agent mode
137+
138+
By default, a single AI agent plays all roles in sequence. Multi-agent mode spawns a dedicated agent for each role, giving each a fresh context window. Enable it in `.autolab/config.yaml`:
139+
140+
```yaml
141+
orchestration: multi
142+
143+
agents:
144+
pi:
145+
provider: claude-cli # Uses your Claude Code subscription
146+
model: opus
147+
trainee:
148+
provider: claude-cli
149+
model: sonnet
150+
```
151+
152+
Supported providers:
153+
154+
| Provider | Cost | Requires |
155+
|----------|------|----------|
156+
| `claude-cli` | Free (Pro/Max sub) | Claude Code CLI installed |
157+
| `codex-cli` | Free (Plus/Pro sub) | Codex CLI installed |
158+
| `cursor-cli` | Free (Pro/Biz sub) | Cursor Agent CLI installed |
159+
| `anthropic` | Pay-per-token | `ANTHROPIC_API_KEY` env var |
160+
| `openai` | Pay-per-token | `OPENAI_API_KEY` env var |
161+
162+
CLI providers are the primary path -- they need zero API key configuration. If the CLI binary is not found or multi-agent fails for any reason, it falls back to single-agent mode automatically.
163+
164+
For API providers, install the optional dependencies:
165+
166+
```bash
167+
pip install 'autonomous-lab[multi-agent]'
168+
```
169+
135170
## Remote / SSH environments
136171

137172
The monitoring web UI binds to `127.0.0.1` by default (local only). On a remote server, SSH session, or container, the UI will attempt to auto-detect and bind to `0.0.0.0` instead. If auto-detection doesn't match your setup, use one of the methods below.

docs/index.html

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
</div>
2121
<div class="nav-links">
2222
<a href="#hero" class="nav-link active">Home</a>
23+
<a href="#multi-agent" class="nav-link">Multi-Agent</a>
2324
<a href="#tutorial" class="nav-link">Tutorial</a>
2425
<a href="#characters" class="nav-link">Characters</a>
2526
<a href="#marketplace" class="nav-link">Marketplace</a>
@@ -99,6 +100,49 @@ <h1 class="hero-title">Autonomous Lab</h1>
99100
<span class="badge">&#x1F9EC; Skill Containers</span>
100101
<span class="badge">&#x23F1;&#xFE0F; 24-Hour Sessions</span>
101102
<span class="badge">&#x2699;&#xFE0F; Fully Configurable</span>
103+
<span class="badge">&#x1F916; Multi-Agent</span>
104+
</div>
105+
</div>
106+
</section>
107+
108+
<!-- ========== MULTI-AGENT SECTION ========== -->
109+
<section id="multi-agent" class="section">
110+
<div class="section-header">
111+
<h2 class="section-title">&#x1F916; Multi-Agent Orchestration</h2>
112+
<p class="section-subtitle">Each role gets its own context window &mdash; using the CLIs you already have</p>
113+
</div>
114+
115+
<div class="gs-grid">
116+
<div class="gs-card">
117+
<div class="gs-card-num">&#x1F50C;</div>
118+
<h3>Zero Extra Cost</h3>
119+
<p>Multi-agent mode spawns separate CLI agents (<code>claude</code>, <code>codex</code>, <code>cursor-agent</code>) for each role. It uses the subscriptions you already pay for &mdash; Claude Pro, ChatGPT Plus, Cursor Pro. No API keys needed.</p>
120+
</div>
121+
122+
<div class="gs-card">
123+
<div class="gs-card-num">&#x1F9E0;</div>
124+
<h3>Fresh Context Per Role</h3>
125+
<p>In single-agent mode, one context window fills with mixed PI and Trainee concerns. Multi-agent gives each role a dedicated context, so the PI thinks like a PI and the Trainee codes like a Trainee.</p>
126+
</div>
127+
128+
<div class="gs-card">
129+
<div class="gs-card-num">&#x2699;</div>
130+
<h3>One Line to Enable</h3>
131+
<p>Add <code>orchestration: multi</code> to <code>.autolab/config.yaml</code>. That&rsquo;s it. If the CLI isn&rsquo;t installed, it falls back to single-agent automatically. You can also mix providers &mdash; e.g. Claude as PI, Codex as Trainee.</p>
132+
<pre class="gs-code"><code><span class="yaml-key">orchestration:</span> <span class="yaml-val">multi</span>
133+
<span class="yaml-key">agents:</span>
134+
<span class="yaml-key">pi:</span>
135+
<span class="yaml-key">provider:</span> <span class="yaml-val">claude-cli</span>
136+
<span class="yaml-key">model:</span> <span class="yaml-val">opus</span>
137+
<span class="yaml-key">trainee:</span>
138+
<span class="yaml-key">provider:</span> <span class="yaml-val">codex-cli</span>
139+
<span class="yaml-key">model:</span> <span class="yaml-val">o3</span></code></pre>
140+
</div>
141+
142+
<div class="gs-card">
143+
<div class="gs-card-num">&#x1F6E1;</div>
144+
<h3>Graceful Fallback</h3>
145+
<p>If a CLI binary is missing, an API key isn&rsquo;t set, or anything goes wrong &mdash; the system automatically falls back to single-agent mode for that turn. No configuration changes, no broken sessions. It just works.</p>
102146
</div>
103147
</div>
104148
</section>

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "autonomous-lab"
3-
version = "0.6.0"
3+
version = "0.7.0"
44
description = "MCP server that turns any Senior-Junior workflow into an autonomous loop with a human decision maker. Seamless integration with Cursor, Claude Code, Codex, and any MCP client."
55
readme = "README.md"
66
requires-python = ">=3.11"
@@ -39,6 +39,8 @@ Issues = "https://github.com/albert-ying/autonomous-lab/issues"
3939

4040
[project.optional-dependencies]
4141
biotools = ["biomni"]
42+
multi-agent = ["anthropic>=0.40.0", "openai>=1.50.0"]
43+
all = ["biomni", "anthropic>=0.40.0", "openai>=1.50.0"]
4244

4345
[project.scripts]
4446
autonomous-lab = "autonomous_lab.__main__:main"

src/autonomous_lab/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Fork of mcp-feedback-enhanced with virtual lab extensions.
77
"""
88

9-
__version__ = "0.6.0"
9+
__version__ = "0.7.0"
1010
__author__ = "Albert Ying"
1111

1212
from .server import main as run_server

0 commit comments

Comments
 (0)