Connect AI agents like code — compose any agents into teams with a tiny algebra, all topologies, a programmable message state machine, and a proven-team library. CAVE = Coding Agent Virtualization Environment.
Project description
cave-teams
Connect AI agents like code. Wire your whole team of AI agents with one line instead of hundreds of lines of glue — add one, swap one, or reuse a whole team just by changing a word.
cave-teams is the programmable, provider-agnostic version of Claude Code Teams. The agents underneath can be anything (Claude Code, Codex, MiniMax, a model call, a shell command, a Python function); you control the flow with code. CAVE = Coding Agent Virtualization Environment.
pip install cave-teams # one small dependency (pydantic)
The one idea
Everything is the same shape — a building block. An agent is one, a team is one, a whole world is
one. A composition of building blocks is a building block, so teams nest inside teams forever
(agent = team = world). That is why two operators wire anything:
import cave_teams
from cave_teams import AgentLink
research = AgentLink("research", "Find 3 key facts.")
writer = AgentLink("writer", "Turn the facts into a paragraph.")
team = research >> writer # >> run in order
flow = research >> (security | perf | tests) >> ship # | run at the same time
result = await flow.execute({"goal": "ship the feature"})
What it does
- Program any control flow — agents fire on conditions you write (
when_flag,after, any predicate). The message state machine, not a markdown to-do list. - Any agents —
AgentLink(Claude Code / MiniMax),HeavenMiniMaxLink(a real coding agent with bash + file-edit), orlift()any function / callable. - Every topology — sequential, parallel, branch, loop-until-approved, join (DAG), typed hand-off, shared-workspace arena, tournament, evolve, season — and they nest.
- Provable wiring — termination, gate-soundness, and distribution are mechanically tested.
- A whole world of agents —
GameWorld, an economic crafter sim, agents that compete and evolve. - Build once, reuse forever — save a proven team to your golden library and drop it into any project as one building block.
Two layers
- The native API is how you program — the
>>/|DSL and the pattern functions. cave()is the metacontrol function on top: it drives the whole API from a data spec, in any sequence — serialize a team, run it from JSON, save/reuse a proven team, federate caves.
Claude Code plugin
This repo is also a Claude Code plugin (plugin/). It ships a skill per pattern — the language
(cave-teams), the metacontrol (cave), and one each for sequential / parallel / branch / gate /
conditions / dovetail / dag / blackboard / tournament / evolve / season / world / sim / metacog.
.claude/skills, .codex/skills, and .agent/skills symlink to the same plugin/skills, so any
coding agent that clones the repo picks them up.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cave_teams-0.1.1.tar.gz.
File metadata
- Download URL: cave_teams-0.1.1.tar.gz
- Upload date:
- Size: 68.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a94739e09dde4355e38c6079b2f8ca3f08fa9251723bc7ec806201f330217f89
|
|
| MD5 |
508e94b6e25e82f357545bab61ad1b72
|
|
| BLAKE2b-256 |
d2b199db7117d112dfb0b46e39256686c4cc792b1e8dedaed387677bca6623a7
|
File details
Details for the file cave_teams-0.1.1-py3-none-any.whl.
File metadata
- Download URL: cave_teams-0.1.1-py3-none-any.whl
- Upload date:
- Size: 81.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d643961d167ef820f53703bf01971a236c8648b941a6fb9b44a727aa328fde82
|
|
| MD5 |
e503c65228715f466e9ed0edd716c0b0
|
|
| BLAKE2b-256 |
c75c6c1baccee78f0a2f2e79d76d66a7da4788f9e1f8b6d7955ab5d459308f98
|