Download OpenAPI specification:
MedLog is a protocol for event-level logging of clinical AI. Any time an AI model is invoked to interact with a human, interface with another algorithm, or act independently, a MedLog record is created. This record consists of nine core fields: model, user, target, inputs, artifacts, outputs, outcomes, metadata, and feedback, providing a structured and consistent record of model activity. The MedLog protocol can catalyze the development of new databases and software to store and analyze MedLog records. Realizing this vision would enable continuous surveillance, auditing, and iterative improvement of medical AI – including, when needed, detailed traces for complex, agentic, or multi-stage workflows – laying the foundation for a new form of AI-centric digital epidemiology.
Some useful links:
event_id required | string <uuid> Unique ID for this event |
run_id | string <uuid> Constant across all events in the same inference run |
parent_event_id | string or null <uuid> ID of the event this one expands on (if any) |
timestamp required | string <date-time> |
medlog_version required | string |
required | object (SystemMetadata) |
required | object (ModelInstance) |
required | object (UserIdentity) |
required | object (TargetIdentity) |
required | object (Inputs) |
{- "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
- "run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
- "parent_event_id": "244d15ba-4793-4516-8d39-3fb250c8abf5",
- "timestamp": "2019-08-24T14:15:22Z",
- "medlog_version": "1.0",
- "system_metadata": {
- "hostname": "string",
- "app_name": "string",
- "proc_id": "string",
- "latency_ms": 0
}, - "model_instance": {
- "model_id": "gpt-4o",
- "model_version": "2025-05-01",
}, - "user_identity": {
- "caller_type": "clinician",
- "caller_id": "string"
}, - "target_identity": {
- "target_type": "patient",
- "target_id": "string"
},
}
{- "message": "string",
- "code": "string",
- "details": { }
}
event_id required | string <uuid> Unique ID for this event |
run_id | string <uuid> Constant across all events in the same inference run |
parent_event_id | string or null <uuid> ID of the event this one expands on (if any) |
timestamp required | string <date-time> |
medlog_version required | string |
required | object (SystemMetadata) |
required | object (Artifact) |
{- "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
- "run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
- "parent_event_id": "244d15ba-4793-4516-8d39-3fb250c8abf5",
- "timestamp": "2019-08-24T14:15:22Z",
- "medlog_version": "1.0",
- "system_metadata": {
- "hostname": "string",
- "app_name": "string",
- "proc_id": "string",
- "latency_ms": 0
}, - "artifact": {
- "artifact_type": "text_chunk",
- "mime_type": "string",
- "description": "string"
}
}
{- "message": "string",
- "code": "string",
- "details": { }
}
event_id required | string <uuid> Unique ID for this event |
run_id | string <uuid> Constant across all events in the same inference run |
parent_event_id | string or null <uuid> ID of the event this one expands on (if any) |
timestamp required | string <date-time> |
medlog_version required | string |
required | object (SystemMetadata) |
required | object (HumanOutput) |
{- "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
- "run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
- "parent_event_id": "244d15ba-4793-4516-8d39-3fb250c8abf5",
- "timestamp": "2019-08-24T14:15:22Z",
- "medlog_version": "1.0",
- "system_metadata": {
- "hostname": "string",
- "app_name": "string",
- "proc_id": "string",
- "latency_ms": 0
},
}
{- "message": "string",
- "code": "string",
- "details": { }
}
event_id required | string <uuid> Unique ID for this event |
run_id | string <uuid> Constant across all events in the same inference run |
parent_event_id | string or null <uuid> ID of the event this one expands on (if any) |
timestamp required | string <date-time> |
medlog_version required | string |
required | object (SystemMetadata) |
required | object (Outcome) |
{- "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
- "run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
- "parent_event_id": "244d15ba-4793-4516-8d39-3fb250c8abf5",
- "timestamp": "2019-08-24T14:15:22Z",
- "medlog_version": "1.0",
- "system_metadata": {
- "hostname": "string",
- "app_name": "string",
- "proc_id": "string",
- "latency_ms": 0
}, - "outcome": {
- "outcome_type": "validated",
- "occurred_at": "2019-08-24T14:15:22Z",
- "description": "string",
}
}
{- "message": "string",
- "code": "string",
- "details": { }
}
event_id required | string <uuid> Unique ID for this event |
run_id | string <uuid> Constant across all events in the same inference run |
parent_event_id | string or null <uuid> ID of the event this one expands on (if any) |
timestamp required | string <date-time> |
medlog_version required | string |
required | object (SystemMetadata) |
required | object (Feedback) |
{- "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
- "run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",
- "parent_event_id": "244d15ba-4793-4516-8d39-3fb250c8abf5",
- "timestamp": "2019-08-24T14:15:22Z",
- "medlog_version": "1.0",
- "system_metadata": {
- "hostname": "string",
- "app_name": "string",
- "proc_id": "string",
- "latency_ms": 0
}, - "feedback": {
- "feedback_type": "rating",
- "rating_value": 5,
- "comment": "string"
}
}
{- "message": "string",
- "code": "string",
- "details": { }
}