Exercises

Debug and architect 6 real AgentFlow workflow scenarios.

1. You write when('URGENT', escalator) and get TypeError: 'Agent' object is not iterable. How do you fix it?

2. Why should per-request workflow metadata live in ctx.variables instead of a module-level Python dict?

3. You want two independent checks (tone review and SLA compliance) to run concurrently to cut total latency in half. Which primitive do you use?

4. A Python pre-processing step strips whitespace from ctx.input, then the next Agent receives None. What did the step forget?

5. Five separate workflows all need the exact same 3-step PII compliance check. How do you avoid copy-pasting it?

6. Which keyword argument bounds the iteration count of repeat() in AgentFlow?

Back to the AgentFlow tutorial