When to Use
Lab Results Agent
Best for:
- Lab result interpretation
- Post-visit lab review
- Routine monitoring analysis
- Direct lab-to-patient communication
EHR Agent
Best for:
- Comprehensive health analysis
- Multi-system assessment
- Complex cases with imaging/genetics
- Pre-visit preparation
Endpoint
Request Format
Required Fields
| Field | Type | Description |
|---|---|---|
webhookUrl | string | HTTPS URL to receive results |
labResults | array | Lab test results to analyze (min 1, max 200) |
Lab Result Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Lab test name (e.g., “Creatinine”, “Hemoglobin A1c”) |
value | string | Yes | Result value, may include unit (e.g., “1.8 mg/dL” or “7.2%“) |
flag | string | No | Abnormality flag: High, Low, Normal, Critical |
referenceRange | string | No | Normal reference range (e.g., “0.7-1.3 mg/dL”) |
date | string | No | Date of test (ISO 8601 or YYYY-MM-DD). Recommended |
unit | string | No | Unit of measurement (if not in value) |
category | string | No | Lab category for database matching (e.g., “Renal”, “Metabolic”) |
notes | string | No | Additional context |
Patient Context (Optional)
Providing patient context significantly improves interpretation quality:| Field | Type | Max | Description |
|---|---|---|---|
name | string | - | Patient name or identifier |
age | string | - | Patient age |
gender | string | - | Patient gender |
conditions | array | 100 | Medical conditions/diagnoses |
medications | array | 30 | Current medications |
allergies | array | 20 | Known allergies |
familyHistory | array | 20 | Family medical history |
vitalSigns | array | - | Recent vital signs |
socialHistory | string | - | Smoking, alcohol, diet, exercise |
clinicalNotes | string | - | Free-text clinical notes |
Error Responses
400 Bad Request — Validation Error
401 Unauthorized
429 Too Many Requests
Returned when your company has reached its concurrent request limit. Includes aRetry-After header indicating how long to wait (in seconds).
500 Internal Server Error
Response Format
Immediate Response (200 OK)
Response Headers
| Header | Description | Example |
|---|---|---|
X-Concurrent-Limit | Maximum concurrent requests | 7 |
X-Concurrent-Active | Active requests (including this one) | 2 |
X-Concurrent-Remaining | Available slots | 5 |
Webhook Delivery
Results are delivered to your webhook URL in 3-6 minutes:Result Fields
| Field | Description |
|---|---|
labResults | Labs that were analyzed (after 200-lab limiting) |
patientResponse | Patient-friendly explanation in Markdown |
clinicianResponse | Clinical interpretation with citations in Markdown |
citations | Citation metadata for both responses |
metadata.labsReceived | Number of labs sent in request |
metadata.labsAnalyzed | Number of labs analyzed (after limiting) |
metadata.insightsMatched | Number of curated medical knowledge insights matched to the patient’s lab results |
The response format is similar to the EHR Agent but does not include
selectedElements since all provided labs are analyzed directly.Processing Steps
The Lab Results Agent sends status updates during processing:| Step | Name |
|---|---|
| 1 | Processing started |
| 2 | Analyzing lab results |
| 3 | Prioritizing findings |
| 4 | Generating search queries |
| 5 | Searching medical literature and clinical guidelines |
| 6 | Processing search results |
| 7 | Generating responses |
| 8 | Final webhook delivered |
Example Request
Element Limits
| Category | Max Elements |
|---|---|
| Lab Results | 200 |
| Conditions | 100 |
| Medications | 30 |
| Allergies | 20 |
| Family History | 20 |
Pricing
$0.65 per requestNext Steps
Webhooks
Set up webhook handling and signature verification.
Response Format
Learn how to parse and display responses.
Rate Limits
Understand concurrency limits.
EHR Agent
See the EHR Agent for comprehensive health analysis.