Skip to content

No background needed to start
Go deeper in any chapter when you're ready

token2agent — request demo

agent run --goal "summarize last week's meeting notes"

  1. contextsystem + user + notes_search
  2. tokenizeuser → [141249, 277, 750, …]
  3. prefillKV cache ready
  4. decodenotes_search({query: "last week's meetings"})"3 decisions, 2 action items"
  5. tool4 notes + excerpts
  6. messages += [tool_call, tool_result]
  7. respondstream → user · trace ✓

Topic jumps to that section of the chapterM Model project (optional exercises)A System project (optional exercises) Security checkpointHow to read S/A/M codes

Start here

Part I ModelsOptional · deep route

Take it when you want to know how models work; if you only build applications, skip ahead to S6 LLM APIs and Application Basics.

The 5 chapters of Part I (S1–S5); open this or switch to Deep mode to show them

Part II Applications

Part III Knowledge & Tools

Part IV Agents

Part V Production

Part VI Capstone

You can follow the concepts route without programming: read the lectures, Try it first and self-check sections to understand how AI systems work. The hands-on routes require basic programming, HTTP and JSON.

Choose a reading mode at the top of each page. Simple shows the main explanation for a first read. Deep also opens implementation details, derivations, optional topics and advanced exercises.

The advanced exercises build one system across chapters. By the end, you have a deployed agent you use daily, with RAG, tools, memory, evals and security guardrails, plus engineering evidence others can review. Each step adds a capability. The number after A matches its chapter; see How to read the codes:

Stage What your system gains
Part II Applications (A6–A8) A streaming chat UI (Gradio, Chainlit or a CLI work too) with traces, reliable structured output and workflows, and a golden set and judge grown from real traces
Part III Knowledge & Tools (A9–A11) RAG with citations, tools and an MCP server with risk levels, and a context builder with a budget and caching
Part IV Agents (A12–A15) A hand-written harness, layered memory, trajectory evals and prompt optimization; multi-agent stays only if it wins the eval
Part V Production (A16–A18) A security audit and fixes, a complete frontend, and a multi-user deployment with an eval-gated release process
Part VI Capstone (A19) The capstone: extend it into an always-on agent

The full breakdown is in System Project A6–A19.

Lecture content is licensed under CC BY-NC-SA 4.0: you may share and adapt it with attribution, not for commercial use, and adaptations must use the same license. Quoted third-party content and trademarks belong to their owners.