Dograh

How to Make a Conversation Flow for AI Voice Agents

How to Make a Conversation Flow for AI Voice Agents
TechnicalDecember 1, 2026·14 min read

How to Make a Conversation Flow for AI Voice Agents

Pritesh Kumar
Pritesh Kumar·Co-founder, Dograh AI

Building Dograh, the open-source alternative to Vapi. OSS and Voice AI. Exit founder and YC alum.

To make a conversation flow, build each voice agent turn as a loop. The agent lets the caller finish, acknowledges the request, restates the constraint, asks one question, offers the next step and confirms it. Dograh, the open-source AI voice agent platform, builds the flow from nodes and edges. You can self-host it or run it on Dograh Cloud.

Key Takeaways

  • Set pause length from real call traces, never from one fixed number.
  • Read back high-stakes details like payment dates before any tool commits them.
  • Change one behavior per test and replay the same recorded calls.

A voice agent can get every word right and still feel wrong to talk to. We cover the turn loop, timing from call data, fillers and interruptions, read-backs, live-call diagnosis and a pre-launch test, then show how each piece maps onto a workflow in Dograh.

The six-step loop every turn should follow

Picture a caller who asks to move an appointment and says mornings won't work. The agent replies with a flat request for a preferred time. The words are polite, yet nothing shows the agent heard the constraint, so the caller has to say it again. Build each turn as a closed loop instead of a string of separate replies. A study in the International Journal of Listening tested active listening, paraphrase included, in first conversations between strangers, and the paraphrase is the part of the loop that shows a caller they were heard.

A caller tells a voice agent to move an appointment because mornings won't work. Around the call, six numbered cards run in a loop: let the caller finish, acknowledge the change, restate the constraint (afternoons only, highlighted), ask one question, give the next action, confirm the result. A dashed arrow labeled next turn leads back to step 1.
When the agent skips the restatement, the caller ends up saying the same thing twice. Move past step three only once the caller's own detail has come back to them.

The loop has six moves. First the agent lets the speaker finish, judging completion from the sentence, the intonation and the context, because a quiet line doesn't always mean the thought is done. Second it acknowledges the request itself, the appointment change, instead of offering a generic greeting. Third it restates the detail that changes what it can do, afternoons only, without repeating the whole transcript. Fourth it asks the one question that blocks progress, such as which day would work.

Fifth it gives the next action, the open afternoon slots, and never describes an action as done before the tool reports success. Sixth it checks that the result matches what the caller wanted before closing the task, and leaves room to correct a detail without starting over.

Underneath, write the flow as states for listening, interpreting, clarifying, answering and confirming, with a repair state the agent enters whenever confidence is low or the caller contradicts a stored detail. Skip clarification when the request can already be acted on, since the loop doesn't require speech at every state. Stacked questions make it unclear which answer fills which field, and Recepta.ai's advice on how to ask better questions on customer calls helps when you rewrite those crowded turns. For a quick audit, mark the loop beside a handful of recordings and note where the agent skipped the restatement or closed without checking. Fix the most frequent miss before you add anything to the script.

Setting turn timing from real call data

People hand over the floor quickly. A cross-language study of turn-taking in PNAS found that speakers in all ten languages it studied avoid talking over each other and keep the silence between turns short, with the typical gap shifting by a fraction of a second from one language to the next. Treat that as a picture of human coordination. It is no endpointing setting for a phone agent.

A fixed pause fails in both directions. Cut it too short and the agent grabs turns the caller hadn't finished. Stretch it too far and callers wonder whether the line dropped. Tune it from production traces that include slow speakers, corrections, background noise and tool calls.

One pattern helps. When completion cues appear, the agent can start generating a reply in the background while playback waits for the endpointing window to close, and any caller speech stops playback at once. That early reply must stay cancellable and can never authorize a tool action with consequences. Measure the time from the moment the caller actually stopped to the first audible response, then split it into endpointing, generation, speech synthesis and backend waits so an engineer can see which stage costs the most. Our playbook on speech latency covers that breakdown.

SignalWhat it usually meansWhat the agent doesWhat sets the timing
Gap after a complete questionThe turn has likely endedStarts a reply and holds playback until the endpointing window closesYour endpointing window, tuned from traces
Filler such as "um" or "uh"The caller is still thinkingKeeps listening and stays quietFresh signs the turn is complete
Backchannel such as "mm-hm"A listener signal with no new requestCarries on and cancels any reply queued on a mistaken handoffClassifying the sound before the state moves
Caller speaks while the agent talksAn interruptionStops playback, keeps the dialogue state and resumes with a short acknowledgmentSpeech detection, with an immediate stop
Silence during a backend lookupThe agent is workingPlays a brief acknowledgmentTool wait time, never the endpointing timer
Silence after an unfinished sentenceThe caller may go onWaits for completion before treating the pause as a handoffFalse-endpoint rate in your traces

