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.
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
- 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.
- 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.
- Execution happens inside a disposable sandbox with zero root keys. The
nonosandbox mounts only the scoped matter projection with default-deny network egress. Outbound connectors use Infisical phantom handles that resolve only inside trusted gateways. - 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_resolvedbroadcast clears the pending state across all connected surfaces. - 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
- Scope your firm’s reversibility, data sensitivity, and jurisdiction in the Workflow Readiness Check.
- Read the Regulated Agent Workflows Guide for step-by-step gate selection.
- Inspect the full Security & Trust Architecture or Biro Workspace catalog.
- agent-systems
- trust-boundary
- runtime-infra
Keep exploring
Turn the idea into a better agent workflow
Can the agent prove its own result?
Use four practical questions to find the gaps in an agent workflow.
Inspect the proofSee an evaluation system in practice
Read what the reconciler proves, what it does not, and where people remain in control.
Follow alongGet new builder notes
Follow practical notes and honest agent teardowns as they are published.