Audit Trail Design
Status: DRAFT Owner: Engineering Last Review: 2026-02-21 Applicable Standards: SOC 2 (CC4.1, CC4.2, CC7.2, CC7.3) / GDPR (Art. 30) / SEC (recordkeeping)
1. Purpose
This document describes the audit trail mechanisms in the Equa platform — how user actions, system events, and AI agent operations are recorded, stored, and surfaced. It identifies gaps in the current implementation and recommends improvements to meet SOC 2, GDPR, and SEC recordkeeping requirements.2. Scope
For the full technical architecture, see Event and Activity Model.
3. Current Implementation
The platform uses a dual audit system: structured Actions for high-level user operations and flexible EventLogs for detailed event records.3.1 Actions Table
Source:equa-server/modules/persistence/src/schema.ts (Actions entity)
Key characteristics:
- Content-addressable: The hash-based primary key means identical actions produce the same hash, providing implicit deduplication
- Immutable by design intent: The
HashedTablebase class uses the hash as the primary key, making updates semantically incorrect (a modified record would have a different hash). However,DELETEoperations are not prevented at the database level - No payload field: The Actions table stores only the action type UUID — detailed context must be correlated from other sources
3.2 EventLogs Table
Source:equa-server/modules/persistence/src/schema.ts (EventLogs entity)
Key characteristics:
- Flexible schema: The
dataJSON field can store any structured payload, making it adaptable to new event types without schema migrations - Mutable: Both
createdandmodifiedtimestamps exist, and the record can be updated or deleted - Semi-queryable: JSON payloads can be queried via PostgreSQL JSON operators, but there are no dedicated indexes on the
datafield
3.3 Activity Flow
3.4 Activity API Endpoints
Source:equa-server/modules/api/src/endpoints/activity-endpoints.ts
4. Agent Audit Logger
Source:equa-server/modules/agent/src/security/guardrails.ts
The AI agent (Equanaut) has a dedicated audit logger that records all tool executions with enhanced detail.
4.1 Logged Fields
4.2 Sensitive Field Sanitization
Before logging tool arguments, the audit logger redacts values for fields matching these patterns:
Sanitized fields are replaced with
[REDACTED] in the log output.
4.3 Agent Rate Limit Logging
The guardrails system also logs rate limit events:4.4 Browser Automation Audit (Comet-Bridge)
Source:Comet-Bridge/scripts/browser-audit.mjs, Comet-Bridge/scripts/audit-logger.mjs
Comet-Bridge, the browser automation layer used by Equanaut for web-based tasks, maintains its own audit trail independently of the server-side audit system. This is a local-runtime audit surface that records all browser automation sessions and lifecycle events.
Lifecycle Event Types
The browser automation audit captures five lifecycle event types:
Each event file contains the full lifecycle envelope (task-thread ID, run ID, status, timestamps, route, agent ID, and failure reason where applicable).
PII Masking Rules
Browser automation sessions may capture screenshots and action logs that contain sensitive content. The following masking rules apply:Dual-Stream Architecture
Lifecycle events are written to two parallel audit streams simultaneously:
The
runId field cross-links both streams, enabling complete reconstruction of a browser automation run from either the session directory or the run JSONL.
5. Frontend Display
Source:equa-web/src/modules/organization-dashboard/
The organization dashboard displays recent actions for the active organization, providing visibility into team activity. This is a read-only view that queries the activity API endpoints.