---
title: "Audit & Compliance"
description: "Nexus OS maintains a complete audit trail for compliance and debugging. Every significant action is recorded: Agent creation, start, stop, restart Saga step execution and compensation Workflow step transitions Cost budge"
resource: https://www.aiagents.nexus/docs/manual/security/audit-security
generated: { by: "process:nexus-agent-assets", at: 2026-09-07T09:13:03Z }
status: stable
---

# Audit & Compliance

Nexus OS maintains a complete audit trail for compliance and debugging.

## What Gets Logged

Every significant action is recorded:

- Agent creation, start, stop, restart
- Saga step execution and compensation
- Workflow step transitions
- Cost budget changes and spending
- AXIS trust verification results
- Credential access (not values)
- Edge deployment operations
- Configuration changes

## Audit Log Format

Each entry contains:

```json
{
  "id": 1234,
  "timestamp": "2025-01-15T10:30:00Z",
  "agent_id": "planner",
  "agent_name": "planner",
  "action": "saga_step_completed",
  "detail": "Step 3 of order-processing saga completed successfully"
}
```

## Querying the Audit Log

```bash
# View recent entries
naos audit --limit 50

# Filter by agent
naos audit --agent planner

# Filter by action type
naos audit --action saga_step_completed

# Export for compliance
naos audit --format json --output audit-export.json
```

## Retention Policy

By default, audit logs are retained indefinitely. Configure retention:

```yaml
audit:
  retention_days: 90
  compress_after: 30
  export_format: json
```
