Dograh

How to Build a Voiceflow-Like Voice Agent With Open Source Tools

How to Build a Voiceflow-Like Voice Agent With Open Source Tools
TutorialDecember 4, 2026·13 min read

How to Build a Voiceflow-Like Voice Agent With Open Source Tools

Abhishek Kumar
Abhishek Kumar·Co-founder, Dograh AI

Co-founder of Dograh, building the future of open-source voice AI agents. Own your voice AI stack.

To build a Voiceflow-like voice agent with open source tools, pick models for phone audio, draw the flow on a canvas, add knowledge and API tools, then connect a phone number and a web widget. Phone-first teams can build on Dograh, the open-source AI voice agent platform built around phone calls. Self-host it or run it on Dograh Cloud.

Key Takeaways

  • Design for the phone first, since most calls reach the agent as 8 kHz audio.
  • Write shared instructions once in a Global Node, then one Agent Node per job.
  • In Dograh, the same agent answers the phone line and a website chat widget.

Voiceflow made it easy to lay out an agent's playbooks and workflows on one screen, and that view is worth keeping. We rebuild that shape in Dograh, our open-source AI voice agent platform, with the phone call designed first, and end with a test on a real line.

What you need and where Dograh runs

These steps follow the published Dograh and Voiceflow docs. Run them on a trial server before production, with a test number, so the first caller never reaches an unfinished agent. You need a phone number on a carrier such as Twilio, Telnyx or Plivo, keys for the models you pick, the documents the agent answers from and the APIs it should call. If the agent will also sit on your website, you need access to the site's pages to paste one script tag.

The platform itself is open code. Every part of Dograh, from the canvas to the telephony layer, ships under the BSD 2-Clause license, and the Docker Compose setup brings it up on a machine with 8 GB of RAM and 4 vCPUs or more. Enterprise plans add on-prem deployment, and call recordings and transcripts stay on servers you run.

A self-hosted Dograh has no per-minute platform fee. Servers, model keys and phone minutes still cost money, and your team looks after the database and upgrades. The community supports the open-source version, and custom SLAs come with Enterprise. Dograh Cloud runs the same product for a 1¢-a-minute platform fee with 10 concurrent calls included. Our Voiceflow pricing breakdown covers Voiceflow's plans and credits.

Check: After you sign in, the sidebar lists Providers, Models and Telephony.

How Voiceflow's parts map to Dograh

Voiceflow's docs organize an agent into instructions, playbooks, workflows, knowledge and tools, deployed to a web chat widget, phone numbers or SIP. Each part has a match in this build, shown at product level below, and our Voiceflow migration guide maps an existing export field by field.

VoiceflowWhere it lives in this build
InstructionsGlobal Node, added to each step with Add Global Prompt on
PlaybooksAgent Nodes, one per job
WorkflowsPathways between nodes, each with a written condition
AtlasBuilder tab, which edits the agent by chat as a draft
KnowledgeKnowledge Base Files attached per node
API tools and MCPExternal HTTP API tool and MCP Server tool
FunctionsAn endpoint you host, called by an HTTP API tool
Web chat widgetAdd to Website, with a Chat Agent or Voice Agent widget
Phone numbers and SIPTwilio, Telnyx, Plivo, Vonage, Vobiz, Exotel, Cloudonix and Asterisk ARI
Outbound callsCampaigns, or the API Trigger from your own system
Human handoffTransfer Call tool
Tests and evaluationsTest Audio, Test Chat and the QA Analysis node
Environments and version historyDrafts and published versions
Traffic splitsAgents & traffic split on a campaign

Open-source directories such as OpenAlternative's Voiceflow list mix chat-first builders with voice frameworks. This build starts from the phone call and adds the chat widget as a second channel of the same agent.

Step 1: Pick models that hear phone audio well

A phone agent depends on what it hears, so choose the models before the flow. Most phone calls still reach the agent as 8 kHz audio, while a browser demo runs at 16 kHz, and a speech-to-text model that sounds perfect in a demo can stumble on a real line.

Add your provider keys under Providers, then create a configuration under Models with a speech-to-text model, a language model and a voice, or use Dograh's own models. Select Make org default, or pick the configuration in the agent's Model tab, since models are chosen per agent. The platform runs the call flow, tools and telephony, and the speech and language models are a layer you choose on top of it.

Product names and jargon are where phone audio hurts most. Open the agent's Settings, add the words to the Dictionary as one comma-separated list and select Save Dictionary, so the speech-to-text model listens for them. Our post on custom vocabulary covers which providers use the list.

