DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to test an agent against prompt injection before it touches real data with AI Engineer Notebooks

Run direct and indirect injection attacks on a tool-using agent, then add defenses and retest.

Short answer: Open 07-security/01-prompt-injection-and-trust.ipynb and run the direct and indirect injection examples against the sample agent; then Note which outputs are handled unsafely and which tool calls the attacks trigger; open 05-agents/03-guardrails-and-budgets.ipynb and add stopping conditions and budgets to limit what the agent can do. All steps.

Authorization notice. AI Engineer Notebooks is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.

dual-use. The injection examples are working attack payloads, so run them only against systems you own or are authorized to test.

Who it is forA security-minded engineer who has been asked to sign off on an LLM feature that reads external content and calls tools.

The problemAn agent that reads web pages, emails, or documents can be steered by text hidden in that content into misusing its tools.

The outcomeA list of working attacks against the agent, the defenses that stopped them, and the attacks that still got through.

What you need first

  • A Google account to open Colab notebooks
  • A free Groq API key from console.groq.com (no credit card needed)
  • The key saved as a Colab secret, as the setup notebook describes
  • Basic Python and comfort reading API responses

Steps

  1. Open 07-security/01-prompt-injection-and-trust.ipynb and run the direct and indirect injection examples against the sample agent.
  2. Note which outputs are handled unsafely and which tool calls the attacks trigger.
  3. Open 05-agents/03-guardrails-and-budgets.ipynb and add stopping conditions and budgets to limit what the agent can do.
  4. Rerun the injection examples and record which attacks still succeed.
  5. Write down the trust boundary for each tool and the remaining gaps for your review.

Prompt for your agent

Using the repo calmrocks/ai-engineer-notebooks, run the injection examples in 07-security/01-prompt-injection-and-trust.ipynb against <placeholder agent or tool list>. Expected output: a table of attacks with the tool calls each one triggered, before and after defenses. Verify that the test covers both direct and indirect injection.

Caveat. The security notebook teaches the OWASP LLM Top 10 risks on the notebook's own sample agent, so it does not test your production system until you point it there.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for calmrocks/ai-engineer-notebooks and "Test an agent against prompt injection before it touches real data"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer