Best practiceRunning agents
Log every agent action and watch it in real time
OWASP ASI08OWASP ASI10
Agents act at machine speed: the Hugging Face intruder took about 17,600 actions in four days. Without a full record of prompts, tool calls, arguments and results you cannot detect a hijack, stop it, or explain afterwards what happened.
What to do
- Record every model call, tool call with arguments, tool result and outbound request, with timestamps and the agent's identity.
- Alert on new destinations, credential file access, mass reads, deletions, loops and secrets appearing in output.
- Plant canary tokens in data the agent can reach and alert when one shows up anywhere else.
- Keep transcripts long enough to investigate, and make them searchable.