Technical Guide

    Build vs Buy LLM Governance: Will In-House Logs Hold Up as Audit Evidence?

    In-house logs can hold up as audit evidence, but only if they are designed as evidence from the start. Application and gateway logs are usually built for debugging and operations. They tend to fall short on completeness, protection from alteration, independence from the component being audited, and linkage to the policy decision (allow, redact, block, escalate) in force for each interaction and tool call. If those gaps cannot be closed internally, runtime policy enforcement that produces evidence as a by-product of enforcement is the alternative to evaluate.

    • Completeness: every interaction and tool call in scope produces a record, and a failure to write one is detected rather than silent.
    • Integrity: records cannot be altered by the component that wrote them or by the engineers who operate it, and alteration would be detectable.
    • Policy-decision linkage: each record shows the decision applied (allow, redact, block or escalate) and the policy version in force at that moment.
    • Attribution: each record names the identity and permissions that authorized the action, including for agent and tool-call steps.
    • Retention and residency: retention periods and storage location are configured deliberately against your own regulatory obligations, and are enforced.
    • Auditor accessibility: records share one schema, can be exported in a form an examiner can read, and do not require the build team to interpret them.
    • Engineering ownership: who maintains the capture pipeline, storage controls and access model as models and agents change.
    • Evidence schema maintenance: who updates fields for new tool types, new policies and changing examiner expectations, and how history stays comparable.
    • Position in the path: whether evidence is produced by the component that enforces policy, or reconstructed afterward from logs that observe it.
    • Coverage under one policy: whether models, agents, tools and MCP servers are governed by a single policy rather than separate rules per surface.
    • Deployment model: whether the system can run in your own cloud so that evidence stays inside your boundary.
    • Auditor-facing exports: whether evidence can be provided to auditors in a consistent format without custom extraction work for each request.

    Operational logs and audit-grade evidence are different things

    An operational log answers an engineering question: what happened to this request, and why did it fail? Audit-grade evidence answers a different one: what was this AI system permitted to do, what did it do, and can a third party trust the record of both?

    OWASP's Agentic Evidence initiative frames the distinction well. Organizations must be able to establish why an action occurred, which identity and permissions authorized it, what information influenced the decision, and whether the available evidence can be trusted. It also separates component-generated assertions from independently verifiable evidence. A log written by the same component whose behavior is in question is an assertion. It becomes evidence only when something outside that component can corroborate it.

    From this, a working definition follows. A record is defensible when it is complete for the scope in question, attributable to an identity, tied to the policy decision in force at the time, protected from alteration, retained under defined controls, held in a location that satisfies residency obligations, and accessible to an auditor in a consistent structure.

    External expectations point the same way. The European Commission's AI Act guidance says the high-risk systems it addresses must be traceable and auditable, with appropriate documentation kept for ex-post investigation. As of December 2026, the AI Act (Regulation (EU) 2024/1689) is in force, and whether a given system is high-risk depends on classification under the full regulation text. OWASP guidance is not binding law, but it is a useful security-practice benchmark for what a defensible record contains.

    How common in-house approaches measure up

    Most in-house LLM logging combines several of the sources below. The assessment is general and depends on how each one is implemented, but the pattern of gaps is consistent.

    • Application logs: Good at capturing prompts, responses and errors from the code that wrote them. Typically self-reported by the component being audited, structured differently per team, and rarely record which policy applied.
    • API gateway logs: Consistent for request metadata such as caller, endpoint and timing. Often miss what happened inside a tool call or agent step, and record traffic rather than a policy decision unless one is explicitly added.
    • Observability traces: Strong for latency and call relationships. Built for sampling and short retention, so completeness and defined retention controls need deliberate work.
    • SIEM exports: Add central storage, search and access control. They can only forward what upstream sources emitted, so gaps and unverifiable assertions carry through.
    • Common gap across all four: None records the policy version and decision applied to each interaction or tool call unless the team designs that field, populates it consistently and keeps it current.

    Where an in-house build can be enough

    In-house logging can suffice when the scope is narrow and the evidence burden is modest. A small number of internal models, a single enforcement point that every call passes through, a stable schema owned by one team, and write-once storage with defined retention can produce records that an auditor accepts. Low-risk internal use cases may not need more.

    The design becomes harder as scope widens. Evidence must then cover models, agents, tools and MCP servers consistently, and records must show the identity and permissions behind each action. OWASP also asks whether records can establish the identity, version and integrity of the tool descriptor used during execution, which most application logs do not attempt. Each new agent or tool adds a schema to maintain, and any source that emits records differently weakens the whole set.

    The decisive question is usually architectural. If the logging layer observes the enforcement point rather than sitting in the execution path, a failure can leave an action taken and unrecorded. OWASP's agent security guidance recommends failing closed when risk classification, approval validation, policy lookup or audit logging fails. That is a test any in-house design should pass and be tested against.

    Evaluating runtime enforcement as the alternative

    The alternative to extending internal logging is to enforce policy in the execution path, so that the decision and its record come from the same act. Trussed is one example. It enforces policy at runtime across models, agents, tools, MCP servers, AI sites and coding assistants, with actions that include allow, redact, block, rate limit and escalate for human approval. Enforcement applies to individual interactions and tool calls, and the audit-ready evidence is generated by that enforcement, not assembled by reviewing records after the fact.

    Deployment is self-managed in the customer cloud, with configurable retention and data residency. Evidence is mapped to HIPAA, NAIC, NYDFS, the EU AI Act and NIST. For scale, Trussed reports 18+ months of continuous production use in a regulated enterprise, 99.95% uptime on live production traffic, 100+ models under one policy plane, and 30+ GB of audit evidence generated per day. Customers span insurance, pharma, healthcare and education. Trussed holds SOC 2 Type II, HIPAA, GDPR, FERPA, ISO 27001 and NIST AI RMF credentials.

    Treat this as an option to test against the criteria above, not a conclusion. Ask any vendor, and your own team, the same questions: can you show the policy decision and version for a specific tool call, does the system fail closed, who can alter the records, and what will an auditor actually receive?

    Operational log versus audit-grade evidence

    Operational log

    Written by the component being observed, shaped for troubleshooting, often mutable and loosely structured.

    Policy decision record

    States whether an interaction or tool call was allowed, redacted, blocked or escalated, and under which policy.

    Protected storage

    Retained under defined controls, with configured residency and resistance to alteration.

    Auditor access

    Exportable in a consistent structure that an examiner can review without engineering support.

    Test your evidence against an auditor's questions

    Review how enforcement in the execution path produces audit-ready evidence for interactions and tool calls, and compare it with your current logging design.

    Request a Demo