Skip to content
MSO CloudDocumentation

AI and chat

On this page

The data assistant, per-organization AI configuration and the prompt registry.

aiConfigs#

Source: apps/web/src/server/routers/ai-configs.ts

Procedure Type Access Description
aiConfigs.listConnections query orgProcedure, manage_ai Ordered list of the org's AI connections (primary first).
aiConfigs.saveByokAndEnable mutation rateLimitedOrgProcedure, manage_ai Save a usable organisation chain and enable byok in the same transaction.
aiConfigs.getOrganizationSettings query authedProcedure, manage_ai Effective source plus safe platform metadata; encrypted material is never projected.
aiConfigs.useInherited mutation rateLimitedOrgProcedure, manage_ai Return to platform defaults without deleting the organisation's encrypted byok rows.
aiConfigs.testConnection mutation authedProcedure, manage_ai —
aiConfigs.listModels mutation authedProcedure, manage_ai —
aiConfigs.usageThisMonth query orgProcedure —

platformAiConfigs#

Source: apps/web/src/server/routers/ai-configs.ts

Global platform default chain.

Procedure Type Access Description
platformAiConfigs.listConnections query superAdminProcedure —
platformAiConfigs.saveConnections mutation superAdminProcedure —
platformAiConfigs.testConnection mutation superAdminProcedure —
platformAiConfigs.listModels mutation superAdminProcedure —

aiPrompts#

Source: apps/web/src/server/routers/ai-prompts.ts

Procedure Type Access Description
aiPrompts.list query orgProcedure List all override rows for the active org.
aiPrompts.upsert mutation rateLimitedOrgProcedure, manage_ai Upsert a single (slot, industry) override.
aiPrompts.reset mutation rateLimitedOrgProcedure, manage_ai Delete a (slot, industry) override row, restoring the built-in default for that slot.
aiPrompts.preview query authedProcedure Render the full effective prompt (system + role) using the current overrides — no caching, no mutation.
aiPrompts.test mutation authedProcedure, manage_ai Send the rendered prompt to the org's configured model and return the model's response, latency, and token usage.
aiPrompts.defaults query authedProcedure Read-only: defaults bundle for the admin UI.

chat#

Source: apps/web/src/server/routers/chat.ts

Procedure Type Access Description
chat.dashboardWelcome query chatProcedure, plugin chat-with-data, owner or admin Welcome screen of the dashboard AI assistant tab: this reader's /chat chips, intro and placeholder, led by the page's declared starters.
chat.listConversations query chatProcedure, plugin chat-with-data, owner or admin List active conversations for the current brand + user, newest first.
chat.getConversation query chatProcedure, plugin chat-with-data, owner or admin Fetch one conversation with its full message history.
chat.rateMessage mutation rateLimitedChatProcedure Rate one assistant answer in the caller's own conversation.
chat.createConversation mutation rateLimitedChatProcedure Create a new (empty) conversation; messages are appended by /api/chat.
chat.renameConversation mutation rateLimitedChatProcedure Rename a conversation.
chat.deleteConversation mutation rateLimitedChatProcedure Archive (soft-delete) a conversation.

chatAssistant#

Source: apps/web/src/server/routers/chat-assistant.ts

Procedure Type Access Description
chatAssistant.getSettings query orgProcedure, owner or admin —
chatAssistant.getBrandSettings query brandProcedure, owner or admin —
chatAssistant.updateSettings mutation rateLimitedOrgProcedure, owner or admin Save the org-wide settings (owner / admin / super).
chatAssistant.updateBrandSettings mutation rateLimitedBrandProcedure, owner or admin —