AI for Defenders

Put LLMs and agents to work on real security tasks — and keep them on a leash.

28 labs, about 26 hours: 11 beginner, 12 intermediate, 5 advanced. Free, no account needed to start.

Open this journey with your progress

The labs, in order

  1. Build a local image classifier
  2. Generate images locally with an open-source model, privately and responsibly
  3. Run a local, offline AI coding assistant
  4. Summarize security logs with a local LLM
  5. Install Ollama and run your first local model — safely
  6. Build a private RAG app on your own machine
  7. Transcribe audio privately on your own machine with Whisper
  8. Build a recommender system
  9. Build a semantic search engine for your own documents
  10. Build a spam filter with Naive Bayes
  11. Classify text with a local model
  12. Add semantic caching to your LLM app: cut cost and latency by reusing answers to similar questions (without leaking data)
  13. Classify network traffic with a decision tree
  14. Build a local RAG pipeline over your own documents
  15. Decide when an incident-response agent should ask a clarifying question instead of acting: score ambiguity x blast radius, sweep the threshold, and measure when asking stops paying
  16. Build your first MCP server: expose a security tool to an LLM (and test it with the MCP Inspector — no API key needed)
  17. Triage security alerts with k-means clustering
  18. Build a neural network from scratch
  19. Measure lost-in-the-middle recall for an evidence-reading agent, then fix it by reordering
  20. Make your LLM app resilient: timeouts, retries with backoff, a circuit breaker, and a fallback model
  21. Draft an incident timeline from raw logs with a local LLM — then verify every single event
  22. Evaluate an LLM with a rubric and a test set
  23. Rewrite tool error messages so an IR agent can recover from them, and measure the recovery rate
  24. MCP server, Part 4: dynamic client registration and PKCE — let unknown clients register themselves and get tokens with no shared secret (all local, proven with curl)
  25. Fine-tune a Language Model with LoRA (Deep Dive)
  26. Detect log anomalies with an autoencoder
  27. Add a Reflexion self-critique loop to a triage agent: let it reflect on its own failed run and retry, then measure what it recovers and what it wrecks
  28. Build a prompt-injection-resistant tool broker: a deny-by-default layer that guards every tool an LLM can call (free, local Ollama — no API key)

Related