← All notes

Guardrail layers for tool-using agents

Short answer

Treat a runtime guardrail as the last layer, not the only one. Combine an injection detector, a check that the agent's reasoning still matches the user's goal, and static analysis of generated code. Rely on architecture first. [S1][S2]

Why

Agents now act on untrusted web pages and email, and fine-tuning or chatbot filters do not cover that. [S1] Injection is most dangerous when agents have tools or sensitive data. [S2]

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: arXiv, [2505.03574] LlamaFirewall: An open source guardrail system for building secure AI agents, CC BY 4.0; arXiv, [2506.08837] Design Patterns for Securing LLM Agents against Prompt Injections, CC BY 4.0.

Cite this

Permanent ID: iil:note:j12bp47w

iinventedlight. 2026. "Guardrail layers for tool-using agents." iinventedlight Library, iil:note:j12bp47w, version of 2026-11-04. https://iinventedlight.com/library/notes/ao-security-guardrail-layers/. License: CC-BY-4.0.

@misc{iil_note_j12bp47w,
  author = {{iinventedlight}},
  title = {{Guardrail layers for tool-using agents}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-04},
  url = {https://iinventedlight.com/library/notes/ao-security-guardrail-layers/},
  note = {Permanent ID iil:note:j12bp47w. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/ao-security-guardrail-layers.md.