4 ready-to-build workflows

AI agent workflows for Elder care & home nursing

Cover dropped home visits, triage device readings against the care plan, and keep adult children updated in their own language — with a nurse-in-charge owning every dispatch and every care-plan change.

Each recipe below is expressed only in VegaDūta's real workflow building blocks — Trigger, Agent, Knowledge, Condition, Approval, Output, Tool (MCP), Voice, Device, Loop, Code and Parallel — so it maps 1:1 to something you can assemble in the Workflow designer. Consequential actions always pass a human Approval step.

1. Dropped home visit → covered, with the dispatch human-approved

06:20, and a nurse messages the coordinator: fever, can't come in. Her six visits today include a dressing change, an insulin administration and two frail clients who cannot be left. The coordinator opens the roster — a Google Sheet printed every Sunday and stuck on a whiteboard with magnets — and starts down a WhatsApp group of forty carers, typing 'anyone free in Jayanagar 11am?' Some reply, some don't, some are already double-booked on a row of the sheet she hasn't scrolled to. She phones four people. By 09:00 half the day is covered, three families have been told, and she genuinely cannot remember which three.

Trigger: WhatsApp from the carer, or Webhook (rostering app marks unavailable)

How the workflow runs

  1. Trigger

    Carer reports unavailability. The carer's own WhatsApp/SMS message, or a Webhook from the rostering app, opens the gap — the same message she already sends, now starting a workflow instead of a scroll.

  2. Knowledge

    Load acuity and skill rules. A scoped Knowledge collection supplies YOUR documented client-acuity tiers, the skill/qualification matrix and the travel and shift-hour rules — the things currently held in the coordinator's head.

  3. Agent

    Rank the affected visits by care need. An Agent node ranks the affected visits: which are clinically unskippable, which are skill-gated (injection, catheter, wound), which can shift by hours. It applies the written rules and makes no clinical judgement of its own.

  4. Parallel

    Check the whole pool at once. A Parallel node evaluates candidate carers simultaneously — qualification match, travel feasibility from their previous visit, shift-hour limits — replacing the serial phone round and the 'anyone free?' broadcast that reaches forty people and answers nobody.

  5. Tool (MCP)

    Hard skill gate (user-defined SpEL tool). A tenant-authored tool `skill_gate` (SpEL, e.g. input.visitSkills.contains('INJECTION') ? input.carerQualifications.contains('RN') : true) enforces qualification matching deterministically. A skill gate must never be a model's judgement call — as an expression it is auditable, testable, and editable by the nursing lead when a qualification rule changes.

  6. Condition

    Anything still uncovered?. A Condition node splits covered from uncovered. An unskippable visit with no qualified carer escalates to the nurse-in-charge instead of being quietly rescheduled to tomorrow.

  7. Approval

    Nurse-in-charge dispatches. An Approval node holds every reassignment — sending a specific carer to a specific frail client is a clinical staffing decision with a duty of care attached, so a qualified human confirms each dispatch and each skill match.

  8. Output

    Tell carers, clients and families. On approval, an Output node messages assigned carers with the visit detail, and clients/families on WhatsApp or an ElevenLabs Voice call (Sarvam-localised) with who is coming and when — the step that silently fails today.

  9. Tool (MCP)

    Write the roster and any extra-visit charge. A Tool (MCP) node updates the rostering system; where cover triggers a chargeable out-of-cycle visit, an approved Razorpay UPI payment link goes to the family. Nothing is auto-debited, ever.

Channels & connectors

  • Webhook
  • WhatsApp
  • SMS / Twilio
  • Voice / Call
  • ElevenLabs
  • Sarvam
  • Razorpay (UPI)
  • Approval / HITL
  • Tool (MCP → rostering / billing)

Outcome

A dropped shift becomes a ranked, skill-matched cover proposal within minutes, and once the nurse-in-charge dispatches it, every carer, client and family is told automatically — no whiteboard, no forty-person broadcast, no trying to remember who was called.

Why it helps

The mechanism is parallel search plus guaranteed notification. The coordinator's slow step is a serial phone round against a printed sheet; evaluating the pool in parallel against documented skill and travel rules collapses that to a single decision. And the step that fails most often — telling the family who is now coming — becomes an automatic consequence of the dispatch rather than a task someone has to remember at 09:00 on a bad morning.

Build spec

