A plugin for Claude Code · Codex · Antigravity · MiniMax

Claude Code Teams you can program.

You know Claude Code Teams — but you can't change how the agents coordinate. cave-teams is the programmable version: control the whole team's flow with a tiny DSL, for any coding agent. Build the same systems, better — plus things the built-in teams can't do at all.

See the features ★ Star on GitHub
# live on PyPI — the leader-driven v0.2
pip install cave-teams
A real team running. The leader dispatches, cave-teams checks every message — and when the leader tries a wrong move it's blocked, told why, and self-corrects. Watch the log.

You can't program
Claude Code Teams.

Claude Code Teams is a black box. You get the coordination the vendor baked in — you can't change the flow, add a step, swap the model, or reuse it. Want anything custom? You're back to hand-wiring agents yourself, callbacks and queues and all. And every bit of it is locked to one tool.

→ You should be able to program your agent teams — for any coding agent.

# the plumbing you rewrite every time…
async def run():
    a = await agent_a(task)
    b, c = await asyncio.gather(
        agent_b(a), agent_c(a))
    return await judge(b, c)   # again. and again.

Imagine snapping
them together instead.

What if a whole team of agents was one line you could read out loud? What if adding an agent meant adding a word — and a team you built once dropped straight into your next project, untouched? That's the entire idea.

→ Build AI teams as easily as you snap blocks together.

# your whole team — one line
team = research >> (security | perf | tests) >> ship

# read it out loud: research, then security,
# perf and tests at the same time, then ship.

Works with the coding
agents you already use.

cave-teams isn't a new agent to learn — it's a layer you drop on top of the ones you have. Point it at Claude Code, Codex, Antigravity, MiniMax, or anything that runs, and program their teamwork from one place. Swap between them without touching your wiring.

→ A plugin for your coding agent — not a replacement for it.

CAVE = Coding Agent Virtualization Environment. cave-teams runs your agents inside it, as teams you can program.

# same wiring — any agent underneath
team = claude_code | codex | minimax
ship = plan >> team >> review

Program the logic —
not a markdown to-do list.

Claude Code Teams runs on markdown: agents read files and pass them along in a fixed order set by a prompt. You can't change the logic. cave-teams is a real control system — each agent runs only when you say: after these two finish, only if there's budget left, only once a check has passed. Any rule you can write, you can wire.

agents shuffle files in a fixed order from markdown → you program when each one runs

from cave_teams import when_flag, after, when

# each agent runs only when its rule is true
team.add_condition("publisher", when_flag("approved"))      # after approval
team.add_condition("merge", after("frontend", "backend"))   # wait for both
team.add_condition("worker", when(check_budget))         # any rule you write

One idea: agents snap together.

Give every agent the same shape and they all click — in three steps.

01

Wrap your agents

Any model, any framework, any function. Turn each one into a building block — and bring whatever you already use.

02

Connect them

>> runs them in order. | runs them at the same time. That one line is your whole team.

03

Run it

One call runs the team — and the wiring is checked before it executes, so it can't break in surprising ways.

What it does — and the pain it kills.

Everything you hand-roll today, crossed off the list:

Program any control flow — when each agent runs
agents shuffle files in a fixed order from markdown
Use every team shape, and nest them
one fixed team pattern — take it or leave it
Wire a whole team in one line
hundreds of lines of callback glue
Change the team by changing a word
pulling the system apart to add one agent
Reuse a team inside a bigger team
nothing is reusable — rebuild every time
Save a proven team, reuse it across projects
rebuilding the same team from scratch in every repo
Run agents in order, or all at once
juggling parallel calls by hand
Loop an agent until a checker approves
retry loops that hang or never stop
Hold a contest and keep the best agent
no way to systematically improve agents
Use any model or agent you already have
locked into one vendor — rewrite to switch
Catch wiring bugs before you run
orchestration bugs you find in production

Your whole team,
one readable line.

Today you wire agents by hand — callbacks, queues, a "manager" that just shuffles files around. Imagine writing the entire team as one line you can read out loud: research, then security and perf at the same time, then ship. The plumbing just… disappears.

hundreds of lines of callback glue → one readable line

team = research >> (security | perf) >> ship

And it stays that
simple as you grow.

Six months in, most agent systems are a tangle nobody dares touch. Picture yours still being one line — add a reviewer by adding a word, drop a step by deleting it. It never becomes the mess you're afraid to open.

pulling the system apart to add one agent → add a word

team = research >> (security | perf | redteam) >> ship

Nothing you build
is ever a dead end.

You're used to throwing work away — a great crew trapped in an old repo. Now picture every team you build snapping into the next one as a single piece, nesting as deep as you want. A team becomes a part; a part becomes a bigger machine.

nothing is reusable — rebuild every time → build once, reuse forever

crew   = research >> writer
studio = manager >> crew >> publisher

Walk away. Come back
to work that passed.

Right now you re-run and re-read everything yourself, or you watch it ship something half-right. Imagine closing the laptop while a writer and a reviewer loop until the reviewer actually approves — guaranteed to stop. You come back to work that's already good.

retry loops that hang or never stop → loops that always finish

draft = gate(writer >> reviewer)
# repeats until the reviewer approves

Your agents compete
to impress you.

Today you get one mediocre attempt and tweak the prompt. Now imagine several agents racing on the same task, a judge keeping only the best, and the winners breeding the next generation — sharper every round. You stop improving them by hand; they improve to win your attention.

