Write your agent team once. Compile it for different runtimes.
Describe your agents, give them identities and tools, and keep the whole team in one source project. Spawnfile compiles that project into the configuration and workspaces their runtimes need, then builds and deploys it with Docker.
Spawnfile + workspace ─→ compile ─→ runtime files
Start with one agent. Requires Node.js 22.19+; compilation needs no Docker or model credentials.
npm install -g spawnfile
spawnfile init my-agent
cd my-agent
spawnfile validate
spawnfile compileinit creates an OpenClaw project with IDENTITY.md, SOUL.md, and AGENTS.md. compile writes runtime configuration, the generated workspace, and container files into .spawn/. Read spawnfile-report.json there to see how your source was compiled. The agent is configured, but has not started.
Edit the Markdown files to define who the agent is and what it should do, then compile again. Keep the source in Git; .spawn/ is generated and ignored.
A team has its own Spawnfile, which references the member agent projects. Create its directory with spawnfile init my-team --team. Once you have two projects with distinct agent names under my-team/agents/, put their references in my-team/Spawnfile:
spawnfile_version: "0.1"
kind: team
name: research-team
mode: swarm
members:
- id: researcher
ref: ./agents/researcher
- id: writer
ref: ./agents/writerEach member has its own Spawnfile, identity, and runtime. Teams can share instructions and resources, contain nested teams, and declare Moltnet rooms. The team guide covers the full setup; examples show complete projects.
- Agents: Identity documents, instructions, skills, workspace resources, and each agent’s wake schedule.
- Tools and models: MCP connections, model selection, and declared secret requirements.
- Team structure: Members, nested teams, and shared resources.
- Communication: Declared Moltnet networks and rooms for agents to exchange messages across runtimes.
- Deployment: Runtime configuration, container files, and a capability report built from the same source.
A team declaration alone does not create a conversation or a useful division of work. Give the agents a task, configure their communication, and choose how they wake. Start with the team guide and example projects.
Once the prompts and configuration are ready:
- Provide credentials. Import an existing subscription login or configure provider credentials with auth profiles. Keep secret values out of Git.
- Build and start. With Docker available,
spawnfile up . --detach --auth-profile <profile>compiles, builds, and starts the project. A Docker context can target another machine. - Check the deployment.
spawnfile status . --liveprobes the running deployment;spawnfile status .reads only local declared and compiled state. - Share an image.
spawnfile publishpackages the project for an OCI registry so another operator can run it without the source, using their own credentials.
See container deployment, status, and image distribution for complete commands and requirements.
| Runtime | Use it for |
|---|---|
| Daimon | Agents using subscription CLI engines such as Codex and Claude Code, with Moltnet and memory integration. |
| OpenClaw | OpenClaw agents and their native messaging surfaces. The default agent scaffold. |
| PicoClaw | PicoClaw agents and their native messaging surfaces. |
Daimon requires a pinned runtime image matching the compiler contract. The older pi adapter remains available for existing projects.
Portability is capability-specific: the compiler reports each feature as supported, degraded, or unsupported. Read that report before switching runtimes. Exact versions live in runtimes.yaml; the runtime specification describes the adapter model.
| I want to… | Read |
|---|---|
| Understand the source format | Spawnfile specification |
| Explore complete projects | Examples |
| Add an adapter or contribute | Contributing |
| Integrate with deployment tooling | Target and lifecycle contracts |
| Find a detailed contract | Specification index |
Spawnfile is part of Noopolis. Moltnet supplies messaging; Daimon runs individual agents; Simfile builds simulation worlds around organizations. You can use Spawnfile on its own.
