Skip to main content
The EHR Agent analyzes comprehensive electronic health records — labs, conditions, medications, imaging, genetics, and vital signs — to deliver evidence-based insights for both patients and clinicians. Analysis is backed by peer-reviewed medical literature and a curated corpus of 3,000+ clinical guidelines from leading medical societies.

When to Use

EHR Agent

Best for:
  • Comprehensive health analysis
  • Multi-system assessment
  • Complex cases with imaging/genetics
  • Pre-visit preparation
Input: Full EHR data bundle

Lab Results Agent

Best for:
  • Lab result interpretation
  • Post-visit lab review
  • Routine monitoring analysis
  • Direct lab-to-patient communication
Input: Lab results + optional patient context

Endpoint

Agent Modes

The EHR Agent supports two modes:
Deep Agent runs include researchTasks in the response — an array of the specific research queries executed during the multi-step literature review. Light Agent responses do not include this field.

Request Format

Required Fields

Health Data Fields

All fields in data are optional, but you should provide at least some health information for meaningful analysis:

Patient Info

No PHI allowed in patientInfo. Do not include name, date of birth, address, or any other personally identifiable information. Only de-identified demographic data (age, gender) is accepted.

Lab Result Fields

Used for both recentAbnormalLabs and recentNormalLabs: Track how a lab value has changed over time:

Condition Fields

Medication Fields

Family History Fields

Imaging Study Fields

Genetic Data Fields

Vital Sign Fields

Element Limits & Sorting

To ensure optimal analysis quality and prevent context overflow, the API applies limits to each data category. Elements are sorted by date (most recent first) before limits are applied.
Dates are critical for accurate analysis. The API sorts data by recency to prioritize the most recent findings. Without dates:
  • Lab results may be analyzed in the wrong order, potentially missing critical recent changes
  • Older, less relevant data may be included instead of recent findings
  • Trend analysis and temporal reasoning will be impaired
While dates are technically optional (per FHIR), lab results and imaging studies should always include dates in practice. Data without dates will be deprioritized during element limiting.

Error Responses

400 Bad Request — Validation Error

401 Unauthorized

429 Too Many Requests

Returned when your company has reached its concurrent request limit. Includes a Retry-After header.

500 Internal Server Error

Response Format

Immediate Response (200 OK)

Response Headers

Webhook Delivery

Results are delivered to your webhook URL (5-8 min for Light, 10-13 min for Deep): Light Agent response:
Deep Agent response (includes researchTasks):

Result Fields

Selected Elements

The selectedElements array contains the health data elements that the AI identified as most clinically relevant:

Processing Steps

Status update webhooks are sent during processing: Light Agent Steps: Deep Agent Steps:
For Deep Agent, steps 1-4 are sent by the initial API server. Steps 5-8 and the final result are sent by the Deep Agent research processor. This architecture allows the Deep Agent to run for up to 16 minutes without timeout constraints.

Example Requests

Pricing

Next Steps

Webhooks

Set up webhook handling and signature verification.

Response Format

Learn how to parse and display responses with citations.

Rate Limits

Understand concurrency limits.

Lab Results Agent

Simpler endpoint for lab-only analysis.