An AI agent can confirm appointments and answer questions about logistics. It shouldn't answer questions about symptoms, side effects or medication. Handoff rules decide where that boundary is.
Handoff rules: keywords, no answer and the tool
Each bubbl3 AI agent has handoff rules:
- Keywords. When a contact's message contains one of them, bubbl3 hands off without asking the model. You can set up to 50: side effects, symptoms, dose, dosage, pain, the names of your medications.
- A turn limit. After that many turns in a conversation, the conversation is handed off to your team.
- No answer. When the model answers with neither text nor a tool call, the conversation is handed off. This is on by default.
- The handoff tool. The agent can decide to hand off by calling
handoff_to_human.
Keywords are the dependable part, because they don't depend on the model's judgment. Start broad and trim later.
Maya: MayaI've been dizzy since the new dose. Should I keep taking it?
"dose" is one of the keywords, so bubbl3 hands off without asking the model, and the conversation is assigned to your clinical team.
Handoff to human, the MCP tool
handoff_to_human is one of the MCP server's tools, available to bubbl3's own agents and to any MCP client you connect. When it's called, the conversation is marked for a person, the team is notified, and your agent.handoff webhook fires with the reason tool and the agent's note.
The note is written by a model. Show it to the clinician as plain text, and never treat it as instructions.
Routing to a team
Each agent's handoff rules name the team, or the person, a handed-off conversation is assigned to. Point telehealth agents at your clinical team, so the conversation lands in their inbox with the agent's note.
Your other systems can follow along: the agent.handoff webhook carries a reason from a fixed list, such as keyword, max_turns or tool, so you can page someone for some reasons and not others.
Audit trail
bubbl3 keeps a record of what the agent did:
- Each agent run is logged with its outcome (running, resolved, handoff or error), the handoff reason, and its steps: model calls, tool calls, messages, handoffs and guards.
- Every MCP tool call is logged with the tool, the outcome, how long it took and which key or identity made it. Message bodies, phone numbers and credentials aren't stored in that log.
Review the runs that ended in a handoff. If a person had to step in after the agent had already replied to something clinical, add that word to the keywords.
bubbl3 doesn't give medical advice and doesn't decide what clinical information you send. Your clinicians and your policies do.
You're responsible for having consent to text the people you message. bubbl3 honors opt-outs automatically on every channel.