An End-to-End Audit Trail for AI Agent Actions in Python
One line in my log had no request id, and it was the audit record of a refund.
Video #235 ยท Enterprise architecture and AI agents
Steps in the video
Files
- compare.py (29 lines)
- platform_parts.py (36 lines)
- trail.py (26 lines)
Tested with
Python 3.12.15
What this does not show
One made-up program in one process, no model. Only a run_in_executor thread was tested; asyncio.to_thread copies the context by itself. Queues, scheduled jobs and separate services, which need a header such as traceparent, were not tested. The trail is not tamper-evident.
Sources
Learning IT by Example.