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

# Integration patterns

> Integrate MedLog at API gateways, LLM proxies, and agent frameworks — without modifying the models.

MedLog can be deployed within a health system without coordination with external institutions or vendors.
Cross-site analysis, however, requires shared interfaces across EHR vendors, AI vendors, and health
systems.

MedLog can be integrated into existing systems at **API gateways, LLM proxies, or similar interfaces that
intercept model calls** and emit MedLog-compliant records. The same approach can wrap agent frameworks and
tool calls to record inputs, retrieved context, outputs, and uncertainty estimates. This design supports
incremental adoption without modifying the underlying models.

<Frame>
  ```mermaid theme={null}
  flowchart LR
    CALLER["Clinician app /<br/>service / agent"] --> GW["API gateway /<br/>LLM proxy"]
    GW --> MODEL["AI model"]
    MODEL --> GW
    GW --> CALLER
    GW -. MedLog-compliant records .-> COL["MedLog collector"]
  ```
</Frame>

## Implemented with existing tooling

MedLog can be implemented with existing standards and tooling. Existing standards can represent its
logging patterns without requiring a new software stack. See
[interoperability](/implementation/interoperability) for how MedLog maps onto W3C PROV, OpenTelemetry, and
FHIR.
