Skip to content
Control loop

Ethical walls and audit trails in Mattergraph and Filegraph

Legal and accounting agents fail compliance review when tenant boundaries live in prompts; Mattergraph and Filegraph enforce matter isolation, M-of-N sign-off, and SHA-256 evidence packets in the runtime.

Published2026-12-01Control loop
Author & domainsTimagent-systems · trust-boundary · runtime-infra

Prompt-level instructions cannot enforce an ethical wall. If an AI assistant has vector-store or filesystem access across multiple client matters, a single prompt injection, ambiguous entity name, or retrieval collision can leak privileged facts across matter boundaries. For law firms, accounting practices, and regulated financial teams under POPIA, GDPR, FCA, FSCA, Solvency II, or SEC 17a-4(f), “we told the model not to look” does not pass InfoSec or General Counsel sign-off.

Mattergraph Legal and Filegraph Accounting move tenant isolation, approval authority, and audit retention out of the prompt and into the execution runtime.

Five runtime layers from request to sealed audit trail

Runtime layer Mechanism What it prevents
1. Identity & Directory Binding Authentik OIDC + MFA session incarnation Shared logins, unverified external signups, and anonymous tool invocations.
2. Matter-Scoped Policy Cerbos Ethical Wall Gate Cross-matter reads, unauthorized precedent queries, and unpermitted external sends.
3. Zero-Secret Execution nono host sandbox + Infisical phantom handles Credential exfiltration from .env files, DMS tokens, or accounting API keys.
4. Human Quorum & Hibernation Maker-Checker M-of-N Quorum in Biro & Apple Operator Unilateral client sends, unreviewed ledger postings, and idle compute burn while waiting.
5. Immutable Retention SHA-256 Evidence Packet + SEC 17a-4(f) WORM manifest Unverifiable AI transcripts and silent post-hoc edits to override receipts.

How a governed matter workflow runs end-to-end

  1. Session incarnation binds the human operator. A partner or engagement manager authenticates through Authentik OIDC with MFA. Every downstream agent task carries that human identity and matter scope as compiled policy metadata.
  2. Cerbos enforces the ethical wall before any file is opened. Before a Mattergraph clause-redline agent or Filegraph working-paper agent touches a document, Cerbos evaluates the compiled permit against the active matter ID, jurisdiction pinning (EU, UK, US, ZA), and conflicted-party list. Denied paths fail closed before a single byte enters model context.
  3. Execution happens inside a disposable sandbox with zero root keys. The nono sandbox mounts only the scoped matter projection with default-deny network egress. Outbound connectors use Infisical phantom handles that resolve only inside trusted gateways.
  4. High-consequence writes hibernate at $0.00 idle cost. When an agent prepares a client-facing redline, statutory filing, or ledger adjustment, the Idempotent Compensating Effect Ledger pauses the workflow and emits a structured Evidence Card to Biro and Apple Operator. Once the required M-of-N quorum signs off, a live request_resolved broadcast clears the pending state across all connected surfaces.
  5. Every run seals into a verifiable WORM manifest. Completion emits a deterministic SHA-256 Evidence Packet linking the input digest, policy permit, tool exit codes, human override receipt, and metered token line items for SEC 17a-4(f) retention.

Prompt-based assistant vs. Mattergraph / Filegraph cell

Dimension Prompt-based assistant Mattergraph / Filegraph cell
Matter / client wall System prompt instruction Compiled Cerbos policy + matter-scoped projection
Credentials in runtime Ambient API keys or OAuth tokens Infisical phantom handles + short-lived leases
Client send / ledger write Single-user click or auto-send Maker-Checker M-of-N Quorum with $0.00 hibernation
Emergency halt Kill browser tab or restart container Durable Postgres Kill Switch (global, tenant, mandate)
Audit artifact Scrollable chat log SHA-256 Evidence Packet + WORM manifest

Next steps

  • agent-systems
  • trust-boundary
  • runtime-infra
← Back to notes

Keep exploring

Turn the idea into a better agent workflow