Locus product guide · Updated
AI agent audit trail: what to log and how
An AI agent audit trail is a record of every action an agent took: which agent acted, whose authority it used, which tool it called, what it was allowed to spend, what it was charged, and who changed its access. With Locus Pro, every paid call records the spender, tool and cost, and every agent key change goes to an append-only credential audit log.
What should an AI agent audit trail record?
Record enough to answer the questions a reviewer asks after an incident or a surprising bill: who acted, with what permission, what it did, what it cost, and whether a person approved it.
| Field | Question it answers |
|---|---|
| Agent identity | Which agent acted, and which person or team owns it? |
| Credential | Which key or connected app did it use, and what was that key allowed to do? |
| Action and tool | Which tool, endpoint or model did it call? |
| Cost and outcome | What was it charged, and did the call succeed, fail or get refunded? |
| Approval | Did a person approve the action, and who? |
| Time | When did each step happen, in one time zone? |
Why isn't an agent's own log an audit trail?
An agent's transcript says what the model meant to do. An audit trail says what the system let it do and what actually happened, written by the system that enforced the permission, not by the agent.
Keep the record outside the agent's reach: an agent key should not be able to edit or delete its own history, and changes to keys and limits should be logged with the person who made them.
What does Locus Pro record for each agent?
Locus Pro writes the record at the point where it charges a call, so the trail covers every paid tool, data and API call an agent makes through it.
- Every paid call records who spent the credits, on which tool, and what it cost. A spender can be a workspace member, an agent key, an API key, an end user or one of your customers.
- Analytics filters spend by spender, provider and endpoint, and the transaction list shows every balance movement, including refunds.
- Spend over time downloads as a CSV for a reviewer or your own records.
- The credential audit log lists each key that was issued, rotated, renamed or revoked, with the time and whether a person, an API key or the system made the change.
- Calls above your approval amount wait for a person, so expensive actions carry an approval before they run.
How do I set up an audit trail for my agents?
Give every agent its own key instead of a shared one, so each record names a single agent. Name keys after the agent and its owner, allow only the tools that agent needs, and revoke a key when the agent is retired.
Tag calls made for your own customers with the customer, so spend per customer appears in the same record. Send the CSV or transaction list to the system where you keep other audit evidence.
What an audit trail does not cover
Locus Pro records the paid calls it brokers and the changes to its own keys. Actions an agent takes elsewhere, such as edits in your code repository or messages it sends, need logging in those systems; the AI agent governance guide covers identity, access and logging across tools.
Frequently asked questions
What is the difference between an audit trail and observability for AI agents?
Observability traces help you debug what a model did step by step. An audit trail is the record you keep to prove which agent acted, under whose authority, and what it was charged, and it should not be editable by the agent.
Can an agent delete or change its own audit records?
Not in Locus Pro. Charges are recorded by Locus when the call is settled, and the credential audit log is append-only. An API key cannot change spend controls either; that needs a signed-in owner or admin.
Can I export an AI agent audit trail?
Yes. In Locus Pro, spend over time downloads as a CSV, and analytics views keep their filters in the URL so you can share one with another authorized member.
Does the audit trail show which customer an agent acted for?
Yes, when your calls name the customer. Locus Pro then records spend for each of your customers alongside the agent or key that made the call.
Implementation references
Use these first-party references for current request contracts and account requirements. Tool availability, prices, and negotiated terms can change.