Chat
Send a message
/v1/ai/chat
Send a message and receive an AI response. Supports streaming via SSE.
| Field | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The user message |
companion | string | No | Companion type (e.g., smart-home, devops) |
model | string | No | Model override (uses preference if omitted) |
stream | boolean | No | Enable SSE streaming (default: false) |
session_id | string | No | Continue an existing session |
stream: true.
Companion chat
/v1/ai/companion/{type}/chat
Chat with a specific companion type. Requires Brain to be available.
List agents
/v1/ai/agents
List available AI agents and their capabilities. Requires Brain.
Sessions
Create session
/v1/ai/sessions
Create a new chat session.
List sessions
/v1/ai/sessions
List the authenticated user’s sessions. Supports pagination.
| Parameter | Type | Description |
|---|---|---|
limit | int | Max results (default: 20) |
offset | int | Pagination offset |
Get session
/v1/ai/sessions/{id}
Get a specific session including its message history.
Delete session
/v1/ai/sessions/{id}
Delete a session and all its messages.
Companion Memory
Companions can store and recall information across sessions using memory layers.List memories
/v1/ai/memory
List companion memories filtered by layer or type.
| Parameter | Type | Description |
|---|---|---|
layer | string | Memory layer filter (identity, preferences, history) |
companion_type | string | Filter by companion |
limit | int | Max results |
offset | int | Pagination offset |
Create memory
/v1/ai/memory
Store a new memory entry for a companion.
Delete memory
/v1/ai/memory/{id}
Delete a specific memory entry.
Manager Approvals
For enterprise/pro tiers, certain companion actions require human approval.List approvals
/v1/ai/approvals
List pending manager approval requests.
Approve or reject
/v1/ai/approvals/{id}
Approve or reject a pending action. Requires pro tier or higher.
List events
/v1/ai/events
List manager events and audit log.
