Invect

AI Assistant

Build flows faster with the AI chat assistant built into the editor.

The flow editor includes a built-in AI chat assistant. Describe what you want in plain language and the assistant will add nodes, connect edges, configure parameters, and modify your flow — all from a conversation.

Enabling the assistant

The assistant uses a credential stored in Invect's credential store. Point the chat config at a credential:

createInvectRouter({
  baseDatabaseConfig: { type: 'sqlite', connectionString: 'file:./dev.db', id: 'main' },
  chat: {
    credentialId: 'my-openai-credential-id',
    defaultModel: 'gpt-4o-mini',
  },
});

Create the credential through the Invect UI (Credentials page) — add an OpenAI or Anthropic API key credential, then reference its ID here.

If no credential is configured, the chat panel will indicate the assistant is unavailable.

What the assistant can do

The assistant has access to tools that let it modify flows in real time:

  • Add nodes — Place action nodes from any provider onto the canvas
  • Connect nodes — Wire nodes together with edges
  • Configure nodes — Set parameter values on any node
  • Remove nodes and edges — Clean up the flow
  • Read the current flow — Understand what's already built before making changes

Example prompts

Add a Gmail node that sends a daily digest to admin@example.com

Connect the HTTP request node to the JQ transformation and then to the output

Set the model on the AI node to claude-3-5-haiku and give it the prompt: 
"Summarize the following: {{ fetch_article.body }}"

Build a flow that fetches GitHub issues labeled 'urgent' and posts each one to Slack

Chat history

Conversations are saved per-flow automatically. When you return to a flow, the assistant remembers what you discussed previously — including which tools it ran and what changes it made.

Chat history persists across page reloads and browser restarts. You can clear it using the trash icon in the chat panel.

Configuration

createInvectRouter({
  baseDatabaseConfig: { type: 'sqlite', connectionString: 'file:./dev.db', id: 'main' },
  chat: {
    // Credential ID to use for the chat model
    credentialId: 'credential-id',

    // Default model to use (e.g. "gpt-4o-mini", "claude-3-5-haiku-20241022")
    defaultModel: 'gpt-4o-mini',

    // Max tool-calling steps per message (default: 15, max: 50)
    maxSteps: 15,

    // Max messages to include in history sent to the LLM (default: 20)
    maxHistoryMessages: 20,

    // Disable the assistant entirely
    enabled: false,
  },
});

Disabling the assistant

To hide the chat panel entirely:

chat: {
  enabled: false,
}