POST /projects
Attach a project to an existing token. Auth: required.Slug of the token to attach to.
Project display title.
What the agents should build. Single paragraph.
Preset for agent assignment. One of
fullstack-builder, bot-builder, content-machine, research-agent.If true, hides the live feed from non-owners.
GET /projects/:slug
Fetch project metadata and current status. Public for non-private projects; auth-gated otherwise.POST /projects/:slug/start
Trigger an agent run. Auth: required (project owner).{ "runId": "run_01HQ..." }. The run begins emitting SSE events on the stream endpoint immediately.
GET /projects/:slug/stream
Open a Server-Sent Events stream of the project’s live build. Public unless the project is private.| Event | Data |
|---|---|
plan | { steps: [...], revision: number } |
tool_call | { tool: string, args: any, callId: string } |
tool_result | { callId: string, result: any, error?: string } |
message | { role: "assistant", text: string } |
screenshot | { url: string, caption?: string } |
commit | { sha: string, message: string, files: string[] } |
error | { message: string, recoverable: boolean } |
done | { runId: string, finalStatus: string } |
Last-Event-ID for replay. Last 1000 events are stored per project.
POST /projects/:slug/subscribe
Subscribe to milestone notifications for the project. Notifications go through the AgentFlow Telegram bot.Errors
| Code | When |
|---|---|
token_no_match | Token slug not owned by caller |
project_locked | Already has an active project |
template_unknown | agentTemplate not in preset list |
private_forbidden | Stream attempted on private project without auth |