New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
Every agent tutorial hides the loop inside somebody else's framework.
What you'll have at the end
A script that runs a bounded loop, calls one real tool, and stops once the model says it's done
You need
A script that already sends a plain text question to a live LLM API and gets back a plain text answer, with no tool calling wired in yet.
Not covered
This does not cover what happens when the tool itself throws an error, or capping the loop by dollars spent instead of by a repeat count: those are their own problems.
Checked 15 Aug 2026
Part of the AI Agents cookbook