Agents (Early Access) · Use case
An agent that reads each new patient message as it lands in your secure inbox, then handles it one of three ways — it replies with your booking link when the ask is routine, asks for the one missing detail when something's needed, or hands the message to your team whenever it reads clinical. It never gives medical advice itself.
Beta note: This article covers the Keragon Agents early-access release. Behaviour, limits, and UI may change during the early access period; this page is updated on a rolling basis as we learn from early adopters.
| Who it's for | Front-desk and care teams who sort a shared secure inbox or patient-portal messages by hand. |
| Apps it uses | A secure patient-messaging app (like Spruce Health) and a staff chat app (like Slack). |
| What fires it | A new inbound patient message. |
The scenario
A patient message lands in the shared inbox, and someone on your team runs the same check by hand:
- Open the message and read it in full.
- Decide: is this admin, or is it clinical?
- If it's admin — paste in the booking link and reply.
- If it's clinical — flag a nurse or provider, with context.
- If it's a mix of both — figure out what to do with the half you can't answer.
Take a patient who writes that her chest has felt tight since this morning and she's a little short of breath. If that sits unread behind a stack of refill and scheduling messages, the one message that needed a clinician fast is the one that waited longest.
How it works
The agent reads one inbound message and sorts it into one of three lanes. It only ever does one thing per message — it never both replies to the patient and escalates the same message.
Read the whole message. Pull the latest inbound text (and any voicemail transcript) for the conversation, and look up the patient so the reply has a name to use.
Answer when it's routine. Send one warm, secure reply with your booking link for an everyday, non-clinical ask — and ask only for the missing detail when one is needed. No clinical guidance, ever.
Escalate when it's clinical. Hand any symptom, medication question, or worsening condition to your staff channel with the patient's name, a one-line gist, and a link back to the conversation. No reply with advice.
Log the lane. Tag the conversation with the lane it landed in (routine, needs-info, or urgent/clinical) so your team can see what the agent did and why.
The adaptable agent
This is an example message-triage agent — a ready-to-use starting point. Use it as-is to see how it works, then change the highlighted fields so it matches how your practice runs day to day.
It's made of two kinds of pieces:
- Fixed pieces hold the agent's judgement and the safety rules that keep it from ever advising a patient. Leave these as they are.
-
Fillable pieces (shown in
[BRACKETS]) are the details you swap for your own apps, channel, and booking link.
Trigger
What starts the agent.
| Trigger | When it runs |
|---|---|
| New inbound message | Each time a patient message arrives in your secure inbox. |
Instructions
Paste this into your agent. Change the highlighted [BRACKETED] fields to match your practice; leave the rest as it is.
Full instructions — paste into the agent
TRIGGER CONTEXT
You run each time a new patient message arrives in [SECURE_MESSAGING_APP].
The message comes with a conversation id, a contact id, and a reference to
the message. You handle one message each run.
STEPS
1. Read the message. Use [SECURE_MESSAGING_APP] to get the conversation items
for the conversation id, and read the latest inbound message (plus any
voicemail transcript).
2. Look up the patient. Use [SECURE_MESSAGING_APP] to get the contact for the
contact id, so you have a name and details for the reply.
3. Decide which lane the message belongs in. This is your own judgement — read
the message and sort it into exactly one of three lanes:
• urgent_or_clinical — any symptom, medication or clinical question,
worsening condition, mental-health concern, or anything that needs a
clinician's judgement. When you're unsure how urgent it is, choose this.
• needs_info — an everyday request you can't act on yet because a key
detail is missing (e.g. asks to reschedule but gives no date or provider).
• routine — an everyday, non-clinical ask you can answer with a booking
link or standard info.
4. Do the one thing that matches the lane:
• routine - send one secure reply through [SECURE_MESSAGING_APP] with the
booking link [BOOKING_URL], warm and non-clinical.
• needs_info - send one secure reply asking only for the missing detail.
No clinical guidance.
• urgent_or_clinical - do not reply to the patient with advice. Post to
[STAFF_CHAT_APP] channel [STAFF_CHANNEL] with the patient's name, a
one-line gist, the reason, and a link back to the conversation. A person
takes it from here.
5. Log the lane. Tag the conversation in [SECURE_MESSAGING_APP] with the lane
(routine, needs_info, or urgent_or_clinical). If tagging isn't available,
add a note instead.
Routine reply template (change the wording, keep it non-clinical):
"Thanks for reaching out! You can book a time that works for you here:
[BOOKING_URL]. If anything feels urgent, please call us or seek care."
WHEN SOMETHING'S UNCLEAR
- A message mixes an everyday ask WITH anything clinical or symptom-related -
treat the WHOLE message as urgent_or_clinical and escalate. Never send a
booking link on a mixed message.
- A message you can't read (empty, media-only, or an untranscribed voicemail)
- don't sort it. Post to [STAFF_CHANNEL] noting it couldn't be read, and stop.
- More than one patient matches the contact - don't reply. Post the
conversation reference to [STAFF_CHANNEL] for a person to match, and stop.
- When in doubt about urgency - escalate to a person. Never guess a lane.
WHEN YOU'RE DONE
- The message ended up in exactly one lane.
- The matching action happened (one secure reply OR one staff-channel post),
and the lane was tagged.
GUARDRAILS
- Never give the patient clinical advice, a diagnosis, triage instructions, or
medication guidance. Routine and needs_info replies are admin only.
- When unsure of urgency, escalate to a person.
- Try a failed step up to 3 times before stopping.
- Send at most one secure reply to the same patient per run.
- When the run is finished, stop.Tools to select
Tools are the actions you let your agent take inside your apps.
| Role | What we used here | What it's for |
|---|---|---|
| Trigger | New inbound message | Starts the agent when a patient message arrives. |
| Secure messaging | Spruce Health — get conversation items, get contact, send secure message, tag the conversation | Where the agent reads the message, looks up the patient, sends the reply, and logs the lane. |
| Staff chat | Slack — send message | Posts clinical messages to the channel your team watches. |
Swap any of these for the equivalent tool your practice already uses.
Deciding which lane a message belongs in is the agent's own reasoning — a step it does itself, not a tool you add. Keragon agents have a model built in, so there's no separate AI tool to enable here.
What to fill in
These are the only things you change so the agent fits your practice. Everything else stays the same.
| Field | What to put | Example |
|---|---|---|
[SECURE_MESSAGING_APP] |
The secure patient-messaging app you use | Spruce Health |
[STAFF_CHAT_APP] |
The team chat app you use | Slack |
[STAFF_CHANNEL] |
The channel your clinical staff watch | #clinical-triage |
[BOOKING_URL] |
Your self-scheduling link | https://yourclinic.com/book |
What it produces
Every time it runs, the agent sorts each message into one of three lanes, based on what the message is asking for:
| Outcome | What the message showed | What the agent did | Why |
|---|---|---|---|
| Answered (routine) | An everyday, non-clinical ask — "I'd like to schedule my annual physical sometime next month." | Sent one warm, secure reply with the booking link, and tagged the conversation routine. |
An admin-only ask just needs an admin-only reply — a single message with the booking link, nothing escalated. |
| Escalated (urgent/clinical) | A symptom report — "My chest has been feeling tight since this morning and I'm a bit short of breath." | Sent the patient no reply, posted to #clinical-triage with the name, a one-line gist, the reason, and a link to the conversation, and tagged the conversation urgent_or_clinical. |
A symptom needs a clinician, so the agent steps back and hands a person the full context — it never gives the patient advice. This is the core safety behaviour. |
| Escalated (mixed message) | A booking ask buried with a medication question — "Can I book a follow-up? Also my new blood-pressure med is making me dizzy — should I keep taking it?" | Sent no booking link, escalated the whole message to #clinical-triage, and tagged it urgent_or_clinical. |
There's a real routine ask in there, but the medication question makes the whole message clinical — so the agent treats it as clinical and hands all of it to a person. |
Routine reply to the patient (verbatim)
Secure reply to patient (verbatim)
Thanks for reaching out! You can book a time that works for you here: <booking link>. If anything feels urgent, please call us or seek care.
Urgent escalation to staff (verbatim)
Staff-channel post (verbatim)
Triage: Priya Anand — chest tightness + shortness of breath since this morning. Acuity: urgent_or_clinical. Spruce conversation: <conversation id>. No patient reply sent.
Try a variation
- "Send billing questions to a separate
#billingchannel instead of replying with the booking link." (add a billing branch on the message's intent) - "When a message is needs-info, ask only for the preferred date and provider — nothing else." (that's the default — make the fields explicit)
- "Post clinical escalations to two places — the nurse channel and the on-call provider." (list both in
[STAFF_CHANNEL]) - "Swap Spruce Health for our patient portal and Slack for Microsoft Teams." (change
[SECURE_MESSAGING_APP]and[STAFF_CHAT_APP])
Make it yours
- Change the highlighted fields, not the rest. The three lanes, the mixed-message rule, and the "escalate when unsure" rule are what keep the agent safe — leave those as they are.
- Match your own apps. Swap Spruce Health and Slack for the secure-messaging app and team chat your practice already uses.
-
Point it at the right channel. Set
[STAFF_CHANNEL]to a channel a person actually watches — an escalation nobody sees is the same as no escalation. - Keep the lanes separate. A message is answered or escalated, never both. If you add a branch, make sure it still lands in exactly one lane.
- Let it ask for help. When a message reads clinical — or is a mix of admin and clinical — the agent hands it to a person on purpose. Keep it that way — it reads and routes, it never diagnoses or tells the patient what to do.
Helpful articles
- Create your first agent — the build flow from trigger to tools.
- Set up your agent's trigger — schedule vs event, and when to use each.
- Test your agent before publishing — how to read a run and confirm each step.
- Troubleshooting agents — what to do when a run loops, stalls, or a tool call fails.
- Patient intake → triage & routing — the sibling use case: read a messy intake and route it to the right person.