AI assistant
The assistant stores conversations on the server for each user. It is disabled by default. An administrator configures the provider, model and API key under System Settings → Assistant; provider messaging is not enabled in this release.
Release status
The current release provides the session shell, transcripts, and access control. Provider messaging is controlled by capability flags returned by GET /api/v1/assistant/bootstrap:
| Capability | Meaning | Current release |
|---|---|---|
session_shell | Window, sessions, transcripts | true when enabled and permitted |
chat_messages | Send messages to the configured provider | false |
chat_streaming | Stream assistant replies | false |
mcp_tools | Let the assistant call MCP tools | false |
portal_context_packets | Feed current portal context to the assistant | false |
While chat_messages is false, the message composer is disabled and POST /api/v1/assistant/sessions/{id}/messages returns 400 Assistant provider messaging is not enabled in this release.
The assistant window
The Assistant launcher sits in the left sidebar; a green dot on it means the shell is ready. The window docks left, right, bottom, or floats freely, and can be resized. Placement and size persist per user as the assistant.window setting in user settings, so the layout follows you across browsers.
The header shows a feature status badge:
| Status | Meaning |
|---|---|
session_shell_ready | Assistant enabled and your policy grants access |
disabled_by_instance | assistant.instance.enabled is off |
disabled_by_policy | Instance enabled, but your policy denies read on assistant |
Active sessions appear as tabs with message count and status; the footer shows the provider and model configured for the instance.
Sessions
Each session belongs to one user and snapshots the provider and model that were configured when it was created.
| Property | Values |
|---|---|
status | idle, running, error |
lifecycle | active, archived |
pinned | Pinned sessions are never auto-rotated |
Session rules:
- A user holds a limited number of active sessions (default 5, hard cap 20). Creating one beyond the limit automatically archives the oldest active session that is neither running nor pinned. If every active session is pinned or running, creation fails with
409and the list of blocking session ids. - Titles are trimmed, stripped of control characters, and capped at 200 characters; the default title is
New assistant session. - A
runningsession cannot be archived manually. - Archived sessions are purged after the retention window (default 30 days, max 365). The session row survives the purge, but the transcript is gone — session state then reports
transcript_available: falsewith reasonexpired.
Session creation and archiving are recorded in the audit log as assistant.session.created and assistant.session.archived.
Admin configuration
All assistant settings are instance-level defaults under System Settings → Assistant (admin only):
| Setting key | Default | Purpose |
|---|---|---|
assistant.instance.enabled | false | Master switch for the assistant |
assistant.instance.provider | openrouter | Provider preset: openrouter or litellm |
assistant.instance.base_url | — | OpenAI-compatible API base URL |
assistant.instance.model | — | Default chat model |
assistant.instance.portal_context_enabled | false | Allow portal context packets to reach the assistant |
assistant.instance.max_sessions_per_user | 5 | Active session limit before rotation |
assistant.instance.archive_retention_days | 30 | Days an archived transcript is retained |
The provider API key is not a regular setting: it is written to the secret store, bound to the assistant instance (consumer type assistant_instance, field api_key). The settings page only shows whether a key is configured and lets you paste a new value to rotate it. The bootstrap endpoint likewise exposes only the booleans base_url_configured and api_key_configured — never the values.
Tip: Minimal enable sequence: switch
assistant.instance.enabledon, pick the provider, set the base URL and model, paste the API key. The window then becomes available to every user whose policy grantsreadonassistant.
Access control
The assistant is gated by two RBAC resource types:
| Resource | Action | Grants |
|---|---|---|
assistant | read | Open the window, list/create/archive own sessions |
assistant | execute | Send chat messages (once provider messaging is enabled) |
assistant | update | Pin, unpin, and rename own sessions |
assistant_conversation | view_audit | Read session transcripts of other users |
Users always read their own transcripts; reading someone else's session state requires the assistant_conversation grant, intended for audit and review roles.
Data boundaries
Stored in PostgreSQL:
- Sessions: title, status, lifecycle, pinned flag, provider/model snapshot, timestamps, last error, message count.
- Messages: role (
system,user,assistant,tool) and JSON content, retained until the archive retention purge.
Outbound traffic:
- When enabled, chat requests go to the configured provider base URL with the stored API key. The administrator fixes the provider and model for all sessions.
- Portal context is sent only when
assistant.instance.portal_context_enabledis true.
REST API
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/assistant/bootstrap | Config, access flags, feature status, capabilities |
GET | /api/v1/assistant/sessions | List own sessions |
POST | /api/v1/assistant/sessions | Create session (rotates or returns 409) |
PATCH | /api/v1/assistant/sessions/{id} | Rename / pin / unpin |
DELETE | /api/v1/assistant/sessions/{id} | Archive session |
GET | /api/v1/assistant/sessions/{id}/state | Session plus transcript |
POST | /api/v1/assistant/sessions/{id}/messages | Send message (400 until provider messaging is enabled) |
The authoritative contract is the OpenAPI document — see API reference. For AI agents operating Piping from the outside, see the MCP server.