Building AI Agents in 21 Days A Hands-On Course in Agentic Systems with Python and LLMs by M. Saqib ================================================================ Go from a single line that calls a language model to a deployed, autonomous agent that plans, uses tools, checks its own work, and recovers from failure - in three focused weeks. ================================================================ Most "AI agent" books hand you a framework and a magic import. You end up with a demo you can't debug and only a hazy idea of what the agent actually does. This book is the opposite. You build the agent yourself, from the loop up, in plain Python - so when something breaks, you know exactly why. You call Claude through the official Anthropic Python SDK and write every part by hand: the control loop, the tools, memory, retrieval, planning, guardrails, and the deployment around it. Frameworks like LangGraph and CrewAI are explained so you can read them - but you never hide behind one. By Day 21 an agent is no longer magic. It is something you can build, measure, and ship. WHAT YOU GET - 21 day-chapters (3 weeks x 7 days) of careful, worked teaching - no filler, no hand-waving. - 150+ runnable Python listings with real output. - 246 figures and diagrams - loop diagrams, sequence diagrams, and measured plots. - A clean, print-friendly layout, and a per-day workshop (quiz and exercises) so each idea lands in your hands. THE 21 DAYS Week 1 - Foundations Day 1. What Is an Agent? The Loop That Thinks Day 2. Tool Calling - Giving the Model Hands Day 3. The Agent Loop Day 4. ReAct - Reasoning Before Acting Day 5. Memory & the Context Window Day 6. Structured Output You Can Trust Day 7. Errors, Timeouts, and a Resilient Loop Week 2 - Capability Day 8. Designing Tools the Model Can Use Day 9. Retrieval as a Tool (RAG) Day 10. Planning vs. Reacting Day 11. Multi-Step Tasks & Working State Day 12. Self-Correction & Reflection Day 13. Cost and Latency Budgeting Day 14. Tracing and Observability Week 3 - Robustness and Scale Day 15. Evaluating Agents Day 16. Guardrails and Safety Day 17. Human in the Loop Day 18. Multi-Agent Orchestration Day 19. Long-Running & Background Agents Day 20. Deploying an Agent Day 21. Capstone - A Complete Agent, End to End WHO IT'S FOR You know ordinary Python - functions, dictionaries, exceptions. You do NOT need any machine-learning background, and you will not train a model; you call one and build the system around it. You need an Anthropic API key; each call costs a fraction of a cent, and the whole book runs for about the price of a coffee. BY DAY 21 YOU CAN - build the agent loop that calls a model, runs its tools, and feeds the results back until the task is done; - design tools, schemas, and structured output the model uses well; - ground an agent's answers in your own documents with retrieval; - make an agent plan, reflect, and correct itself; - measure and cut what every run costs in tokens and time; - evaluate an agent like code, guard it against bad input and prompt injection, and deploy it as a real service. The agent stops being a black box. Go build one that works.
ThriftBooks sells millions of used books at the lowest everyday prices. We personally assess every book's quality and offer rare, out-of-print treasures. We deliver the joy of reading in recyclable packaging with free standard shipping on US orders over $15. ThriftBooks.com. Read more. Spend less.