Skip to main content
Every action in AgentOS — deploys, runs, decisions, secrets, guardrails, memory erases, webhooks, models, evals, users, roles, API keys, sign-ins and refused requests — writes an audit event in the same transaction as the change itself. Events can’t be changed or deleted, and each one is chained to the one before it with a keyed hash, so a changed, removed or reordered event is detected. For what is recorded and how to read it in the panel, see Audit log. This route lets a SIEM, a nightly archive job or a script pull the events of an environment, oldest first, picking up where it left off. It needs the admin role in the environment.

Read the audit log

GET /v0/envs/{env}/audit
integer
default:"0"
Only events with a larger id: pass the previous page’s next.
integer
default:"100"
1–500.
string
Only this agent’s events (its name).
Events come oldest first. next is the last event’s id when the page is full, and null when there is nothing more right now. To follow the log, store the last id you processed and call again with after=<that id> on a schedule:
Reading the log is itself audited: every pull that returns events records an audit.exported event (the format, how many events, and from which id). An empty pull records nothing, so polling an idle environment doesn’t fill the log.

The event object

integer
Increases with every event of the installation. Use it as your cursor.
integer
The hash chain the event belongs to (one per tenant) and its position in it. A tenant’s environments share one chain, so seq has gaps when you read one environment.
string
When it happened, ISO 8601 in UTC.
string
What happened, as resource.verb in the past tense, from the catalog below.
string
success, denied (the request was refused) or failure.
string
person, service_account, agent (acting for a run’s caller), system (the platform on its own) or anonymous (for example a failed sign-in).
integer | null
The user who acted (a person or a service account’s user).
integer | null
The API key a service account used.
integer | null
For an agent’s action, the caller of the run it acted in.
integer | null
Where it happened.
string
What it was done to. Names are kept for things (agents, guardrails, webhooks…), never for people: a user is named only by id, so erasing a person never means editing the log.
object
{field: [from, to]} for the fields that changed. Secrets are stored as keyed fingerprints, and long text such as prompts and memory values as a length and a fingerprint, never the text itself.
object
More about the action, such as a deploy id, a receipt’s counts or a refused request’s reason.
string
Why, when there is one.
string
panel, api, agent, system or cli.
string
The request it came from; empty for background work.
integer
The event format’s version, 1.
string
The hash chain: hash is an HMAC-SHA256 over the event’s fields and prev_hash, the hash of the previous event in the same chain. Checking the hashes needs the installation’s audit key; the panel’s Log intact check does this on every visit to the Audit page.

Actions

Reads are not recorded, except exports of the log itself. A prompt deployed from the Prompts tab appears as version.config_changed followed by version.promoted.
This route returns the events of one environment. Events that belong to no environment — such as sign-ins, or changes to a tenant’s users made on the Users page — are shown to tenant admins in the panel’s Govern → Audit page.

Errors