StudyAIStudyAI
Pro
AI AgentsLesson 6
Lesson 68 minPro

Agent Safety & Guardrails

Keeping autonomous agents from doing harm.

What you will learn
  • Prompt injection risks
  • Human-in-the-loop approvals
  • Limiting an agent's blast radius

Explanation

Agents act in the real world, so safety is essential. Prompt injection is the top risk: malicious text in a web page or document tricks the agent into ignoring its instructions.

Defend with least privilege (give tools only the access they need), human approval for risky actions (sending money, deleting data), and input/output validation.

Always cap steps and scope so a confused agent can't cause large damage — limit the blast radius.

Real-world use

An agent reading emails could be hijacked by a hidden instruction in one message — which is why high-impact actions should require human sign-off.

Common mistakes
  • Giving an agent broad permissions and full autonomy on high-impact actions with no human check.
Practice

List three actions an agent should never take without explicit human approval.

Knowledge check
0/2 answered

1. Prompt injection is when...

2. A good guardrail for risky actions is...

Answer all questions to check.