Skip to content

Set up AI

Goal: ask the AI assistant about the active context and have it act for you through the platform's operations (workers, feeds, triggers, scenarios, strategies, state, topics).

Prerequisites

  • Signed in to https://app.virtufin.com (Getting started), on the context you want to use (providers are kept per context: set them up on each).
  • An API key for an OpenAI-compatible Chat Completions endpoint (OpenAI, Anthropic, OpenRouter, Mistral, or any other with an https:// public base URL) — unless the deployment has an org provider, which works without a key of your own.
  • No admin role is needed to set up AI or to ask; the assistant writes only for admins.

Steps

  1. Open Settings > AI (the Settings tab, then AI in the sidebar; route /settings/ai). The page names the active context: Your AI providers for the assistant on <context>.
  2. Add a provider. Under Provider keys, press Add OpenAI (or Add Anthropic, Add OpenRouter, Add Mistral; Add other for any other base URL). A row appears with Name and Base URL filled in.
  3. Paste the key into API key and press Save keys. A notice says Provider keys saved; the key field now shows set (…abcd); type to replace.
  4. Pick a model. Under Model, the table lists the models your key reaches, with Input / 1M, Output / 1M (USD per million tokens, from LiteLLM's price list) and Context. Type in Filter models (e.g. gpt mini) and press Use on a row. The line above says Using <provider> · <model> — …; the row shows In use.
    • A model the provider does not list: pick the provider in the drop-down below the table, type the id in or type a model id, press Use.
  5. Open the assistant: press AI in the header (any view). The panel opens on the right.
  6. Ask, e.g. Which workers are stopped?, and press Enter (Shift+Enter for a new line).
  7. Confirm writes. As an admin, ask it to do something (stop the worker binance-orderbook). On a protected context the dialog Write to the protected context <name>? names the operation (e.g. workers.stop (Stop a worker)): Yes, send it or No. On an unprotected context the write goes out at once.

New in the panel starts a fresh conversation; closing the panel also ends it.

What you should see

  • Each tool call in the panel as it runs: ✓ or ✗, the operation (workers.list), its input; then the answer.
  • Writes the assistant made in Infra > Changes (done, failed with the reason, or declined).

Troubleshooting

Symptom Cause and fix
no AI provider: add one in Settings > AI No provider with a key on this context, and no org provider. Do steps 1–3 on this context.
no model for <name>: choose one in Settings > AI The default provider has no model: step 4.
<name>: base URL must be https / is a private or local address / does not resolve The server only calls public https:// URLs. Fix the base URL.
provider answered 401: … The key is wrong or revoked: type a new one, Save keys.
<provider>: answered 404 … under Model The provider has no GET /models: type the model id by hand (step 4).
Prices unavailable: … The server could not load LiteLLM's price list (VIRTUFIN_APP_LLM_PRICES_URL); models still work, prices show –.
The assistant only reads You are not an admin (the badge says read only): it gets read tools only.
A model price shows – LiteLLM's list does not name that model id.
Saved keys stopped working for everyone The server's session key was rotated: enter the keys again.

More: AI.