All posts

Building agents

Flow agents or a single prompt: choosing the right build

A single prompt is quick to write and good at open conversation. Steps and paths win when a call has a shape you must keep. How to choose, what it costs, and how to move between them.

The Graine team

5 min read

Every Graine agent starts with one decision: describe the whole call in a single prompt, or build it as a flow of steps. Both are ordinary agents. They place and answer calls, run in campaigns, speak the same languages with the same voices, send the same webhooks and work on your website and in your app. What differs is how you describe the conversation, and that difference shows up in how predictable, how fast and how easy to change the agent is.

This post is a practical guide to choosing.

Two ways to describe a conversation

A prompt agent runs on one set of instructions that covers the whole call. On every turn, the model reads all of it, along with the conversation so far, and writes the reply. It is the fastest way to a working agent: write the prompt, test it, refine it.

A flow agent splits the call into steps, joined by paths. A short briefing that every step shares says who the agent is and why it is calling. Each step adds its own job: confirm who picked up, explain the reason for the call, agree a next step, say goodbye. Paths decide where the call goes after each turn. There are three kinds of step:

  • AI reply: the agent holds the conversation, following that step's instructions.
  • Fixed line: the same words every time, in the caller's language, played from audio prepared in advance.
  • Branch: says nothing, and sends the call one way or another at once.

And four ways a path can be taken: the AI decides, from a description such as "the caller agrees to a time"; a rule checks the call's data directly; always, as the step's fallback; or an event your own server sends into the live call.

When a single prompt is enough

A prompt agent suits conversations where the order does not matter much and every reply depends on what the caller says:

  • answering questions about your product or service;
  • an FAQ line, with a knowledge base behind it;
  • a friendly check-in or a feedback call;
  • a first version of any agent, while you learn what callers actually ask.

If you can describe a good call in a page and the agent follows it, keep it simple.

When a flow wins

A flow earns its extra structure when the call has a shape you need to keep:

  • One thing must happen before another. Identity is confirmed before an account is discussed, every time, not just usually.
  • Some sentences must be said word for word. A recording notice, a disclosure, a consent question or a price read back. A fixed line says exactly what your compliance team approved.
  • The call branches on data you already hold. The amount owed, the plan the customer is on, the day of the week where they live. A rule checks the value directly, with no model involved.
  • Something outside the call should move it. A payment that lands, a booking made on a web page. Only a flow can wait for an event.
  • The prompt has grown so long that the agent skips parts of it. Splitting it into steps keeps each part focused.
  • You need to explain what happened. For any call, you can see which step the conversation was on and why it moved on.

Here is the shape of a payment reminder, built as a flow:

Welcome: "Hello, this is a call from {business_name}."

[Check who it is]             AI reply
 |- AI decides: "The caller confirms they are the account holder"
 |    '-> [Check the amount due]          Branch, says nothing
 |          |- Rule: amount_due is above 0  -> [Agree a payment date]   AI reply
 |          '- Always                       -> [Goodbye]
 '- AI decides: "It's the wrong person"     -> [Goodbye]

[Goodbye]                     AI reply that ends the call

The branch never speaks. Once the caller confirms who they are, the next thing they hear comes from Agree a payment date, or from Goodbye when nothing is owed.

Cost and speed, in general terms

Exact figures depend on your models, languages and call lengths, but the shape of the trade-off is consistent.

  • A prompt agent reads its whole prompt on every turn. A long prompt is more to process on each reply, which adds to both cost and the pause before the agent speaks. Trimming the prompt is the first lever.
  • A flow agent reads the briefing and the current step, so a long script does not mean a long read on every turn.
  • Rules are free and instant. Deciding on data you already hold involves no model at all.
  • Fixed lines start at once. No reply is written and no speech is generated on the call, because the audio was prepared when you saved. (A line with a variable in it is spoken live instead, a moment later.)
  • Paths the AI decides cost a decision. On those turns, a decision model picks the path before the reply is written. Use rules wherever the data can decide, and keep AI-decided paths for what only the conversation can tell you.
  • Each step can have its own settings, such as a faster model for simple steps and a stronger one where judgement matters.

Moving from a prompt to a flow

You do not have to start again. In the agent editor, Convert to a flow agent reads your prompt and drafts the steps from it. You review and edit the draft, and a new flow agent is created with the same voice, model and call settings. The prompt agent you started from is left exactly as it was, still taking calls.

A safe way to move:

  1. Convert, then read every step. Tighten each step's instructions to one job.
  2. Replace must-say sentences with fixed lines, in every language the agent speaks.
  3. Turn data checks into rules, so the model is not asked what you already know.
  4. Test by chat and by call. For each test, check which step the call was on and why it took each path.
  5. Switch over deliberately. Point new calls and campaigns at the flow agent once it behaves, and keep the prompt agent until you are confident.

Going the other way is just as valid. If a flow has grown into many AI replies with "always" paths between them, it may be a conversation that wants to be a prompt.

A quick way to decide

If your call...Start with
is mostly questions and answers, in any orderA single prompt
must say some sentences word for wordA flow, with fixed lines
must do one thing before another, every timeA flow
branches on data you send with the callA flow, with rules
waits for something outside the callA flow, with events
is new, and you are still learning what callers askA single prompt, converted later

Build it with us

If you are not sure which shape your calls need, send us one call you want automated and we will tell you how we would build it: hello@graine.ai. Or create an account and start from a prompt or a flow template today.

Put it to work on your calls.

Tell us what your calls and your app need to do, and we'll show you how it runs on Graine. Or start building with your own account today.

Flow agents in the docs