Error handlers and exceptions
A run does not always end with a good answer. See what happens when an agent runs out of turns or returns a broken answer, which exception the SDK raises, and how an error handler turns the failure into an answer you control.
10 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 10 minutes.
Written from the official documentation
In this module: Running agents
- RunConfigOne object of settings that applies to a whole run.Pro
- ResultsFinal output, new items, next input and what to do after a run.Pro
- StreamingRaw model events and run item events as the agent works.Pro
- Error handlers and exceptionsMax turns, model errors and how a run recovers or fails.Pro
- REPL and agent visualizationChat with an agent in a terminal and draw its graph.Pro