Task guardrails
A guardrail checks a task's output before it moves on, and sends the agent back with feedback when it fails. Watch a Python check, an LLM check and the hallucination guardrail stop a bad festival SMS.
11 minPro
Checking your access…
Inside this lesson
- An animation you play, pause and step through, with each part saying what it is doing.
- The real code beside it, with the lines for each step lit up.
- Practice mode, where you route each message yourself, and a short quiz.
- About 11 minutes.
Written from the official documentation
In this module: Tasks
- Tasks and crewsGiving agents work and running the team.Pro
- Structured task outputsTaskOutput, output_pydantic, output_json and output files.Pro
- Task guardrailsChecking a task's output and retrying when it fails.Pro
- Task context, async and conditional tasksFeeding outputs forward, running in parallel, skipping steps.Pro