โ† Docs

๐Ÿ“‹ Audit Log

Immutable agent action history for user-facing accountability.

How it works

Your agents log actions via a simple POST request. End users can then view a complete, tamper-proof history of everything the agent did. No edits, no deletes โ€” once written, audit entries are immutable. This provides user-facing accountability without any extra infrastructure on your end.

Log an action

curl -X POST https://www.agent-utils.com/api/audit \

-H "x-api-key: au_your_key" \

-H "Content-Type: application/json" \

-d '{"agentName":"billing-agent","action":"refund_issued"}'

# Response

{"success":true,"data":{"id":"64f1a2b3c4d5e6f7a8b9c0d1"}}

List logs with filters

# List all (paginated)

curl https://www.agent-utils.com/api/audit \

-H "x-api-key: au_your_key"

# Filter by agent, action, severity, date range

curl "https://www.agent-utils.com/api/audit?agent=billing-agent&severity=warn&limit=20" \

-H "x-api-key: au_your_key"

Get a single entry

curl https://www.agent-utils.com/api/audit/${id} \

-H "x-api-key: au_your_key"

Parameters

ParamMethodTypeDescription
actionPOSTstringRequired. Description of the action taken
agentNamePOSTstringName of the agent. Default: unknown
targetPOSTstringWhat the action was performed on (e.g. resource ID)
metadataPOSTobjectArbitrary key-value data attached to the entry
severityPOSTstringinfo ยท warn ยท error ยท critical โ€” default: info
agentGETqueryFilter by agentName
actionGETqueryFilter by action
severityGETqueryFilter by severity level
startDate / endDateGETqueryISO date strings to filter by createdAt range
limit / offsetGETqueryPagination (default: limit=50, offset=0, max limit=100)

Python

import requests

requests.post(

"https://www.agent-utils.com/api/audit",

headers={"x-api-key": "au_your_key"},

json={

"agentName": "billing-agent",

"action": "refund_issued",

"target": "invoice_7842",

"metadata": {"amount": 49.99},

"severity": "info"

}

)

Immutability guarantee

Audit log entries cannot be modified or deleted via the API. There are no PUT, PATCH, or DELETE endpoints. This ensures a trustworthy trail of agent actions for compliance and debugging. Retention varies by tier: 30 days (Free), 90 days (Builder), 365 days (Pro), unlimited (Enterprise).