Why This Matters

Traditional drug interaction databases only check prescription-vs-prescription pairs. This scenario requires an agent to correlate data across three provenance boundaries:

Data File Provenance
Lisinopril 20 mg (ACE inhibitor) clinical/medications.ttl ClinicalGenerated (EHR)
Potassium Chloride 20 mEq supplement wellness/supplements.ttl SelfReported (patient-entered)
Serum K+ 5.1 mEq/L (borderline high) clinical/lab-results.ttl ClinicalGenerated (EHR)

The key insight

An agent that only examines clinical records would miss the self-reported potassium supplement. Only cross-provenance reasoning detects the complete picture.

Prerequisites

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

The reference patient pod is included in this repository at ../reference-patient-pod/. It contains 30 days of realistic health data for a fictional patient named Alex Rivera, 52M, Portland, OR.

Quick Start (Under 10 Minutes)

Option A — MCP via Claude Desktop

Claude Desktop reads the Pod directly through the Cascade MCP server. No CLI commands needed.

Option B — CLI-as-Skill via Claude Code

Claude Code calls the Cascade CLI commands as bash tools. Requires a terminal.

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.

Step 3. Open a new conversation and paste the contents of agent-prompt.md as your message.

Step 4. The agent will use the cascade_pod_query and cascade_write MCP tools automatically.

Option B: CLI-as-Skill via Claude Code

Step 1. Open a terminal in this example directory and run Claude Code with the pod path:

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

Step 2. Paste the contents of agent-prompt.md as your prompt.

Step 3. The agent will invoke the Cascade CLI directly:

Commands the agent will run
# Step 1: Read medications
cascade pod query ./reference-patient-pod --medications --json

# Step 2: Read supplements
cascade pod query ./reference-patient-pod --supplements --json

# Step 3: Read lab results
cascade pod query ./reference-patient-pod --labs --json

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

What the Agent Should Do

  1. Read the patient's medication list (both prescribed and self-reported)
  2. Identify the ACE inhibitor (lisinopril) + potassium supplement interaction
  3. Correlate with the serum potassium lab result (5.1 mEq/L, above the normal range of 3.5–5.0)
  4. Write back a flagged observation to the Pod with AIGenerated provenance

The expected output is in expected-output.md. Compare the agent's response against it to assess correctness.

Files in This Example

The following files are included. The Markdown files open as raw text.

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. Use this to evaluate the agent's response.
security-model.md Data flow documentation and consent model. Covers what data the agent reads and what it writes.

Key Cascade Protocol Concepts Demonstrated

Cross-provenance correlation

Combining ClinicalGenerated, SelfReported, and DeviceGenerated data across separate Pod files.

Drug-supplement interaction

Going beyond drug-drug checks to detect drug-supplement interactions across provenance boundaries.

Structured write-back

AI observations are written with cascade:AIGenerated provenance, keeping them distinct from clinical and patient data.

Audit trail

Every read and write is logged in the Pod's audit log with a timestamp and agent identity.

← All Agent Examples Documentation