HeyRik DocsBuild AI agentsDesign a conversational flow
Build AI agents

Design a conversational 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.

01

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.
02

Display the flow as a clear blueprint

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

01Open

Identify the business, purpose, and caller.

02Discover

Ask one ordered question per turn.

03Decide

Use knowledge, tools, and clear branches.

04Resolve

Complete, transfer, or follow up.

05Close

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.

03

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.

04

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

Perfect. I have a 3 BHK, around ₹80 lakhs, near Gachibowli. May a senior property expert call you with matching options?

Caller

Yes, tomorrow morning.

Structured result
qualified
property_type3 BHK flat
budget₹80 lakhs
locationGachibowli
follow_upTomorrow morning
outcomeQualified for expert follow-up
05

Evaluate before launch

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