# Securing AI Agents

> Threat-model and harden autonomous AI agents that run tools, execute shell, and act on untrusted input. Defense in depth.

- Source: https://stevenfoerster.com/tutorials/paths/securing-ai-agents/

Learning Path

Threat-model and harden autonomous AI agents: reason about the attack surface of agents that run tools, execute shell commands, and act on untrusted input, then design defenses in depth.

4 available [Start the path](https://stevenfoerster.com/tutorials/building-a-minimal-tool-calling-agent/)

1.  - 1
    - intermediate

    ## [Building a Minimal Tool-Calling Agent You Can Harden](https://stevenfoerster.com/tutorials/building-a-minimal-tool-calling-agent/)

    Build miniagent: a bare-bones Python tool-calling agent with shell, file, and HTTP access, then map the attack surface it creates.

2.  - 2
    - intermediate

    ## [Threat Modeling an AI Agent with Shell Access](https://stevenfoerster.com/tutorials/threat-modeling-ai-agent-with-shell-access/)

    Apply STRIDE threat modeling to an AI agent that can execute shell commands, read files, and act on untrusted user input.

3.  - 3
    - advanced

    ## [Sandboxing Agent Tool Execution with Containers and seccomp](https://stevenfoerster.com/tutorials/sandboxing-agent-tool-execution/)

    Run miniagent tool execution inside a locked-down container with dropped capabilities and a seccomp profile to close T5 and T8.

4.  - 4
    - intermediate

    ## [Least Privilege for Agent Tools: Capability-Scoped Actions](https://stevenfoerster.com/tutorials/least-privilege-for-agent-tools/)

    Add executor-level policy enforcement to miniagent so each tool is restricted to a declared, narrow set of operations.


[All tutorials and learning paths](https://stevenfoerster.com/tutorials/)
