AI settings
The AI Assistant works with the artefacts of your solution: it queries data sources, starts and fills in workflows, evaluates server rules and calls plugin methods. It uses only the ones whose AI settings allow it, and only as far as the signed-in user may reach them. This article describes the AI settings of each kind of artefact.
Every kind has the same two basic settings:
- The assistant can query this data source (or start this workflow, evaluate this rule): the switch that offers the artefact to the assistant. Off by default.
- AI instructions: what the artefact is for and when the assistant should use it, in plain words. The assistant reads it to choose the right artefact for a question, so write it for a new colleague: what it holds or does, its important fields, and the questions it answers. Users of the worker sites do not see this text, but the model does for every user who can use the artefact, so do not put anything in it that a user may not read.
Assistant profiles can narrow what their assistant uses further.
Data sources
In the data source editor, open the AI section.

| Name | Description |
|---|---|
| The assistant can query this data source | Offers the data source to the assistant. |
| AI instructions | What the records are, the fields that matter, and the questions the data source answers. For example: Issued licenses: license number, status, holder company, validity (ValidFromDate to ValidToDate) and the quantities issued, used and remaining. Use it for questions about licenses and when they expire. |
| Parameters | The values the assistant passes to the placeholders @params.name of the data source's script (see Parameters). Nothing else reaches the query, and a placeholder without a value matches nothing. A built-in data source has no script and takes no parameters. |
With a data source, the assistant can:
- Read its fields: their names, types and descriptions, the options of enum fields in the user's language, and what a reference points to.
- Query it: with filters (ranges, empty values, or), the fields it needs, a sort order, and at most 100 records at a time.
- Count and group its records, for example applications by status or per month in 2026, and sum, average or find the smallest or largest value of a field.
The data source's access rules, database rules and field read rules apply to the assistant as they do on the worker site. But a data source does not need Access From Worker Site, or a widget, for the assistant to query it: switching its AI settings on makes it available to every user who passes its access rules. The assistant also sees every field of the data source with its description and computed expression, so they should hold nothing that a user of the data source may not read.
Data classes
A built-in data source (the one each data class has) is read-only. It takes its AI settings from its data class: open the data class editor and the AI section, and check The assistant can query this data class.

Workflows
In the workflow definition editor, open the AI section. The AI settings can be set once the workflow definition is saved.