Track p50, p95 and p99 response latency alongside interruption rate, false-endpoint rate and the share of tasks recovered after an interruption. Define response latency the same way every time, including whether the first audio is an acknowledgment or a real answer. A faster first sound is no gain if the caller has to repeat the request afterward. The settings fit when traces show few false interruptions and reviewers find no unexplained dead air, so check both outcomes rather than chasing the latency chart alone.

Dograh

Open Source Alternative to Vapi / Retell

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

dograh-hq/dograh

Star on GitHub

Reading pauses, fillers and backchannels correctly

A caller says "um", goes quiet, then corrects the request. If the agent starts answering in that gap, a warmer prompt won't fix it, because the missing behavior is signal classification. The agent has to tell participation apart from a real handover of the floor. More questions don't make better listening either. Huang and colleagues' study on question-asking links follow-up questions with greater liking, and a follow-up builds on what the caller just said, which another scripted question can't do. Stay on the caller's topic instead of opening a new branch whenever the conversation slows.

Respond to what each signal does. Fillers and half-words mean the caller may continue, so a search for the right word never becomes a new agent turn. A minimal "okay" can mean the caller heard you without asking for anything, and if it lands during an agent pause, cancel any queued speech that assumed a new request. A self-correction replaces the disputed detail in working state, and the old value never stays on as an equal instruction.

After an interruption, resume from the open point with a short acknowledgment and skip replaying the introduction. Frustration shaped like a question, such as "why is this so hard?", usually wants acknowledgment unless the caller is really asking for an explanation. For teams wiring this up, MartLLM's server-sent events streaming guide is a useful reference for incremental text delivery. Keep that transport concern apart from the decision to play speech.

Evaluate interruption rate, missed-turn rate, backchannel frequency, repair success and topic preservation. There is no right number of backchannels to aim for. What matters is whether each acknowledgment supports the caller without competing for the floor.

Confirming names, amounts and dates without stalling

When a caller asks for a change, acknowledge it, interpret it and move forward. Say a caller asks to move a payment date. The agent confirms it heard, restates that the payment date needs to change and asks whether Friday or Monday works. The acknowledgment shows attention, the restatement exposes a possible misunderstanding early, and the question narrows the next action. The Oxford Handbook chapter on conversational interaction treats repair as a central part of dialogue, so a check-in is ordinary conversation and never a sign the exchange has failed.

Match the confirmation to the stakes. A caller asking for clinic hours needs the hours and room for a follow-up, with no read-back. Payments, cancellations, transfers and appointment changes need explicit confirmation before anything runs, so the agent states the proposed action and waits for a clear yes. Silence is never consent, and a filler is never approval. Confirm the decision the caller is authorizing, which may differ from the last word the recognizer caught. Keep proposed values apart from committed values in the workflow, so a yes authorizes the stated action and never whatever operation happens to be queued behind it.

Repair only the detail in dispute. Read the value back clearly, keeping the caller's format where you can but expanding ambiguous dates and spelling names when needed. Ask whether that one value is right instead of asking for approval of a long summary. If the surname is unclear, ask for the surname again and leave the appointment details alone. Resolve conflicting values before they reach the payment or scheduling tool. Our post on getting names, numbers and emails right covers recognition and read-back for each kind of field.

Keep the apology brief. The useful reply to a correction is the updated value and the next step, with the accepted details kept so the caller never has to rebuild the request.

Diagnosing flow breaks on live calls

The complaint usually sounds simple. The agent talks over people or leaves dead air. The cause isn't always endpointing, since a recognizer may have dropped a trailing phrase, a tool may still be running, or the workflow may be waiting for a confirmation nobody asked for. Inspect the call trace before changing a setting, and compare incoming audio, transcript revisions, endpoint decisions, tool runs and outbound playback. Our guide to debugging voice agent call traces shows how to separate those events.

SymptomLikely causeFixMetric to watch
Agent talks over the callerEndpointing window too shortLengthen the window and tune it from production tracesFalse-endpoint rate
Long dead air after the caller finishesWindow too long or a slow backend lookupShorten an excessive window and acknowledge backend lookupsp95 response latency
Caller repeats the same answerDetail misheard or never confirmedEnter repair and confirm only the disputed detailRepair rate
Agent restarts its whole answer after an interruptionDialogue state not keptCancel queued speech and resume from the last relevant pointTasks recovered after an interruption
Agent asks several questions in one turnClarifications stacked togetherAsk one question, then reassessClarification turns per successful task
Caller hangs up or asks for a personRepeated misunderstanding with no way outOffer a handoff after failed repairsAbandonment rate

