Skip to main content

Stan Settings

Configure Stan's personality, inspect available skills, manage context usage and compaction, browse and resume past conversations, and send messages through the universal Stan message endpoint.

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


Personality Object​

{
"personality": "professional"
}

Valid values: professional, friendly, concise.


GET /api/v1/stan/settings​

Get the current personality preset for the authenticated user.

Scope: stan:execute

Response 200 OK

{ "data": { "personality": "professional" }, "meta": { "requestId": "req_abc123" } }

PATCH /api/v1/stan/settings​

Set the personality preset for the authenticated user.

Scope: stan:execute

Request Body

{
"personality": "friendly"
}
FieldTypeRequiredDescription
personalitystringYesOne of professional, friendly, concise

Response 200 OK

{ "data": { "personality": "friendly" }, "meta": { "requestId": "req_abc123" } }

GET /api/v1/stan/skills​

List all skills available to Stan -- both built-in system skills and user-defined skills.

Scope: stan:execute

Response 200 OK

{
"data": {
"system": [
{
"name": "workflow-builder",
"category": "build",
"description": "Build and edit workflows conversationally."
}
],
"user": [
{
"id": "skill_abc001",
"name": "my-custom-skill",
"category": "custom",
"description": "A user-authored skill."
}
]
},
"meta": { "requestId": "req_abc123" }
}

GET /api/v1/stan/context​

Get the current context-usage stats for the active Stan session.

Scope: stan:execute

Response 200 OK

When no session is active:

{
"data": { "active": false, "message": "No active session" },
"meta": { "requestId": "req_abc123" }
}

When a session is active:

{
"data": {
"active": true,
"totalTokens": 18234,
"availableTokens": 181766,
"maxTokens": 200000,
"usagePercentage": 9,
"needsCompaction": false
},
"meta": { "requestId": "req_abc123" }
}

POST /api/v1/stan/compact​

Trigger compaction of the active Stan session's conversation history. Requires an active LLM session.

Scope: stan:execute

Response 200 OK

{
"data": { "compacted": true, "messagesCompacted": 24 },
"meta": { "requestId": "req_abc123" }
}

GET /api/v1/stan/conversations​

List past conversation sessions for the authenticated user.

Scope: stan:execute

Query Parameters

ParameterTypeRequiredDescription
limitintegerNoNumber of sessions to return (default: 20)

Response 200 OK

{
"data": [
{
"_id": "conv_abc001",
"userId": "user_456",
"title": "Webhook trigger setup",
"mode": "workflows",
"modelId": "model_abc123",
"modelName": "Claude Opus 4.7",
"messageCount": 14,
"createdResources": { "workflowId": "wf_abc123" },
"startedAt": "2025-02-10T10:00:00Z",
"endedAt": "2025-02-10T10:42:00Z",
"lastMessageAt": "2025-02-10T10:42:00Z"
}
],
"meta": { "requestId": "req_abc123" }
}

Conversations are listed most recent first, without their messages.


GET /api/v1/stan/conversations/:id​

Get the full record of a past conversation, including all messages.

Scope: stan:execute

Path Parameters

ParameterTypeRequiredDescription
idstringYesConversation ID

Response 200 OK

{
"data": {
"_id": "conv_abc001",
"userId": "user_456",
"title": "Webhook trigger setup",
"mode": "workflows",
"modelId": "model_abc123",
"modelName": "Claude Opus 4.7",
"messageCount": 14,
"messages": [
{ "role": "user", "content": "Add a webhook trigger" },
{ "role": "assistant", "content": "Done -- added webhook-trigger node." }
],
"createdResources": { "workflowId": "wf_abc123" },
"startedAt": "2025-02-10T10:00:00Z",
"endedAt": "2025-02-10T10:42:00Z",
"lastMessageAt": "2025-02-10T10:42:00Z"
},
"meta": { "requestId": "req_abc123" }
}

POST /api/v1/stan/conversations/:id/resume​

Resume a past conversation. Restores the conversation's model and mode and reloads up to the last 50 messages into the active session.

Scope: stan:execute

Path Parameters

ParameterTypeRequiredDescription
idstringYesConversation ID

Response 200 OK​

The conversation, as GET /stan/conversations/:id shows it; it is now your active session.


POST /api/v1/stan/messages​

Universal Stan message endpoint, with full slash-command support: the single entry point for any client (web, mobile) to interact with Stan. The message goes to the user's current session.

Scope: stan:execute

Request Body

{
"message": "/help",
"source": "chat"
}
FieldTypeRequiredDescription
messagestringYesThe user message or slash command to send
sourcestringNoOriginating client surface (default: chat)

Response 200 OK

A slash command or quick answer returns at once:

{
"data": {
"id": "Hq3LmR8vTz2WkP5nX",
"response": "**STAN Commands** ...",
"category": "help",
"timestamp": "2026-09-29T14:02:11.418Z",
"sessionId": "Wm4TqZ7cR2pLx9KvB",
"createdNew": false
},
"meta": { "requestId": "req_abc123" }
}

A message Stan works on starts a run, and the call waits up to about 10 seconds for it. If the run has finished, async is false and the reply is in response:

{
"data": {
"id": "Hq3LmR8vTz2WkP5nX",
"response": "I've added a webhook trigger node to your workflow.",
"async": false,
"runId": "Jd8sQw3nY6rTb1XcM",
"runStatus": "completed",
"category": "llm-general",
"resources": {},
"tokensUsed": 1834,
"toolCalls": [ { "name": "add_workflow_node", "ok": true } ],
"timestamp": "2026-09-29T14:02:11.418Z",
"sessionId": "Wm4TqZ7cR2pLx9KvB",
"createdNew": false
},
"meta": { "requestId": "req_abc123" }
}

runStatus is completed or failed; for a failed run, response says what went wrong.

Response 202 Accepted

If the run is still queued or running after the wait, the same fields come back with async: true, the runStatus, a note, and an empty response. Poll GET /api/v1/stan/runs/:runId until runStatus is completed or failed, then read response there.


GET /api/v1/stan/runs/:id​

Poll a Stan run started by POST /api/v1/stan/messages or by POST /api/v1/stan/sessions/:id/messages with "async": true. Only your own runs are returned.

Scope: stan:execute

Response 200 OK (finished)

{
"data": {
"runId": "Jd8sQw3nY6rTb1XcM",
"async": false,
"runStatus": "completed",
"response": "I've added a webhook trigger node to your workflow.",
"resources": {},
"tokensUsed": 1834,
"toolCalls": [ { "name": "add_workflow_node", "ok": true } ]
},
"meta": { "requestId": "req_abc123" }
}

Response 200 OK (still working)

{
"data": {
"runId": "Jd8sQw3nY6rTb1XcM",
"async": true,
"runStatus": "running",
"response": "",
"resources": {},
"tokensUsed": 0,
"toolCalls": [],
"streamingText": "Adding the trigger node...",
"streamSeq": 12,
"note": "Still running; poll GET /api/v1/stan/runs/Jd8sQw3nY6rTb1XcM until runStatus is completed or failed."
},
"meta": { "requestId": "req_abc123" }
}

A run is still working while runStatus is queued or running (async is true); streamingText carries the reply as it is written. Once async is false, response holds the reply; for a failed run it says what went wrong.

Errors: 404 when the run does not exist or is not yours.