BAIEnterprise Digitalization · AI Application Development中文EN

The Family Health Agent: Product Architecture and Capabilities

Date: 2026-11-05Category: Systems & ArchitectureTags: Family Steward · Health Management · Product Architecture · Agent

A health-continuity agent for a three-generation household: a seven-layer product architecture, four role modes, five business loops, and a three-tier model fallback — with an architecture diagram, three core flow diagrams, and honestly labeled rollout status for every capability.

The Family Health Agent: Product Architecture and Capabilities

This article is the product description of the health-management agent inside the family steward “Xiaoguanjia”: what it looks like (architecture), what it can do (capabilities), and what lines it will not cross (red lines). For the design reasoning behind it, see the companion piece, Building a Family Health Service: From a Household Scenario to System Design.

1. Product Positioning

In one sentence: an agent that provides “health continuity” for a three-generation household — it does not practice medicine. It takes charge of the family’s health records, medication and follow-up affairs, visit support, and record-aware health Q&A, so that no medical visit ever has to start from zero.

Who it serves, and what each of them actually needs

Member Core need The product’s answer
Elders Chronic care that never drops, no medication mistakes, no missed follow-ups Medication-list reconciliation, ledger due-date reminders, emergency card
Adults (the manager) One ledger for the whole family; walk into a hospital able to explain everything One record per person, trend comparisons, one-page visit brief
Teenagers Minimal disturbance, privacy with boundaries Only risk-relevant items collected; permissions isolated per member
The whole family Ask a question out loud, get an answer with a basis On-duty answerer with record context + evidence anchoring from a medical model

What the product is not: it is not online diagnosis (no diagnosing, no prescribing, no medication adjustments), not a checkup provider, and not an emergency-response system (for red-flag symptoms it does exactly one thing: urge you to seek emergency care and hand you the emergency card).

2. Product Architecture

Product architecture diagram

How to read it: seven layers, top to bottom — what the family touches is at the top; the closer to the bottom, the closer to infrastructure. The vertical column on the right holds cross-cutting capabilities that span every layer and belong to none. The health agent is a domain pack inside Xiaoguanjia: the foundation layer is shared with the whole steward, while the six layers above it are health-specific.

Layer by layer

Layer Responsibility Key components and design points
Touchpoint layer Every surface where the family meets the system A single unified intake (snap a photo / say it / send it — no categorizing required); clearly divided presentation duties: the board is for looking, voice is for speaking, WeCom is for remote; the paper emergency card stays — when power and network are down, it is the most reliable surface of all
Role layer Organizing “one agent” into governable work modes The four roles are configuration packs (prompt fragment + tool allowlist + SOP), not four agents; assignment is primarily deterministic routing (the trigger source decides), and when it is uncertain, the task falls to the read-only on-duty answerer
Capability layer The product capabilities the family can actually feel Six capability groups correspond to five loops plus casual logging (see Part 3); each group can only invoke tools on its own role’s allowlist
Rules & policy layer Safety boundaries as code Three tiers of rules (L0 baseline / R-H domain pack / SOPs) converge and are enforced here; the confirmation channel and red-flag interception are engine-level actions that do not depend on the model’s good behavior
Data layer The single source of truth health.db with 16 tables; originals and structured facts are kept apart (files hold the originals, the database records their hashes); context packs are assembled here — confirmed data only, every item carrying its date and source; unconfirmed data is quarantined in the pending-review zone and may not be cited downstream
Model layer A model lineup divided by task Extraction and Q&A are chosen separately: extraction uses a local 8B model (originals never leave the home network); Q&A uses Baichuan M3-Plus (evidence anchoring), M3 as fallback, and DeepSeek as the final downgrade; models are wired in through aliases on the mini router, so swapping a model changes nothing above this layer
Foundation layer Infrastructure shared with the whole steward Agent Loop, scheduler (including the health domain’s own nagging budget), Home Assistant, /audit, message channels — health does not rebuild its own foundation
Cross-cutting capabilities Spanning all layers Per-member privacy authorization, data-egress control, end-to-end audit, and version governance for rules, dictionaries, and SOPs

3. Product Capabilities

Listed by capability domain. Each item states how the family experiences it, and its status (Live / Integrated, spot-check pending / Planned).

3.1 Records and data capabilities

