---
title: "Hostile agents and bots · Agent Wranglers"
url: https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots
updated: 2026-10-20
licence: "All rights reserved"
---

# Hostile agents and bots

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

> AI agents and bots attack sites at scale. Verify who an agent is, limit scraping, mark what users wrote and keep agent actions reversible.

**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`.

## Required

- [Verify who an agent is](https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots/verify-agent-identity): Never trust the user agent string. Give special access to a bot or agent only after it proves who it is.
- [Log agent actions and let users undo them](https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots/reversible-agent-actions): Record which agent did what for which user, and make its changes easy to undo.

## Recommended

- [Limit bulk reads and scraping](https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots/limit-bulk-reads): Cap how fast one client can page through your data and how much it can read in a day.
- [Mark user content that agents read](https://agentwranglers.se/playbook/adversarial-testing/hostile-agents-and-bots/mark-user-content): Keep text written by your users apart from your own content, so other people's agents can tell it is not yours.

- Previous: [AI agents and models](https://agentwranglers.se/playbook/adversarial-testing/ai-agents-and-models)
- [All chapters](https://agentwranglers.se/playbook/adversarial-testing)
