Common Patterns
Create a copilot session with a workflow_id, send messages via the chat endpoint (streaming SSE), and save good suggestions with the snapshot endpoint. Each chat message can produce a new version of the workflow graph. The copilot maintains conversation context within a session.POST /api/copilot/sessions
Create a copilot session for a workflow.GET /api/copilot/sessions
Get session by workflow_id.string
required
Workflow ID
DELETE /api/copilot/sessions/
Delete a copilot session.string
required
Session ID
GET /api/copilot/sessions//messages
Get copilot conversation history.string
required
Session ID
POST /api/copilot/sessions//messages//snapshot
Save the copilot’s workflow suggestion as a snapshot.string
required
Session ID
string
required
Message ID
POST /api/copilot/sessions//chat
Send a message and stream the copilot response (SSE). The copilot runs a ReAct loop with access to a fixed set of tools for inspecting and modifying the workflow.string
required
Session ID
SSE event types
The chat stream emits these events (each asdata: <json> lines):
Copilot tools
The copilot has eight tools, exposed via the ReAct loop:
The copilot itself runs as an agent under platform billing. Its model is configurable via
/api/copilot/settings/model and defaults to gpt-5.2, with options including GPT-5.2, GPT-4.1, o3/o4, and Claude Opus/Sonnet/Haiku 4.x. Only function-calling-capable models are allowed.
Runtime limits: 25 ReAct steps max, temperature 0.7, workflow state truncated at 50,000 chars total (block configs over 2,000 chars get ... [truncated]).
GET /api/copilot/settings/model
Get copilot model configuration.PUT /api/copilot/settings/model
Set copilot model.Error Responses
Copilot routes return{"error": "<message>"}.