Capability Description Status
One record per person Eight modules: baseline card, risk list, checkup series, metric trends, visit history, medication list, three ledgers, special topics Live
Metric trends One row per metric, reference ranges stored alongside each value (ranges differ by institution and are never forcibly unified); years link up into trends automatically Live
Baseline backfill Allergies / past conditions / family history / current medications are filled in through interviews; anything missing is listed as missing, never inferred or fabricated Live (interviews to be held member by member)
Fact versioning Corrections supersede old rows with new ones (supersedes), so history stays traceable; raw extraction output is retained in full, so the archive can be re-extracted from stock as models improve Live
Member permissions Viewing and receiving are authorized per member; unconfirmed data is quarantined globally Live (permission table is a conservative default, to be confirmed member by member)

3.2 Report processing capabilities (archivist)

Capability Description Status
Unified-intake classification Anything arrives via photo / voice / message on any channel; the system classifies first, then routes (reports / prescriptions / invoices / certificates / anything unclear goes to the pending-review zone) Live
Local extraction A local 8B model on the Mac mini extracts section by section against the metric dictionary; originals never leave the home network Live
Value cross-check Every extracted value is compared against the source text by code; mismatches are flagged red for human review — nothing slips into the archive unchecked Live
Preview-and-confirm ingest Record draft + trend comparison + follow-up items + missing-information list; data is written only after a family member confirms Live, pilot tested
Recommendations become tasks Every item in a report’s “conclusions and recommendations” is converted into a follow-up or screening task in the ledger Live

3.3 Medication management capabilities (archivist / reminder)

Capability Description Status
Versioned medication list Current and historical medications in one table with validity management; stopped medications keep their reason — nothing is overwritten or deleted Live
New-prescription diff A photo of a new prescription or medicine box is diffed against the current list to show additions and removals; previewed first, effective only after confirmation Live
Suspected-interaction alerts The only permitted wording is “please confirm with the prescribing doctor or a pharmacist” — no elaborated assertions (R-H03) Live, pending real-world validation
Medicine-cabinet patrol A weekly scan of stock levels and expiries (the same mechanism as the household’s food-expiry tracking) Live

3.4 Visit support capabilities (visit assistant)

Capability Description Status
One-page visit brief Auto-assembled before a visit: symptom timeline (including the symptom threads strung together from body-feel logs), recent metric trends, medication list, and questions to ask Live
Emergency card Allergies, underlying conditions, long-term medications, emergency contacts; the electronic version is retrievable in seconds, and a paper copy goes on the fridge Live
Pre-examination preparation Staged preparation reminders for gastroscopy and similar exams (items such as fasting and pausing medication that require a doctor’s confirmation are flagged separately) Designed, SOP to be written
Discharge / post-operative follow-up Follow-up dates and care notes are extracted from the discharge summary and turned into a follow-up task line Designed, SOP to be written
Material-pack assembly Commercial-insurance claim packs and referral packs are gathered and exported automatically by encounter Designed, Not enabled

3.5 Patrol and reminder capabilities (reminder)

Capability Description Status
Three ledgers Follow-ups / screenings / vaccinations share one tasks table distinguished by type, with automatic due-date scanning Live
Trend patrol Drift is judged against each person’s own baseline (not only population reference values); anomalies go into the monthly brief Live
Gap detection “Due for a test but not tested” and “due for a follow-up but not followed up” are themselves signals the patrol picks up Live
Restraint mechanism A health-specific nagging budget + quiet hours; routine items go to the board or the weekly digest only, and only urgent items are pushed directly Live (budget values are draft values, calibrated in practice)
Monthly family health brief A monthly digest for the whole family: new additions, trend changes, open items, and next month’s schedule Designed, awaiting activation

3.6 Q&A and emergency capabilities (on-duty answerer)

Capability Description Status
Context-aware Q&A When a question points to a specific member, code assembles a de-identified context pack (confirmed data only, each item with date and source); general questions carry no personal data Integrated
Dedicated medical model Baichuan M3-Plus by default (evidence anchoring), M3 as fallback, DeepSeek as the final downgrade — with the footer honestly naming the model that actually answered Integrated, spot-check pending
Evidence presentation Answers carry citation anchors and record sources; when the record has nothing, the answer says so plainly instead of dressing general knowledge up as record fact Integrated (the source-list field behind the anchors is still to be verified)
Red-flag interception Red-flag words such as chest pain are intercepted by code before any model call: emergency guidance + the emergency card, zero model invocations Live, pending real-world validation
Remote downgrade Remote channels such as WeCom automatically use a downgraded tool set; spending and identity actions can never be executed remotely Live
Casual logging Dictated body-feel notes are archived verbatim, without interpretation; dictated values such as blood pressure go straight into observations Live

