Nudges
How AI-generated coaching nudges flow from Thrive AI Health's pipeline to partner apps; published as `coach.nudge.created` events to your queue, then fetched and rendered as cards or scheduled action reminders.
The nudging system delivers AI-generated coaching moments to your members. Thrive AI Health's coaching pipeline produces a nudge whenever a moment warrants partner-side delivery; a missed action, a trend concern, a recovery opportunity, a morning report, a daily content recommendation, or a scheduled health-action reminder.
Every nudge is published as a single coach.nudge.created event to your configured queue. A target.type discriminator identifies the resource: card (feed cards) or health_action (scheduled action reminders). You own delivery (consent, MLR review, channel execution, fallback logic) and, for card nudges, report back the user's interaction status.
Sequence
The diagram shows the card flow. health_action nudges follow the same delivery pattern but use /v1/users/{user_id}/health-actions/* for fetch/update.
Trigger detectors
The pipeline runs 13 trigger detectors in parallel every 15 minutes. Most produce a card nudge from a behavioral signal (missed actions, trend declines, recovery) or schedule (morning report, daily content recommendation). The action_reminder detector produces a health_action nudge an hour before a scheduled action. For card nudges, the matched trigger is attached to the resulting CoachNudgeCard as trigger_name.
| Trigger | Detection logic |
|---|---|
missed_first_action | Focus action 1+ hour past scheduled time |
multiple_missed_actions | 3+ missed actions today |
activity_momentum | Steps < 25th percentile for hour |
sleep_recovery | Poor sleep quality metrics |
step_trend_declining | 10-day steps 25% below 28-day avg |
sleep_trend_declining | 3-day sleep < 0.85x 28-day avg |
mood_trend_down | 5-day median 2+ points below 28-day avg |
bedtime_drift | Bedtime shifted > 45 min in 7 days |
jet_lag | Weekend vs weekday sleep differences |
bounce_back | Recovery after low activity/sleep |
daily_report_morning | Morning daily report card |
weekly_article | Sunday morning recommendation nudge |
action_reminder | 1 hour before a health action is scheduled |
Two internal checks run before a nudge event fires:
- Signal-vs-context: a raw trigger alone is not enough. The pipeline evaluates the signal against the user's current context (e.g. an elevated heart rate during a logged walk is suppressed; the same reading at rest fires).
- Priority-based suppression: nudges are prioritized by Thrive AI Health.
Every nudge that reaches your queue has already cleared both checks.
Event payload; coach.nudge.created
The event uses the standard Thrive AI Health platform envelope (event_id, event_type, signed_at, signature, body); the parsed body JSON carries the discriminator and resource. Partners receive one of two body variants based on a contract-level setting negotiated at onboarding.
target.type | Resource | data.* (Full variant) | Follow-up endpoint |
|---|---|---|---|
card | CoachNudgeCard (feed card) | data.card | GET /v1/users/{user_id}/cards/{card_item_id} |
health_action | HealthAction (scheduled action reminder) | data.health_action | GET /v1/users/{user_id}/health-actions/{health_action_id} |
Body; Basic variant
Thin event; partners fetch the full resource via the follow-up GET.
{
"nudge_id": "e259a656-b8bb-45e8-8115-1dded264baf1",
"created_at": "2026-04-02T14:30:00Z",
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"target": {
"type": "card",
"id": "b1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"delivery": {
"urgency": "medium",
"recommended_channel": "push",
"notification": {
"title": "Time for your morning walk",
"body": "Your scheduled 20-minute walk starts in 5 minutes."
}
}
}Body; Full variant
Includes the complete resource under data.*: partners can render without a follow-up GET.
{
"nudge_id": "e259a656-b8bb-45e8-8115-1dded264baf1",
"created_at": "2026-04-02T14:30:00Z",
"user_id": "550e8400-e29b-41d4-a716-446655440000",
"target": { "type": "card", "id": "b1b2c3d4-..." },
"delivery": { "urgency": "high", "recommended_channel": "push", "notification": { "title": "...", "body": "..." } },
"data": {
"card": {
"card_item_id": "4c2b1a09-...",
"item_header": "Your sleep was restless last night",
"item_body": { "main": "...", "description": "...", "header": "Sleep recovery" },
"supported_actions": { "action_keys": ["simplify_plan", "dismiss"] },
"item_preprocessing": { "simplify_plan": { }, "audio_summary_url": "https://...", "audio_duration": 42.0 },
"item_created_at": "2026-04-02T14:30:00Z",
"interaction_status": "pending",
"trigger_name": "sleep_recovery"
}
}
}Field reference
| Field | Type | Description |
|---|---|---|
nudge_id | UUID | Stable id for the nudge record. Distinct from the envelope's event_id; identical across retries of the same nudge. |
created_at | ISO 8601 | When the nudge was produced. |
user_id | UUID | Thrive AI Health user ID. |
target.type | enum | card | health_action. |
target.id | UUID | ID of the target resource. |
delivery.urgency | enum | low | medium | high. |
delivery.recommended_channel | enum | push | sms | email | in_app. Validate against user channel preferences before executing. |
delivery.notification.title | string | LLM-generated push title. |
delivery.notification.body | string | LLM-generated push body. |
data.card | CoachNudgeCard | Full variant only. Same shape as the GET response. |
data.health_action | HealthAction | Full variant only. Same shape as the GET response. |
Use envelope event_id for idempotent consumption; nudge_id in the body is stable across retries of the same nudge. See Event stream → Signature verification.
Downstream responsibilities
Before delivering a notification to the member you must:
- Validate consent: confirm the member has agreed to coaching nudges.
- MLR (Medical, Legal, Regulatory) review: apply your organization's review policy to AI-generated copy.
- Channel execution: honor user channel preferences. If push isn't engaged within 15 minutes, fall back to SMS or in-app per your delivery policy.
Card data structures
CoachNudgeCard: top-level nudge card resource.
| Field | Type | Description |
|---|---|---|
card_item_id | UUID | Card identifier. |
item_header | string | Card title / headline. |
item_body | ItemBody | Main message content. |
supported_actions | SupportedActions | Always exactly 2 actions. |
item_preprocessing | ItemPreprocessing | Pre-computed action payloads, audio assets. |
item_created_at | ISO 8601 | When the card was created. |
interaction_status | InteractionStatus | pending | opened | completed | dismissed. |
trigger_name | enum | null | Detector that produced the card. |
ItemBody: message content rendered on the card. main alone on compact cards; header + main + description on expanded views.
| Field | Type | Description |
|---|---|---|
main | string | Primary insight message. |
description | string | Supporting context. |
header | string | Card header title. |
rationale | string | Extended explanation of the insight. |
SupportedActions: the action buttons. Always exactly 2 keys.
| Field | Type | Description |
|---|---|---|
action_keys | string[2] | From: mark_health_action_as_completed, reschedule_existing_action, add_new_health_action, simplify_plan, dismiss. |
ItemPreprocessing: pre-computed content keyed by action_key. When the user taps an action button, your client renders the corresponding payload directly; no extra API call required. audio_* fields are present on bounce-back and mood triggers.
| Field | Type | Description |
|---|---|---|
{action_key} | object | Per-action payload (action details, simplified plans, explanations, reflections). |
audio_summary_url | string | null | CDN URL of the audio summary, when present. |
audio_duration | float | null | Seconds. |
audio_script | string | null | Audio transcript. |
Update interaction status
After the user views or acts on a card, your client owns the status update:
PATCH /v1/users/{user_id}/cards/{card_item_id}
content-type: application/json
{ "interaction_status": "opened" }Lifecycle: pending → opened → completed | dismissed. Also valid: pending → dismissed.
Thrive AI Health does not push status updates back; this PATCH is the only channel.
Event stream
Thrive AI Health publishes asynchronous events (lab results, daily device data, coaching nudges) to partner-configured message queues. This page covers the delivery model, signature verification, and event catalog.
API reference
Interactive reference for every Partner API endpoint — live try-it panel, request/response schemas, and auto-generated code samples.