RLivN — Architecture¶
Planned architecture ([HYPOTHESIS]). Not yet scaffolded — this describes intended design, not running code.
Hybrid inference: cloud primary, local fallback¶
RLivN is planned around a two-provider agent engine that degrades gracefully:
- Cloud (primary) — the Claude API, model
claude-sonnet-4-6. Full agent capability including tool use (reminders, medication confirmation, smart-home control, placing calls, escalating to a caregiver). - Offline / edge (fallback) — a local Ollama model (e.g. a quantized Llama 3 / Mistral 7B). Conversational only; tool use is not assumed for the local path.
Provider selection (planned): the engine auto-switches to Ollama when a recent cloud call has failed (within a short window) or when the client is explicitly in offline mode, and returns to cloud otherwise. The agent loop checks the active provider before attempting any tool calls, since the local model is not expected to support tool use.
Degrade-gracefully design¶
The intent is that the home device keeps functioning under connectivity or grid disruption, not that offline is a degraded afterthought:
- The client should still be able to talk to the companion when the internet is down.
- Cloud features that require tool use (e.g. medication confirmation, escalation) are expected to be unavailable or deferred in the local path — this boundary must be handled honestly in the agent loop rather than silently failing.
Conversation handling (planned)¶
- Prompt caching on the large, stable inputs — the system prompt and the per-client profile — since they are read on every turn.
- No streaming to the client UI. The plan is to buffer the full agent response and hand it to text-to-speech as a single natural utterance; streaming is expected to produce choppy speech for this audience.
Sustainability framing¶
Per the Sustainability & Carbon Awareness directive:
- The Ollama offline fallback is grid-resilient design, not only a privacy/connectivity feature — the device keeps working under grid disruption.
- Cloud-vs-edge is a carbon trade-off, not only a privacy trade-off. The Claude API runs in datacenters with their own carbon profile; Ollama runs on local hardware. Neither is automatically lower-carbon — it depends on workload, frequency, and grid mix. This trade-off should be named explicitly in any routing decision. Carbon-outcome claims are
[HYPOTHESIS]until measured.
Possible future integration¶
RLivN's backend may eventually reuse MPowerUP's P2P / CRDT primitives for offline-resilient caregiver sync — letting family members share care notes and alert history without a central server. [HYPOTHESIS] — a future integration point, not committed or scoped.
Known unknowns¶
- Whether local-model quality is sufficient for warm, safe eldercare conversation without tool use.
- The real carbon profile of each inference path (unmeasured).
- How escalation/safety behaviors should degrade when only the offline path is available.