Reading about AI agents is one thing; building one is where the concepts finally click. This tutorial walks through creating a small but genuinely useful agent from scratch — the kind of project you can finish over a weekend and actually keep using. We'll skip the hype and focus on the concrete moving parts: the loop, the tools, the prompt, and the gotchas that trip up first-timers.
What We're Building
Our example agent is a research assistant that, given a question, can search the web, read the results, and write a short sourced summary. It's simple enough to build quickly but exercises every core concept: a reasoning loop, tool use, and result synthesis. Once you understand this pattern, you can swap the tools and aim it at almost any domain.
Step 1: Understand the Agent Loop
Strip away the jargon and an agent is just a loop around a language model:






