# Vapi Workflows — Visual Voice Flow Builder > Vapi Workflows is a node-based builder for branching voice flows. Drag prompts, decisions, tool calls, transfers — replaces hand-coded state machines. ## Install Copy the content below into your project: ## Quick Use 1. Sign up at vapi.ai 2. Open dashboard.vapi.ai/workflows → New Workflow 3. Drag in Say / Ask / Decision nodes; connect via the visual builder --- ## Intro Vapi Workflows is the visual flow builder for voice agents — drag-and-drop nodes (say-message, ask-question, run-tool, transfer-to-human, end-call) connected by conditions. Replaces hand-coded state machines for any flow more complex than 'one prompt → many responses'. Best for: customer support, qualification, booking flows where the conversation has predictable branches. Works with: Vapi platform, callable as a Workflow asset from any Vapi assistant. Setup time: 10 minutes (visual builder). --- ### Node types | Node | Use | |---|---| | **Say** | Bot speaks a fixed line | | **Ask** | Bot speaks, then waits for user reply (with VAD) | | **Decision** | Branch based on intent classification or tool result | | **Tool** | Call your backend (REST endpoint) | | **Transfer** | Hand off to human / another assistant | | **End** | Hang up gracefully | ### Hello-world flow ``` [Start] → Say "Hi! I'm Acme's booking assistant." → Ask "Are you looking to book a new stay or modify an existing one?" → Decision { new → BookingFlow, modify → ModifyFlow, else → Transfer to human } [BookingFlow] → Ask "Great! What dates?" → Tool check_availability(dates) → Decision { available → ConfirmFlow, full → SuggestAlternatives } [ConfirmFlow] → Say "Got it. Confirming a 2-night stay May 10-12." → Tool create_booking(...) → Say "Booked! Confirmation sent to your phone." → End ``` ### Build via API ```bash curl -X POST https://api.vapi.ai/workflow \ -H "Authorization: Bearer $VAPI_API_KEY" \ -d @workflow.json ``` Or use the visual builder at dashboard.vapi.ai/workflows. The exported JSON is identical. ### When Workflow vs free-form LLM | Use Workflow | Use free-form LLM (assistant) | |---|---| | Conversation has known branches | Open-ended Q&A | | Compliance / script required | Creative responses ok | | Need predictable transfer rules | Edge cases handled by model | | 80% of customer support | Concierge / brainstorm | You can also nest: a Workflow can include a "free-form LLM" node that hands off to a chat assistant for the open-ended portions, then returns to the flow. --- ### FAQ **Q: Workflow vs Squad — what's the difference?** A: Workflow is a single agent following a flowchart. Squad is multiple agents that can hand off to each other (e.g. greeter → booking → support). Use Workflow for in-call branching; Squad for distinct personas. **Q: Can I version Workflows?** A: Yes — every save creates a new version. Roll back via the dashboard or `workflow.versionId` in the API. Useful for A/B testing flow variants. **Q: How do I test a Workflow without making real calls?** A: The dashboard has a 'Test Call' button that simulates the flow with text input/output (no audio). For full audio testing, Vapi gives you a free test phone number on the playground. --- ## Source & Thanks > Built by [Vapi](https://github.com/VapiAI). Commercial product with free trial. > > [docs.vapi.ai/workflows](https://docs.vapi.ai/workflows) — Official docs --- ## 快速使用 1. 在 vapi.ai 注册 2. 打开 dashboard.vapi.ai/workflows → New Workflow 3. 拖入 Say / Ask / Decision 节点,用可视化构建器连接 --- ## 简介 Vapi Workflows 是语音 agent 的可视化流程构建器 —— 拖拽节点(say-message / ask-question / run-tool / transfer-to-human / end-call)按条件连。替代任何比「一个 prompt → 多种响应」更复杂的手写状态机。适合客服、资格预审、预订这种有可预测分支的对话。Vapi 平台原生,可作为 Workflow 资产从任何 Vapi assistant 调用。装机时间 10 分钟(可视化构建器)。 --- ### 节点类型 | 节点 | 用途 | |---|---| | **Say** | bot 说一句固定话 | | **Ask** | bot 说话,然后等用户响应(带 VAD) | | **Decision** | 按意图分类或工具结果分支 | | **Tool** | 调你的后端(REST 端点) | | **Transfer** | 转给真人 / 另一个 assistant | | **End** | 优雅挂断 | ### Hello-world 流程 ``` [Start] → Say "Hi! I'm Acme's booking assistant." → Ask "Are you looking to book a new stay or modify an existing one?" → Decision { new → BookingFlow, modify → ModifyFlow, else → Transfer to human } [BookingFlow] → Ask "Great! What dates?" → Tool check_availability(dates) → Decision { available → ConfirmFlow, full → SuggestAlternatives } [ConfirmFlow] → Say "Got it. Confirming a 2-night stay May 10-12." → Tool create_booking(...) → Say "Booked! Confirmation sent to your phone." → End ``` ### 通过 API 构建 ```bash curl -X POST https://api.vapi.ai/workflow \ -H "Authorization: Bearer $VAPI_API_KEY" \ -d @workflow.json ``` 或用 dashboard.vapi.ai/workflows 的可视化构建器。导出的 JSON 跟 API 一样。 ### Workflow vs 自由 LLM 怎么选 | 用 Workflow | 用自由 LLM(assistant) | |---|---| | 对话有已知分支 | 开放问答 | | 需要合规 / 脚本 | 创意响应可以 | | 需要可预测的转接规则 | 边缘情况靠模型 | | 80% 的客服场景 | 礼宾 / 头脑风暴 | 也可以嵌套:一个 Workflow 可以包含「自由 LLM」节点,开放部分交给聊天 assistant,结束后回到流程。 --- ### FAQ **Q: Workflow 和 Squad 区别?** A: Workflow 是单个 agent 跟一个流程图。Squad 是多个 agent 互相切换(比如 greeter → booking → support)。通话内分支用 Workflow,不同人设用 Squad。 **Q: Workflow 能版本化吗?** A: 能 —— 每次保存生成一个新版本。在仪表盘或用 API 的 `workflow.versionId` 回滚。适合 A/B 测试流程变体。 **Q: 不打真电话怎么测 Workflow?** A: 仪表盘有「Test Call」按钮,用文字输入/输出模拟流程(没音频)。要全音频测试,Vapi playground 给一个免费测试号码。 --- ## 来源与感谢 > Built by [Vapi](https://github.com/VapiAI). Commercial product with free trial. > > [docs.vapi.ai/workflows](https://docs.vapi.ai/workflows) — Official docs --- Source: https://tokrepo.com/en/workflows/vapi-workflows-visual-voice-flow-builder Author: Vapi