Glossary · Phase 1 · Building with LLMs
Agent
A model in a loop that decides what to do next, uses tools, looks at the results, and repeats until the job is done.
Try it now
A fake model replays a script so you can see the shape. Each tool turn adds two messages. The loop ends when the reply isn't a tool request, and it prints 3 calls, 6 messages.
Learn it properly
The agent loop · Model → tool → result → model, until the task is done. About 30 minutes.
Other terms from the same lesson
- agent loop: The repeating cycle of an agent: think, call a tool, read the result, decide again.
- decorator: A line starting with @ just above a function that adds extra behavior to it, such as @app.post("/api/answer").
- side effect: Anything a tool does besides giving back an answer, such as sending an email or changing a record. Asking again can't undo it.
Never trained an AI?
Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.