Guide · Hybrid agents
Build your first hybrid agent
A hybrid agent runs your flows for the tasks that must go exactly to plan, like booking an appointment, and lets AI answer everything else from your knowledge base. This guide builds one for a small clinic.
- Plan Pro and above
- Time about 20 minutes
- Code none needed
1What you're building
Flexaura has three kinds of agent. A generative agent writes every reply with AI. A deterministic agent follows a flow you drew and never lets AI write a reply. A hybrid agent does both, and decides which for every message:
Your flow answers
- When a message starts one of your tasks: a button, a keyword, or a message that means the same as one of your example phrases.
- When it answers the question the flow just asked.
- Word for word, exactly as you wrote it. 1 credit.
The AI answers
- Everything your flow doesn’t cover: prices, treatments, “do you take my insurance?”
- From your prompt and knowledge base, like a generative agent.
- It can also start one of your tasks when that’s what the visitor wants. Credits as for the AI model.
If a visitor asks something else while the flow is waiting for an answer (“how much is it?” when asked for a date), the AI answers that, and the flow asks its question again right after. Nothing is lost.
1Is the flow waiting for an answer to a question?
YesGo to the next question.
NoSkip to question 3.
2Does the message answer it?
YesThe flow carries on.
NoThe AI answers the aside, then the flow asks its question again.
3Does the message start one of your tasks (a button, a keyword or a matching phrase)?
YesThe flow runs that task.
NoThe AI answers from your knowledge base, or starts one of your tasks if that's what the visitor wants.
How each message is handled. The flow always gets the first look.
The example
A clinic’s assistant. One flow, Book an appointment, asks which service, a day, morning or afternoon, a name and a phone number, then emails the front desk. Everything else (“what does a check-up cost?”, “where do I park?”) is answered by AI from the clinic’s price list and FAQ.
2Create the agent
The AI half of a hybrid agent is set up exactly like a generative agent, so creating one starts with the same wizard.
- Click + New agent and choose Hybrid (“Flows for key tasks, AI for the rest”), then Create hybrid agent. On the Free plan the card shows an upgrade link instead.
Work through the six steps, clicking Next after each:
- Basics: the agent’s name, the name visitors see, and an avatar.
- Personality: the System prompt and tone. Describe the business and how to talk, for example You are the front desk assistant for Ridge Dental Clinic in Accra. Answer questions about our treatments, prices and opening hours from the knowledge base. Be brief and friendly. You don’t need to describe your flows here: the AI is told about your tasks automatically.
- Model: which AI model answers. A smaller model (such as GPT-4o mini) costs fewer credits per reply.
- Knowledge: upload the documents the AI should answer from: a price list, an FAQ, your policies.
- Channels: web chat, and email if your plan has it.
- Publish: Publish agent.
- You land on the agent’s flow page, with an empty flow. Until you publish a flow, the agent already chats: it answers everything with AI, like a generative agent.
3Give it a flow
The flow page is the same one deterministic agents use, so everything in Build your first flow agent applies. The quickest start is a template.
- Click Start from a template, pick Appointment request, keep its saved tests ticked, and confirm. The canvas fills with the booking flow: a menu, a Ask for step per detail, a Confirm, a Notify by email to your team and an End.
- Make it yours. Click
pick_serviceand change the services to your own. Clicktell_teamand replacebookings@example.comwith your front desk’s address: the flow won’t publish while it still has the example address. - Click the Book an appointment intent badge. It already has keywords (appointment, book, booking) and ten Example phrases such as do you have any free slots. A hybrid agent always matches by meaning, so a message like “can someone see me on Thursday?” starts the booking without any of those keywords. Add phrases your own visitors use.
- Click Save draft, then Publish.
In a deterministic agent the fallback menu greets everyone who says something it doesn’t recognise. In a hybrid agent those messages go to the AI instead, so visitors only see the menu when they ask for it (typing menu or start over) or when the AI can’t be reached.
4The AI answer step
Sometimes a flow needs an answer that lives in your documents in the middle of a task. After someone picks Consultation, say, you might want to tell them what a consultation involves and costs. That’s the AI answer step, which only hybrid agents have.
- Click + Add step → AI answer, and name it
explain_service. - In What should the AI answer? write the instruction, for example Explain what a, then pick
servicefrom the { } button, then involves and costs, from the knowledge base. - Link it between
pick_serviceand the next step, save and publish.
The AI writes one reply, without asking anything, and the flow moves straight on. If the AI can’t be reached, the step says nothing and the flow carries on.
Anything that must be said word for word (a disclaimer, an agreed price, a legal notice) belongs in a Message step, which is never rewritten. Use AI answer only where an answer in the AI’s own words is fine. Anything you put in the instruction with {{ }} is sent to the AI.
5Test it
Click Test on the flow page and try each way a message can go:
What would you like to book?
The aside is answered by AI, and the waiting question comes back with its buttons. The price here comes from the clinic’s own knowledge base.
- A keyword such as book: the flow answers on its own.
- A question your flow doesn’t cover, such as do you do teeth whitening?: the AI answers from your knowledge base.
- A task in other words, such as I’d like to come in this week: matched by meaning, or the AI starts the booking for you.
- An aside mid-task: while the flow waits for an answer, ask something else. The AI answers, and the question is asked again.
Expand steps under a reply to see what happened. AI replies say which model wrote them and what they cost, for example AI (gpt-4o-mini) wrote the reply · 1 credit, or that the AI started a task.
Saved tests
Saved tests work as for flow agents, with one difference: they never call the AI, so they stay fast, free and repeatable. Where a message would go to the AI, the test shows [Answered by AI] instead (and AI answer steps show [AI answer]). In the test form, hybrid agents get two extra checks per message:
| Check | What it does |
|---|---|
| Goes to the AI | Yes: the flow should hand this message to the AI. No: the flow should handle it itself. |
| If so, the AI starts | An intent name, like book. The test pretends the AI started that task, and carries on through the flow. |
Save as test in the Test drawer fills both in from your chat.
6Where each setting lives
A hybrid agent has two halves, and each is edited where its generative or flow counterpart is. The flow page links to the others at the top.
| To change | Go to |
|---|---|
| The flow, its secrets, verified visitors, versions and saved tests | The flow page (Edit flow in the agent’s menu) |
| The AI's prompt, model, knowledge base, name, avatar and chat look | AI settings: the same wizard as a generative agent |
| The AI's tools (buttons, saving facts, handing off, your API tools) and the handoff email | Tools on the flow page, or Workflow in the agent’s menu |
| Embed code for your website | The flow page, Put it on your website |
AI usage on the flow page lists which AI providers see the conversations: OpenAI, which checks every message and matches messages by meaning, and your model’s provider, which writes the AI’s replies. A hybrid agent can’t switch these off. If you need an agent that sends nothing to any AI provider, create a deterministic agent.
7Improve it from real conversations
Every message the AI answers costs more than one the flow handles, and a task the AI had to start is one your flow could have recognised itself. The agent’s Analytics page shows where to tighten up:
- Answered by AI: the share of conversations where the AI wrote a reply, and in how many it started a task.
- How messages were understood: how many messages started a task by a button, a keyword, a typo, their meaning or the AI, and how many the AI answered without one.
- Handed to the AI: the messages themselves, most common first. Click + Add to an intent on one to add it to an intent as an example phrase or keyword. Where the AI started a task for that message, that intent is already picked.
Additions go into the flow’s draft. Publish the flow to use them; the next visitor who says the same thing goes straight into the task, for 1 credit.
8Good to know
- Safety checks are the same as for generative agents: every incoming message and every AI-written reply is checked by OpenAI’s moderation service. Your flow’s own replies aren’t rewritten.
- What the AI sees: your prompt, knowledge base and the conversation so far, including the flow’s replies. It doesn’t see your flow’s variables, secrets or your systems’ API responses, apart from what the flow already said to the visitor.
- Asides have a limit. On one question the AI answers up to 3 asides. After that, answers that don’t fit count as failed tries again, so the question’s way out (a handoff, usually) still works.
- Typos still ask first. “boook” offers “Did you mean Book an appointment?” rather than going to the AI.
- Answers are remembered within a conversation. Start the same task twice and steps that already have an answer (a name, a phone number) skip their question, unless you tick Ask even if it’s already answered on that step.
- If the AI can’t be reached, the message gets your flow’s fallback step (usually the menu), so the visitor always gets a reply.
- On a plan without flows, the agent keeps chatting, answering everything with AI, until you upgrade again.
- Credits: a message the flow handles costs 1 credit; one the AI answers costs what its model costs, as for a generative agent. Your own API key (bring your own key) makes AI replies 1 credit too.
Every step type, including AI answer, is explained in the Flow step handbook.