AI Agents Tutorial: LLMS with Tools

TL;DRAn AI agent is an LLM that can take actions through tools — not just produce text.

An agent wraps an LLM in a loop where it can decide to call tools (search, code execution, APIs, file edits), observe results, and continue until a goal is met. This turns a text generator into something that does things — books a trip, fixes a bug, researches a topic. The capability is powerful but raises reliability and safety stakes: an agent acts on the world, so errors have consequences.

Key points

Common mistakes

Try it: Explain the difference between a chatbot and an agent.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>chatbot: text in → text out
agent: goal → {think, call tool, observe} loop → result
acts on the world</pre></body></html>
Open the interactive lesson →
RAG · Hybrid Search · Rerank Tool Use · Function Calling