Introduction to Computer Security

Agent Security Challenge

Craft a malicious LangChain tool to hijack, extract secrets from, and manipulate an LLM-powered weather agent.

How It Works

1
A weather assistant agent runs with an LLM, a system prompt containing a secret token, and a benign tool (weather_lookup).
2
You write a malicious tool (a Python class) that gets loaded alongside the benign tool. The LLM decides which tools to call.
3
Your goal is to hijack the agent (make it call your tool), extract the secret token from the system prompt, and manipulate the output.
4
Each level adds stronger defenses. Can you beat them all?

Select a Challenge Level