Skip to main content

Generate a Flow with AI

The AI generator uses Claude (claude-sonnet-4-6) with an edit_flow tool to build or modify Voiceblox flows from natural language descriptions.

How to use it

  1. Click the AI button in the top toolbar
  2. Describe the agent you want to build in plain language
  3. The AI generates a set of operations and applies them to the canvas

How it works

The system prompt is dynamically built from nodeTemplates.ts and connectionRules.ts, so the AI always has an up-to-date understanding of the available nodes and valid connections. When you submit a message, the AI either:
  • Calls ask_user to surface a clarifying question (response: { done: false, message })
  • Calls edit_flow to produce a list of operations (response: { done: true, operations[], versionName })
The operations are validated against the graph’s topology before being applied. If validation fails, the AI retries up to 3 times with the error feedback.

Operation types

Example prompts

Requirements

  • The builder LLM key for your BUILDER_LLM_PROVIDER (BUILDER_LLM_ANTHROPIC_API_KEY or BUILDER_LLM_GEMINI_API_KEY) must be set in .env.local

Tips

  • Be specific about the conversation structure (number of steps, branch conditions)
  • You can ask the AI to modify only part of an existing flow
  • If the result isn’t right, describe what’s wrong and ask it to fix it
See Prompting Tips for more examples.