← Chapter 33. The tool use loop
The tool use loop
Swipe to change step
Step 1 of 9. A user asks What is the weather in Lisbon? Your app owns the conversation: the API is stateless, so every request carries the full history. User. Your app (holds the conversation). Claude (Messages API). arrow from User to Your app, labelled question. arrow from Your app to Claude, labelled messages + tools. a question moving along question.
Keys: → or J next, ← or K back, Home and End jump, Space toggles auto-play when the diagram has focus.