Pick the fix from the order of events. If the endpoint decision came promptly and the tool returned late, a different silence threshold won't remove the wait, so give a truthful acknowledgment that work is underway and look at the backend separately. If the agent restarts after an interruption, inspect state retention and output cancellation, because throwing away stale audio is different from throwing away the caller's accepted details. Never lower the repair rate by blocking clarification. Check whether the agent finishes the right task.

Size the work after reading the traces. An acknowledgment line or an endpointing tweak is a small configuration change, while reworking repair transitions needs wider regression testing because it changes which state follows a correction. For each failing call, log the symptom, the turn, the suspected cause, the change and the metric that moved, plus a reviewer's judgment of the outcome so a better dashboard number can't hide a worse conversation.

Join the Dograh Community

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

Running one real-call test before you launch

Start with the call type that takes the most of your team's attention, such as appointment changes or payment reminders. Map its scripts, exceptions, tool actions and handoffs to people before touching timing, or you'll tune a workflow whose success condition is still unclear. Use authorized recordings with access controls, and keep tools with real consequences in a sandbox.

Then run a small comparison you can repeat. Gather about twenty representative calls for that task, including corrections, hesitations and failures, and mark the six-step loop on each to find where the agent's reading drifted from the request. Work out a baseline for task completion, clarification turns per successful task, repair rate and abandonment, each with a written definition. Change one behavior, endpointing or the confirmation policy, never both together, and run the evaluation again.

Replay the same audio where you can, then use controlled live calls to see how people react to the new timing. Recorded replay tests perception consistently, but it can't reproduce a caller who adapts after being interrupted, so keep that limit in mind when you read the results. For broader launch preparation, BubblyPhone's voice agent checklist for startups complements the call-level test without replacing it.

Building the conversation flow in Dograh

In Dograh a conversation flow is a graph. A Start Call node opens the call, each Agent Node runs one focused exchange with its own prompt, and an End Call node closes it. Edges join the nodes, and each carries a condition in plain words that the model reads to decide when to move on, plus optional Transition Speech, fixed text or a recorded clip that plays as the call moves. A Global node holds the tone and fallback rules every node shares, and variable extraction on a node captures details such as the new date or the caller's surname as the call goes.

The timing controls sit in the agent's settings. Turn Detection offers a transcription-based mode or the Smart Turn Analyzer, a model that judges whether a turn is finished, with an Incomplete Turn Timeout for the pauses slow speakers leave. Allow Interruption is set per node, so the agent can stop for the caller during questions and still finish a read-back or disclosure in full. The Interruption Strategy can wait for a minimum number of transcribed words before cutting the agent off, so a short "mm-hm" is less likely to stop it. For backend waits, an HTTP API tool's Messages can play a line such as "Let me check that" when the request starts and a later update if the lookup runs long.

When repairs keep failing, Transfer Call hands the caller to a person, dialing the destination first and connecting the caller only when someone answers. Each call's View Trace shows speech-to-text, AI and voice time for every turn, and a QA node scores each step of finished calls with tags, a 1 to 10 score and a summary. On Dograh Cloud, and on a self-hosted install connected to a free Dograh account, you can describe the flow to the Agent Builder in plain words, approve the requirements it lists and review the nodes and edges it builds before adjusting them on the canvas. A server with no internet access builds on the canvas directly.

Running it on your own servers means no per-minute platform fee, though servers, model keys and phone minutes still cost money and your team looks after the database and upgrades. Support comes from the open-source community, and Enterprise adds custom SLAs and a dedicated account manager. If you'd rather not host it, Dograh Cloud runs it for a 1¢-a-minute platform fee. Pick the call type you mapped, build it at Dograh and run it against the recordings you gathered.

Glossary

Endpointing
The decision that the caller has finished a turn. Set too early it cuts people off, and set too late it leaves dead air.
Backchannel
A short listener sound such as mm-hm or okay that shows attention without taking the turn.
Conversational repair
Fixing a misunderstanding inside the conversation, for example by asking again for one misheard detail instead of restarting the task.
p95 latency
The response time that 95% of turns beat. It exposes the slow turns that an average hides.

Frequently Asked Questions

Built with Outrank tool

Get started with Dograh

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