2 agents1 acuity/priority agent (once per gap) + 1 cover-matching agent invoked across the pool by the Parallel node. Qualification matching is a deterministic SpEL tool; the dispatch approval, the notifications and the roster write are workflow nodes. · Pattern: Priority ranking → Parallel candidate matching with a SpEL skill gate → human dispatch approval → guaranteed multi-party notification

System prompt (paste-ready)

You are a home-nursing roster assistant for {{provider}}. Given the affected visits of an unavailable carer, rank them using ONLY the client-acuity tiers and skill rules in Knowledge. Return strict JSON per visit {visit_id, client_ref, acuity_tier, required_skills[], skippable, latest_safe_time, candidate_carers[{carer_ref, skill_gate_result (copied from the `skill_gate` tool), travel_feasible, within_shift_limits}]}. You propose cover — you never dispatch, never message a client, and never mark a visit skippable unless the documented rules say it is. You must NOT make any clinical judgement about a client's condition, and must NOT alter the care plan or medication. If no qualified carer exists for an unskippable visit, return escalate=true for the nurse-in-charge.

Agent roles & model tiers

  • Acuity ranker (per gap) Standard tier with a fallback model — this ranking decides which frail client is seen first, and a 06:20 outage cannot mean no ranking at all

    Rank affected visits strictly by documented acuity tiers and skill gates. Never infer clinical need beyond the written rules; unskippable-with-no-cover ⇒ escalate=true.
  • Cover matcher (per candidate carer, run in Parallel) Economy tier with fallback — many short mechanical checks per gap

    For ONE candidate carer, take the `skill_gate` verdict as authoritative, then check travel feasibility from their prior visit and shift-hour limits, returning a structured verdict with reasons. Roster facts only — never assume willingness or availability.

MCP connectors

  • Rostering / home-care management system — via Tool (MCP): read today's roster and carer availability, then write the approved reassignment against the visit id
  • Carer HR / qualification register — via Tool (MCP): fetch each candidate's current qualifications and expiry dates to feed the skill gate
  • Billing system — via Tool (MCP): raise the out-of-cycle visit charge once approved, and attach the Razorpay UPI payment reference to the client's account

Built-in tools

  • user-defined tool `skill_gate` (SpEL): input.visitSkills.contains('INJECTION') ? input.carerQualifications.contains('RN') : true — the agency's own qualification rule as a deterministic expression, so a skill gate is never a model's opinion and the nursing lead can update it the day a qualification policy changes
  • user-defined tool `visit_fee` (SpEL): input.outOfCycle ? (input.baseFee + (input.afterHours ? input.nightSurcharge : 0)) : 0 — the extra-visit charge computed by formula, so the family sees the same number the agency's price list says
  • knowledge_search (client-acuity tiers, skill/qualification matrix, travel and shift-limit rules)
  • http_request (read roster and availability; write approved reassignments; issue an approved payment link)

Guardrails

  • No dispatch happens without the nurse-in-charge's approval — the agent proposes cover, a qualified human sends a carer to a client
  • The agent makes no clinical judgement about a client and never touches the care plan or medication; it applies only the documented acuity and skill rules
  • Skill gates are enforced by the `skill_gate` SpEL expression as hard filters, never soft preferences a model can trade away against travel time
  • A visit is skippable only if the written rules say so — an unskippable visit with no qualified carer escalates rather than being rescheduled
  • Money movement is gated twice: a human approves the charge, and the family receives a Razorpay UPI link — nothing is ever auto-debited
  • Roster writes are keyed to the visit id, so a re-trigger cannot double-assign a carer or double-charge a family

Cost strategy

The matcher is the multiplied term — once per candidate carer per gap — so it stays on the economy tier and hard-capped; the Parallel node buys wall-clock speed, not extra cost per check. The acuity ranker runs once per gap and is where standard tier earns its keep, because that single ranking decides which frail client is seen first. Both carry a fallback model: a 06:20 provider outage is exactly the morning you cannot afford to be back on the whiteboard.

Output & delivery

The gap opens by the carer's own WhatsApp message or a Webhook → a standard-tier agent ranks affected visits on documented acuity rules → a Parallel node runs cheap per-carer checks across the pool with the `skill_gate` SpEL tool as a hard filter → the Condition node escalates any uncovered unskippable visit → the nurse-in-charge dispatches at the Approval node → an Output node notifies carers, clients and families (WhatsApp and ElevenLabs Voice, Sarvam-localised) → a Tool (MCP) node writes the roster and, only if approved, issues a Razorpay UPI link for a chargeable extra visit.

