Default: audit on
Audit logging is on by default. No configuration is required.Opt out for sensitive workloads
PassAuditConfig(enabled=False) (or the shorthand audit=False) to
suppress command, filesystem, snapshot, network, pty,
and security events for a sandbox at the source — nothing ships to
the collector for those categories, nothing is persisted.
Lifecycle and admin events are always recorded regardless of this
toggle. They contain no user-generated content and are required for
billing and platform operations.
Account-wide default
Flip audit logging off for your entire account from the console at Settings → API Keys → Audit logging. The toggle sets the default that’s injected into every new sandbox whoseSecurityPolicy doesn’t
set audit.enabled explicitly.
Precedence (most specific wins):
- Per-sandbox
AuditConfig(enabled=...)on theSecurityPolicy— overrides everything. - Account-wide toggle — applied when the sandbox policy omits
audit.enabled. - Platform default — on.
AuditConfig model
What gets recorded
Nine categories of events, each with a sandbox id, node id, timestamp, event name, category, and a JSONdetail payload:
Always recorded categories (lifecycle, admin) are logged regardless
of the audit toggle. They contain no user-generated content and are
required for billing and platform operations.
Gated categories (network, command, filesystem, snapshot, pty,
security) respect the per-sandbox and account-wide audit toggle. When
audit is off, these events are not shipped to the collector.
HTTP request/response bodies, PII detection counts, and injection scores
are not written to the audit log.
Retention
Audit events are kept for 7 days platform-wide, then deleted by a nightly cleanup job in the node collector. Retention is not configurable per sandbox today — it’s a single, predictable window for all tenants.Accessing audit data
Audit events are stored platform-side and can be read back over the API with your normal API key — no administrator involvement required.owner_id with GET /auth/me. An account can only read its own
audit log — requesting another account’s returns 403.
Query parameters
Response shape
detail carries event-specific context and is populated for most events; it is
null where an event needs no extra context. source identifies which component
recorded the event — orchestrator for VM lifecycle and in-sandbox activity,
sandbox-manager for control-plane API events.
The per-sandbox route returns the same entries and pagination, with
sandbox_id in place of owner_id.
There is no SDK helper for this yet — call the endpoint directly, as above.
Remember the 7-day retention window: export anything you need to
keep for longer.