LoslegenKostenlos loslegen

En garde! Building guardrails for our agent

Diese Übung ist Teil des Kurses

Building AI Agents with Google ADK

Kurs anzeigen

Anleitung zur Übung

Safety first! Equip your agent with some safety rails, so every response stays aligned with expectations:

  • Use the .SafetySetting() class to define how the agent should handle dangerous content.
  • Create a .GenerateContentConfig() instance to bundle together safety settings with other content generation settings.
  • Pass these configurations to the agent as an argument.


Note: If you’re running DataLab in Restricted Mode, this exercise isn’t supported yet. We’re actively working on making it available in the future.


Interaktive Übung

In dieser interaktiven Übung kannst du die Theorie in die Praxis umsetzen.

Übung starten