2. Home device readings triaged against the care plan — escalated, never diagnosed

The family bought a BP monitor, a glucometer and a fall sensor. Every evening the daughter photographs the cuff's display and posts it into a WhatsApp group called 'Amma Care' with the agency's day nurse in it. The nurse reads the group when she can, which is not after 18:00 and not on Sundays. Some readings go into a spiral notebook kept on the client's shelf, in the carer's handwriting, in whatever units she remembered. A drift builds over four days across a photo, a notebook page and nobody's memory. When the fall sensor fires at 23:10, it fires into an app on the son's phone in another city, and the first the agency hears is his call at 23:22.

Trigger: Device / Webhook (BP, SpO2, glucose, weight, fall sensor)

How the workflow runs

  1. Device

    Reading arrives. A Device or Webhook trigger receives the reading from the home device or its vendor cloud — no photograph, no group, no transcription into a notebook. Consumer health devices have no first-party connector: Webhook in, vendor cloud read via a Tool (MCP) node.

  2. Knowledge

    Load THIS client's care-plan bands. A scoped Knowledge collection supplies the per-client parameters set by that client's own clinician — escalation bands, trend rules and the named on-call ladder. Population norms are never used.

  3. Tool (MCP)

    Band check by formula (user-defined SpEL tool). A tenant-authored tool `band_check` (SpEL, e.g. input.systolic >= input.plan.systolicEscalate ? 'ESCALATE' : (input.systolic >= input.plan.systolicWatch ? 'WATCH' : 'WITHIN_PLAN')) performs the comparison deterministically against that client's plan values. A clinician-set threshold must behave identically at 23:10 and at 11:00 — an expression guarantees that, and the nursing lead can update a client's bands after a review without waiting on a developer.

  4. Agent

    Frame the fact (no diagnosis). An Agent node turns the deterministic verdict into strict JSON {status, parameter, value, units, band_breached, plan_escalation_route, note} for the ladder. It never names a condition, never explains a cause, never suggests an action beyond the plan's own route, and never overrules the formula.

  5. Condition

    Reading, drift, emergency, or broken cuff?. A Condition node separates in-band readings (logged), watch-level drift (nurse review queue), plan-defined escalation or a fall alert (immediate route), and device faults — an implausible value or an error code goes to a human to check the equipment, not to a clinical alarm.

  6. Approval

    On-call nurse owns the escalation. An Approval node holds the escalation for the on-call nurse. For plan-defined emergencies the node runs the SOP's fast path with a hard timeout that auto-escalates UP the human ladder — never a bypass that lets the agent act alone.

  7. Voice

    Reach the named ladder. A Voice/Call node (ElevenLabs; Sarvam for Indian languages) calls the on-call nurse, then the named clinician, with SMS/WhatsApp backup — reading out the parameter, the value and the band crossed as facts.

  8. Loop

    Retry until someone acknowledges. A Loop node re-runs the documented ladder at the SOP's intervals until an explicit human acknowledgement is captured; an exhausted ladder raises a supervisor alert. This is the 23:10 gap, closed.

  9. Output

    Log it against the care record. A Tool (MCP) node writes the reading, the classification and the acknowledgement trail to the care record — so the four-day drift is visible next time as data, not reconstructed from a photo and a notebook.

Channels & connectors

  • Webhook
  • Voice / Call
  • ElevenLabs
  • Sarvam
  • SMS / Twilio
  • WhatsApp
  • Knowledge base
  • Approval / HITL
  • Tool (MCP → care record / device cloud)

Outcome

Every reading is checked against that client's own clinician-set bands as it arrives, drift becomes a reviewable queue instead of a surprise, and a plan-defined escalation reaches a named human with retries and a written trail — at 23:10 and on Sundays.

Why it helps

The mechanism is continuous comparison against a per-client plan plus a persistent contact ladder. Home telemetry does not fail because readings are missing; it fails because nobody is watching the WhatsApp group at 23:10 and nobody records what happened next. Comparison is cheap and constant, and the retry Loop plus the acknowledgement trail supply exactly the two things a family later asks about: was anyone told, and when.

