Books you can read online, chapter by chapter
Long-form guides with runnable code, written to be read in order. Every book here is free to read in full.
- 1Book
- 16Chapters
- FreeNo sign-up to read
- 1What "agentic" really means: workflows vs agents and the autonomy spectrum33 min
- 2How LLMs work, just enough: tokens, context windows, sampling and reasoning models37 min
- 3Talking to models: APIs, messages, system prompts and streaming45 min
- 4Prompting for agents: instructions, examples, roles and prompt structure37 min
- 5Structured outputs: JSON Schema, validation and recovering from bad output42 min
and 11 more chapters
16 chapters, about 10 h 32 min
Start readingAgentic AI Foundations
From LLM Calls to Your First Agent
Learn how AI agents really work by building one yourself, in plain Python and without a framework hiding the details. You'll write the model client, tool calling and the agent loop, manage context and memory, choose a model, and test your agent with golden tasks and evals. Every chapter works on the same fictional retailer, Kestrel Outfitters, and the code runs locally with a fake model, so you don't need an API key.
- 16Chapters
- 600+ testsTested code examples
- 3.12Python
- NoneAPI key needed

Bishal SahaLet's build together
Have a system to design, or an AI feature to get right?
Tell me about the problem. You'll get a clear, honest view of the best way forward.
- Reply within 24 hoursOn business days, with my honest view and a next step.
- Accepting select engagementsArchitecture, AI features and full builds.
- Remote, worldwideWorking with startups, SMEs and enterprises.