Check: The agent's Model tab shows your configuration, and the Dictionary lists your product names.

Step 2: Create the agent in the builder or on a canvas

There are two ways to start. You can describe the agent in plain language to the Agent Builder, or draw it yourself on a blank canvas. The builder runs on Dograh's hosted models, so a self-hosted install connects to a free Dograh account to use it.

Pick Create Agent under Voice Agents, and choose Use Agent Builder or Blank Canvas. In the builder, describe the phone line, for example "an agent that answers our support line, checks order status and passes refund requests to our team", approve Your agent requirements, and it builds the flow for you to fine-tune on the canvas.

After launch, the Builder tab takes the role Voiceflow gives Atlas. Describe a change in plain words, and it edits the agent as a draft while the published version keeps answering calls.

Check: The editor shows Builder, Canvas, Model, Variables and Settings tabs.

Step 3: Turn instructions and playbooks into nodes

Voiceflow's building blocks map neatly onto the canvas. Shared instructions go in the Global Node, whose prompt is added to every step that has Add Global Prompt switched on, so the persona and the handoff rules are written once.

Each playbook becomes an Agent Node with one job, such as checking an order or booking a repair, and its own prompt and tools. Workflows become pathways between nodes, and each pathway carries a condition written in plain words, which the model reads to pick the next step. An End Call node closes each branch.

Write every prompt for the ear. Ask one question per turn, keep replies to a sentence or two, and read numbers back in small groups, since a caller cannot scroll back. The Start Call node's Greeting Text is spoken word for word, so it is the place for the business name and anything that must sound the same on every call.

Check: The Global Node holds the shared rules, each job has its own Agent Node, and every pathway has a written condition.

Dograh

Open Source Alternative to Vapi / Retell

Self-hosted voice agent platform — no per-minute fees

dograh-hq/dograh

Star on GitHub

Step 4: Tune interruptions for spoken calls

Turn-taking decides whether a phone agent feels natural or clumsy. Allow Interruption on each Agent Node lets the caller cut in while the agent talks, and it is on for every new Agent Node. Switch it off on a node that must be heard in full, such as a disclosure.

On the Start Call node, Allow Greeting Interruption is on by default. On agents with separate speech and language models, Minimum Words to Interrupt sets how many words the caller must say before the greeting stops, 2 by default, so a cough does not cut it short. For a greeting that must be heard in full, such as a recording notice, switch Allow Greeting Interruption off, and the caller's words are kept until the greeting ends.

Check: In Test Audio, talking over a long answer stops the agent, and a node with Allow Interruption off finishes its line first.

Step 5: Ground answers in your knowledge base

Voiceflow's Knowledge becomes Knowledge Base Files, uploaded once and attached where they are needed. Open Files in the sidebar and upload your help articles and policies as PDF, DOCX, DOC, TXT, JSON or Markdown, up to 5 MB each. Choose Full Document for short files, or Chunked Search, which uses the embedding model in your model configuration, for long ones.

Then select the files on each Agent Node under Knowledge Base Documents. The agent searches only the files attached to the node it is on, so a billing node never reads the repair manual. Files written for reading need trimming before they sound right aloud, as our post on knowledge-base grounding explains.

Check: In Test Chat, a question from your help articles gets its answer from the right file.

Step 6: Connect your systems with API tools

Voiceflow's API tools and MCP map straight across. Under Tools in the sidebar, an External HTTP API tool sends a request with the method, endpoint, credential and parameters you set, and the agent gets the whole reply back, so have your endpoint return only the fields the agent needs. If the system already runs an MCP server, one MCP Server tool brings all of its tools in.

Voiceflow Functions, the code that runs inside Voiceflow, become a small endpoint you host, which an HTTP API tool calls. The tool waits 5 seconds and does not retry, so keep that endpoint quick and tell the agent what to say on an error. Lines in the tool's Messages card, When the tool starts and While the tool is running, fill the pause during a slow lookup.

Code labeled Functions sits inside Voiceflow's cloud and becomes a small server the team hosts. On a call, a caller asks an order question, the voice agent's HTTP API tool sends a request to that server and gets a short reply back, and the agent speaks a filler line while the slow lookup runs.
Code written as a Voiceflow Function moves to a server your team runs, and the agent reaches it through a tool in the middle of the call. If that server is slow, a line the agent speaks while it waits fills the gap for the caller.

