FastClaw / APIs and integrations
project runtime
Project Runtime is FastClaw's coding agent layer: projects, running instances, template scaffolding, dev server, previews, logs, and changed files.

two-layer model
docs/coding-agent-runtime.md Split it into Project and Project Runtime. Project is the source code tree and chat group; Project Runtime is a running instance, dev server or preview of this project.
| Layer | Meaning |
|---|---|
| Project | Source tree and session grouping under User, Agent, Project ID |
| Project Runtime | The running instance of the corresponding project, including status, preview URL, logs, and backend sandbox |
| Workspace | host dir workspaces/<agent>/projects/<pid>/, running containers and per-turn sandbox shared mounts |
Live preview
The runtime container and the sandbox bind mount of each turn have the same host dir, so after the Agent changes the file, the HMR of the dev server can be reflected immediately. No additional synchronization of files is required.
- API: /api/agents/{id}/projects/{pid}/runtime
- Actions: GET, up, sleep, wake, DELETE, preview, logs
- Tools: start_app_preview, app_preview_logs
- Status: none, scaffolding, starting, running, sleeping, crashed
Template
main.go has registered shipany-tanstack and vite-react templates. The template declares DevPort, ScaffoldCmd, DevCmd, TemplateMount, Image and other parameters, and can run multiple templates on the same sandbox image.
| Template | port | Purpose |
|---|---|---|
| shipany-tanstack | 3000 | SaaS/TanStack Start project scaffolding |
| vite-react | 5173 | Lightweight Vite + React + TS example |
| Custom template | Configurable | Extension via TemplateSpec |