The Loop
Think, act, observe — the three moves every agent makes.
The Loop is a free AI Agents lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the AI Agents learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
An agent is a loop, not a bigger model. It does three things over and over: think about what it needs, act by calling a tool, then observe what came back — until it can answer.
Here is that loop, one real run. Watch which step actually touches the world.
[{"type":"USER","text":"What should I wear in Istanbul today?"},
{"type":"THOUGHT","text":"I cannot know today's weather from memory. I need the weather tool."},
{"type":"TOOL_CALL","tool":"weather.get","args":{"city":"Istanbul"}},
{"type":"TOOL_RESULT","tool":"weather.get","result":{"temp_c":6,"wind_kmh":4,"rain_chance":0.7,"simulated":true}},
{"type":"THOUGHT","text":"6°C and a 70% chance of rain. That is a coat-and-umbrella answer."},
{"type":"ANSWER","text":"Warm, waterproof layers — 6°C with a 70% chance of rain. (Reading is simulated.)"}]Notice the shape: the model never fetched anything itself. It asked for a tool call, the runtime executed it, and the result came back as an observation. That hand-off is the whole trick.
Lock it in.
Frequently asked questions
Is the “The Loop” lesson free?
Yes — the full text of “The Loop” is free to read here on the web, and the AI Agents course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the AI Agents course, upgrade to CoddyKit PRO.
What will I learn in “The Loop”?
Think, act, observe — the three moves every agent makes. You practise AI Agents with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start AI Agents?
No prior experience is required. AI Agents on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “The Loop” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this AI Agents lesson?
Yes. Every AI Agents lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.