Skip to main content

Agents

Create, manage, and interact with AI agents. Agents are workflow-powered intelligent assistants that run as persistent pods with function-calling capabilities, persistent memory, and tool access.

All endpoints require authentication via X-API-Key header and the appropriate scope.

An app's agent for each of its users. Inside a Strongly app, a call to these routes that forwards the request's X-Strongly-User-Token (with the app's own bearer token, which the pod's auth-proxy adds) acts as that signed-in user: the agent POST /agents creates is theirs (ownerId) and records the app (appId), and the user reaches only their own agents of that app. An app user (signed up through the app's branded page) reaches them only this way. Such an agent needs aiModelId (a model the app's owner may use), and does not take connectors, workspace, referenceKey, fallbackModelIds or sharedLinkedIds. See Agent Clones. A user token that does not verify is refused with 401.


Agent Object​

{
"_id": "wf_abc123",
"name": "C-Suite CMO",
"ownerId": "u_123",
"appId": "app-abc123",
"baseAgentId": "wf_base1",
"allowedFeatures": ["workflows"],
"status": "running",
"agentId": "pod_xyz789",
"agentType": "function-calling",
"toolsCount": 12,
"memoryTypes": ["conversation", "episodic"],
"config": {
"temperature": 0.7,
"max_iterations": 15
},
"liveState": {
"currentActivity": "idle"
},
"createdAt": "2025-01-15T10:30:00Z",
"lastActivity": "2025-02-01T14:22:00Z"
}

ownerId is the user the agent belongs to. appId is present only on an agent an app created for one of its users; baseAgentId only on a clone, naming its base (see Agent Clones). A base with clones has isCloneBase. allowedFeatures is what the agent may do (absent on a clone, which may do what its base may).

waiting is set while it waits for a machine: reason (WaitingForCapacity: the cloud has no machine of the size it asked for free right now) and detail in plain words. It starts as soon as a machine is free; waiting is absent or null otherwise.


GET /api/v1/agents​

List your agents with each one's status, read as the Agents page reads it: starting, running, idle (an on-demand agent asleep), stopping, stopped, or error when its pod can never start. While it runs, health is the platform's last check of it (as on GET /api/v1/agents/:id), with healthUpdatedAt.

Scope: agents:read

Query Parameters

ParameterTypeRequiredDescription
qstringNoSearch by agent name or description
statusstringNoFilter by status: starting, running, idle, stopping, stopped, error
limitintegerNoNumber of results to return (default: 50)
cursorstringNometa.nextCursor of the previous page; omit for the first page
sortstringNoSort field and direction, e.g. -createdAt

Response 200 OK

{
"data": [
{
"_id": "wf_abc123",
"name": "C-Suite CMO",
"description": "Plans and reviews the content calendar.",
"ownerId": "user_abc",
"ownerName": "Ada Lovelace",
"status": "running",
"podId": "pod_xyz789",
"health": { "status": "healthy", "podStatus": "running", "checkedAt": "2025-02-01T14:22:00Z", "error": null, "replicas": { "desired": 1, "ready": 1, "available": 1 } },
"healthUpdatedAt": "2025-02-01T14:22:00Z",
"agentType": "function-calling",
"toolsCount": 12,
"lastActivity": "2025-02-01T14:22:00Z",
"createdAt": "2025-01-15T10:30:00Z",
"knowledgeBaseIds": []
}
],
"meta": {
"total": 3,
"limit": 50,
"nextCursor": null,
"requestId": "req_abc123"
}
}

Each item is an agent summary: _id, name, description, ownerId, ownerName, status, podId, health, healthUpdatedAt, agentType, toolsCount, lastActivity, createdAt, knowledgeBaseIds, and when set waiting, appId, baseAgentId, unsharedAs, unsharedAt and isCloneBase. GET /api/v1/agents/:id returns the full agent (its nodes, connections, config and live state).


GET /api/v1/agents/stats​

Count the agents GET /api/v1/agents lists, with the same search: every one the list holds for you with these filters, not a page, counted by the database. Each by<Field> is a list of rows, one per value with how many have it ({ "<field>": value, "total": n }), most first; a value the records leave out is null.

Scope: agents:read

