Files

AIOS Agent Execution Audit Plane

Purpose

Record every agent-initiated action on the AIOS GitOps runtime: what, who, when, why, result.

Audit Lifecycle

  1. Pre-flight: Record intent before execution
  2. In-flight: Capture command, input, git state, branch
  3. Post-flight: Record result, outputs, errors, duration
  4. Archive: Immutable commit to git as structured JSON logs

Audit Schema (v1)

{
  "audit_id": "<uuid or hash>",
  "event_type": "command_execution | command_completed | command_failed | baseline_promotion | tag_creation | state_change",
  "command_ref": "CMD-<date>-<description>",
  "agent": "openclaw | hermes | codex",
  "user": "gitops-write-bot",
  "timestamp": "<ISO-8601>",
  "git": {
    "branch": "main",
    "sha_head": "<sha>",
    "baseline": "V1R3C1",
    "dirty": false
  },
  "input": {},
  "output": {},
  "duration_ms": 0,
  "result": "success | failure | pending",
  "error": null
}

Storage

  • audit/agent-runs/ — per-agent JSONL
  • audit/command-history/ — per-command aggregated
  • audit/version-history/ — per-baseline audit trail
  • All audit files committed to git (immutable)