
The 808 Books / Five Floors Up / Chapter 8
Logging both parties: the audit trail
After an incident, the first question is "who did this?" With agents, the honest answer is usually two parties: the person who asked and the agent that acted. Log both.
The short version
- Every agent action should be traceable to the agent's own identity, and, when it acted for someone, to that person too.
- Join up three layers: identity logs (who got which token), agent traces (what it planned and which tools it called), and system logs (what actually changed).
- Protect the logs themselves, and decide up front how much of the prompts and responses you'll keep.
By the numbers
52%of companies say they can track and audit all data used or shared by their AI agents ([Help Net Security, reporting SailPoint 2025](https://www.helpnetsecurity.com/2025/05/30/ai-agents-organizations-risk/); vendor research)
More than two-thirdsof organizations can't clearly tell agent actions from human actions (CSA, 2026)
"Development"the current status of OpenTelemetry's GenAI agent conventions, the emerging standard for agent traces; useful now, still changing (OpenTelemetry)
01 Why "the service account did it" isn't an answer
In the introduction, Omar's logs showed the billing service account sending 40 tenants' ledgers. True, and useless. It's the identity equivalent of a security camera pointed at the ceiling. They couldn't say which agent, acting for whom, prompted by what, or what else it had done. NIST's NCCoE names this directly in its agent identity work: link specific agent actions to the agent's own non-human identity for visibility, and keep track of where prompts and data came from (Hogan Lovells, summarizing NIST).
The rest of this chapter is for Pro members
Keep reading with Pro, C$10 a month.
You’ve read the first section. Pro opens every chapter of all seven 808 Books, their print editions as PDFs, and every guide in the library.
- 02 Three layers, one thread
- 03 A common format for traces
- 04 Content, privacy and tamper-resistance
- The exercise and template
- The chapter check
- Sources