Multi-Step Behavior, Instrumentation, and Streaming
Lecture 6.4
- Demo: multi-step tasks the agent chains autonomously (read → edit → verify)
- Emergent behavior: the agent plans steps it was never explicitly told
- When the agent gets stuck or loops — recognizing and debugging failure modes
- Instrumenting context growth: counting tokens per API call, tracking the messages array size over a session
- Visualizing the cost curve: where tokens accumulate and why
- Streaming responses: implementing streaming for better UX during long tool-calling sequences
- Connection to Module 4: context growth is the problem, context management is the solution
Additional Resources