no way to systematically improve agents → a contest you can run

best = tournament(agents, judge)

On whatever models
you already have.

You're wary of betting on one vendor and getting trapped. Picture swapping Claude for GPT for a local model without touching a line of your wiring — bring any agent, any function, any framework you already use. The team is yours; the engine is just a setting.

locked into one vendor — rewrite to switch → swap the model, keep the wiring

writer = AgentLink("writer", model="claude")
writer = AgentLink("writer", model="gpt-4o")  # same team

Trust it
before it runs.

Orchestration bugs normally find you in production, from an angry user. Imagine instead that the connectors come with proofs — a loop always stops, "approved" really means approved, the order you write things never quietly changes the result. You catch it at your desk, or it was never there.

orchestration bugs you find in production → caught before you ship

# proven by tests, every release
✓ every loop is guaranteed to stop
✓ "approved" always means approved
✓ rearranging steps never changes the result

Every win
compounds forever.

Every project, you rebuild the same crew from scratch and your best work dies with the repo. Now imagine perfecting a team once, saving it to your proven library, and dropping it into anything as one piece. Your library grows. Every project starts faster than the last. Your work finally compounds.

rebuilding the same team from scratch in every repo → build it once, reuse it everywhere

# build a team that works…
crew = research >> review >> ship

# …save it to your proven library, then reuse it
# anywhere — as easily as calling one agent:
release = planner >> golden("ship_crew") >> publish

A box of compilers.

Claude Code Teams gives you one pattern. cave-teams gives you sixteen — each a little compiler that turns an input into a result. Install the plugin and your coding agent reaches for any of them by name.

Crafter sim
a domain a trained agent

Agents craft, compete, and the winners evolve. A compiler and a research lab in one engine.

cave( )
a data spec a running team

Drive the whole library from one call.

Golden library
build once reuse forever

Save a proven team, drop it into any project.

Gate
a draft approved work

Loop until a checker approves.

Tournament
N agents the best one

A contest with a judge.

World
a small spec a whole economy

A simulation of agents — and worlds nest inside worlds.

Pipeline
steps one flow

Run agents in order.

Fan-out
one input many at once

Run agents at the same time.

Router
a condition the right agent

Branch on the state.

Control flow
your rules when each agent runs

The programmable message machine — the part Claude Code Teams can't do.

Scheduler
dependencies a run order

Run when inputs are ready.

Arena
a shared board a result

Agents collaborate on one workspace.

Hand-off
an output a typed input

Pass named data between agents.

Evolve
winners a stronger generation

Breed better agents.

Season
epochs a rising bar

Rounds where the standard climbs.

Metacog
a team a self-improving team

Compounds its own skill over cycles.

They run the worlds.
You go live your life.

Imagine pointing your agents at a domain and walking away — they craft, compete, and the winners evolve, running whole simulations on their own. You're at the gym, with your family, building your health, your wealth, your relationships — while your agents quietly get better at the thing you set them on. You come back to results. Claude Code Teams has nothing like it.

agent economies tournaments evolving teams simulations games

Stop asking if they can.
They already know.

Today you fight your agent — "do you know how to make a tournament? a gate? a blackboard?" — and re-explain it every time. Now your agent speaks the algebra cold (it's math — agents love math). You say what you want; it wires the team and runs it. No more teaching. No more fighting. cave-teams ships as a plugin for Claude Code, Codex, and any coding agent.

# the plugin — one skill per pattern
/plugin marketplace add sancovp/cave-teams

Get started in a few lines.

Open source. MIT. One tiny dependency — nothing else to set up.

from cave_teams import AgentLink

team   = AgentLink("research") >> AgentLink("write")
result = await team.execute({"goal": "..."})
# live on PyPI — the leader-driven v0.2
pip install cave-teams

Questions.

How is this different from Claude Code Teams?

Claude Code Teams is built into one tool, and you can't program how the agents coordinate — you get what it ships. cave-teams lets you program the whole team flow with a DSL, and works with any coding agent (Claude Code, Codex, Antigravity, MiniMax) — not just one. You can build the same systems, and ones the built-in teams can't do at all.

Does it work with Codex, Antigravity, MiniMax, or my own agent?

Yes — that's the point. cave-teams is provider-agnostic. Anything that can run (a coding agent, a model, a function, a shell command) becomes a building block, and you swap between them without touching your wiring.

How is this different from LangGraph, CrewAI, or AutoGen?

Those are frameworks you build inside. cave-teams is a tiny set of connectors you put over whatever agents you already have — >> and |, plus tests that prove the wiring. No new runtime to adopt, nothing to rewrite.

Do I have to use your agents?

No. Wrap any model, any function, any framework. Swap from one model to another without touching your wiring — that's the whole point.

Can a team contain another team?

Yes. A team behaves exactly like a single agent, so teams nest inside teams as deep as you want — and anything you build is reusable in the next project.

Is it production-ready?

It's early and pre-1.0 — but the core is small, tested, and the wiring laws are verified. MIT-licensed and self-contained, so you own every line.

What does it depend on?

One small dependency — pydantic. That's the entire install — no database, no services, no account.

Go live in the world
you actually wanted.

Your agents speak the algebra, run the simulations, and improve themselves — while you garden the system and go make your health, wealth, and relationships better. No more asking if they can. No more fighting. They get it; you're free. And it's free — open source, MIT, one install, and your coding agent already speaks it. The only question is why you'd say no.