---
title: "Log agent actions and let users undo them · Agent Wranglers"
url: https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots/reversible-agent-actions
updated: 2026-10-20
licence: "All rights reserved"
---

# Log agent actions and let users undo them

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Hostile agents and bots](https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots)
- Rule: Record which agent did what for which user, and make its changes easy to undo.
- How: Store the agent's name and token ID with every change it makes. Show the user a history of agent actions. Prefer soft deletes and drafts for anything an agent changes, and let the user undo them.
- Check: Have a test agent change a test record. The history shows the agent by name, and one undo restores the record.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers security testing playbook: https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots/reversible-agent-actions`.

- Previous: [Limit bulk reads and scraping](https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots/limit-bulk-reads)
- Next: [Mark user content that agents read](https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots/mark-user-content)
- [Hostile agents and bots](https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots)
