This post explains what an audit log for an AI agent can contain, and how RagLeap Core logs agent actions in v0.13.1 (2026-11-09), v0.13.2 (2026-11-10) and v0.13.3 (2026-11-14). Everything below comes from those release notes, checked on 2026-11-15. Status: Released. It is not a compliance claim, and ragleap-core has not been independently security reviewed.
What is an audit log for an AI agent?
In general, it is a record of what an agent proposed, what a person approved or rejected, what actually ran and what came back, so that you can reconstruct an event afterwards. It is only useful if it is complete enough to answer your question and if it does not itself leak the data it describes.
What does RagLeap Core log for each action?
Since v0.13.1 (#1278) it writes one JSON line per agent action on the ragleap.audit logger. The events are action_proposed, action_executed, action_error, action_rejected, action_skipped and action_forced_approval. The lines carry a sha256 of the content and of the result, never the text. AUDIT_LOG_LINES=false turns them off. In v0.13.3 the text of a file an agent writes also never goes into the action log.
How do I search the audit log?
Since v0.13.2 (#1306), GET /audit can be filtered and paged by method, path (starts with), status, since, until (ISO 8601) and before_id. Calls without these parameters behave as before.
How do I trace one request through the logs?
The X-Request-ID of a call is carried by the AUDIT lines written while handling it, as request_id (#1319). LOG_REQUEST_ID=true puts it in every app log line; it is off by default. The request id is not stored in database rows, and lines written later in the background have none.
How does audit retention work?
It is opt-in (#1318). AUDIT_RETENTION_DAYS, ACTION_LOG_RETENTION_DAYS and AGENT_RUN_RETENTION_DAYS default to empty or 0, which keeps everything, and a value of 1 to 6 is refused. When a limit is set, older rows are deleted every 6 hours in small batches, and runs that are running or waiting for approval are never deleted. Each purge writes a retention_purge AUDIT line. GET /retention (admin) shows the state and POST /retention/purge (owner) is a dry run by default.
What should I do before I set a retention period?
Deleting history removes evidence. The release notes advise shipping the AUDIT lines to a log store first, and choosing the retention period with your own counsel. The docs also include an incident runbook (#1277) and a time sync guide (#1290), which matter because log times are only as good as the clock.
What is not covered?
- v0.13.1 does not log GET reads, chat routes, per-step run events or a failed send after approval.
- Stored prompts are not redacted.
- The request id is not stored in database rows, and later background lines have none.
- Nothing here makes an installation compliant with any law or standard.
- ragleap-core has not been independently security reviewed.
The ragleap-agents library has its own optional log: AuditLog(path) records ids, tool names and sizes, never text. See how to build an AI agent that asks for approval. New guides in v0.13.2: docs/audit-retention.md and docs/audit-log-lines.md.
Sources: the release notes for v0.13.1, v0.13.2 and v0.13.3, and our release pages for v0.13.1 and v0.13.2.
Quick answers
What should an AI agent audit log contain?
In general: what the agent proposed, what was approved or rejected, what ran and what came back, with a time and an id to trace the request. RagLeap Core logs one JSON line per agent action, with sha256 hashes of content and result instead of the text.
How do I turn off RagLeap's audit log lines?
Set AUDIT_LOG_LINES=false. The lines go to the ragleap.audit logger, one JSON line per agent action.
Does RagLeap delete audit history by default?
No. AUDIT_RETENTION_DAYS, ACTION_LOG_RETENTION_DAYS and AGENT_RUN_RETENTION_DAYS default to empty or 0, which keeps everything. Deleting history removes evidence, so ship the audit lines to a log store first.
Does the audit log make an installation compliant?
No. The release notes say it is not a compliance claim, and nothing in it makes an installation compliant with any law or standard.