Search Results for

    Show / Hide Table of Contents

    AI Assistant overview

    The AI Assistant is a chat on your worker sites. Users ask questions in their own words, and the assistant answers from the solution's own data, documents and workflows, with the user's own permissions. It can:

    • Look up, count and summarize records through the data sources you allow, for example How many applications are there, by status?
    • Take the user to the right place: a button that opens a page of the worker site, a record in the window its list opens it in, or a workflow.
    • Fill in and submit workflow forms for the user. Each change waits on a card in the chat that shows the values, and nothing changes until the user allows it.
    • Answer from your documents (a knowledge source) and cite the passages it used.
    • Evaluate server rules and call plugin methods that you offer to it.

    A caseworker asks the assistant a question in the chat of a worker site

    Note

    The AI Assistant serves the users of your worker sites. To build and maintain solutions with AI coding assistants such as Claude Code or GitHub Copilot, see AI Integration (MCP).

    How it works

    The chat runs in the browser on the worker site. A separate service, the Casewhere AI service, runs the conversation with the model. Every time the model wants data or wants to do something, the AI service asks the Worker API, which does it as the signed-in user, with the same checks as the worker site.

    flowchart LR
        U["User on a worker site<br/>(chat panel)"] -->|"messages"| API["Worker API"]
        API -->|"the turn, with the user,<br/>profile and model"| AI{{"Casewhere AI service"}}
        AI -->|"prompt and tools"| M["Model provider<br/>(Azure OpenAI, OpenAI, Claude)"]
        AI -->|"tool calls, as the user"| API
        API --> DATA[("Data, workflows,<br/>rules, plugins")]
        AI -->|"searches"| KS["Knowledge sources"]
        style AI fill:#1f6feb,color:#ffffff,stroke:#11448a
    

    The important consequences of this design:

    • The assistant never sees more than the user. Data sources apply their access rules, database rules and field read rules; workflows apply their security rules. A user who cannot open a record on the worker site cannot get it from the assistant either.
    • The browser talks to the Worker API only. The AI service is an internal service and is never exposed to the browser.
    • Nothing changes without the user. Every form submit, workflow start and plugin call that changes data waits on a confirmation card. Links the model writes are checked against what it may link to, so it cannot invent a destination.
    • API keys stay in your environment. The keys of the model providers and search services are stored encrypted in the key store of your Casewhere installation. They are never shown again, never written to logs, and never leave the environment in packages or the configuration folder.

    Building blocks

    You set up the assistant in Casewhere Admin, under AI in the navigation, and in the AI settings of your solution's artefacts.

    Building block Where What it is for
    Model connection AI > Model Connections The model the assistant runs on: the provider, the model and its API key
    Knowledge source AI > Knowledge Sources Documents the assistant can search and cite: files you upload, or an Azure AI Search index
    Assistant profile AI > Assistant Profiles One assistant: its instructions, models, tools, knowledge sources, welcome, limits and who may use it
    AI settings The editors of data sources, data classes, workflow definitions, rules and plugins What the assistant may query, start, evaluate or call, and what it is told about it
    Worker site The AI section of the worker site editor Turns the chat on for a worker site and chooses its assistant profiles

    Set up the assistant

    1. Make sure the Casewhere AI service is installed for your environment (see Requirements).
    2. Create a model connection with the API key of your model provider, and test it.
    3. Turn on the AI settings of the data sources, workflows, rules and plugin methods the assistant should use, with AI instructions that tell it what each one is for.
    4. Optionally, add a knowledge source with the documents users ask about.
    5. Create an assistant profile: its instructions, its model, its tools and knowledge sources, a greeting and suggested prompts.
    6. Enable the AI chat on a worker site and choose the profile.
    7. Sign in to the worker site and use the assistant.

    Requirements

    • The Casewhere AI service. It is a separate web application (.NET 10, hosted in IIS with the ASP.NET Core hosting bundle) that only the Worker API and Casewhere Admin call. It keeps the conversations, runs and usage records in its own MongoDB database (CasewhereWorkerAi). See Configuration settings for its settings.
    • The workerAi:BaseUrl setting of the Worker API and of Casewhere Admin: the address of the AI service. When it is empty, the chat is not available on any worker site.
    • A model provider account: Azure OpenAI, OpenAI, Claude (Anthropic) or Claude on Microsoft Foundry, with a model that supports tool calls.
    • Signed-in users. The chat is never shown to anonymous users.

    Security and privacy

    • The assistant acts as the signed-in user. Every tool call is checked by the Worker API as if the user did it on the worker site.
    • What a user asks, and what the tools return, is sent to the model provider of the profile's model connection. Choose the provider and the data residency that your organization allows, and offer the assistant only the data sources and fields it needs.
    • The AI instructions of a data source, workflow, rule or plugin method are sent to the model for every user who can use it. Do not put anything in them that a user of the worker site may not read. The list of workflows the assistant knows about is not filtered by the user's access; the workflow's security rules are checked when it starts.
    • Tool results, records and documents are data, never instructions. Even when a record holds text written to mislead the model, the confirmation cards and the checked links keep the user in control of every change.
    • Conversations are kept per user for the number of days the profile sets, and users can delete them.
    • Answers are written by AI and can be wrong. The chat says so under the message box.

    In this section

    Topic Description
    Model connections Connect the assistant to a model provider
    Knowledge sources Let the assistant search and cite your documents
    Assistant profiles Configure an assistant: instructions, models, tools, welcome, limits and access
    AI settings Let the assistant use data sources, workflows, rules and plugin methods
    Enable the assistant on a worker site Turn on the chat for a worker site
    Use the assistant The chat as your users see it
    Translate the chat The text resources of the chat panel
    Call the assistant from scripts The IAiApi DSL API
    AI settings across environments Products, packages, DevOps and the configuration folder
    In This Article
    Back to top Generated by DocFX