Back to course

Conditional Edges: Letting the Agent Decide

Agentic AI Engineering (Build, don't just prompt)

Dynamic Routing

Sometimes, an agent needs to loop back if the result isn't good enough. This is a 'Conditional Edge'.

The Router Function

Create a function that inspects the state and returns the name of the next node to visit. If the task is done, go to END.