Save agent draft
Partial save of the draft agent config (instructions, model fields, agentTools, workflows, memory, scorers, subagents, etc). Only the fields you send are written. Subagents are [{ agentId }]. The model fields are model_slug, policy_slug, model_options and model_settings; the older requesty_model_slug, requesty_policy_slug and requesty_options spellings are still accepted and mapped onto them (the canonical name wins if you send both). prompt, model_name, model_provider and model_openrouter_slug no longer exist and are ignored — the system prompt is instructions. name and description are the agent’s own, not the draft’s: they are saved here for convenience but apply immediately to every version, published ones included, and need no publish. The response carries the updated agent alongside the draft.
Authorizations
Organization API key, generated in studio.sidenet.ai. Backend only — never in a browser.
Path Parameters
"6f1c0f4e-2b7a-4a51-9a2f-0c9d1b3e5a10"
Body
The agent's system prompt, as an ordered list of blocks. Each entry is one of: { type: "text", content } — inline text; { type: "prompt_block", content, rules? } — inline text with an optional display condition; { type: "prompt_block_ref", id } — a reference to a /v1/prompt-blocks block in the same organization. Content may contain {{variable}}, {{a.b}} and {{variable || 'default'}} placeholders, resolved per request from the chat body's variables plus the now.* builtins; an unsupplied placeholder is left visible. rules is a { operator: "AND"|"OR", conditions: [...] } group (max 3 levels) — the block is included only when it evaluates true. On the draft a ref floats to the block's active version; publishing PINS it, so a published agent version keeps its exact prompt until you republish (see /v1/prompt-blocks/:id/rollout). Pins are server-owned — do not send versionId.
The concrete model to run, e.g. anthropic/claude-sonnet-4-5. Ignored when policy_slug is set.
"anthropic/claude-sonnet-4-5"
A routing policy to run instead of a fixed model, e.g. policy/fastest-sonnet. Overrides model_slug when set.
"policy/fastest-sonnet"
Model-level options passed through to the router — reasoning effort, native provider options, and the like.
Generation settings: temperature, maxTokens, and similar.
Max LLM round-trips per run for the agentic tool loop. The final step is forced tool-free so runs always end with a text answer. null = platform default (20).
1 <= x <= 1008
Workflows the agent can run, as { workflow_id, config? } entries. workflow_id is the /v1/workflows id and must belong to the same organization. The workflow's ACTIVE version is always what runs, so activating a new version reaches the agent on its next turn with no republish. The agent-facing tool name and its description come from the workflow itself — the model calls it as workflow-<workflow name>. The whole workflow runs inside one tool call, and its step progress is streamed to the client as data-tool-workflow / data-tool-workflow-step parts by /v1/chat.
Tools assigned to the agent. Each entry is { tool_id, provider_id?, config?, composio_connected_account_id?, discovery?, loop_responses?, require_approval? }. discovery (integration tools only) controls where the tool schema lives at runtime: true puts it behind the agent's search_tools/load_tool discovery tools, false pins it into the prompt, and unset lets the platform decide — small toolkits stay in the prompt, large ones (beyond ~15 total tools) become discoverable so the prompt is not flooded with schemas. require_approval: true pauses every call to that tool for human approval: the chat stream emits a data-tool-call-approval chunk instead of executing (carrying a model-written reason sentence for the approval card), and the client continues the run by POSTing /v1/chat with the approval field. Set loop_responses: true on a tool to let one call cover a whole result set: it gains _fields (project only the fields needed), _all_pages (fetch and merge every page) and _for_each (call once per value of a parameter and merge the rows), and the agent is given the large-response retrieval tools automatically. Because those re-issue the request, enable it only on tools whose endpoint is safe to call repeatedly.
The agent's name. Agent-level, not versioned — it takes effect immediately, with no publish, and is what other agents see when this one is a subagent.
"Support agent"
The agent's description. Agent-level, not versioned — same immediate effect as name. Send null to clear it.
"Answers billing and account questions"
Subagents this one may delegate to.
Response
The saved draft, and the agent record it belongs to