An agent reads a memory, changes another and then loses access. Later, the owner wants to understand what happened. Which credential acted? Which record did it touch? Did the operation succeed, fail or get denied?

Answering those questions should not require copying the memory's contents or the agent's bearer token into another database table. An audit trail needs enough context to explain operations while limiting the information it duplicates.

In the accepted MB-001 foundation of METABOLIQ Brain, audit events are structured database records. They cover selected memory, authentication and administrative operations. They are separate from memory revision snapshots and from application debug logs.

The scope matters: this foundation is accepted for one owner on a trusted local machine. Newer retrieval experiments are outside this article. The observations below describe the accepted implementation and controlled tests, not production readiness or a complete forensic record.

Two records, two questions

A memory revision answers: what did this memory contain at a particular version? Its snapshot deliberately includes content, source information and other memory fields.

An audit event answers a different question: what operation did the application record, and under which identity? Events have an action, result, timestamp and actor information, with target and namespace identifiers where applicable. They also carry request context and a structured detail object.

A memory update event can identify the changed field names and resulting version without storing the field values. An agent read can identify a memory without repeating its text. Collection events record a returned-item count; that count describes the page returned, not necessarily every matching record.

This separation reduces duplication. It does not make audit data non-sensitive.

Attribution starts with the authenticated credential

The audited memory service uses the authenticated principal for actor type and identifier. An agent's event is associated with the owner of its credential. Our focused read test supplied misleading actor and owner headers; the recorded actor remained the authenticated agent.

That establishes credential attribution for the tested path. It does not prove which person, model or process held the token at the time. Shared or copied credentials weaken the human explanation even when the application records the credential correctly.

Request identifiers help correlate events, but they are not identity proofs. The accepted middleware can retain a caller-supplied request identifier when it matches the permitted format, or generate one otherwise. An identifier should therefore be treated as a correlation label, not an independent attestation of origin.

Keep content out; acknowledge the metadata

The inspected memory audit call sites record identifiers, operation details, field names and counts rather than memory titles, bodies or search query text. Credential events retain selected configuration metadata and a token prefix rather than the full bearer token.

We exercised creation, reading, search and update using distinctive fictional markers. The tested audit rows and owner audit responses contained neither those payload and query markers nor the full test token. The markers were also absent from captured test logs.

Those results have a precise boundary. The audit helper accepts a general detail object; it does not mechanically redact arbitrary sensitive values supplied by a future caller. Privacy therefore depends on the event producers and their tests as well as the table structure.

The records still contain potentially sensitive metadata: actor and target identifiers, timestamps, an IP field, request identifiers and, for particular administrative events, credential names, token prefixes, namespace slugs or grants. These values can reveal relationships and activity patterns. A token prefix is not the full credential, but it is still metadata worth protecting.

Captured local test logs do not establish what an external proxy, terminal, monitoring service or caller might retain. Nor should arbitrary secrets be placed in caller-controlled request identifiers or administrative names.

Successful mutations and denied requests need different transactions

For inspected memory creation, update and archive operations, the memory change, revision snapshot and success event share a transaction. A success event is not committed first and left behind while the corresponding mutation fails later in that transaction.

We injected an audit-insert failure separately into each of those three operations. In each case the operation raised an error, memory and revision counts remained unchanged, the pre-existing memory retained its original version and state, and no success event was added.

That is evidence for those failure points. It does not establish every crash, retry or lost-response scenario. An event labelled success describes the application's recorded operation; it does not prove that the caller received or processed the response.

Denials use another path. Selected access denials write through a separate session and commit independently before the request raises its error. We observed a restricted-memory read return 404 while its denial event remained stored, identifying the attempted operation and restricted record without copying the record's body.

Independent persistence lets evidence survive a failed request. It does not make audit storage infallible. Availability and failure handling of the database remain operational concerns.

An owner-scoped view is still a partial view

The audit endpoint requires owner authentication and filters both its returned rows and total count by that owner's identifier. An authenticated agent is denied access to the endpoint. Controlled two-owner fixtures verified that the views did not share event identifiers; these isolation checks do not expand the product's accepted single-owner operating scope.

Some authentication failures cannot be attributed to an owner. In a focused test, a login attempt for a nonexistent fictional account produced an event without an owner identifier. That event was stored but absent from both owners' filtered views. The owner-facing log is therefore not a view of every stored event.

Coverage also varies by operation. The accepted implementation records agent memory reads, lists and searches, but the tested owner read and list paths did not add equivalent events. A successful agent namespace listing, a nonexistent-memory lookup and a stale-version conflict also added no event in our focused checks.

These distinctions are why “every request is audited” would be an inaccurate description. An absent event does not prove that no request occurred.

Append-only has an administrative boundary

Database triggers reject ordinary updates and deletes of audit rows. Our focused checks attempted both and confirmed that the original event remained unchanged.

The model keeps audit identifiers without foreign-key links to their subjects. Rotation also leaves earlier events intact: our test read with the old credential, rotated it and read with the replacement. The earlier event retained the old actor identifier, the later read used the new one, and the rotation event linked the replacement to the old credential.

These controls should not be described as tamper-proof storage. A privileged database administrator can change database protections. The accepted migration itself temporarily disables the append-only trigger to backfill owner attribution. There is no basis here for claiming cryptographic sealing, independent archival or protection against a fully privileged administrator.

What we verified—and what remains outside the evidence

For this article, 12 focused cases passed against an isolated export of the accepted MB-001 implementation. They exercised attribution, request metadata, three audit-insert failures, persisted denial evidence, content minimization, owner visibility, rotation history, update/delete guards, coverage gaps and collection counts.

The accepted baseline was identified from local main and the founder acceptance package. Remote freshness could not be independently confirmed because the configured Git credential helper was unavailable. Active retrieval changes were excluded. All test owners, credentials and memories were fictional; existing Brain databases and source were not changed.

The tests do not establish compliance certification, complete forensic coverage, production security, retention policy, backup recovery or immunity to administrative tampering. They establish a narrower and useful account of what this audit trail records and where its evidence ends.

An audit trail earns trust when its claims match its coverage. For Brain, that means preserving attribution and selected operational evidence, limiting copied content, and stating clearly which questions the record cannot answer.

← All engineering articles