Query Parameters (the list's own filters)

ParameterTypeRequiredDescription
qstringNoSearch by agent name or description

Response 200 OK

{
"data": { "total": 3, "byStatus": [ { "status": "running", "total": 2 }, { "status": "stopped", "total": 1 } ], "byHealth": [ { "health": "healthy", "total": 2 } ] },
"meta": { "requestId": "..." }
}
FieldDescription
totalHow many the list holds with these filters.
byStatusEach status as the list shows it (starting, running, idle, stopping, stopped, error) with how many agents have it.
byHealthThe running agents by their last health check (healthy, unhealthy, ...); null before the first check.

GET /api/v1/agents/:id​

Get detailed agent information including live status, config, and nodes. attachments lists the workflows the agent calls as tools and the add-ons provisioned for it; each keeps that workflow or add-on in use until it is removed from the agent (below). attachments.dataSources lists the data sources the agent's nodes use (a data source node, a connector), as its deployment reads them; they change in the agent's builder. While the agent runs, liveState.stats.totalRuns is how many runs it has on record and liveState.stats.lastRunAt when the newest began (null when it has none); both read the same records, whenever the agent's pod last started. health is the platform's last check of the running agent's server, made about every 30 seconds: status is healthy, unhealthy, unreachable or error, with the reason in error. It is null until the first check and while the agent is not running.

Scope: agents:read

Response 200 OK

{
"data": {
"_id": "wf_abc123",
"name": "C-Suite CMO",
"mode": "agent",
"status": "running",
"podId": "pod_xyz789",
"health": {
"status": "healthy",
"podStatus": "running",
"checkedAt": "2025-02-01T14:22:30Z",
"error": null,
"replicas": { "desired": 1, "ready": 1, "available": 1 }
},
"healthUpdatedAt": "2025-02-01T14:22:30Z",
"agentType": "function-calling",
"toolsCount": 12,
"memoryTypes": ["conversation", "episodic"],
"config": { "temperature": 0.7 },
"liveState": { "currentActivity": "idle" },
"nodes": [...],
"connections": [...],
"attachments": {
"toolWorkflows": [{ "_id": "wf_orders", "name": "Order lookup", "status": "draft" }],
"addons": [{ "_id": "addon-1a2b", "type": "postgres", "name": "Orders", "status": "running" }],
"dataSources": [{ "_id": "ds_orders", "name": "Orders DB", "type": "postgresql" }]
},
"createdAt": "2025-01-15T10:30:00Z",
"lastActivity": "2025-02-01T14:22:00Z"
},
"meta": {
"requestId": "req_abc123"
}
}

DELETE /api/v1/agents/:id​

Delete an agent. A running agent is stopped first: the delete goes ahead once its worker is deleted and nothing can start it again, then the agent and its records are deleted. If the stop cannot be confirmed (for example the agent service cannot be reached), the answer is 409 invalid-state saying why, and nothing of the agent is removed: delete it again once it has stopped.

Scope: agents:write

Response 204 No Content


PATCH /api/v1/agents/:id​

Update the agent's workflow: any of name, description, nodes, connections. Returns the agent.

Scope: agents:write

{ "name": "Iris", "description": "Personal assistant" }

PATCH /api/v1/agents/:id/config​

Update the agent's brain config: only the keys sent change; it returns the config. Operating-prompt text edits live-reload on the agent's next turn. Every other change requires a redeploy -- call POST /agents/:id/redeploy afterwards (GET /agents/:id/config reports applyPending: true until then).

Scope: agents:write

Request Body -- any subset of:

{
"personality": "Warm, direct, technically competent. Asks one clarifying question when ambiguous.",
"operatingPromptId": "prompt_xyz123",
"stanAware": false,
"contextPolicy": { "kind": "summarise", "tokenBudget": 8000, "keepRecent": 12 },
"sessionPolicy": {
"idleTimeoutSeconds": 1800,
"maxSessionDurationSeconds": 14400,
"maxConcurrentSessionsPerUser": 3,
"autoArchiveAfterDays": 30,
"allowPerSessionModelOverride": false
},
"heartbeatEnabled": true,
"heartbeatCron": "0 9 * * *",
"heartbeatTimezone": "America/New_York",
"maxIterations": 15,
"knowledgeBaseIds": ["kb_abc123"]
}

stanAware is whether the agent recommends working with STAN for something it has no tool or integration for. It is false unless set: the agent then says plainly what it can't do and never mentions STAN, which is right for any agent whose users are not your builders.

Also temperature (0 to 2), maxTokens (up to what the agent's model generates in one reply, modelMaxOutputTokens in GET /agents/:id/config; more is refused with the limit; changing the model sets it to the new model's limit), responseFormat (json_object or text; a json_object agent answers every turn with a JSON object, so it never stops to ask a clarifying question), builtInTools ({ "disabled": [...] }), onDemandMode (always-on, or on-demand: the agent sleeps after idleTimeoutSeconds without a message, at least 60, and wakes on the next one, a scheduled task, or its user signing in; unchosen, an agent runs always on and the clone an app gives each user runs on demand; a base's clones follow it) and idleTimeoutSeconds. GET /agents/:id/config also answers onDemandModeChosen, status (running, starting, idle, error with statusError, stopped) and wakeError ({ message, at }: why a wake at its user's sign-in failed).

Response 200 OK: the agent's config, as GET /agents/:id/config returns it.


GET /api/v1/agents/:id/config​

Read the agent's current brain config plus pod state.

Scope: agents:read

Response 200 OK

{
"data": {
"agentName": "Iris",
"agentType": "function-calling",
"isRunning": true,
"agentPodId": "pod_abc",
"baseAgentId": null,
"baseAgentName": null,
"isCloneBase": true,
"baseSyncedAt": null,
"baseSyncError": null,
"baseSyncErrorAt": null,
"config": {
"heartbeatEnabled": false,
"heartbeatCron": "0 * * * *",
"heartbeatTimezone": "UTC",
"maxIterations": 10,
"personality": "Warm, direct…",
"operatingPromptId": "prompt_xyz123",
"stanAware": false,
"contextPolicy": { "kind": "summarise", "tokenBudget": 8000, "keepRecent": 12 },
"sessionPolicy": { "idleTimeoutSeconds": 1800, "maxSessionDurationSeconds": 14400, "maxConcurrentSessionsPerUser": 3, "autoArchiveAfterDays": 30, "allowPerSessionModelOverride": false },
"primaryModelId": "model_anthropic_sonnet",
"fallbackModelIds": ["model_openai_gpt4o"]
}
},
"meta": {
"requestId": "req_abc123"
}
}

On a clone, baseAgentId and baseAgentName name its base ("Clone of ..."), baseSyncedAt is when it last took its base's configuration, and while its last sync failed baseSyncError says why and baseSyncErrorAt when. A base has isCloneBase: true. See Agent Clones.


PATCH /api/v1/agents/:id/model​

Swap the agent's primary AI model and (optional) ordered fallback list. Triggers a STRONGLY_SERVICES bundle rebuild so the new model id is resolvable at runtime. Call POST /agents/:id/redeploy afterwards to bring up a pod on the new model.

Scope: agents:write

Request Body

{
"modelId": "model_anthropic_sonnet",
"fallbackModelIds": ["model_openai_gpt4o", "model_meta_llama70b"]
}

Response 200 OK

{
"data": {
"success": true,
"modelId": "model_anthropic_sonnet",
"fallbackModelIds": ["model_openai_gpt4o", "model_meta_llama70b"]
},
"meta": {
"requestId": "req_abc123"
}
}

POST /api/v1/agents/:id/redeploy​

Apply pending brain-config changes to a running agent by stopping and re-starting the pod. No-op when the agent is not running. The restarted agent runs as its owner, whoever redeploys it; allowed for the same callers as a start.

Scope: agents:write

Response 200 OK​

A lifecycle result: status starting and the new pod. An agent with no running pod is not restarted: status stopped, pod null (start it with POST /agents/:id/start).


POST /api/v1/agents​

One-shot agent creation from Agent Builder wizard input. Auto-provisions required add-ons (e.g. MongoDB for memory), builds the brain workflow with personality + operating prompt + context policy + session policy + model, and seeds Library content (memory / rules / skills / tasks) scoped to the new agent.

Scope: agents:write

Request Body

{
"name": "Iris",
"description": "Personal assistant: drafts email, summarises meetings, plans the day.",
"personality": "Warm, direct, technically competent.",
"operatingPromptId": "prompt_default_op",
"aiModelId": "model_anthropic_sonnet",
"fallbackModelIds": ["model_openai_gpt4o"],
"contextPolicy": { "kind": "summarise", "tokenBudget": 8000, "keepRecent": 12 },
"sessionPolicy": {
"idleTimeoutSeconds": 1800,
"maxSessionDurationSeconds": 14400,
"maxConcurrentSessionsPerUser": 3,
"autoArchiveAfterDays": 30,
"allowPerSessionModelOverride": false
},
"connectors": [
{ "tileId": "web-search", "nodeType": "web-search", "label": "Web Search", "category": "code", "config": {} }
],
"training": {
"memory": [],
"rules": [{ "description": "Confirm before sending", "content": "…", "category": "must", "severity": "high" }],
"skills": [],
"tasks": []
}
}

All fields except name are optional (a clone of a base is made with POST /api/v1/agents/:id/clone, and keeps its base's description). description is what the agent is for, shown in the agent list and on its Overview (none when omitted; change it with PATCH /api/v1/agents/:id). allowedFeatures is what the agent may do (every feature when omitted: the agent is unrestricted until restricted with a shorter list). contextPolicy.tokenBudget may not exceed the aiModelId model's context window (400 validation-error otherwise; the same rule applies to the config update and model change). contextPolicy.tokenBudget caps each request to the model: the agent's system prompt, its tool definitions, the summary or titles carried for older history, the kept history and the new message. contextPolicy.keepRecent is how many recent turns (a user message and every reply to it) stay verbatim while they fit the budget. When operatingPromptId is omitted the platform default is used. When personality is omitted the platform DEFAULT_PERSONALITY is used. stanAware: true makes the agent recommend working with STAN for things it has no tool for; omitted, it is off and the agent says plainly what it can't do, never mentioning STAN. A connector whose tileId is not in the connector catalog is refused with 400 validation-error naming it, and a connector missing a field with 400 validation-error naming the field (connectors[0].label). The connectors that can be given, and the fields each one's config takes, are listed by GET /api/v1/agents/connectors.

Response 201 Created

The new agent, status stopped until you start it.


GET /api/v1/agents/name-availability​

Check whether a given agent name is available for the calling user. Returns available: false with a reason of duplicate or invalid when the name can't be used.

Scope: agents:read

Query Parameters

ParameterTypeRequiredDescription
namestringYesCandidate name
ignoreWorkflowIdstringNoSkip this workflow id when checking (use during rename)

Response 200 OK

{ "data": { "available": false, "reason": "duplicate", "conflictWorkflowId": "wf_other" }, "meta": { "requestId": "req_abc123" } }

POST /api/v1/agents/:id/start​

Start an agent pod. Creates a persistent Kubernetes pod running the agent server with function-calling capabilities and tool access.

The agent runs as its owner, whoever starts it: its pod's token, its services and its usage are the owner's (a clone's, its user's). Its owner, the owner of the app it belongs to and platform admins may start it; anyone else gets 403 forbidden. Each start is in the audit log with the caller and the owner.

Scope: agents:write

Response 200 OK​

What the start did, a lifecycle result: status starting, the new pod, and mcpRegisterFailures, the connectors whose tools the started agent is missing. A non-empty list means the agent cannot use those tools: fix or re-provision the connector and start it again. Starting an agent that is already running answers its live pod (status running, starting or idle, without mcpRegisterFailures).

{
"data": {
"agentId": "wf_clone1",
"ownerId": "u_patient",
"action": "start",
"status": "starting",
"pod": { "id": "6ad3897b38056f82d512f0dd", "status": "starting" },
"mcpRegisterFailures": []
},
"meta": { "requestId": "req_abc123" }
}

Lifecycle result​

A start, stop or redeploy answers what it did, built from the action itself. The owner of an app and a platform admin may act on an agent they cannot read (another user's clone), so the answer is never a read of the agent.

FieldType
agentIdstringThe agent
ownerIdstringThe user the agent runs as: its owner (a clone's user), whoever acted
actionstart, stop or redeploy
statusstarting, running, idle, stopping or stoppedThe agent's state once the action returned
pod{ "id", "status" } or nullIts pod record as the action left it; null when it has none
mcpRegisterFailuresarrayStart and redeploy: { "serverId", "label", "reason" } for each connector whose tools it is missing

POST /api/v1/agents/:id/stop​

Stop a running agent pod. Allowed for the same callers as a start (its owner, its app's owner, platform admins), and audited the same way.

Scope: agents:write

Response 200 OK​

A lifecycle result: status stopped, or stopping while its pods still terminate.


GET /api/v1/agents/:id/status​

Get the current status of an agent pod.

Scope: agents:read

Response 200 OK

{
"data": {
"agentId": "pod_xyz789",
"status": "running",
"workflowId": "wf_abc123",
"agentType": "function-calling",
"toolsCount": 12
},
"meta": {
"requestId": "req_abc123"
}
}

POST /api/v1/agents/:id/threads​

Create a new conversation thread for an agent.

Scope: agents:write

Request Body

{
"title": "Marketing Strategy Discussion"
}
FieldTypeRequiredDescription
titlestringNoThread title (default: "New Conversation")
subjectIdstringNoYour app's own id for whom the conversation is about (1 to 200 letters, digits and _ . : -), kept as the thread's metadata.subjectId. DELETE /apps/:appId/agent-subjects/:id deletes every thread and message tagged with it.

Response 201 Created

{
"data": {
"_id": "thread_abc123",
"agentId": "wf_abc123",
"userId": "usr_abc",
"title": "New Conversation",
"messages": [],
"metadata": {},
"messageCount": 0,
"totalTokens": 0,
"createdAt": "2026-10-11T09:00:00.000Z",
"updatedAt": "2026-10-11T09:00:00.000Z"
},
"meta": {
"requestId": "req_abc123"
}
}

GET /api/v1/agents/:id/threads​

List conversation threads for an agent. A thread's totalTokens are the AI Gateway's record of every call its runs made (each model call, a tool's included, and each recall's embedding); a new thread's are 0.

Scope: agents:read

Response 200 OK

{
"data": [
{
"_id": "thread_abc123",
"agentId": "wf_abc123",
"title": "Marketing Strategy Discussion",
"messageCount": 24,
"totalTokens": 15230,
"createdAt": "2025-02-01T10:00:00Z",
"updatedAt": "2025-02-01T14:22:00Z"
}
],
"meta": {
"requestId": "req_abc123"
}
}

GET /api/v1/agents/:agentId/threads/:id​

One conversation thread of the agent with its messages, oldest first: each message's role (user or assistant), content, createdAt and, for an answer, its runId, tokens and toolCalls. Its totalTokens are the AI Gateway's record of every call its runs made, and an answer's tokens the record of every call its run made. A thread is its user's; another user's is 404.

Scope: agents:read

Response 200 OK

{
"data": {
"_id": "thread_abc123",
"agentId": "wf_abc123",
"userId": "user_123",
"title": "Marketing Strategy Discussion",
"messages": [
{ "role": "user", "content": "Summarize this week's launches.", "createdAt": "2025-02-01T14:21:58Z" },
{ "role": "assistant", "content": "Three launches shipped...", "createdAt": "2025-02-01T14:22:00Z", "tokens": 1830, "runId": "run_789" }
],
"messageCount": 2,
"totalTokens": 1830,
"createdAt": "2025-02-01T10:00:00Z",
"updatedAt": "2025-02-01T14:22:00Z"
},
"meta": { "requestId": "req_abc123" }
}

DELETE /api/v1/agents/:agentId/threads/:id​

Delete a conversation thread.

Scope: agents:write

Response 204 No Content


DELETE /api/v1/agents/:agentId/threads/:threadId/messages/:id​

Delete one message of a conversation thread. The thread keeps its other messages. Every message has an id (in GET /agents/:agentId/threads/:id); a run's question and answer ids come in its thread.run.created and thread.message.completed events (message_id). The thread's user deletes it, and so does the owner of the app whose agent the thread is on (a clone the app made for its user).

Scope: agents:write

Response 204 No Content


POST /api/v1/agents/:agentId/threads/:id/runs​

Run a message in one of the agent's threads and receive the response as Server-Sent Events (SSE).

Scope: agents:write

Request Body

{
"message": "/help"
}
FieldTypeRequiredDescription
messagestringYesMessage to send to the agent (100000 characters max)
subjectIdstringNoYour app's own id for whom the message is about, kept as metadata.subjectId on the question and the answer, and as subjectId on any task the agent creates while answering (DELETE /apps/:appId/agent-subjects/:id)
interactivebooleanNotrue when your client shows its user a Confirm / Cancel for a delete or send. The run then pauses before a tool that declares it deletes or sends (thread.run.confirmation_required) until you call POST /agents/:agentId/runs/:id/approve or .../cancel. Without it the run never waits; it follows the agent's rules.

Response 200 OK (SSE Stream)

Content-Type: text/event-stream

data: {"event":"thread.message.delta","data":{"delta":{"content":"Here are "}}}

data: {"event":"thread.message.delta","data":{"delta":{"content":"the available commands..."}}}

data: {"event":"thread.run.tool_call","data":{"name":"web-search","arguments":{"query":"..."}}}

data: {"event":"thread.run.completed","data":{"status":"completed"}}

The stream ends after the run's last event: thread.run.completed, thread.run.failed or thread.run.cancelled. Nothing follows it, and a finished run sends no [DONE]. A run that could not be started, or whose stream stopped before the run's last event, sends one error event (error, and code and status when the agent gave them) followed by data: [DONE]. A response that breaks off with neither was interrupted (an HTTP client reports the body as incomplete).

SSE Event Types

EventDescription
thread.message.deltaPartial content from the agent's response
thread.run.tool_callAgent is calling a tool
thread.run.tool_resultTool call result
thread.run.createdThe run started: run_id, and message_id, the id the thread keeps the question by
thread.run.confirmation_required(interactive only) The run waits for its user to confirm a delete or send: run_id, tool_call_id, tool, arguments, kind (delete or send)
thread.run.confirmedThe user confirmed: the call runs and the run goes on
thread.message.completedThe answer: content, tokens, and message_id, the id the thread keeps it by
thread.run.completedAgent finished processing
thread.run.failedAgent encountered an error
thread.run.cancelledThe run was cancelled (a waiting delete or send never ran)

While a run waits for a confirmation the stream stays open and carries a comment line (: waiting for the user's confirmation) every 15 seconds. A run has no time limit.


POST /api/v1/agents/:agentId/runs/:id/approve​

Confirm the delete or send an interactive chat run waits on: the call runs and the run goes on. Only the run's user, the agent's owner or an admin may (anyone else gets 404). 409 when the run is not waiting on that call.

Scope: agents:write. STAN tool: approve_agent_run.

{ "toolCallId": "call_7" }

Response 200 OK: { "runId": "...", "toolCallId": "call_7", "approved": true }


POST /api/v1/agents/:agentId/runs/:id/cancel​

Stop an agent run: a chat turn in progress, or one waiting for a confirmation (that call never runs, and the thread says so). Answers once the run has recorded its ending.

Scope: agents:write. STAN tool: cancel_agent_run.

Response 200 OK: { "runId": "...", "status": "cancelled", "cancelled": true } (status is the ending the run reached first when it had already finished).


POST /api/v1/workflows/:id/promote​

Promote an existing workflow to an agent. The workflow must contain at least one agent node (category: agents).

Scope: agents:write

Request Body (optional)

{
"toolWorkflowIds": ["wf_tool_1"],
"description": "Triages inbound support tickets"
}
FieldTypeRequiredDescription
toolWorkflowIdsarrayNoDeployed workflows to give the agent as tools
descriptionstringNoThe agent's description (the workflow keeps its own when omitted)

Response 200 OK

The agent, as GET /agents/:id shows it, with warnings: what the promotion found to fix (an empty list when nothing).


GET /api/v1/agents/:id/skills​

List skill associations for an agent. Returns each association enriched with the underlying skill's name, description, source, and tags.

Scope: agents:read

Path Parameters

ParameterTypeRequiredDescription
idstringYesAgent (workflow) ID

Response 200 OK

{
"data": [
{
"skillId": "prompt_xyz789",
"editable": true,
"autoConnected": true,
"connectedBy": "agent",
"connectedAt": "2025-02-01T10:00:00Z",
"name": "Web Search",
"description": "Search the web for information",
"source": "user",
"tags": ["research"]
}
],
"meta": {
"requestId": "req_abc123"
}
}

POST /api/v1/agents/:id/skills​

Add a skill association to an agent. If the skill is already associated, returns success without duplicating.

Scope: agents:write

Path Parameters

ParameterTypeRequiredDescription
idstringYesAgent (workflow) ID

Request Body

FieldTypeRequiredDescription
skillIdstringYesID of the skill (prompt) to attach
editablebooleanNoWhether the agent can edit this skill (default: true)
autoConnectedbooleanNoWhether the skill was auto-connected (default: true)
connectedBystringNoWho connected the skill (default: "agent")

Response 201 Created: the association (200 OK with it when the skill is already attached).

{
"data": {
"skillId": "prompt_xyz789",
"editable": true,
"autoConnected": true,
"connectedBy": "agent",
"connectedAt": "2026-10-11T18:30:00Z"
},
"meta": {
"requestId": "req_abc123"
}
}

PATCH /api/v1/agents/:agentId/skills/:id​

Update the editable flag on an existing skill association.

Scope: agents:write

Path Parameters

ParameterTypeRequiredDescription
agentIdstringYesAgent (workflow) ID
idstringYesSkill ID of the association to update

Request Body

FieldTypeRequiredDescription
editablebooleanYesNew value for the editable flag

Response 200 OK: the association.

{
"data": { "skillId": "prompt_xyz789", "editable": false, "autoConnected": true, "connectedBy": "agent", "connectedAt": "2026-10-11T18:30:00Z" },
"meta": { "requestId": "req_abc123" }
}

DELETE /api/v1/agents/:agentId/skills/:id​

Remove a skill association from an agent.

Scope: agents:write

Path Parameters

ParameterTypeRequiredDescription
agentIdstringYesAgent (workflow) ID
idstringYesSkill ID of the association to remove

Response 204 No Content


GET /api/v1/agents/clonable​

The base agents shared with you to clone, each with its owner and, once you have cloned it, your clone (cloneId). See Agent Clones.

Scope: agents:read

Response 200 OK, a cursor-paged list of { "_id", "name", "description", "ownerId", "ownerName", "ownerEmail", "cloneId" }.


POST /api/v1/agents/:id/clone​

Clone a base into an agent of your own: one shared with you to clone, or, through an app for its signed-in user (the app's request with the user's X-Strongly-User-Token), one of the app owner's own agents (an app makes each of its users' clone this way). The clone follows its base: everything the base provides is read-only on it, and you add your own records. See Agent Clones.

Scope: agents:write

Response 201 Created: your clone, as GET /api/v1/agents/:id shows it (baseAgentId names its base). A user who has their clone of it already gets 409 with its agentId. 403 when it is not shared with you to clone (and, through an app, is not one of the app owner's own agents), or when the base uses something you may not use (a model, data source, add-on, tool workflow or MCP server), naming each.


GET /api/v1/agents/:id/clones​

A base's clones: each user's clone with its name, owner, its app (when an app made it), status and sync state. inSync is true when the clone carries the base's latest configuration; while a sync failed, baseSyncError says why and baseSyncErrorAt when. A clone whose base is no longer shared with its user has unsharedAs (keep: it keeps working, no longer synced; suspend: it is stopped and cannot run) and unsharedAt; otherwise both are null.

Scope: agents:read

Response 200 OK, a cursor-paged list:

{
"data": [
{ "_id": "wf_clone1", "ownerId": "u_1", "ownerName": "Ana", "ownerEmail": "ana@example.com", "appId": "app-abc123", "status": "running", "inSync": false, "baseSyncedAt": null, "baseSyncError": "Redeploying it with its base agent's configuration failed: ...", "baseSyncErrorAt": "2026-10-16T07:57:30Z" }
],
"meta": { "requestId": "req_abc123", "nextCursor": null }
}

POST /api/v1/agents/:id/sync​

Sync now. On a base, every clone out of sync takes everything the base provides (its name and description, and its configuration); on a clone, that clone. Running clones are redeployed. A clone that fails stays out of sync with its error, and the base's owner is notified. Clones are also synced when they start and whenever the base changes.

Scope: agents:write

Response 200 OK:

{ "data": { "synced": ["wf_clone2"], "failed": [{ "agentId": "wf_clone1", "error": "Redeploying it with its base agent's configuration failed: ..." }] } }

Permissions: /api/v1/agents/:id/permissions​

An agent is only for its user; it is shared only to clone. GET /api/v1/agents/:id/permissions lists who it is shared with (members, each { "userId", "role": "cloner" }), POST /api/v1/agents/:id/permissions/members with { "userId", "role": "cloner" } shares it with a user to clone (platform users and app users), and DELETE /api/v1/agents/:agentId/permissions/members/:userId stops sharing it. When that user has a clone of it, the clones query parameter says what happens to the clone, and is required (400 validation-error naming the clone without it): keep (it keeps working as it is, still read-only, no longer synced from the base), suspend (it is stopped and refused a start, 409 clone-suspended, until the base is shared with them again; its records stay) or delete (it is deleted with its user's own records). A kept or suspended clone shows unsharedAs (keep or suspend) and unsharedAt on GET /agents/:id/clones, GET /agents/:id and GET /agents/:id/config; sharing the base with the user again makes it follow the base again. A member can clone it, never use or change it. A clone is never shared (403). A clone is never copied: POST /workflows/:id/duplicate, POST /workflows/:id/save-as-template and GET /workflows/:id/export on a clone answer 403 clone-not-copyable (clone the base again). An agent has no public visibility.

Scope: agents:read (list), agents:write (share, stop sharing)


GET /api/v1/agents/:id/allowed-features​

What an agent may do: each feature that creates or controls platform resources, with whether the agent is granted it. On a clone, its base's grants (an app user's clone is never granted datasources or addons).

Scope: agents:read

Response 200 OK, a cursor-paged list of { "name", "label", "description", "granted" }. The features: projects, workspaces, apps, addons, datasources, deployments, workflows, models, jobs, sharing, stan.


PATCH /api/v1/agents/:id/allowed-features​

Set what an agent may do: the complete list of features it is granted (a new agent is granted every feature; a shorter list restricts it, an empty list grants none). It applies from the agent's next request; a running agent is redeployed with the tools of its features, and a base's clones follow it. A request the agent makes (from its runtime or its workspace, at the platform API or any platform service) that needs a feature it is not granted answers 403 with code feature-restricted and the feature.

Scope: agents:write

Request Body

{ "allowedFeatures": ["workflows"] }

Response 200 OK: { "allowedFeatures": [...] }. An unknown feature is 400; a clone refuses its own (403 clone-follows-base: set it on its base).


GET /api/v1/agents/:id/library-references​

The Library items the agent reads (the skills, prompts, rules, memories and artifacts linked to it or to the pools it reads from, its skills and its operating prompt) and the version it reads of each. An agent reads the latest version of an item unless it is pinned to one. A clone reads its base's items at the versions its base pins.

Scope: agents:read

Response 200 OK, a cursor-paged list:

{
"data": [
{ "type": "skill", "id": "sk_abc123", "name": "Order lookup", "latestVersion": 4, "pinnedVersion": 3, "fromBase": true },
{ "type": "prompt", "id": "pr_def456", "name": "Support operating prompt", "latestVersion": 2, "pinnedVersion": null, "fromBase": true },
{ "type": "skill", "id": "sk_ghi789", "name": "My shortcuts", "latestVersion": 1, "pinnedVersion": null, "fromBase": false }
],
"meta": { "requestId": "req_abc123", "nextCursor": null }
}

pinnedVersion is null when the agent reads the latest. On a clone, fromBase is true for an item of its base's official layer (read-only on the clone) and false for one its user added; it is false on every other agent.


PATCH /api/v1/agents/:agentId/library-references/:id​

Pin one of the agent's Library references to a version, or have it read the latest again. A skill's or prompt's version includes its bundled files. From the next turn the agent reads that version of the item: its rules, memories and skills recall, GET /library/skills/:id, GET /library/prompts/:id, and an artifact's metadata and download all answer the agent with the pinned version. A person reading the Library still sees the latest.

Pins set on a base hold for every clone, and a clone refuses its own (403 clone-follows-base).

Scope: agents:write

Path Parameters

ParameterTypeRequiredDescription
agentIdstringYesAgent (workflow) ID
idstringYesLibrary item ID, from GET /agents/:id/library-references

Request Body

{ "pinnedVersion": 3 }

pinnedVersion is a version number (1 or more), or null to read the latest.

Response 200 OK: the reference as it now reads. 404 when the agent does not reference the item; 409 when the item has no such version (pinned-version-missing). A pinned version that is later missing is an error on the agent's read too, never a quiet switch to the latest.


DELETE /api/v1/agents/:agentId/tool-workflows/:id​

Take a tool workflow off an agent (one of its attachments.toolWorkflows). The workflow is not deleted: once no agent lists it, DELETE /api/v1/workflows/:id can delete it. A running agent loads the change when it restarts (POST /api/v1/agents/:id/redeploy).

Scope: agents:write

Path Parameters

ParameterTypeRequiredDescription
agentIdstringYesAgent (workflow) ID
idstringYesID of the tool workflow to take off

Response 200 OK: the agent as GET /api/v1/agents/:id shows it, without the workflow in attachments.toolWorkflows. 404 when the agent has no such tool workflow, or you cannot see the agent; 403 when you can use the agent but not change it.


DELETE /api/v1/agents/:agentId/addons/:id​

Take an attached add-on off an agent (one of its attachments.addons). The add-on is not deleted: once nothing uses it, DELETE /api/v1/addons/:id can delete it. A running agent loads the change when it restarts.

Scope: agents:write

Path Parameters

ParameterTypeRequiredDescription
agentIdstringYesAgent (workflow) ID
idstringYesID of the add-on to take off

Response 200 OK: the agent without the add-on in attachments.addons. 404 when the agent has no such add-on attached, or you cannot see the agent; 403 when you can use the agent but not change it.


GET /api/v1/agents/:id/addons​

The add-ons an agent uses and, for each, what each of its clones gets ("For each clone", see Agent Clones). Only the agent's owner reads it.

Scope: agents:read · paged (limit, cursor)

On a base, each entry is { addonId, name, type, status, cloneAddonMode, availableCloneAddonModes, separateSpaceRefusal, clones }: cloneAddonMode is separate-space (A separate space in this add-on: one add-on; each clone gets its own isolated database and login; lower cost), new-addon (A new add-on: one of the same type and size per clone) or null (not chosen: the agent cannot be cloned until it is). availableCloneAddonModes is what the add-on offers (types that cannot isolate a clone offer only new-addon; separateSpaceRefusal says why) and clones how many clones hold one. On a clone, each entry is what it holds of one of its base's add-ons: { addonId, name, type, status, cloneAddonMode } with its separate space (space: name, username and database, keyPrefix (Redis) or vhost (RabbitMQ); never a password) or its new add-on (newAddonId).


PATCH /api/v1/agents/:agentId/addons/:id​

Set what each clone of an agent gets of one of its add-ons.

Scope: agents:write

Body

FieldTypeRequiredDescription
cloneAddonModestring or nullYesseparate-space (A separate space in this add-on), new-addon (A new add-on), or null to unset it

Response 200 OK: the add-on's entry, as GET /agents/:id/addons shows it. Only the agent's owner sets it, never on a clone (403 clone-follows-base). 400 validation-error for separate-space on a type that cannot isolate a clone; 404 for an add-on the agent does not use; 409 clone-addon-mode-in-use while a clone holds what the current choice gave it. Cloning a base with an add-on not chosen is refused (400 clone-addon-mode-required, naming it). A clone never receives the add-on's own login.


Artifacts​

The files an agent produces are Library artifacts linked to the agent: list them with GET /api/v1/library/artifacts?linkedIds=<agentId>, read one with GET /api/v1/library/artifacts/:id (and POST …/download for a signed link to its content), save one with POST /api/v1/library/artifacts (linkedIds: ["<agentId>"]), and delete with DELETE /api/v1/library/artifacts/:id.


Knowledge​

An agent answers from the knowledge bases its config lists: set them with PATCH /api/v1/agents/:id/config { "knowledgeBaseIds": [...] } and restart a running agent. GET /api/v1/agents/:id/knowledge (catalog), GET /api/v1/agents/:id/knowledge/search?q=, GET /api/v1/agents/:agentId/knowledge/documents/:id/outline and GET /api/v1/agents/:agentId/knowledge/documents/:documentId/sections/:id read its knowledge as the agent does. See the Knowledge Bases API.


GET /api/v1/agents/:id/analytics​

Get analytics data for an agent: sessions, runs, success rate, tool use and daily activity. Runs are every run of the agent: its chat turns, its heartbeat beats and its scheduled tasks' fires.

Scope: agents:read

Query Parameters

ParameterTypeRequiredDescription
daysintegerNoNumber of days to look back (default: 30)

Response 200 OK

{
"data": {
"sessionsCount": 47,
"runsCount": 156,
"successRate": 94,
"avgResponseTimeMs": 8200,
"runStatusBreakdown": { "completed": 147, "failed": 6, "inProgress": 1, "cancelled": 2 },
"recentFailures": [
{ "runId": "run_abc123", "threadId": "thread_abc123", "error": "The model request timed out", "startedAt": "2025-02-01T13:10:00Z" }
],
"toolsDetail": [
{ "name": "web_fetch", "callCount": 40, "successRate": 98, "avgDurationMs": 1200, "workflowName": null, "workflowId": null }
],
"dailyRuns": [
{ "date": "2025-02-01", "runs": 12, "completed": 11, "failed": 1 }
]
},
"meta": {
"requestId": "req_abc123"
}
}

successRate is the percent of finished runs (completed, failed or cancelled) that completed; a run still in progress does not count, and it is null until a run has finished.


GET /api/v1/agents/:id/time-series​

An agent's model calls through the AI Gateway over time, from the gateway's record of each call it made (its records name the agent). Its cost is FinOps': GET /api/v1/finops/costs/trends?workload=<agent id>.

Every series has the same shape: the window, its granularity, start (the start of the first point) and end (now), and points, one for every hour or UTC day of the window, from the one its start falls in to the current one (so far). A quiet point counts zero and averages nothing (null).

Scope: agents:read

Path Parameters​

ParameterTypeRequiredDescription
idstringYesThe agent ID

Query Parameters​

ParameterTypeRequiredDescription
windowstringNo24h (hourly points), 7d or 30d (daily UTC points). 30d when left out.
granularitystringNohourly for 24h, daily for 7d and 30d; the window's when left out. Another is refused (400).

Response 200 OK​

{
"data": {
"window": "30d",
"granularity": "daily",
"start": "2026-09-21T00:00:00Z",
"end": "2026-10-21T13:40:00Z",
"points": [
{ "timestamp": "2026-10-21T00:00:00Z", "requests": 107, "errors": 0, "inputTokens": 7493, "outputTokens": 0,
"totalTokens": 7493, "avgLatencyMs": 574 }
]
},
"meta": { "requestId": "..." }
}
FieldDescription
requests, errorsRequests through the AI Gateway in the point, and how many failed.
inputTokens, outputTokens, totalTokensTheir tokens.
avgLatencyMsTheir mean response time; null with no requests.

An agent is its owner's: its owner and platform admins may read it, and each counts the calls they may count (the owner's own; an admin everyone's).

Errors​

StatusCodeWhen
400validation-errorA window or granularity it does not offer.
404not-foundNo such agent, or one you may not see.

GET /api/v1/agents/templates​

The reference agents an agent can be created from, each { key, summary }.

Scope: agents:read

Response 200 OK: every template, in one list.


GET /api/v1/agents/templates/:key​

A reference agent's Agent Builder input (personality, operating prompt, skills, rules, connectors), to create an agent from with POST /api/v1/agents as it is or changed.

Scope: agents:read

ParameterTypeRequiredDescription
keystringYesThe template's key, from the list

Response 200 OK: the template's POST /api/v1/agents body.


GET /api/v1/agents/connectors​

The connectors an agent can be given, by category (data, comms, apis, code, ai_tools), each with the fields it asks for: the same connectors and fields the Agent Builder's Connect step offers. A connector backed by a workflow node (nodeType) asks for that node's connection fields; one with none (an add-on, the Workspace, a setting of the agent such as Web Search) asks for its own.

Scope: agents:read

Response 200 OK: every category, in one list.

[
{
"id": "apis", "label": "APIs", "description": "…",
"connectors": [
{
"tileId": "api-caller", "category": "apis", "label": "Call any REST API", "description": "…",
"iconKey": "api", "popular": true, "nodeType": "api-caller",
"setupInstructions": ["Choose the Target. …"],
"fields": [
{ "key": "target", "label": "Target", "type": "select", "required": true, "default": "url", "secret": false,
"options": [{ "value": "url", "label": "External URL" }, { "value": "app", "label": "Strongly app" }] },
{ "key": "appId", "label": "App", "type": "appSelector", "required": true, "secret": false,
"showIf": { "field": "target", "value": "app" } }
]
}
]
}
]

A field's type is text, textarea, password, number, email, select (with options), checkbox, appSelector (an app id), datasource-selector (a data source id, of datasourceType), credentialSelector (a credential id, of credentialType) or custom (customType says which; a Google OAuth authorization is completed in the web builder). showIf is the rule under which the field shows ({ field, value | values | notValues | includes }, or a list that must all hold); secret fields are stored encrypted. Pass a connector to POST /api/v1/agents as { tileId, nodeType, addOnType, label, category, config } with config keyed by its fields. A connector listed with unavailable cannot be given now (its node is not in the node catalog, and the text says so); sent anyway, it is refused.


GET /api/v1/agents/:id/logs​

The latest log lines of an agent's pod.

Scope: agents:read

ParameterTypeRequiredDescription
idstringYesThe agent's id, or its pod's
linesintegerNoHow many lines (at most 2000)
containerstringNoA container of the pod (default the agent's)

Response 200 OK: the log lines.


POST /api/v1/agents/:id/demote​

Turn an agent back into a regular workflow, to edit and run it as one. It only changes the mode: stop a running agent first.

Scope: agents:write

ParameterTypeRequiredDescription
idstringYesThe agent

Response 200 OK: the workflow it became, as GET /workflows/:id shows it.


Agent Slash Commands​

Agents support slash commands through the chat interface. These are handled by the agent's system prompt, not by the REST API. Send them as regular messages via POST /agents/:agentId/threads/:id/runs:

CommandDescription
/helpList available commands
/personality set <preset>Change communication style
/remember <text>Store a memory
/memoriesList stored memories
/skillsList available skills
/skill create <name>Create a new skill
/tasksList scheduled tasks
/task createSchedule a recurring task

See individual agent documentation for agent-specific commands.