Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
AI Guardrails: Secure Generative AI and AI Agents
New
2 students

AI Guardrails: Secure Generative AI and AI Agents

Design OWASP-aligned controls for prompt injection, sensitive data, AI agents and testing, with hands-on labs
Last updated 11/2026
English

What you'll learn

  • Map an AI application's workflow, trust boundaries and consequential actions before choosing controls
  • Turn business policy into testable rules and a decision table that drives real controls
  • Defend against direct and indirect prompt injection, including instructions hidden in documents and images
  • Keep sensitive data out of the model and enforce permissions before retrieval, so restricted content never reaches it
  • Validate AI output separately from factual support and business authorization
  • Bound AI agents: tool access, credentials, connectors and MCP servers, approval gates and spending limits
  • Assemble layered guardrails that fail safely, and map them to the OWASP LLM and Agentic Top 10 and MITRE ATLAS
  • Red-team your assistant and measure missed attacks, unnecessary blocks and legitimate tasks completed
  • Investigate guardrail failures, contain them and prove the fix with regression tests

Course content

11 sections • 56 lectures • 7h 30m total length
  • When a Helpful AI Becomes a Business Problem9:56

    See how a helpful AI assistant turns into a business problem: a misleading answer, information given to the wrong person, an action nobody authorized, and a promise nobody approved. Learn to trace each failure to its business consequence and to tell a poor answer from an unsafe action.

  • Safety, Security, Reliability, and Business Rules7:36

    Separate the four kinds of problems guardrails deal with: harmful content, deliberate misuse, unsupported answers and broken business rules. See how a single customer request can raise several different control questions at once.

  • What Guardrails Can—and Cannot—Do7:18

    Understand what layered safeguards can achieve, what risk remains, and why a system prompt or a classifier can never replace authorization enforced by the application. Learn the difference between preventing, detecting and responding.

  • Meet HarborPoint Services7:31

    Meet HarborPoint Services, the home-services company used throughout the course: its people, documents, records and the AI assistant it plans to launch. Learn where answering a question ends and recommending or taking an action begins.

  • Exercise: Define Acceptable Behavior8:45

    Turn "make the assistant safe" into requirements you can observe and test. Define what the assistant may do, what it must never do, and which situations need a person to review. Includes the Acceptable-Behavior Worksheet.

Requirements

  • Basic familiarity with generative AI tools such as chat assistants
  • No programming experience needed: the labs run supplied Python code in Jupyter or Google Colab, and you change clearly labeled settings
  • No API keys, GPU or cloud accounts are needed for the core labs

Description

This course contains the use of artificial intelligence.

Your AI assistant just told a customer their water damage is covered. It isn't. Another chat handed an address to the wrong person, a refund went out that nobody approved, and the assistant promised an exception that doesn't exist. Every one of those started with a helpful AI and a missing guardrail.

This course teaches you to design, build and prove the controls that keep generative AI applications and AI agents within bounds. You won't just learn what prompt injection is. You'll learn where each control belongs in a real application, what it checks, what happens when it fails, and how to show the people who own the risk that it works.

One realistic case, start to finish. You'll follow HarborPoint Services, a home-services company launching a customer-service assistant that answers policy questions, looks up accounts, books visits and issues refunds. Every lesson builds on the last, from mapping the application to a release decision you can defend.

What you'll work through:

  • Map before you control: follow a request through retrieval, generation, validation and execution, and find the trust boundaries.
  • Policy into rules: turn "make it safe" into a decision table that drives real controls, with exceptions and human review that stay bounded.
  • Hostile inputs: direct and indirect prompt injection, including instructions hidden in documents and images, and why screening alone is never enough.
  • Sensitive data and retrieval: minimize what the model sees, enforce permissions before retrieval, and keep the knowledge base trustworthy.
  • Answers and commitments: separate a plausible answer from a supported one, and enforce business limits outside the model.
  • AI agents: narrow tools and credentials, connectors and MCP servers, approval gates that mean something, and limits on repetition and spending.
  • Architecture: layer rules, classifiers, model evaluators and human review, decide what happens when a guardrail service fails, and map everything to the OWASP Top 10 for LLM Applications, the OWASP Top 10 for Agentic Applications and MITRE ATLAS.
  • Testing: build evaluation sets, measure missed violations and unnecessary blocks, red-team the assistant, and run regression tests after every change.
  • Operations: monitor decisions in production, investigate a control failure, contain it, restore service, and assign ownership.

Learn by doing. Pause-and-decide exercises run through every lesson, and the capstone has you repair a flawed release configuration and present a guardrail plan with its evidence, limitations and owners. Hands-on labs use synthetic data and supplied code in Jupyter or Google Colab. The core labs need no AI model, no API keys or subscriptions, and no special hardware.

A defender's course. This isn't a tour of one product or a collection of attack tricks. It's about controls enforced by the application, measured honestly, and operated over time, so the assistant stays useful to legitimate customers while the guardrails do their job.

Real, publicly reported incidents are included where they make a point, and every one is verified. By the end, you'll be able to look at any AI assistant or agent and say exactly what keeps it under control, and what doesn't yet.

Who this course is for:

  • IT professionals and security analysts supporting AI-enabled applications
  • Application owners, AI project leads and technically curious managers who need to know what keeps an AI assistant under control
  • Developers who want an approachable, practical start on application guardrails
  • Anyone responsible for launching a customer-facing AI assistant or AI agent and defending that decision