Thrive AI Health

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.

TriggerDetection logic
missed_first_actionFocus action 1+ hour past scheduled time
multiple_missed_actions3+ missed actions today
activity_momentumSteps < 25th percentile for hour
sleep_recoveryPoor sleep quality metrics
step_trend_declining10-day steps 25% below 28-day avg
sleep_trend_declining3-day sleep < 0.85x 28-day avg
mood_trend_down5-day median 2+ points below 28-day avg
bedtime_driftBedtime shifted > 45 min in 7 days
jet_lagWeekend vs weekday sleep differences
bounce_backRecovery after low activity/sleep
daily_report_morningMorning daily report card
weekly_articleSunday morning recommendation nudge
action_reminder1 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.typeResourcedata.* (Full variant)Follow-up endpoint
cardCoachNudgeCard (feed card)data.cardGET /v1/users/{user_id}/cards/{card_item_id}
health_actionHealthAction (scheduled action reminder)data.health_actionGET /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

FieldTypeDescription
nudge_idUUIDStable id for the nudge record. Distinct from the envelope's event_id; identical across retries of the same nudge.
created_atISO 8601When the nudge was produced.
user_idUUIDThrive AI Health user ID.
target.typeenumcard | health_action.
target.idUUIDID of the target resource.
delivery.urgencyenumlow | medium | high.
delivery.recommended_channelenumpush | sms | email | in_app. Validate against user channel preferences before executing.
delivery.notification.titlestringLLM-generated push title.
delivery.notification.bodystringLLM-generated push body.
data.cardCoachNudgeCardFull variant only. Same shape as the GET response.
data.health_actionHealthActionFull 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.

FieldTypeDescription
card_item_idUUIDCard identifier.
item_headerstringCard title / headline.
item_bodyItemBodyMain message content.
supported_actionsSupportedActionsAlways exactly 2 actions.
item_preprocessingItemPreprocessingPre-computed action payloads, audio assets.
item_created_atISO 8601When the card was created.
interaction_statusInteractionStatuspending | opened | completed | dismissed.
trigger_nameenum | nullDetector that produced the card.

ItemBody: message content rendered on the card. main alone on compact cards; header + main + description on expanded views.

FieldTypeDescription
mainstringPrimary insight message.
descriptionstringSupporting context.
headerstringCard header title.
rationalestringExtended explanation of the insight.

SupportedActions: the action buttons. Always exactly 2 keys.

FieldTypeDescription
action_keysstring[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.

FieldTypeDescription
{action_key}objectPer-action payload (action details, simplified plans, explanations, reflections).
audio_summary_urlstring | nullCDN URL of the audio summary, when present.
audio_durationfloat | nullSeconds.
audio_scriptstring | nullAudio 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.

On this page