> ## Documentation Index
> Fetch the complete documentation index at: https://medlogprotocol.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Header

> Provenance information, execution context, and system metadata available at inference time.

The MedLog record header consists of provenance information, execution context, and system metadata
available at inference time, including server identifiers, timestamps of model invocation and input
retrieval, and a stable event identifier for the newly-created MedLog record. Akin to `PROCID` in
`syslog`, this field may also optionally include identifiers for run- or episode-level linkage (e.g.,
`run_id`, `parent_event_id`). These identifiers allow grouping events across multi-stage or agentic
workflows without imposing a specific orchestration architecture. Lastly, to ensure interoperability, the
header must include the version of the MedLog protocol specification that the record complies with.

| Field             | Type      | Notes                                                          |
| ----------------- | --------- | -------------------------------------------------------------- |
| `event_id`        | uuid      | Stable identifier for this invocation. **Required.**           |
| `run_id`          | uuid      | Constant across all events in the same run. Optional.          |
| `parent_event_id` | uuid      | The event this one expands on. Optional.                       |
| `timestamp`       | date-time | When the event occurred. **Required.**                         |
| `medlog_version`  | string    | The protocol version the record complies with. **Required.**   |
| `system_metadata` | object    | `hostname`, `app_name`, `proc_id`, `latency_ms`. **Required.** |
