# Design a conversational flow

> Learn how to structure an AI voice agent Conversation Flow with identity, ordered questions, guardrails, closing rules, complete configurations, and output examples.

Source: https://www.heyrik.com/docs/guides/conversation-flow

Give your agent a clear identity, an ordered path through the conversation, safe boundaries, and a natural close.

8 minute read Practical examples included

A Conversation Flow is the ordered list in `config.prompt_sections`. Each section handles a different part of the agent's behavior. HeyRik compiles enabled sections from the lowest order to the highest. In the dashboard, open the agent and edit this instruction document inside **Assistant Details**; it is not a separate builder tab.

**Why sections work better than one large prompt**

They make the agent easier to read, review, disable, reorder, test, and improve without mixing unrelated instructions.

## Anatomy of a reliable flow

Use a small set of sections with distinct responsibilities.

01

### Identity & purpose

You are a warm real-estate qualification agent. Your goal is to qualify the caller for a site visit.

**Avoid:** Be helpful and sell properties.

02

### Language restrictions

Speak only in Telugu and English. Use English for property terms, numbers, and locations.

**Avoid:** Speak naturally in any language.

03

### Conversational flow

Confirm the person, then ask property type, budget, location, and timeline—one at a time.

**Avoid:** Collect all lead information.

04

### Guardrails

Never quote an unknown price. Offer a senior expert when information is unavailable.

**Avoid:** Try to answer every question.

05

### Closing

Confirm the captured requirements, secure consent for a follow-up, thank the caller, and end.

**Avoid:** End when finished.

## Display the flow as a clear blueprint

A visual sequence helps teams understand the agent before reading the complete configuration.

01**Open**

Identify the business, purpose, and caller.

02**Discover**

Ask one ordered question per turn.

03**Decide**

Use knowledge, tools, and clear branches.

04**Resolve**

Complete, transfer, or follow up.

05**Close**

Summarize, confirm, and end naturally.

**Start**

Identity, greeting, and permission to continue.

**Discover**

One ordered question per turn.

**Decide**

Branch using the caller’s answer and trusted knowledge.

**Resolve**

Complete, transfer, or arrange a follow-up.

## Complete flow example

A full flow stays concise while making the sequence and safety rules explicit.

**Agent configuration**

```
{
  "name": "Real Estate Qualifier",
  "language": "te-IN",
  "greeting": "Namaskaram, I’m calling about your property enquiry.",
  "config": {
    "languages": ["te-IN", "en-IN"],
    "personality": "Professional",
    "prompt_sections": [
      {
        "order": 0,
        "enabled": true,
        "title": "Identity & Purpose",
        "content": "You are a warm real-estate qualification agent. Qualify the caller for a site visit."
      },
      {
        "order": 1,
        "enabled": true,
        "title": "Conversational Flow",
        "content": "Confirm the person. Ask property type, budget, location, and timeline—one question at a time."
      },
      {
        "order": 2,
        "enabled": true,
        "title": "Guardrails",
        "content": "Never invent pricing or availability. Offer a senior expert when unsure."
      },
      {
        "order": 3,
        "enabled": true,
        "title": "Closing",
        "content": "Confirm requirements and permission for an expert follow-up, then thank the caller."
      }
    ]
  }
}
```

**How HeyRik reads it**

```
1. IDENTITY
   I am a real-estate qualification agent.

2. GOAL
   Qualify this caller for a site visit.

3. SEQUENCE
   Confirm person → property type → budget
   → location → timeline.

4. SAFETY
   Do not invent price or availability.

5. COMPLETION
   Confirm details and follow-up permission.
```

**Updating the flow**

`config.prompt_sections` replaces the whole current flow. Send every section you want the agent to keep.

## Example conversation output

A good flow creates short turns, a visible sequence, and a clear outcome.

HeyRik agent

Namaskaram, I’m calling about your property enquiry. Am I speaking with Arjun?

Caller

Yes, this is Arjun.

HeyRik agent

Great, thank you. Are you looking for a flat, villa, or plot?

Caller

A three-bedroom flat.

HeyRik agent

Understood. What budget range would be comfortable for you?

Caller

Around 80 lakhs.

HeyRik agent

Thanks. Which location do you prefer?

Caller

Gachibowli or nearby.

HeyRik agent

You’re looking for a 3 BHK around ₹80 lakhs near Gachibowli. When are you planning to buy?

Caller

Within the next three months.

HeyRik agent

Thank you. May a senior property expert call you to discuss matching options?

Caller

Yes, tomorrow morning.

**Structured result**

_qualified_

property\_type**3 BHK flat**

budget**₹80 lakhs**

location**Gachibowli**

timeline**Within three months**

follow\_up\_consent**Yes**

follow\_up**Tomorrow morning**

outcome**Qualified for expert follow-up**

## Evaluate before launch

Read the flow as if you were the caller and check each condition.

**01**The agent’s identity and one primary goal are explicit.**02**Questions appear in a logical order and ask for one detail at a time.**03**The agent knows which languages and terms it may use.**04**Unknown facts have a safe fallback instead of an invented answer.**05**Transfer and escalation conditions are unambiguous.**06**The final confirmation and end condition are defined.