For data the agent needs from the first word, use Pre-Call Data Fetch at the bottom of the Start Call node. It sends a POST with the caller's details to an endpoint you run, and that endpoint finds the caller and sends back just what the agent will use. Until your endpoint answers, the caller hears the phone ring, and the greeting starts with the data in hand.

Check: In a browser test, an order question triggers the lookup tool, and the agent reads back only the fields your endpoint returned.

Join the Dograh Community

Dograh is an OSS alternative to Vapi. Join our Slack community for queries, releases, best practices & community interactions.

Step 7: Connect the phone line and handoffs

Phone calls come in through your own carrier account. Open Telephony in the sidebar, select Add configuration and pick Twilio, Telnyx, Plivo, Vonage, Vobiz, Exotel, Cloudonix or Asterisk ARI for your own SIP trunk or PBX. Add the number there, and choose this agent in the number's Inbound workflow field.

Voiceflow's human handoff becomes the Transfer Call tool. Transfer Call works on Twilio, Telnyx, Plivo, Cloudonix and Asterisk ARI. Dograh calls the destination first and connects the caller only when someone answers. If nobody does within 30 seconds, a time you can change, the agent gets "transfer_failed" and keeps the caller.

Outbound calls run as Campaigns from a CSV file with a phone_number column, or from your own system through an API Trigger node. Each campaign runs its Call Schedule in one Timezone. It starts on your browser's time zone, or your last scheduled campaign's, so set it to your callers' zone. Set Max Retries and Retry Delay yourself to match your calling policy.

Outbound calls also meet answering machines. On agents with separate speech and language models, the agent's Settings hold Enable voicemail and screening handling, and once it is on, When voicemail is detected lets you pick Disconnect the call or Leave a message, so decide whether a voicemail should carry your number.

Check: A call to the number reaches the agent, and a transfer on a real call rings your team first.

Step 8: Add the website widget to the same agent

The website gets the same agent, so one flow serves callers and visitors. In the agent's Settings, find Add to Website, select Configure Widget, add your site under Allowed Domains and choose a Widget Type. Voice Agent gives visitors a spoken call in the browser, while Chat Agent gives them a typed chat with the same prompts and tools.

Pick Floating Widget for a button in the corner, Inline Component for a panel inside a page section, or Headless to drive it from your own buttons. Chat sessions last up to an hour and show in call history with a transcript. Each mode is laid out in the Add to Website guide, and page context and domain rules are in our post on adding a voice widget safely.

Check: On an allowed page, the widget opens, answers a question from your knowledge files, and the chat appears in call history.

Step 9: Test it on a real phone line

A phone-first agent is only proven on the phone. Start with Test Audio and Test Chat in the editor, where Rerun this turn and Edit and rerun this turn replay one step after a prompt change, then place a real call with Phone Call.

Listen for the moments a browser hides, such as clipped product names and long pauses during a lookup. Transfer Call needs a real phone line, so check every handoff there. Once Langfuse tracing is connected in Platform Settings, View Trace on a run lays out each turn's transcription, the prompt the language model received, its reply and any tool calls, which helps you find where a turn went wrong.

Two nodes close the loop. The QA Analysis node scores every step of a call, and the Webhook node posts results to your system once the call ends. It adds a call_disposition key, retries temporary failures up to five attempts in all, and also fires on every unanswered try.

Check: A real call runs the main path with your product names spelled right in the transcript, and one transfer connects.

Before you ship it

Publish when the phone tests pass, and treat later edits as a staging step. Changes in the Builder tab or on the canvas stay a draft until you select Publish, which gives you the safety Voiceflow teams expect from environments.

For outbound lists, Agents & traffic split on a campaign shares calls between two versions, so a new prompt can face the old one on real calls. In our experience with teams, reviewing a random 5 to 10% of live calls through the QA node is enough to see an agent drift. The first weeks also bring call reasons nobody planned for, so read transcripts and add those calls to the flow.

Glossary

Global Node
A Dograh node holding shared instructions, added to every step that has Add Global Prompt on, like Voiceflow's instructions.
Pathway
The Dograh version of a Voiceflow workflow step. It joins two nodes and holds a plain-language condition the model checks before moving on.
Allow Interruption
A per-node switch, on for new Agent Nodes, that lets the caller cut in while the agent is speaking.
Chunked Search
A Knowledge Base mode for long files. It breaks each file into pieces and pulls in only those that fit the question, and it uses the embedding model in your model configuration.

Frequently Asked Questions

Get started with Dograh

Build, deploy, and scale AI agents with Dograh. Join the community of developers building the future.