What is an executable flow graph?
An executable flow graph is a structured map of a conversation's states, the decisions available at each state and the allowed transitions between them, which an AI agent runs step by step in real time, so that what the agent may say and do at any point is defined in advance rather than improvised.
Executable is the operative word. Plenty of teams draw conversation flows on whiteboards or in process documents. A flow graph is executable when the agent's runtime reads it directly: the agent knows which state it is in, which moves are open and which are closed. A language model still interprets what the customer says and phrases the reply. The graph decides what the reply is for.
How an executable flow graph works
A flow graph is built from five kinds of element. The examples below come from a loan inquiry, but the same parts appear in an insurance quote or a hotel group booking.
| Element | What it is | Example |
|---|---|---|
| States | Recognizable points in the conversation | Identity confirmed; purpose of the loan stated; objection raised |
| Decision points | States with more than one permitted next move | Ask about timing now, or address the rate concern first |
| Transitions | The allowed paths between states, triggered by what the customer says or provides | "I'd rather not give my income" leads to the explanation state, not the next field |
| Constraints | What must happen, what must not, and when to stop | A disclosure before any figure is quoted; never state an approval; escalate on a complaint |
| Data capture | Which details are collected at which state | Loan amount at the purpose state; contact details at the close |
At runtime the loop is short. The customer speaks or types. The language model interprets the input and maps it onto the graph. The graph returns the transitions available from the current state, and if there is a choice, a ranking step picks one. The model renders the chosen move as speech or text, and the system logs the state and the decision before moving on.
Why executable flow graphs matter
Large language models are fluent but unreliable on specifics. In a 2024 study by Dahl, Magesh, Suzgun and Ho, later published in the Journal of Legal Analysis, language models asked specific, verifiable questions about federal court cases produced hallucinated answers between 58% and 88% of the time, depending on the model.
Customer conversations are not court cases, but the lesson carries over. When a statement has to be exactly right (a fee, an eligibility rule, a required disclosure), generating it freely is a risk. A graph moves those statements out of improvisation and into defined states, while leaving the model free to handle the parts of a conversation where flexibility helps: understanding an unusual answer, rephrasing a question, matching the customer's tone.
The graph also makes the agent reviewable. A compliance team cannot approve every possible output of a prompt. It can approve a graph: the states, the permitted statements and the escalation rules are visible before launch and can be checked afterward against the logs.
Where executable flow graphs are used
Flow graphs earn their place where a conversation has a destination and rules along the way.
- Regulated sales. Lending, insurance and investment conversations, where specific disclosures are required and certain statements are prohibited.
- Multi-step applications. Account opening, quote-to-bind and enrollment, where order and data capture matter.
- Collections and payment arrangements. Conversations governed by contact rules, required notices and dispute handling.
- Bookings with conditions. Group reservations, property viewings and appointments with eligibility or deposit rules.
For open-ended questions with no fixed outcome, such as product research or general support, retrieval over a knowledge base is often enough and a graph adds little. The structure is worth building when the organization would be uncomfortable with two customers in the same situation getting two different answers.
What a good executable flow graph looks like
- Derived as well as drawn. The sequence reflects how successful conversations actually unfold, from analysis of real recordings, not only the official process document.
- Off-path handling. There are defined states for "the customer said something unexpected," and each routes somewhere sensible instead of stalling.
- Versioned. Every change is dated, reviewed and attributable, so any conversation can be traced to the graph version that ran it.
- Testable. Each path can be replayed against scripted test conversations before release.
- Readable by non-engineers. Business owners and compliance reviewers can read the states and rules without reading code.
- Logged. Every run records the states visited and the decisions taken.
How to measure an executable flow graph
- Path completion. The share of conversations that reach a successful end state, such as a submitted application or a booked appointment.
- Off-path rate. The share of turns that fall into fallback states. A rising rate means the graph has gaps.
- Drop-off by state. Where conversations end, located to the specific state rather than to "somewhere in the middle."
- Constraint adherence. The share of required disclosures delivered and prohibited statements avoided, verified on the logs. The target is all of them.
- Outcome by version. The business result of each graph version compared with the one before, on comparable traffic.
Rules that bear on executable flow graphs in the United States
Flow graphs are often adopted because of regulatory expectations about predictability and records. The main US points are below; requirements elsewhere differ, and the EU AI Act adds transparency duties for systems that interact with people and stricter obligations for high-risk uses such as creditworthiness assessment.
- Reasons for credit decisions. Under the Equal Credit Opportunity Act and Regulation B, a creditor that takes adverse action must give the applicant the specific principal reasons. If an agent's path contributes to a credit outcome, the reasons need to be recoverable from the log.
- Model governance in banking. Bank supervisors expect models used in business decisions to be validated, documented and placed under change control. A versioned graph fits that framework better than an undocumented prompt.
- Statements the agent makes. Under the FTC Act, and for consumer financial products under the prohibition on unfair, deceptive or abusive practices, what an agent says is the company's statement. Defining permitted statements in advance is the practical control.
- Record retention. Several regulated industries must keep business communications for set periods. Broker-dealers, for example, preserve communications under SEC and FINRA rules, and conversation logs fall within that scope.
Frequently asked questions
Is an executable flow graph the same as a script?
No. A script fixes the words. A flow graph fixes the structure: the states, transitions and constraints. Within a state, the agent phrases its reply naturally and in response to what the customer actually said.
Does a flow graph make an AI agent rigid?
Only where it should be. Constraints are firm, but between them the language model handles phrasing, interruptions and unexpected answers. Well-built graphs include fallback states so that an unusual turn does not end the conversation.
How is a flow graph different from a phone menu tree?
A phone menu waits for the caller to choose from a fixed list of options. A flow graph interprets free speech or text and can move in any permitted direction from the current state.
Who should own the flow graph?
Usually three parties: a business owner accountable for outcomes, a compliance owner accountable for constraints, and an engineering owner accountable for the runtime. Changes should need sign-off from all three.
How are flow graphs built?
Either authored by hand from process documentation, or derived from analysis of recorded conversations and then reviewed. Authoring captures what the organization intends; derivation captures what actually works. Most production graphs combine both.
Related terms
A path your compliance team can read.
Encore AI compiles the flow graph from how your top performers already win, then runs it on voice, chat, SMS, WhatsApp, email, IVR, IVA and agentic landing pages with every decision logged.
Scale your best to be the best.
Book a Demo