Skip to content

Companion and local AI

Experimental on-device models

The read-only and safety boundaries apply to every provider. On-device LiteRT performance depends on the Android device and available memory.

AI Companion

Read-only architecture

flowchart LR
    DATA[Tracking data] --> CTX[context builder]
    CTX --> SNAP[read-only excerpt]
    SNAP --> SVC[provider service]
    SVC --> P1[On-device LiteRT]
    SVC --> P2[Ollama or private endpoint]
    SVC --> P3[Configured cloud endpoint]
    P1 & P2 & P3 --> VAL[validate output]
    VAL --> CHAT[visible answer]
    VAL --> MEM[optional memory proposal]
    MEM -. no write path .-> DATA

The provider receives no database access and no tools for changing check-ins, counters, relapses, tasks or settings.

  1. Enabled and configured endpoints are checked by priority.
  2. External endpoints require explicit data consent.
  3. Fallback occurs only for allowed technical failures.
  4. A local failure never silently sends data to a server or cloud provider.
  5. Each endpoint receives only the excerpt assembled for the selected context budget.

On-device LiteRT profiles

The local provider uses LiteRT-LM Android and currently offers:

  • Gemma 4 E4B with 2K, 4K or 8K total context and optional Thinking,
  • Qwen3 4B Instruct 2507 with a 2K context and no Thinking.

Models are downloaded only after an explicit action, SHA-256 verified and excluded from backups. Generated chunks can stream into the response bubble, while only the completed visible answer is persisted. Internal thought output is not stored as answer text.

Thinking is exposed only for supported models or endpoint types. The Companion settings use the same conversation path for local and remote providers; model testing first checks provider status instead of duplicating a separate status action.

Context and local memory

In remote endpoint details, Thinking effort offers Off, Low, Medium and High for Llama-compatible servers. Response timeout (seconds, 10–600) sets how long Steady waits for a response; the default is 120 seconds. Existing enabled thinking remains High until changed. For a slower thinking model, select Low and enter 300 seconds, then save. Servers may ignore effort; native Ollama supports graded effort for gpt-oss and boolean thinking for other models. Local LiteRT controls remain unchanged. A timeout is reported separately from an unreachable server; these settings do not enable streaming or PC chat access.

Unchanged tracking excerpts can be reused for ten minutes in working memory, separately for each conversation, endpoint and language. Changed records, settings, local day or note searches refresh them. Clear followups such as "why?" or "explain that" use chat history without sending the tracking arrays again. Ambiguous or new data questions still receive a bounded tracking excerpt. No new database or file is created. Revoking consent or disabling AI clears this temporary cache. Whether a server reuses already processed tokens depends on its own caching support; a faster response is not guaranteed.

The selected data budget bounds the complete remote request: system instructions, question, conversation, tracking excerpt, protocol overhead and answer reserve. For long histories, older daily values and events can be omitted while recent detail and monthly aggregates are prioritized. Coverage flags and counts describe the actual excerpt; omitted records cannot become evidence or memory sources. Stored data remains unchanged, and missing values stay unknown.

If a compatible server reports a smaller context capacity, Steady retries the same endpoint with less input, at most twice. It retains answer space and does not switch to a cloud provider for this error. If the protected instructions, question and answer alone exceed the budget, the app asks for a larger budget or shorter custom instructions. Token sizing is an estimate, not the server's exact tokenizer.

Context can contain sparse time series, field schema, counter and reset history, dynamic events, task overviews, monthly aggregates, selected free text, confirmed local memories and local person profiles. In the Recovery build with program resources enabled, it may additionally contain explicitly approved Inventory entries. A coverage manifest describes what was included completely or in abbreviated form.

Durable insights can be proposed and stored locally in encrypted form. They can be reviewed in Settings, deleted individually or cleared completely. Disabling memory does not silently delete existing entries.

Brief acknowledgements such as “yes” or “exactly” continue an existing conversation without automatically sending the tracking-data excerpt again. If a provider repeats one of the recent answers almost verbatim, Steady requests a new continuation exactly once. If that response is still a duplicate, the app displays a short transparent follow-up question without new memory or evidence proposals.

Local LiteRT models can distinguish loading, thinking and visible response as real stream phases. Remote Llama/Ollama endpoints currently use non-streaming transport, so Steady does not invent a phase transition from an elapsed-time timer.

Public and cloud endpoints must use HTTPS. An endpoint marked as private may use HTTP for Llama/Ollama on loopback, LAN and private VPN addresses. HTTP does not encrypt the transmitted context, so use it only on a trusted LAN or through an encrypted VPN; redirects are not accepted.

Deterministic safety boundary

A narrow set of acute high-risk phrases is checked by fixed local rules before a provider call. On a match, a predefined local response is used and the message is not sent to the provider. This boundary is deterministic and independent of the selected AI endpoint.