Skip to main content
On this page

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:

CapabilityMeaningCurrent release
session_shellWindow, sessions, transcriptstrue when enabled and permitted
chat_messagesSend messages to the configured providerfalse
chat_streamingStream assistant repliesfalse
mcp_toolsLet the assistant call MCP toolsfalse
portal_context_packetsFeed current portal context to the assistantfalse

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:

StatusMeaning
session_shell_readyAssistant enabled and your policy grants access
disabled_by_instanceassistant.instance.enabled is off
disabled_by_policyInstance 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.

PropertyValues
statusidle, running, error
lifecycleactive, archived
pinnedPinned 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 409 and 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 running session 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: false with reason expired.

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 keyDefaultPurpose
assistant.instance.enabledfalseMaster switch for the assistant
assistant.instance.provideropenrouterProvider preset: openrouter or litellm
assistant.instance.base_url—OpenAI-compatible API base URL
assistant.instance.model—Default chat model
assistant.instance.portal_context_enabledfalseAllow portal context packets to reach the assistant
assistant.instance.max_sessions_per_user5Active session limit before rotation
assistant.instance.archive_retention_days30Days 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.enabled on, pick the provider, set the base URL and model, paste the API key. The window then becomes available to every user whose policy grants read on assistant.

Access control

The assistant is gated by two RBAC resource types:

ResourceActionGrants
assistantreadOpen the window, list/create/archive own sessions
assistantexecuteSend chat messages (once provider messaging is enabled)
assistantupdatePin, unpin, and rename own sessions
assistant_conversationview_auditRead 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_enabled is true.

REST API

MethodPathPurpose
GET/api/v1/assistant/bootstrapConfig, access flags, feature status, capabilities
GET/api/v1/assistant/sessionsList own sessions
POST/api/v1/assistant/sessionsCreate 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}/stateSession plus transcript
POST/api/v1/assistant/sessions/{id}/messagesSend 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.