Build spec

2 agents1 framing agent (per reading — the high-volume step) + 1 trend agent (scheduled, over a client's recent window). The band comparison is a deterministic user-defined SpEL tool; the escalation approval, the ladder and the record write are workflow nodes. · Pattern: Deterministic SpEL band check → cheap per-reading framing → Condition split → human-owned escalation with timeout-escalates-UP → retry ladder

System prompt (paste-ready)

You frame ONE home-monitoring reading for THIS client's care team. The WITHIN_PLAN / WATCH / ESCALATE verdict has already been computed deterministically by the `band_check` tool against this client's own care-plan values — take it as given and NEVER overrule it. Return strict JSON {status, parameter, value, units, band_breached, plan_escalation_route, note}. Use only this client's documented bands — never population norms, never general medical knowledge. You must NOT name or suggest any medical condition, must NOT explain what the reading might be caused by, must NOT recommend or change any medication or dose, and must NOT advise the client or family what to do. If the value is implausible, the units are wrong, or the device reports an error, return DEVICE_FAULT so a human checks the equipment rather than raising a clinical alarm.

Agent roles & model tiers

  • Reading framer (per reading) Economy tier with a fallback model — fires on every device reading, so it sets the entire cost curve, and a provider outage must never silence a fall sensor

    Take the SpEL band verdict as authoritative and emit strict JSON for the ladder. No condition names, no causes, no advice, no medication commentary. Implausible value or device error ⇒ DEVICE_FAULT to a human.
  • Trend reviewer (scheduled, per client window) Standard tier with fallback — runs infrequently over a window of readings, and is what a nurse actually reads

    Summarise the recent reading window factually for the nurse's review queue: direction, magnitude, missed readings, and which documented WATCH rules were met. Cite actual values and actual counts — never estimate, never interpret clinically, never suggest a diagnosis or a plan change.

MCP connectors

  • Home device vendor cloud (BP cuff, glucometer, SpO2, weight scale, fall sensor) — via Tool (MCP): pull the reading payload and the device's own error/battery status, and backfill missed readings after a connectivity gap
  • Care record / home-care system — via Tool (MCP): append the reading, its classification and the full acknowledgement trail against the client id
  • On-call roster — via Tool (MCP): resolve who is on call for this client right now before the ladder starts dialling

Built-in tools

  • user-defined tool `band_check` (SpEL): input.systolic >= input.plan.systolicEscalate ? 'ESCALATE' : (input.systolic >= input.plan.systolicWatch ? 'WATCH' : 'WITHIN_PLAN') — this client's clinician-set bands as a deterministic expression, updated by the nursing lead after a care review without a developer or a deployment, and behaving identically at 23:10 as at 11:00
  • user-defined tool `reading_line` (SpEL): input.parameter + ' ' + input.value + ' ' + input.units + ' (plan band ' + input.plan.label + ')' — one consistently formatted line for the voice script, the SMS and the care-record entry, so all three say exactly the same thing
  • knowledge_search (this client's care-plan thresholds, trend rules and named escalation ladder)
  • http_request (fetch device history; write the reading, classification and acknowledgement to the care record)

Guardrails

  • The agent never diagnoses, never names a condition, never explains a cause and never touches medication or dose — it reports only which documented band was crossed
  • The band decision is deterministic (`band_check` over this client's own plan values), so it cannot drift with a model change; the agent is explicitly forbidden from overruling it
  • Thresholds are per-client and clinician-set; population norms and general medical knowledge are out of bounds
  • Every escalation is owned by the on-call nurse at the Approval node; the emergency fast path has a hard timeout that escalates UP the human ladder and never lets the agent act alone
  • Implausible values, wrong units and device errors return DEVICE_FAULT and route to a human — a broken cuff must not raise a clinical alarm, and a flat battery must not read as a silent client
  • Client- and family-facing messages state facts and next steps only, never reassurance or interpretation
  • An exhausted ladder alerts a supervisor; the workflow cannot close an escalation by itself, and every attempt is written to the care record

Cost strategy

This is the highest-volume workflow in the pack — several readings per client per day, every day — so the framer must be economy tier and hard-capped, with a fallback model configured because a provider outage here means a fall alert with nowhere to go. Moving the comparison into the `band_check` SpEL tool also removes the reasoning burden from that highest-volume step, which is the cheapest optimisation available. The trend reviewer runs once per client per window, not per reading, which is exactly where a standard-tier model is affordable. The ladder consumes telephony minutes rather than tokens, since retries replay the composed script.

Output & delivery

A Device/Webhook reading lands → a scoped Knowledge collection supplies that client's clinician-set bands and the `band_check` SpEL tool returns a deterministic verdict → an economy-tier agent frames it as strict JSON with no clinical interpretation → the Condition node logs, queues, escalates or flags a device fault → the on-call nurse owns the escalation at the Approval node (timeout escalates UP the human ladder) → ElevenLabs Voice plus SMS/WhatsApp run the named ladder inside a retry Loop → a Tool (MCP) node writes the reading, classification and acknowledgement trail to the care record.

3. Daily family update in the family's own language

The carer writes the visit note in a paper file kept in a drawer at the client's house — three lines of shorthand, 'BP ok, took lunch half, walked to gate w/ support'. Nothing leaves that house. The son lives in Pune and works nights; the daughter-in-law reads Kannada, not English. So the son rings the agency office at odd hours, and whoever picks up walks to the coordinator's desk, who checks the roster sheet for which carer went, then rings the carer, then rings the son back. Every retelling is slightly different, and the daughter-in-law — who is the person actually at the house each morning — is told nothing at all.

Trigger: Webhook (visit completed / carer note submitted) or scheduled daily digest

How the workflow runs

  1. Trigger

    Visit note is submitted. A Webhook fires when the carer completes the visit in the app (or a scheduled digest collects the day's visits) — the note leaves the drawer and becomes an event.

  2. Agent

    Turn shorthand into plain, factual language. An Agent node rewrites the carer's note for the family: what was done, meals and fluids, mobility, mood, and what is planned next. It reports only what the carer wrote — no assessment, no prognosis, no reassurance.

  3. Condition

    Anything the carer flagged for a nurse?. A Condition node checks for carer-flagged concerns and plan-defined trigger words; those never go to the family as a routine update — they divert into the clinical review queue first.

  4. Approval

    Nurse reviews anything flagged. An Approval node holds any flagged update for the nurse-in-charge, who decides what is communicated and by whom before the family hears it.

  5. Tool (MCP)

    Per-contact channel and language (user-defined SpEL tool). A tenant-authored tool `contact_route` (SpEL, e.g. input.contact.prefersVoice ? 'VOICE' : (input.contact.whatsapp ? 'WHATSAPP' : 'SMS')) resolves each registered contact's channel and language from the care record. Family communication preferences change constantly — a formula the coordinator edits herself keeps that current without a ticket.

  6. Output

    Send in each person's own language. An Output node sends on each consented contact's own channel — WhatsApp, SMS, Telegram or Email — Sarvam-localised, so the Kannada-reading daughter-in-law finally gets the same update as the English-reading son.

  7. Voice

    Voice for those who prefer it. For an elderly spouse or a contact who does not read comfortably, a Voice/Call node with ElevenLabs delivers the identical factual update by phone in the same language.

  8. Agent

    Answer questions within a hard boundary. A bounded reply agent handles logistics — who is visiting tomorrow, at what time, how to change a visit, invoice questions. Any clinical question ('should we take her to hospital?', 'can we stop the tablet?') is refused and routed to the nurse-in-charge with context.

Channels & connectors

  • Webhook
  • WhatsApp
  • SMS / Twilio
  • Telegram
  • Email
  • Voice / Call
  • ElevenLabs
  • Sarvam
  • Approval / HITL
  • Tool (MCP → care record / rostering)

Outcome

Every consented family contact gets the same factual daily update on their own channel in their own language, and the calls that still come in are logistics — because clinical questions are routed to a nurse by design rather than by whoever answers the phone.

Why it helps

Two mechanisms. Consistency: an update generated from the carer's actual note says the same thing to every contact, unlike a chain of retellings through the office, the coordinator and the carer. Access: a Kannada- or Hindi-reading relative who currently receives nothing gets exactly the same information — which is what removes the anxious 22:00 call, not any promise of reassurance.

Build spec

2 agents1 note-to-plain-language agent per visit + 1 bounded reply handler for family questions. Channel/language routing is a deterministic SpEL tool; the flag check, the nurse review and the per-contact fan-out are workflow nodes. · Pattern: Note rewrite → clinical-flag diversion → SpEL per-contact routing → localised fan-out → bounded replies with mandatory nurse handoff

System prompt (paste-ready)

You rewrite a home-care visit note into a short, plain-language update for the client's registered family contacts. Include ONLY what the carer actually recorded: care tasks completed, meals and fluids, mobility, mood, and the next scheduled visit. You must NOT add any assessment of how the client is doing, any prognosis, any reassurance ('she's doing well'), any concern the carer did not write, any medical terminology absent from the note, and NOTHING about medication beyond whether a scheduled dose was recorded as given. Never diagnose, never advise, never suggest a care-plan change. If the note contains a carer-flagged concern or a plan-defined trigger word, do NOT produce a family update — return {flagged: true, quote} so a nurse reviews first. Localise into each contact's registered language.

Agent roles & model tiers

  • Note rewriter (per visit) Economy tier with a fallback model — short bounded rewriting, once per visit per day across the whole client book

    Rewrite the carer's note into plain factual language and localise it. Content strictly limited to what was recorded; no assessment, no reassurance, no added medical terms. Flagged concern ⇒ stop and return {flagged:true} for nurse review.
  • Bounded family reply handler Premium/standard tier with fallback — few messages, but it must refuse cleanly and route reliably when a frightened relative pushes hard for a clinical answer

    Answer ONLY logistics: visit schedule, carer identity, rescheduling, invoices and payment. Classify any clinical, medication, hospital-or-not or end-of-life question as OUT_OF_SCOPE and hand off to the nurse-in-charge with context — never answer, never soften into general advice, never reassure.

MCP connectors

  • Home-care / rostering app — via Tool (MCP): read the submitted visit note and the client's next scheduled visit and assigned carer
  • Care record — via Tool (MCP): read the consent list, each contact's registered language and channel, then log what was sent to whom against the visit id
  • Billing system — via Tool (MCP): fetch the current invoice status so the reply handler can answer a payment question factually

Built-in tools

  • user-defined tool `contact_route` (SpEL): input.contact.prefersVoice ? 'VOICE' : (input.contact.whatsapp ? 'WHATSAPP' : 'SMS') — per-contact channel selection as a formula, because family preferences change weekly and the coordinator should be able to change them herself
  • user-defined tool `next_visit_line` (SpEL): 'Next visit: ' + input.nextVisit.date + ' at ' + input.nextVisit.time + ' with ' + input.nextVisit.carerFirstName — the single line families ask about most, formatted identically in every language template
  • knowledge_search (family-communication policy, consent rules, plan-defined trigger words)
  • http_request (fetch the visit note and contact preferences; log what was sent to whom)
  • send_email (the Email arm of the fan-out, for contacts who prefer it)

Guardrails

  • The update contains only what the carer recorded — no assessment, no prognosis, no reassurance, no added clinical terminology, and nothing about medication beyond 'scheduled dose recorded as given'
  • A carer-flagged concern or plan-defined trigger word blocks the family update entirely and diverts to the nurse-in-charge at the Approval node
  • The reply handler answers logistics only; every clinical, medication or hospital-decision question is refused and routed to a nurse with context
  • Recipients, channels and languages come from the consent list on the care record via `contact_route` — a relative who is not on the consent list receives nothing, however insistent
  • The agent never proposes or communicates a care-plan change; that path lives in the handover recipe behind a clinician approval
  • Every send is logged against the visit id, so the agency can show exactly what each contact was told and when

Cost strategy

The rewriter runs once per visit across the entire client book — that is the volume term and it belongs on economy tier, since bounded rewriting plus localisation needs nothing more. Spend the higher tier on the reply handler, which sees far fewer messages but must hold the line when an anxious family member pushes for a clinical answer at midnight. Voice delivery costs telephony minutes and should be enabled per contact via `contact_route`, not by default.

Output & delivery

A completed-visit Webhook (or the daily digest) starts the flow → an economy-tier agent rewrites the carer's note into plain, localised language with no added assessment → the Condition node diverts anything carer-flagged to the nurse-in-charge at the Approval node → the `contact_route` SpEL tool resolves each consented contact's channel and language → an Output node fans the identical update out on WhatsApp/SMS/Telegram/Email (Sarvam-localised), with an ElevenLabs Voice call for contacts who prefer it → replies hit a bounded handler that answers logistics and routes every clinical question to the nurse with full context.

4. Shift handover + care-plan change PROPOSALS, clinician-approved

Three carers, two shifts and a weekend relief cover the same client. Handover is a message in a WhatsApp group at shift change — 'all ok, dressing done' — plus a spiral notebook on the client's shelf that only whoever is standing in the room can read. Standing observations live in separate places and separate weeks: she has refused the evening meal four times, the dressing is soaking through sooner than it did, she has stopped using the walker indoors. No single carer has seen all three facts together, the notebook is not scanned anywhere, and the care plan gets reviewed properly when the family complains or when something goes wrong — whichever comes first.

Trigger: Scheduled (end of shift / weekly plan review) + Webhook (visit notes)

How the workflow runs

  1. Trigger

    Shift closes or review falls due. A scheduled trigger fires at handover or on the weekly review date, and a Webhook supplies every visit note since the last handover — the whole window, not the last message in the group.

  2. Loop

    Map: read each visit note. A Loop node runs a cheap extractor over each note in the window — one focused pass per note, so a busy week costs proportionally and nothing is skimmed at 07:00.

  3. Agent

    Extract observations verbatim. The extractor returns strict JSON per note: tasks done and missed, intake, mobility, skin/wound observations, mood, refusals, and any carer-flagged concern — each with the carer's own words quoted. It adds no interpretation.

  4. Code

    Count the patterns deterministically. A Code node counts occurrences across the window (refusals per meal, dressing changes per week, missed tasks by carer) so frequencies are computed, not estimated by a model — '4 of 6 visits' is arithmetic, and it should be done by arithmetic.

  5. Agent

    Reduce: handover + labelled proposals. A reducer produces the handover summary and, separately, a clearly-labelled list of PROPOSED care-plan review points — 'evening meal refused on 4 of 6 visits' with the quotes attached. Proposals cite evidence; they never assert a cause.

  6. Supervisor

    Route by who must decide. A Supervisor node splits the output: operational items to the coordinator, anything touching the clinical care plan to the client's nurse/clinician, and anything about medication ONLY to the prescriber's queue.

  7. Approval

    Clinician approves any plan change. An Approval node holds every proposed care-plan change for the responsible clinician. The agent may surface a pattern with evidence; only a qualified human changes a care plan, and medication stays entirely with the prescriber.

  8. Sub-workflow

    Approved change flows onward. An approved plan change invokes a Sub-workflow that updates the care plan, refreshes the per-client bands used by the vitals-triage recipe's `band_check` tool, and re-briefs the assigned carers — so an approved decision actually reaches the people and the thresholds it affects.

  9. Output

    Publish the handover, record the decisions. An Output node posts the handover to the incoming shift (WhatsApp/Slack/Email) and a Tool (MCP) node writes approved changes to the care record, stamped with the approving clinician.

Channels & connectors

  • Webhook
  • WhatsApp
  • Slack
  • Email
  • Knowledge base
  • Approval / HITL
  • Tool (MCP → care record / rostering)

Outcome

Each shift starts with an evidence-backed handover assembled from every note in the window, and slow-moving changes surface as clinician-reviewable proposals with quotes and real counts attached — instead of after an incident or a complaint.

Why it helps

The mechanism is aggregation across notes that no single carer ever sees together. A refusal pattern or a change in dressing frequency is visible only when six notes are read side by side, which is exactly the read nobody has time for at a 07:00 handover in a WhatsApp group. Attaching the carer's own words and a counted frequency to each proposal is what makes it reviewable in seconds by the clinician who has to decide.

Build spec

2 agents1 note extractor (once per visit note via the Loop node) + 1 reducer producing the handover and the proposal list. Frequency counting is a Code node, routing is a Supervisor node, and the approved change fans out through a Sub-workflow. · Pattern: Map-reduce over the note window → Code-counted frequencies → Supervisor routes by decision-owner → clinician approves → Sub-workflow applies

System prompt (paste-ready)

(Extractor) Read ONE home-care visit note and return strict JSON {visit_id, date, carer_ref, tasks_completed[], tasks_missed[], intake_note, mobility_note, skin_wound_note, mood_note, refusals[], carer_flags[], quotes[]}. Quote the carer's OWN words for anything that could matter clinically. Do not interpret, do not infer a cause, do not name a condition, and do not comment on medication beyond whether a scheduled dose was recorded as given. If the note is empty or unreadable, return needs_review=true rather than inferring what probably happened.

Agent roles & model tiers

  • Note extractor (per visit note) Economy tier with a fallback model — runs once per note across the window, so it dominates this workflow's cost

    Structured extraction with verbatim quotes. Zero interpretation, zero inference of cause, zero medication commentary. Unreadable ⇒ needs_review=true.
  • Handover reducer + proposal writer (once) Standard tier with fallback — pattern-finding across notes, and the one output a clinician actually reads

    Produce (a) the shift handover summary and (b) a separate, clearly-labelled PROPOSED care-plan review list, each item citing the supporting notes and quotes and using the counts supplied by the Code node. Never compute or estimate a frequency yourself, never assert a cause, and never propose a medication change — medication items are routed to the prescriber as observations only.

MCP connectors

  • Home-care app / care record — via Tool (MCP): read every visit note in the window, then write approved plan changes stamped with the approving clinician
  • Rostering system — via Tool (MCP): read which carers cover the incoming shift so the handover reaches the right people, and re-brief them after an approved change
  • Prescriber / clinic queue — via Tool (MCP): file medication-related observations into the prescriber's own queue, never into the operational one

Built-in tools

  • user-defined tool `frequency_line` (SpEL): input.occurrences + ' of ' + input.visits + ' visits since ' + input.windowStart — the counted evidence line rendered identically on every proposal, so a clinician reads the same format every week and a model never gets to phrase a frequency loosely
  • user-defined tool `review_due` (SpEL): input.daysSinceReview >= input.plan.reviewIntervalDays ? 'DUE' : 'NOT_DUE' — the agency's own review cadence as a formula, so the weekly review is triggered by policy rather than by someone remembering
  • knowledge_search (this client's current care plan, handover template, escalation policy)
  • http_request (read the note window; write approved plan changes with the approving clinician stamped)

Guardrails

  • The agent PROPOSES care-plan review points and never changes a care plan — every change passes the responsible clinician's Approval node and is stamped with who approved it
  • Medication is out of scope entirely: the agent may report that a scheduled dose was or was not recorded as given, and routes anything else to the prescriber's queue as an observation — it never proposes a drug, a dose or a stop
  • No diagnosis and no causal claim: proposals cite the carer's verbatim quotes and Code-counted frequencies, never an explanation of why something is happening
  • Frequencies are computed by the Code node and rendered by the `frequency_line` SpEL tool — a model never phrases a rate, and an uncounted percentage can never appear
  • The Supervisor node routes by decision-owner, so a clinical item cannot land in an operational queue and be actioned by someone unqualified
  • An empty or unreadable note becomes needs_review rather than an inferred entry — the handover never contains invented care history
  • The Sub-workflow only runs on an approved change, so per-client vitals bands and carer briefings can never be updated by an unapproved proposal

Cost strategy

Classic map-reduce economics: N notes × (economy-tier extractor) + ONE standard-tier reduce. The extractor is the multiplied term and stays cheap and hard-capped; the reducer is the single call a clinician actually reads, so that is where the reasoning budget goes. Counting in a Code node rather than the model removes the most error-prone and token-heavy part of the reduce. A weekly review over a busy client costs one reduce regardless of note count, the map can run in Parallel batches for speed at unchanged per-note cost, and fallback models keep a Monday-morning handover from depending on one provider's uptime.

Output & delivery

A scheduled handover or a `review_due` trigger collects the note window → a Loop maps a cheap extractor over every note, quoting carers verbatim → a Code node counts the real frequencies → a standard-tier reducer builds the handover summary plus a separate, evidence-cited list of PROPOSED care-plan review points → a Supervisor node routes operational, clinical and medication items to their proper owners → the responsible clinician approves any change at the Approval node → a Sub-workflow applies the approved change, refreshes the per-client bands and re-briefs the carers → an Output node publishes the handover to the incoming shift and a Tool (MCP) node writes the change to the care record, stamped with the approving clinician.

Related industries

Build one of these in minutes

The sandbox gives you a live agent workspace — no account, no card. Or head back to the full catalogue and compare patterns across every industry.

See how VegaDūta compares to n8n, Dify and BotpressWhy VegaDūta's architectureEstimate your WhatsApp API costs