| Name | Description |
|---|---|
| The assistant can start this workflow | Offers the workflow to the assistant. |
| AI instructions | What the workflow does, the record it works on, and when to use it. For a workflow the assistant may run, also the fields to fill in and anything its forms need that a user would know from the screen. |
| Assistant | Offers a link: the assistant puts a button in its answer, and the user starts the workflow in its own dialog and fills in its forms. May run the workflow: the assistant starts the workflow, fills in its forms and submits them in the chat. |
| Process for new cases | For a workflow that starts new cases (Used For Creating New Cases): the process its cases are created in. Without it, neither a link nor the assistant can start the workflow. |
| Parameters | The values the assistant passes when it starts the workflow or offers a link to it (see Parameters). The workflow gets them as External Data, an input data object (ctx.Input, ctx.Inputs), so it must have Accept Input on. |
How the assistant uses a workflow:
- A workflow on an existing case needs the case. The assistant finds it in the data it queries, and passes the record the workflow works on as its input, as a widget passes its selected row.
- Offers a link: the user clicks the button, and the workflow opens in the worker site's workflow dialog, at its own window size. Nothing is submitted by the assistant.
- May run the workflow: the assistant reads the forms with their labels and options, asks the user for missing values, and shows each submit or draft save on a confirmation card with the values as the form shows them. The form is posted only when the user allows it. A workflow that runs by itself, without forms, is started after one card.
- The workflow's security rules are checked before it starts, and each form post is checked as the worker site checks it. When the form's rules refuse a post, the assistant gets their messages and tells the user why.
- A workflow the assistant may run can also be offered as a link, for example to let the user continue a draft in the worker site.
Note
The list of workflows the assistant knows about is not filtered by the user's access, because security rules may need a case to decide. The rules are checked when the workflow starts. Make sure a workflow on existing cases checks access to its case in its security rules.
Rules
Server rules can be evaluated by the assistant, for example a rule that computes a fee or decides whether an application is complete. In the rule editor, open the AI section. It is shown for server rules only.
| Name | Description |
|---|---|
| The assistant can evaluate this rule | Offers the rule to the assistant. |
| AI instructions | What the rule decides or computes, and when to use it. |
| Parameters | The values the assistant passes when it evaluates the rule (see Parameters). Nothing else reaches the rule. |
The rule runs as the user of the chat, with the same @user and the same data access, and the assistant gets its result. The rule's code reads the values from @parameters: a Number arrives as a decimal, a Boolean as a bool, a Date as a UTC DateTime and a Text as a string.
// a required parameter is always there
var amount = (decimal)@parameters.amount;
// an optional parameter is missing when the assistant leaves it out: read it by its name
var discount = @parameters.Get<decimal?>("discount") ?? 0m;
Return something the assistant can read: a bool, an access mode (sent as its name), a number, a short text or a small object. Tell the assistant in the AI instructions what the result means, for example returns the fee in DKK. A rule that fails reaches the assistant as The rule could not be evaluated.; the error is in the log of the Worker API.
Plugins
Plugins do not describe their methods, so you name each method the assistant may call. Open the plugin (Create or Edit) and the AI tab.
| Name | Description |
|---|---|
| Methods | The methods offered to the assistant. Click Add method to add one, Delete to remove the selected one. The Asks first column shows which ones need the user's confirmation. |
| Method | The name of the method, as the plugin answers to it. |
| AI instructions | What the method does and when the assistant should call it. |
| The user allows each call on a card first | On by default: each call waits on a confirmation card. Turn it off only for a method that changes nothing. |
| Parameters | The values the assistant passes to the method (see Parameters). Nothing else reaches the method. |
The plugin does not need to be public. Every active policy of the plugin that names a method must allow the user, whatever its scope (see Plugin security). A plugin runs with its own settings, not as the user, so its policies decide who may call a method through the assistant.
Parameters
Data sources, workflows, rules and plugin methods declare the values the assistant may pass to them. Click Add parameter and fill in the row:
| Column | Description |
|---|---|
| Name | The name the code reads. It starts with a letter or an underscore and holds only letters, digits and underscores (at most 50 characters). Each name once. |
| Type | Text, Number, Boolean or Date. The value is converted to the type before it is passed: a number to a decimal, a date from ISO 8601 to a UTC date and time. |
| Required | The assistant must pass the value. Without it, the call is refused with a message the assistant can act on, for example The rule needs the parameter amount. |
| Description | What the value means, for example the amount applied for, in DKK. At most 500 characters. |
An artefact can declare up to 20 parameters. Only declared parameters are passed, so whatever else the model sends never reaches your code.
Pages
Pages have no AI settings. The assistant can link to every page in the worker site's menu that the user may open, and it knows what each page shows: the titles of its widgets and the data sources and workflows they use. It can also open one record in the page that a menu page's list opens it in, as a window over the page the user is on.
AI settings in the MCP tools
The MCP tools of Casewhere Admin round-trip the AI settings: EditDataSource, EditDataClass, EditWorkflowDefinition, CreateRule and EditRule take isAiDiscoverable, aiDescription and aiParameters, and EditWorkflowDefinition also aiMode and aiProcessId. These edits replace the whole artefact, so pass the AI settings that Get... returned, or the assistant is switched off for it. Model connections, knowledge sources, assistant profiles and plugin methods are configured in Casewhere Admin only.
See also
- Assistant profiles: limit a profile to some of these artefacts.
- Use the assistant: links, record windows and confirmation cards as users see them.