Why This Matters

Wearable devices generate hundreds of data points per day, but raw numbers are overwhelming and clinically unhelpful. An agent that can:

  • Detect meaningful trends in noisy time-series data
  • Tie confidence to provenance — device-generated data with 150 samples/day gets higher confidence than sparse self-reported data
  • Correlate across data streams — e.g., poor sleep correlating with elevated heart rate
  • Write structured observations with proper provenance

...transforms raw device data into actionable clinical intelligence.

Provenance-weighted confidence

The Cascade Protocol's provenance model makes this possible: each data point carries its source, device, and sample count. An agent can weight its confidence accordingly rather than treating all data as equally reliable.

Wellness Data Available in the Reference Pod

The reference patient pod contains 30 days of data for Alex Rivera, 52M, Portland, OR:

Data Stream Source Days Samples/Day Date Range
Resting Heart Rate Apple Watch Series 9 30 120–168 2026-01-20 to 2026-02-18
Blood Pressure Omron Evolv 30 1 2026-01-20 to 2026-02-18
Activity (steps, energy, exercise) Apple Watch Series 9 30 Continuous 2026-01-20 to 2026-02-18
Sleep (duration, quality) Apple Watch Series 9 30 1 2026-01-20 to 2026-02-18

Prerequisites

cascade CLI
On your PATH
Reference patient pod
../reference-patient-pod/
Claude Desktop or Claude Code
One of the two

Quick Start (Under 10 Minutes)

Option A — MCP via Claude Desktop

Claude Desktop reads the Pod directly via the Cascade MCP server. No CLI setup needed.

Option B — CLI-as-Skill via Claude Code

Claude Code calls Cascade CLI commands as bash tools from a terminal session.

Option A: MCP via Claude Desktop

Step 1. Add the Cascade MCP server to your Claude Desktop configuration:

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "cascade": {
      "command": "cascade",
      "args": ["serve", "--mcp"],
      "env": {
        "CASCADE_POD_PATH": "/path/to/cascadeprotocol.org/reference-patient-pod"
      }
    }
  }
}

Step 2. Restart Claude Desktop, open a new conversation, and paste the contents of agent-prompt.md.

Step 3. The agent will use cascade_pod_query to read wellness data and cascade_write to write observations.

Option B: CLI-as-Skill via Claude Code

Step 1. Open a terminal in this directory and run Claude Code:

Terminal
export CASCADE_POD_PATH="../reference-patient-pod"
claude

Step 2. Paste the contents of agent-prompt.md as your prompt. The agent will invoke the Cascade CLI:

Commands the agent will run
# Read wellness time-series data
cascade pod query ./reference-patient-pod --wellness --json

# Or read individual categories
cascade pod query ./reference-patient-pod --heart-rate --json
cascade pod query ./reference-patient-pod --blood-pressure --json
cascade pod query ./reference-patient-pod --activity --json
cascade pod query ./reference-patient-pod --sleep --json

# Read clinical context (conditions, medications)
cascade pod query ./reference-patient-pod --conditions --json
cascade pod query ./reference-patient-pod --medications --json

# Write back observations
cascade pod write ./reference-patient-pod --type observation --json '{...}'

What the Agent Should Do

  1. Read 30 days of wellness time-series data (heart rate, blood pressure, activity, sleep)
  2. Identify clinically relevant trends (rising BP, declining activity, sleep irregularity)
  3. Tie confidence to provenance — device data with many daily samples gets higher confidence than sparse self-reported data
  4. Correlate across streams — link poor sleep to elevated heart rate, low activity to BP changes
  5. Write trend observations back to the Pod with AIGenerated provenance

Files in This Example

README.md Setup and walkthrough (this page)
agent-prompt.md The prompt to give the agent. Paste this verbatim into Claude Desktop or Claude Code.
expected-output.md Reference answer showing what a correct trend analysis looks like.
security-model.md Data flow documentation and consent model for this example.

Key Cascade Protocol Concepts Demonstrated

Time-series analysis

Processing 30 days of daily snapshots stored as RDF/Turtle to extract trends in heart rate, blood pressure, activity, and sleep.

Provenance-weighted confidence

Device data with high sample counts (120+ readings/day) is rated more confidently than once-daily self-reported data.

Cross-stream correlation

Linking patterns across different wellness data types — e.g., sleep quality predicting next-day heart rate variability.

Structured write-back

Trend observations tagged with cascade:AIGenerated provenance, stored separately from device and clinical data.

Clinical context integration

Using conditions and medications from the clinical section of the Pod to interpret wellness patterns in context.

← All Agent Examples Documentation