Appearance
Sidechat
The Sidechat endpoint powers the AI assistant panel in the dashboard. It understands the current page context (which agent or call the user is viewing) and can take actions like creating agents, updating prompts, or explaining call traces.
POST /api/sidechat
Send a message to the dashboard assistant.
Request:
json
{
"messages": [
{ "role": "user", "content": "Create a support agent for a SaaS company" },
{ "role": "assistant", "content": "I'll create that agent now." },
{ "role": "user", "content": "Give it a friendly tone" }
],
"page_context": {
"page": "agents",
"agent_id": "uuid"
}
}| Field | Required | Description |
|---|---|---|
messages | Yes | Full conversation history. Array of { "role": "user" | "assistant", "content": string }. Always include prior turns for context. |
page_context | No | Current dashboard state — helps the assistant understand what the user is looking at |
Response:
json
{
"reply": "I've created the support agent with a friendly, conversational tone. You can find it in the Agents list.",
"actions": [
{
"tool": "create_agent",
"args_summary": "name=support-agent, tone=friendly",
"result_summary": "Agent created successfully",
"success": true
}
]
}| Field | Description |
|---|---|
reply | The assistant's response text to show to the user |
actions | Platform actions the assistant took during the response. Empty array if it only answered a question. |