Docs
On this page
concept4 min readApplication: SOFI Core

Sofi data handling and security

What data Sofi sends outside the instance, where credentials are kept, who can use assistants and tools, and what Sofi records.

Sofi data handling is the set of rules that decide what record data reaches a language model, who can start an AI feature and what is logged. Read this before you connect a provider or open assistants to users, so you can answer your security and privacy reviewers.

What leaves the instance

Two kinds of model can receive data: Servicely’s built-in models, and the models you connect.

Built-in models. Servicely Intelligence is a central Servicely service that serves a chat, a decision and an embedding model. The instance reaches it at the address in servicely.intelligence.url. When it is set, Sofi classification and search use these models:

  • Classification finds similar records with vector search, then a built-in decision model chooses the value.
  • Search builds its vectors with the built-in embedding model, and a decision model orders the results.
  • Assistant selection uses the built-in decision model when ai.assistant.selection.decision names no decision of your own.

Nothing you configure or script can call a built-in model. When the address is blank, the built-in models are off. Classification then suggests from similar records alone, and search runs by keyword or with your own embedding model.

Your own models. Language-model features send text to the provider of the model they use. That text is the prompt, plus any record data a pre-processing script or a tool adds to it. The request goes to the provider and Base URL on the LLM model record, so your provider decides where the data is processed.

Data Sent to a model Control
Prompt text and record data a prompt or tool reads Yes, to the model’s provider The model record and the tools an assistant has
Attachment contents No, unless you allow it ai.attachment.content.enabled, default false
Attachments larger than the limit No ai.attachment.max_bytes, default 5,242,880 bytes
Record text for classification and search Yes, to Servicely Intelligence, when its address is set servicely.intelligence.url

The classifier form has a Train button. It exports every record of the classifier’s table to the external Sofi service named in sofi_ai.api.url. Only the legacy classifier engine uses it, so do not select it unless you use that engine.

Credentials

Provider keys are kept in System API outbound token records, where the key and secret fields are encrypted. A key can also come from an environment variable on the server. A model uses its own Outbound API Token first, then the shipped token for its provider, then the environment variable.

AI Setup restricts a key to the host it was entered for. A stored key is never sent to a new address unless you type it again.

The key for Servicely Intelligence is set on the deployment only, never in a record.

Microsoft 365 search uses each user’s own delegated Microsoft token. A user can only find SharePoint and OneDrive content they can open in Microsoft 365.

Who can use assistants and tools

Access is checked at several levels, from the whole feature down to one tool.

Level Rule
Whole feature ai.assistant.disabled set to true turns assistants off for everyone.
Feature access ai.assistant.required.roles lists the roles that can use assistants. When it is not set, only administrators can.
Header button ai.assistant.button.required.roles can hide the assistant button from more users. It does not change server-side access.
One assistant, agent or prompt Its Roles field. A user needs one of the roles. A record with no roles is available to nobody.
One tool Its Roles field. A tool with no roles can be used by everyone who reaches it.
Condition An assistant, agent or tool is offered only while its Condition script returns true.
Channel An assistant’s Channels field. Empty means the Servicely interface only. Assistants that change configuration should stay there.
Production A record marked Production Restricted cannot be selected or run on a production instance. ai.production_restricted.enforcement.enabled can tighten this. Only the deployment can relax it.

Active Directory and Microsoft 365 tools also need an operator role, and their destructive tools are production restricted.

Behaviour rules

AI rules and rule sets add behavioural limits to assistants, agents and prompts, such as topics to refuse. They are under AI assistants & agents → Building blocks. Rules are enforced only when ai.rule.enforcement.enabled is true. It is false by default.

Cost limits

AI spend rules cap what Sofi can spend on model calls. A rule applies to the instance, a user, a conversation or an agent, over a period such as the last hour or the last month. Rules and alerts are under AI models, cost & value → Usage & Cost.

ai.spend.enforcement.enabled is not set by default. Rules are then enforced on every instance except developer instances, where they only report. Set it to true or false to decide for yourself.

When spend crosses a rule’s warning threshold or limit, Servicely creates an AI Spend Alert. It notifies administrators once per rule and period. Only the owner of a conversation can continue it past its limit.

What Sofi records

Record What it holds Where to find it
LLM usage log Model, provider, tokens and cost of each call AI models, cost & value → Usage & Cost → LLM usage logs
AI spend alert Each time spend crossed a warning threshold or limit AI models, cost & value → Usage & Cost → AI Spend Alerts
AI activity log Each action an AI agent persona took, such as tool calls, sub-agent calls, escalations, reasoning steps and requests refused by a rule AI assistants & agents → Operations → AI Activity Log
Conversation history Assistant and agent chat transcripts Agent conversation history records
AI prompt execution One background run of a prompt and its state AI prompt execution records
Action result Each run of an intelligent action System & deployment → Logs → Action results

The properties ai.debug.log.http.requests and ai.debug.log.http.responses write the full model requests and responses to the server log. They are false by default. Leave them off in production, because the requests contain record data.

Last updated 3 December 2026commit 6777698daac5Chris Jones
Back to top