3.7 Continuous collection capabilities (Planned)

Capability Description Status
Automatic blood-pressure logging An Omron Bluetooth monitor read locally through Home Assistant, or the Withings API cloud route (one of the two; undecided) Selection research done, not purchased
Watch data back-flow A phone bridge: Health Auto Export on iOS, Health Connect + Gadgetbridge on Android; data lands in the pending-review zone before being written Route verified, not developed
Episodic CGM A Libre sensor worn for 14 days per round via the LibreLinkUp community channel; used for dietary-response assessment, then archived Route verified, Not enabled
Three-tier assessment Instant threshold breach (doctor-set trigger lines) / drift from personal baseline / gap signals; consumer-grade data is graded and used for trends only Rules designed, ships with data collection

4. Core Flows

4.1 Report ingest flow

Report ingest flow

Key points: this chain has three quality gates — a programmatic cross-check after extraction (do not trust the model’s eyes), family confirmation before anything is written (do not trust the system’s judgment), and quarantine of unconfirmed data (do not let half-finished data contaminate reminders and Q&A). Originals and raw extraction output are retained permanently, so re-extraction and audit remain possible in the future.

4.2 Health Q&A flow

Health Q&A flow

Key points: red-flag judgment happens before the model (a code-level wordlist interception); the context pack is assembled by code, not fetched by the model itself (the model never sees what it should not see); the fallback chain guarantees availability, and the footer is assembled by code — which model answered and which record items were cited are always visible to the family, and the model may not rewrite them.

4.3 Patrol and reminder flow

Patrol and reminder flow

Key points: candidate items are produced by programmatic scanning (due dates, threshold breaches, and gaps are all deterministic judgments that never pass through a model); whether anything is sent is decided by the budget and the rules, not by the model; when there is nothing, the system stays silent — the ceiling on proactiveness is defined by the restraint mechanism, and that is the fundamental difference between a health product and marketing push notifications.

5. Capability Boundaries and Design Principles

Hard boundaries (no model and no role may cross them)

  • No diagnosis, no prescribing, no advising anyone to stop or change medication, and no self-invented screening items or trigger lines (trigger lines come only from a doctor or the responsible person’s approval)
  • Every health write is previewed first and written only after human confirmation; unconfirmed data may not be cited by reminders or Q&A
  • Originals and raw trace text never leave the home network; cloud Q&A receives only de-identified context packs
  • For red-flag symptoms, the first action is always guidance to seek care — never answering the question

Design principles (in product terms)

  1. Judgment belongs to code, language belongs to the model — due dates, threshold breaches, and trends are deterministic computations; the model only extracts, understands, and expresses.
  2. Red lines rest on mechanisms, not on good behavior — prohibitions live at the tool layer and the policy layer: with no corresponding tool, the model cannot do it even if it wanted to.
  3. Evidence over fluency — the decisive criterion in Q&A model selection is verifiable evidence anchoring, not eloquence.
  4. Restraint is a feature — the nagging budget, not interpreting casual logs, and not disturbing when there is nothing to say are all deliberately designed product behaviors.
  5. Leave structure for change — metrics extend through the dictionary, models swap through router aliases, roles are added or removed as configuration packs, rules are governed by versioning; the system is built on the assumption that it will change.
  6. Assume single points will fail — the three-tier model fallback, dual-channel delivery (board + push), and the paper emergency card are all advance answers to “what happens when it breaks?”

6. Status and Evolution

Phase Contents Status
Phase 1 (complete) Records and database, the four roles and the rules system, report ingest, patrol reminders, on-duty Q&A (Baichuan integrated) Live
Phase 1 acceptance (in progress) Charter rules validated item by item in practice; Baichuan side-by-side spot-checks (including trap questions); SOP-01 through SOP-10 written into files one by one In progress
Phase 2 (not started) Household-wide rollout: baseline interviews, bulk import of past years’ reports, member-by-member permission confirmation Not started
Phase 3 (designed) Hardware continuous collection: get one blood-pressure chain working end to end as the template, then replicate; watch bridges and CGM connected per member Not started