Shell WalkerIntermediate7 daysFree
Building Agents With AI: Build One, Then Secure It
In seven days you will build a tool-using AI agent from scratch, break it the way an attacker would, and harden it until it holds.
Taught by Mr Elite 7 of 7 days live Complete
I teach this course the way I would at a whiteboard with one student. You build a small agent on your own machine: a loop that calls a language model, lets it use tools, keeps a little memory and answers real tasks. Then you stop being the builder and become the attacker, so you can see exactly where agents go wrong.
It runs for seven days, one lesson a day, about 45 to 75 minutes each. Every day ends with a mission that produces something I can check: a screenshot, a note, a working command or a short write-up. Everything runs on your own machine, a local test setup or a named SecurityElites lab. Nothing ever points at a system you do not own.
I assume you are comfortable in a terminal and know how the web works. I do not assume you have built an agent before.
By the end you can
- Build a working agent loop that calls a model, runs tools and stops safely.
- Write tool definitions with validated arguments and explain why validation matters.
- Explain how indirect prompt injection and tool-output injection hijack an agent, and demonstrate both in a lab.
- Apply least-privilege permissions and tool policies to limit an agent's blast radius.
- Add human approval to risky actions and check the approval shows the real action.
- Handle model output and agent memory as untrusted data.
- Review an agent design and write a short threat model with fixes.
Who this is for
- Intermediate learners who are comfortable in a terminal and understand HTTP, APIs and basic networking.
- Developers and security people who want to build agents and know how they fail.
- Anyone who has tried a few labs and now wants to understand the systems behind the AI challenges.
Before you start
- Comfort with a terminal: moving around, running commands, editing files.
- Basic Python: reading a script and running it. I explain every line I ask you to write.
- A working idea of how HTTP requests and JSON work.
- No prior experience with agents or language models is needed.
- Python 3.10 or newer (free)
- A terminal and a text editor such as VS Code (free)
- A free-tier API key from any model provider, or Ollama with a small local model (free)
- A web browser for the SecurityElites labs (free account)
Syllabus
One day at a time. Finished days get a tick. Days that are not out yet show when they unlock.
Module 1 Build the Agent
Get a working agent loop with real tools running on your own machine.
- 1Orientation and Your First Model CallBy the end of today you can send a prompt to a model from a Python script and print the reply.
- 2The Agent Loop and Your First ToolBy the end of today you can write a loop in which the model requests a tool, your code runs it and the result goes back to the model.Lab: AI Prompt Injection
- 3More Tools, Validation and MemoryBy the end of today you can add a second tool with argument validation and a simple memory file to your agent.Practice | Lab: AI Plugin Path Traversal
Module 2 Break and Defend the Agent
Attack the agent through its inputs, tools and memory, then apply controls that hold.
- 4Indirect Prompt Injection Against Your AgentBy the end of today you can show how text inside a document or web page makes an agent act on instructions its user never gave.Practice | Lab: AI Agent Hijacking | Lab: AI Indirect Prompt Injection
- 5Tool Rules and Least PrivilegeBy the end of today you can write a tool policy that limits what your agent may do and test that it stops a hijack.Practice | Lab: Whose Instruction Was That? | Lab: Coding Agent Blast Radius
- 6Human Approval, Output Handling and MemoryBy the end of today you can add an approval step that shows the real action, and treat model output and memory as untrusted.Practice | Lab: Who Approved That? | Lab: Where Does the Answer Go?
- 7Capstone: Attack and Harden Your Agent, Then Next StepsBy the end of today you can run a full attack-and-fix cycle on an agent you built and present the evidence.Capstone | Lab: Clean the Memory | Lab: Poisoned GitHub Issue
The final project
You build a small file-and-web assistant agent, attack it using the techniques from the course, and harden it with permissions, approvals and output handling. You finish with a short write-up showing each attack before and after the fix.
Questions people ask
Do I need to pay for a model API?
No. A free-tier key from a provider will do, or you can run a small local model with Ollama. Every exercise works with either, and the course costs nothing to follow.
Is the attacking part safe and legal?
Yes, because you only attack the agent you built on your own machine or a named SecurityElites lab. I never ask you to point anything at a system you do not own.
How much Python do I need?
You need to read a short script and run it. I explain each piece of code I ask you to write, so you can follow without being a fluent developer.
Will I be able to build agents for real work after this?
You will have the core pattern and the security controls that real agents need. Production systems add monitoring, testing and scale, and the capstone ends with a list of what to study next.