Your AI team, compiled. Declare it once, run it in Docker on the subscriptions you already have.
Spawnfile is Compose for agent teams. Declare who your agents are, what they use, when they wake and where they talk, in Markdown and a little YAML. Spawnfile compiles that source into each harness's native configuration, runs the whole team in Docker, and can train its agents in place.
Requires Node.js 22.19+. Compiling needs no Docker and no credentials.
npm install -g spawnfile
spawnfile init my-team --template moltnet-team-chat
cd my-team
spawnfile validate
spawnfile compilecompile writes each agent's runtime configuration, workspace and container files into .spawn/. Read .spawn/spawnfile-report.json to see how every feature carried over: supported, degraded or unsupported. Nothing is running yet.
Run spawnfile init --list-templates for other starting points, or spawnfile init my-agent for a single agent.
With Docker available:
spawnfile auth import codex # or: spawnfile auth import claude-code
spawnfile up . --detach # compile, build and start the team
spawnfile status . --live # check the running deploymentup starts every agent and the team's Moltnet network. A Docker context can point at another machine. Credentials live in local auth profiles, never in the source; see Docker packaging.
A team is a directory with its own Spawnfile that references member agents:
spawnfile_version: "0.1"
kind: team
name: research-desk
mode: hierarchical
lead: lead
members:
- { id: lead, ref: ./agents/lead }
- { id: researcher, ref: ./agents/researcher }
- { id: writer, ref: ./agents/writer }
networks:
- id: desk
provider: moltnet
rooms:
- { id: general, members: [lead, researcher, writer] }- Identity: SOUL, IDENTITY and AGENTS docs for each agent.
- Skills and MCP: shared or per agent.
- Model: provider, model and which login it uses.
- Schedules: when each agent wakes, and with what prompt.
- Rooms: Moltnet networks, rooms, and who wakes on mentions.
- Nested teams: teams inside teams, with a lead and shared resources.
- Memory: scoped stores and who can read them.
- Secrets: which ones are required, never their values.
The team guide and examples show complete projects.
| Harness | Models | Logins |
|---|---|---|
| OpenClaw | OpenAI, Anthropic, custom or local endpoints | ChatGPT or Claude subscription, API key |
| PicoClaw | OpenAI, Anthropic, custom or local endpoints | ChatGPT or Claude subscription, API key |
| Daimon | Codex, Grok and Antigravity engines | ChatGPT, SuperGrok or Antigravity subscription |
| Hermes Agent | Native providers, custom and local endpoints | ChatGPT, SuperGrok, Nous Portal, MiniMax or API key |
| OpenCode | Native providers, custom and local endpoints | ChatGPT, SuperGrok, GitHub Copilot, OpenCode Go plan key or API key |
Pick a harness per agent and mix them in one team. Exact versions are pinned in runtimes.yaml; the full support matrix is in the runtime specification.
Hermes Agent and OpenCode use their own logins for deployment and training. Their Moltnet rooms and direct messages require an ACP-capable Moltnet build. The bundled v0.1.22 release predates ACP. Runtime setup
spawnfile train improves one agent's prompt docs against your own train and test cases. Each trial runs the selected agent in an isolated container. Judges score the result and the optimizer revises the files you mark editable.
spawnfile train ./Spawnfile --agent writer \
--train evals/train.spawnfile-training.yaml \
--test evals/test.spawnfile-training.yaml \
--editable agents/writer/AGENTS.md --dry-run--dry-run estimates the cost first; --resume continues a stopped run. Trials can start from recorded moments of real turns. All five bundled harnesses support training. Each stored trial writes a portable .eval file you can regrade. See the training guide.
spawnfile publish packages the project as an OCI image that another operator runs with their own logins, without the source. See distribution.
| I want to... | Read |
|---|---|
| Start from zero | Quickstart |
| Understand the source format | Specification |
| Explore complete projects | Examples |
| Integrate with deployment tooling | Target and lifecycle contracts |
| Bring your own harness | Writing an adapter and two-harness example |
| Regrade a captured trial | Agent training |
| Find a detailed contract | Specification index |
| Contribute | Contributing |
Spawnfile is part of Noopolis: Moltnet carries messages between agents, Daimon runs one agent on a subscription engine, and Simfile builds worlds around a team. Spawnfile works on its own.
spawnfile.com · Docs · Examples · npm