Set up the assistant
Copy page
This guide shows you how to connect Sluice to a model provider. The provider powers three features: the assistant panel, flow authoring in the assistant, and failure triage. The MCP server at /mcp does not need a provider.
Before you start
Section titled “Before you start”- You have the admin role. Only an admin can change the provider and the global secrets.
- You have an API key of the provider, and the ID of the model that you want to use.
- The server has
SLUICE_MASTER_KEYS, so that it can store a builtin secret. A secret from another provider, for example Vault, also works.
Connect the provider
Section titled “Connect the provider”-
Store the API key as a global secret.
Open Secrets and click Add secret. Enter a key, for example
ANTHROPIC_API_KEY. Keep the providerbuiltin, paste the API key into Value, and save. The page never shows the value again. -
Open Settings → AI provider.
-
Fill in the fields of the provider:
Field Value Type Anthropic Base URL Empty. Sluice uses https://api.anthropic.com.Model The model ID from the model list of Anthropic. API key secret key ANTHROPIC_API_KEYField Value Type OpenAI compatible Base URL Empty for OpenAI. Sluice uses https://api.openai.com/v1. For another server, the URL before/chat/completions, for examplehttp://localhost:11434/v1.Model The model name that the server expects. API key secret key The key of the global secret, for example OPENAI_API_KEY.A server without API keys still needs a global secret. Store any value in it.
-
Click Save. The Status row changes to a green badge.
-
Click Test provider. Sluice sends one short request. The page shows “The provider answered.” or the error of the provider.
-
Click Assistant at the bottom right of any page, and ask a question about your flows.
Follow the base URL rules
Section titled “Follow the base URL rules”- An empty base URL uses the default URL of the type.
- A base URL must use
https://. - Plain
http://works only for a loopback host:localhost,127.0.0.1or::1. - A base URL cannot hold a user name or a password.
The Sluice server sends the requests, not the browser. A loopback host thus means the host of the server. When Sluice runs in a container, localhost is the container itself.
Turn on automatic triage
Section titled “Turn on automatic triage”Under Failure triage, select Triage failed and timed out executions automatically, then click Save. Sluice then queues a triage when an execution ends FAILED or TIMED_OUT. Without this option, an operator clicks Triage on the execution page.
Every instance takes queued triages. A triage has 3 minutes. See Triage a failed execution.
Limit the size of the triage context
Section titled “Limit the size of the triage context”SLUICE_AI_MAX_CONTEXT_CHARS limits the characters of one triage request. The default is 120000, and the minimum is 1000. A smaller value costs less per triage and keeps fewer log lines. Set the same value on all instances.
Know what happens on errors
Section titled “Know what happens on errors”| Case | Result |
|---|---|
| The provider answers 429 or 5xx, or the network fails | Sluice tries 3 times in total, 0.5 and 1 second apart. Then the feature shows the error. |
| The API key secret does not resolve | The operation answers 409 ai_key_unavailable. Test provider shows the message. |
| No provider exists | The UI hides the assistant and the triage card. The AI operations answer 409 ai_disabled. MCP still works. |
GET /api/v1/ai/status tells a client whether AI is on and whether triage is automatic.
Remove the provider
Section titled “Remove the provider”On Settings → AI provider, click Remove, then confirm. The UI hides the AI features again. The global secret stays. Delete it on Secrets when you no longer need it.