# Agentic AI from Scratch > Build AI agents from a raw while-loop and an HTTP call, before a single framework gets imported. 16 phases, 163 lessons (137 live), Python and TypeScript, free and open source (MIT). Source: https://github.com/Ramakm/agentic-ai-from-scratch Site: https://agentic-ai-from-scratch.vercel.app/ Maintainer: Ramakrushna Mohapatra (https://www.linkedin.com/in/ramakrushnamohapatra, https://www.instagram.com/techwith.ram/, https://x.com/techwith_ram, https://github.com/Ramakm) Install the tutor skills into a coding agent: npx skills add Ramakm/agentic-ai-from-scratch ## Phase 00: Setup & Tooling A dev environment, local and hosted models, raw HTTP calls, streaming and tracing, all wired up before writing an agent. - 00.01 Your agent dev environment (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/00-setup-and-tooling/01-your-agent-dev-environment/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/00-setup-and-tooling/01-your-agent-dev-environment/docs/en.md - 00.02 Python & TypeScript for agents (60 min): https://agentic-ai-from-scratch.vercel.app/lessons/00-setup-and-tooling/02-python-typescript-for-agents/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/00-setup-and-tooling/02-python-typescript-for-agents/docs/en.md - 00.03 Running local models with Ollama (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/00-setup-and-tooling/03-running-local-models-with-ollama/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/00-setup-and-tooling/03-running-local-models-with-ollama/docs/en.md - 00.04 API keys, providers & rate limits (30 min): https://agentic-ai-from-scratch.vercel.app/lessons/00-setup-and-tooling/04-api-keys-providers-rate-limits/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/00-setup-and-tooling/04-api-keys-providers-rate-limits/docs/en.md - 00.05 Calling an LLM over raw HTTP (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/00-setup-and-tooling/05-calling-an-llm-over-raw-http/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/00-setup-and-tooling/05-calling-an-llm-over-raw-http/docs/en.md - 00.06 Streaming responses with SSE (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/00-setup-and-tooling/06-streaming-responses-with-sse/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/00-setup-and-tooling/06-streaming-responses-with-sse/docs/en.md - 00.07 Tracing from day one (35 min): https://agentic-ai-from-scratch.vercel.app/lessons/00-setup-and-tooling/07-tracing-from-day-one/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/00-setup-and-tooling/07-tracing-from-day-one/docs/en.md - 00.08 Project layout for agent repos (30 min): https://agentic-ai-from-scratch.vercel.app/lessons/00-setup-and-tooling/08-project-layout-for-agent-repos/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/00-setup-and-tooling/08-project-layout-for-agent-repos/docs/en.md ## Phase 01: LLM Foundations for Agents What a model actually returns, how context windows fill, and how to force structured, parseable output. - 01.01 What an LLM actually returns (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/01-llm-foundations/01-what-an-llm-actually-returns/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/01-llm-foundations/01-what-an-llm-actually-returns/docs/en.md - 01.02 Tokens and the context window (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/01-llm-foundations/02-tokens-and-the-context-window/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/01-llm-foundations/02-tokens-and-the-context-window/docs/en.md - 01.03 Sampling: temperature, top-p, determinism (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/01-llm-foundations/03-sampling-temperature-top-p-determinism/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/01-llm-foundations/03-sampling-temperature-top-p-determinism/docs/en.md - 01.04 Chat templates and message roles (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/01-llm-foundations/04-chat-templates-and-message-roles/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/01-llm-foundations/04-chat-templates-and-message-roles/docs/en.md - 01.05 System prompts as contracts (35 min): https://agentic-ai-from-scratch.vercel.app/lessons/01-llm-foundations/05-system-prompts-as-contracts/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/01-llm-foundations/05-system-prompts-as-contracts/docs/en.md - 01.06 Structured output & JSON mode (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/01-llm-foundations/06-structured-output-json-mode/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/01-llm-foundations/06-structured-output-json-mode/docs/en.md - 01.07 Parsing and validating with schemas (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/01-llm-foundations/07-parsing-and-validating-with-schemas/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/01-llm-foundations/07-parsing-and-validating-with-schemas/docs/en.md - 01.08 Token budgets & cost math (35 min): https://agentic-ai-from-scratch.vercel.app/lessons/01-llm-foundations/08-token-budgets-cost-math/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/01-llm-foundations/08-token-budgets-cost-math/docs/en.md - 01.09 Model selection for agent work (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/01-llm-foundations/09-model-selection-for-agent-work/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/01-llm-foundations/09-model-selection-for-agent-work/docs/en.md - 01.10 Why capable models still fail (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/01-llm-foundations/10-why-capable-models-still-fail/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/01-llm-foundations/10-why-capable-models-still-fail/docs/en.md ## Phase 02: Tool Use & Function Calling Turn text into action. Tool schemas, dispatchers, parallel calls, and errors fed back as observations. - 02.01 Text in, text out: the limit (30 min): https://agentic-ai-from-scratch.vercel.app/lessons/02-tool-use/01-text-in-text-out-the-limit/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/02-tool-use/01-text-in-text-out-the-limit/docs/en.md - 02.02 Tool schemas from first principles (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/02-tool-use/02-tool-schemas-from-first-principles/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/02-tool-use/02-tool-schemas-from-first-principles/docs/en.md - 02.03 Writing a tool dispatcher (60 min): https://agentic-ai-from-scratch.vercel.app/lessons/02-tool-use/03-writing-a-tool-dispatcher/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/02-tool-use/03-writing-a-tool-dispatcher/docs/en.md - 02.04 Parallel tool calls (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/02-tool-use/04-parallel-tool-calls/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/02-tool-use/04-parallel-tool-calls/docs/en.md - 02.05 Tool errors as observations (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/02-tool-use/05-tool-errors-as-observations/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/02-tool-use/05-tool-errors-as-observations/docs/en.md - 02.06 Designing tools models can use (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/02-tool-use/06-designing-tools-models-can-use/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/02-tool-use/06-designing-tools-models-can-use/docs/en.md - 02.07 Idempotency and side effects (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/02-tool-use/07-idempotency-and-side-effects/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/02-tool-use/07-idempotency-and-side-effects/docs/en.md - 02.08 Human approval gates (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/02-tool-use/08-human-approval-gates/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/02-tool-use/08-human-approval-gates/docs/en.md - 02.09 Tool results that fit the context (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/02-tool-use/09-tool-results-that-fit-the-context/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/02-tool-use/09-tool-results-that-fit-the-context/docs/en.md - 02.10 Native function calling across providers (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/02-tool-use/10-native-function-calling-across-providers/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/02-tool-use/10-native-function-calling-across-providers/docs/en.md - 02.11 Testing tools in isolation (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/02-tool-use/11-testing-tools-in-isolation/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/02-tool-use/11-testing-tools-in-isolation/docs/en.md ## Phase 03: The Agent Loop A while-loop, a model, and a toolbox. ReAct, stop conditions, retries, interrupts, and the loop as a graph. - 03.01 The agent loop in 120 lines (60 min): https://agentic-ai-from-scratch.vercel.app/lessons/03-the-agent-loop/01-the-agent-loop-in-120-lines/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/03-the-agent-loop/01-the-agent-loop-in-120-lines/docs/en.md - 03.02 ReAct: reason, act, observe (60 min): https://agentic-ai-from-scratch.vercel.app/lessons/03-the-agent-loop/02-react-reason-act-observe/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/03-the-agent-loop/02-react-reason-act-observe/docs/en.md - 03.03 Stop conditions & max steps (35 min): https://agentic-ai-from-scratch.vercel.app/lessons/03-the-agent-loop/03-stop-conditions-max-steps/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/03-the-agent-loop/03-stop-conditions-max-steps/docs/en.md - 03.04 Scratchpads and thought traces (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/03-the-agent-loop/04-scratchpads-and-thought-traces/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/03-the-agent-loop/04-scratchpads-and-thought-traces/docs/en.md - 03.05 Handling malformed actions (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/03-the-agent-loop/05-handling-malformed-actions/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/03-the-agent-loop/05-handling-malformed-actions/docs/en.md - 03.06 Retries, backoff & recovery (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/03-the-agent-loop/06-retries-backoff-recovery/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/03-the-agent-loop/06-retries-backoff-recovery/docs/en.md - 03.07 Streaming an agent's steps (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/03-the-agent-loop/07-streaming-an-agent-s-steps/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/03-the-agent-loop/07-streaming-an-agent-s-steps/docs/en.md - 03.08 Interrupts and resumption (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/03-the-agent-loop/08-interrupts-and-resumption/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/03-the-agent-loop/08-interrupts-and-resumption/docs/en.md - 03.09 State machines for agents (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/03-the-agent-loop/09-state-machines-for-agents/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/03-the-agent-loop/09-state-machines-for-agents/docs/en.md - 03.10 The loop as a graph (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/03-the-agent-loop/10-the-loop-as-a-graph/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/03-the-agent-loop/10-the-loop-as-a-graph/docs/en.md - 03.11 Cost and step budgets (35 min): https://agentic-ai-from-scratch.vercel.app/lessons/03-the-agent-loop/11-cost-and-step-budgets/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/03-the-agent-loop/11-cost-and-step-budgets/docs/en.md - 03.12 Debugging a stuck loop (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/03-the-agent-loop/12-debugging-a-stuck-loop/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/03-the-agent-loop/12-debugging-a-stuck-loop/docs/en.md ## Phase 04: Memory & Context Engineering Context is the program. Buffers, summaries, embeddings, a vector store by hand, and memory that stays clean. - 04.01 Context is the program (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/04-memory-and-context/01-context-is-the-program/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/04-memory-and-context/01-context-is-the-program/docs/en.md - 04.02 Conversation buffers & truncation (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/04-memory-and-context/02-conversation-buffers-truncation/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/04-memory-and-context/02-conversation-buffers-truncation/docs/en.md - 04.03 Summarization memory (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/04-memory-and-context/03-summarization-memory/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/04-memory-and-context/03-summarization-memory/docs/en.md - 04.04 Embeddings from scratch (60 min): https://agentic-ai-from-scratch.vercel.app/lessons/04-memory-and-context/04-embeddings-from-scratch/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/04-memory-and-context/04-embeddings-from-scratch/docs/en.md - 04.05 A vector store in 80 lines (60 min): https://agentic-ai-from-scratch.vercel.app/lessons/04-memory-and-context/05-a-vector-store-in-80-lines/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/04-memory-and-context/05-a-vector-store-in-80-lines/docs/en.md - 04.06 Episodic memory (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/04-memory-and-context/06-episodic-memory/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/04-memory-and-context/06-episodic-memory/docs/en.md - 04.07 Semantic & procedural memory (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/04-memory-and-context/07-semantic-procedural-memory/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/04-memory-and-context/07-semantic-procedural-memory/docs/en.md - 04.08 Memory writes: what to keep (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/04-memory-and-context/08-memory-writes-what-to-keep/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/04-memory-and-context/08-memory-writes-what-to-keep/docs/en.md - 04.09 Context compaction (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/04-memory-and-context/09-context-compaction/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/04-memory-and-context/09-context-compaction/docs/en.md - 04.10 Files as long-term memory (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/04-memory-and-context/10-files-as-long-term-memory/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/04-memory-and-context/10-files-as-long-term-memory/docs/en.md - 04.11 Memory poisoning & hygiene (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/04-memory-and-context/11-memory-poisoning-hygiene/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/04-memory-and-context/11-memory-poisoning-hygiene/docs/en.md ## Phase 05: Retrieval & Agentic RAG Retrieval as a tool the agent decides to call. Hybrid search, reranking, rewriting, and self-correcting loops. - 05.01 Naive RAG and where it breaks (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/05-agentic-rag/01-naive-rag-and-where-it-breaks/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/05-agentic-rag/01-naive-rag-and-where-it-breaks/docs/en.md - 05.02 Chunking strategies (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/05-agentic-rag/02-chunking-strategies/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/05-agentic-rag/02-chunking-strategies/docs/en.md - 05.03 Hybrid search: BM25 + vectors (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/05-agentic-rag/03-hybrid-search-bm25-vectors/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/05-agentic-rag/03-hybrid-search-bm25-vectors/docs/en.md - 05.04 Reranking (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/05-agentic-rag/04-reranking/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/05-agentic-rag/04-reranking/docs/en.md - 05.05 Query rewriting & decomposition (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/05-agentic-rag/05-query-rewriting-decomposition/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/05-agentic-rag/05-query-rewriting-decomposition/docs/en.md - 05.06 Retrieval as a tool (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/05-agentic-rag/06-retrieval-as-a-tool/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/05-agentic-rag/06-retrieval-as-a-tool/docs/en.md - 05.07 Self-correcting RAG (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/05-agentic-rag/07-self-correcting-rag/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/05-agentic-rag/07-self-correcting-rag/docs/en.md - 05.08 Corrective RAG loops (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/05-agentic-rag/08-corrective-rag-loops/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/05-agentic-rag/08-corrective-rag-loops/docs/en.md - 05.09 Graph-based retrieval (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/05-agentic-rag/09-graph-based-retrieval/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/05-agentic-rag/09-graph-based-retrieval/docs/en.md - 05.10 Evaluating retrieval quality (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/05-agentic-rag/10-evaluating-retrieval-quality/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/05-agentic-rag/10-evaluating-retrieval-quality/docs/en.md ## Phase 06: Planning & Reasoning Plan-and-execute, task trees, Tree of Thoughts, reflection, verifiers, and knowing when not to plan. - 06.01 Chain-of-thought for actions (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/06-planning-and-reasoning/01-chain-of-thought-for-actions/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/06-planning-and-reasoning/01-chain-of-thought-for-actions/docs/en.md - 06.02 Plan-and-execute (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/06-planning-and-reasoning/02-plan-and-execute/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/06-planning-and-reasoning/02-plan-and-execute/docs/en.md - 06.03 Task decomposition trees (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/06-planning-and-reasoning/03-task-decomposition-trees/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/06-planning-and-reasoning/03-task-decomposition-trees/docs/en.md - 06.04 Tree of Thoughts search (60 min): https://agentic-ai-from-scratch.vercel.app/lessons/06-planning-and-reasoning/04-tree-of-thoughts-search/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/06-planning-and-reasoning/04-tree-of-thoughts-search/docs/en.md - 06.05 Reflection & self-critique (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/06-planning-and-reasoning/05-reflection-self-critique/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/06-planning-and-reasoning/05-reflection-self-critique/docs/en.md - 06.06 Reflexion: learning from failures (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/06-planning-and-reasoning/06-reflexion-learning-from-failures/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/06-planning-and-reasoning/06-reflexion-learning-from-failures/docs/en.md - 06.07 Verifiers and checkers (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/06-planning-and-reasoning/07-verifiers-and-checkers/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/06-planning-and-reasoning/07-verifiers-and-checkers/docs/en.md - 06.08 Replanning on surprise (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/06-planning-and-reasoning/08-replanning-on-surprise/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/06-planning-and-reasoning/08-replanning-on-surprise/docs/en.md - 06.09 Reasoning models in the loop (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/06-planning-and-reasoning/09-reasoning-models-in-the-loop/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/06-planning-and-reasoning/09-reasoning-models-in-the-loop/docs/en.md - 06.10 When not to plan (30 min): https://agentic-ai-from-scratch.vercel.app/lessons/06-planning-and-reasoning/10-when-not-to-plan/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/06-planning-and-reasoning/10-when-not-to-plan/docs/en.md ## Phase 07: Model Context Protocol MCP from the wire up. JSON-RPC over stdio, a server and a client by hand, transports, auth, and security. - 07.01 Why MCP exists (35 min): https://agentic-ai-from-scratch.vercel.app/lessons/07-model-context-protocol/01-why-mcp-exists/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/07-model-context-protocol/01-why-mcp-exists/docs/en.md - 07.02 The protocol: JSON-RPC over stdio (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/07-model-context-protocol/02-the-protocol-json-rpc-over-stdio/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/07-model-context-protocol/02-the-protocol-json-rpc-over-stdio/docs/en.md - 07.03 Build an MCP server from scratch (60 min): https://agentic-ai-from-scratch.vercel.app/lessons/07-model-context-protocol/03-build-an-mcp-server-from-scratch/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/07-model-context-protocol/03-build-an-mcp-server-from-scratch/docs/en.md - 07.04 Tools, resources & prompts (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/07-model-context-protocol/04-tools-resources-prompts/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/07-model-context-protocol/04-tools-resources-prompts/docs/en.md - 07.05 Build an MCP client (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/07-model-context-protocol/05-build-an-mcp-client/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/07-model-context-protocol/05-build-an-mcp-client/docs/en.md - 07.06 Streamable HTTP transport (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/07-model-context-protocol/06-streamable-http-transport/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/07-model-context-protocol/06-streamable-http-transport/docs/en.md - 07.07 Auth for remote servers (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/07-model-context-protocol/07-auth-for-remote-servers/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/07-model-context-protocol/07-auth-for-remote-servers/docs/en.md - 07.08 Sampling and elicitation (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/07-model-context-protocol/08-sampling-and-elicitation/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/07-model-context-protocol/08-sampling-and-elicitation/docs/en.md - 07.09 Composing many servers (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/07-model-context-protocol/09-composing-many-servers/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/07-model-context-protocol/09-composing-many-servers/docs/en.md - 07.10 Testing MCP servers (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/07-model-context-protocol/10-testing-mcp-servers/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/07-model-context-protocol/10-testing-mcp-servers/docs/en.md - 07.11 MCP security pitfalls (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/07-model-context-protocol/11-mcp-security-pitfalls/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/07-model-context-protocol/11-mcp-security-pitfalls/docs/en.md ## Phase 08: Multi-Agent Systems Orchestrators, workers, handoffs, supervisors, blackboards, A2A, and the real cost of coordination. - 08.01 When one agent is not enough (35 min): https://agentic-ai-from-scratch.vercel.app/lessons/08-multi-agent-systems/01-when-one-agent-is-not-enough/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/08-multi-agent-systems/01-when-one-agent-is-not-enough/docs/en.md - 08.02 Orchestrator–worker (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/08-multi-agent-systems/02-orchestrator-worker/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/08-multi-agent-systems/02-orchestrator-worker/docs/en.md - 08.03 Handoffs between agents (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/08-multi-agent-systems/03-handoffs-between-agents/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/08-multi-agent-systems/03-handoffs-between-agents/docs/en.md - 08.04 Supervisor hierarchies (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/08-multi-agent-systems/04-supervisor-hierarchies/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/08-multi-agent-systems/04-supervisor-hierarchies/docs/en.md - 08.05 Shared blackboards (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/08-multi-agent-systems/05-shared-blackboards/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/08-multi-agent-systems/05-shared-blackboards/docs/en.md - 08.06 Debate and critique (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/08-multi-agent-systems/06-debate-and-critique/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/08-multi-agent-systems/06-debate-and-critique/docs/en.md - 08.07 Agent-to-agent (A2A) protocol (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/08-multi-agent-systems/07-agent-to-agent-a2a-protocol/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/08-multi-agent-systems/07-agent-to-agent-a2a-protocol/docs/en.md - 08.08 Message passing & mailboxes (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/08-multi-agent-systems/08-message-passing-mailboxes/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/08-multi-agent-systems/08-message-passing-mailboxes/docs/en.md - 08.09 Parallel fan-out, fan-in (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/08-multi-agent-systems/09-parallel-fan-out-fan-in/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/08-multi-agent-systems/09-parallel-fan-out-fan-in/docs/en.md - 08.10 Role design & specialization (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/08-multi-agent-systems/10-role-design-specialization/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/08-multi-agent-systems/10-role-design-specialization/docs/en.md - 08.11 Failure modes of swarms (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/08-multi-agent-systems/11-failure-modes-of-swarms/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/08-multi-agent-systems/11-failure-modes-of-swarms/docs/en.md - 08.12 Cost of coordination (35 min): https://agentic-ai-from-scratch.vercel.app/lessons/08-multi-agent-systems/12-cost-of-coordination/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/08-multi-agent-systems/12-cost-of-coordination/docs/en.md ## Phase 09: Frameworks & SDKs Now import the frameworks. The same loop in LangGraph, Agents SDKs, CrewAI, AutoGen, and when to skip them all. - 09.01 The same loop, ten frameworks (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/09-frameworks-and-sdks/01-the-same-loop-ten-frameworks/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/09-frameworks-and-sdks/01-the-same-loop-ten-frameworks/docs/en.md - 09.02 LangGraph: state graphs (60 min): https://agentic-ai-from-scratch.vercel.app/lessons/09-frameworks-and-sdks/02-langgraph-state-graphs/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/09-frameworks-and-sdks/02-langgraph-state-graphs/docs/en.md - 09.03 OpenAI Agents SDK (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/09-frameworks-and-sdks/03-openai-agents-sdk/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/09-frameworks-and-sdks/03-openai-agents-sdk/docs/en.md - 09.04 Claude Agent SDK (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/09-frameworks-and-sdks/04-claude-agent-sdk/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/09-frameworks-and-sdks/04-claude-agent-sdk/docs/en.md - 09.05 CrewAI roles & crews (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/09-frameworks-and-sdks/05-crewai-roles-crews/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/09-frameworks-and-sdks/05-crewai-roles-crews/docs/en.md - 09.06 AutoGen conversations (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/09-frameworks-and-sdks/06-autogen-conversations/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/09-frameworks-and-sdks/06-autogen-conversations/docs/en.md - 09.07 LlamaIndex agents (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/09-frameworks-and-sdks/07-llamaindex-agents/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/09-frameworks-and-sdks/07-llamaindex-agents/docs/en.md - 09.08 Pydantic AI typed agents (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/09-frameworks-and-sdks/08-pydantic-ai-typed-agents/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/09-frameworks-and-sdks/08-pydantic-ai-typed-agents/docs/en.md - 09.09 Choosing (or skipping) a framework (35 min): https://agentic-ai-from-scratch.vercel.app/lessons/09-frameworks-and-sdks/09-choosing-or-skipping-a-framework/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/09-frameworks-and-sdks/09-choosing-or-skipping-a-framework/docs/en.md - 09.10 Porting between frameworks (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/09-frameworks-and-sdks/10-porting-between-frameworks/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/09-frameworks-and-sdks/10-porting-between-frameworks/docs/en.md ## Phase 10: Coding & Computer-Use Agents Agents that edit files, run tests, drive browsers and terminals. Ends with a mini coding agent of your own. - 10.01 Anatomy of a coding agent (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/10-coding-and-computer-use/01-anatomy-of-a-coding-agent/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/10-coding-and-computer-use/01-anatomy-of-a-coding-agent/docs/en.md - 10.02 File read, edit & search tools (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/10-coding-and-computer-use/02-file-read-edit-search-tools/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/10-coding-and-computer-use/02-file-read-edit-search-tools/docs/en.md - 10.03 Running code in a sandbox (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/10-coding-and-computer-use/03-running-code-in-a-sandbox/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/10-coding-and-computer-use/03-running-code-in-a-sandbox/docs/en.md - 10.04 Test-driven agent loops (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/10-coding-and-computer-use/04-test-driven-agent-loops/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/10-coding-and-computer-use/04-test-driven-agent-loops/docs/en.md - 10.05 Repository maps & context (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/10-coding-and-computer-use/05-repository-maps-context/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/10-coding-and-computer-use/05-repository-maps-context/docs/en.md - 10.06 Skills and SKILL.md (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/10-coding-and-computer-use/06-skills-and-skill-md/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/10-coding-and-computer-use/06-skills-and-skill-md/docs/en.md - 10.07 Browser agents (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/10-coding-and-computer-use/07-browser-agents/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/10-coding-and-computer-use/07-browser-agents/docs/en.md - 10.08 Computer use: screenshots to clicks (60 min): https://agentic-ai-from-scratch.vercel.app/lessons/10-coding-and-computer-use/08-computer-use-screenshots-to-clicks/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/10-coding-and-computer-use/08-computer-use-screenshots-to-clicks/docs/en.md - 10.09 Terminal agents (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/10-coding-and-computer-use/09-terminal-agents/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/10-coding-and-computer-use/09-terminal-agents/docs/en.md - 10.10 Long-horizon tasks (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/10-coding-and-computer-use/10-long-horizon-tasks/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/10-coding-and-computer-use/10-long-horizon-tasks/docs/en.md - 10.11 Build a mini coding agent (90 min): https://agentic-ai-from-scratch.vercel.app/lessons/10-coding-and-computer-use/11-build-a-mini-coding-agent/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/10-coding-and-computer-use/11-build-a-mini-coding-agent/docs/en.md ## Phase 11: Evaluation & Observability Golden tasks, trajectory evals, careful LLM judges, OpenTelemetry traces, replay, and your own eval harness. - 11.01 Why agent evals are hard (35 min): https://agentic-ai-from-scratch.vercel.app/lessons/11-evaluation-and-observability/01-why-agent-evals-are-hard/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/11-evaluation-and-observability/01-why-agent-evals-are-hard/docs/en.md - 11.02 Golden tasks & datasets (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/11-evaluation-and-observability/02-golden-tasks-datasets/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/11-evaluation-and-observability/02-golden-tasks-datasets/docs/en.md - 11.03 Trajectory evaluation (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/11-evaluation-and-observability/03-trajectory-evaluation/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/11-evaluation-and-observability/03-trajectory-evaluation/docs/en.md - 11.04 LLM-as-judge, carefully (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/11-evaluation-and-observability/04-llm-as-judge-carefully/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/11-evaluation-and-observability/04-llm-as-judge-carefully/docs/en.md - 11.05 Tool-call accuracy (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/11-evaluation-and-observability/05-tool-call-accuracy/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/11-evaluation-and-observability/05-tool-call-accuracy/docs/en.md - 11.06 Tracing with OpenTelemetry (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/11-evaluation-and-observability/06-tracing-with-opentelemetry/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/11-evaluation-and-observability/06-tracing-with-opentelemetry/docs/en.md - 11.07 Replay and regression (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/11-evaluation-and-observability/07-replay-and-regression/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/11-evaluation-and-observability/07-replay-and-regression/docs/en.md - 11.08 Online metrics & feedback (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/11-evaluation-and-observability/08-online-metrics-feedback/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/11-evaluation-and-observability/08-online-metrics-feedback/docs/en.md - 11.09 Benchmarks: SWE-bench to τ-bench (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/11-evaluation-and-observability/09-benchmarks-swe-bench-to-tau-bench/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/11-evaluation-and-observability/09-benchmarks-swe-bench-to-tau-bench/docs/en.md - 11.10 Building an eval harness (70 min): https://agentic-ai-from-scratch.vercel.app/lessons/11-evaluation-and-observability/10-building-an-eval-harness/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/11-evaluation-and-observability/10-building-an-eval-harness/docs/en.md ## Phase 12: Safety, Security & Guardrails The agent threat model. Prompt injection, exfiltration, least privilege, sandboxes, permissions, red-teaming. - 12.01 The agent threat model (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/12-safety-and-security/01-the-agent-threat-model/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/12-safety-and-security/01-the-agent-threat-model/docs/en.md - 12.02 Prompt injection, direct & indirect (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/12-safety-and-security/02-prompt-injection-direct-indirect/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/12-safety-and-security/02-prompt-injection-direct-indirect/docs/en.md - 12.03 Data exfiltration paths (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/12-safety-and-security/03-data-exfiltration-paths/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/12-safety-and-security/03-data-exfiltration-paths/docs/en.md - 12.04 Least-privilege tools (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/12-safety-and-security/04-least-privilege-tools/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/12-safety-and-security/04-least-privilege-tools/docs/en.md - 12.05 Sandboxing with containers (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/12-safety-and-security/05-sandboxing-with-containers/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/12-safety-and-security/05-sandboxing-with-containers/docs/en.md - 12.06 Permission systems (50 min): https://agentic-ai-from-scratch.vercel.app/lessons/12-safety-and-security/06-permission-systems/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/12-safety-and-security/06-permission-systems/docs/en.md - 12.07 Input & output guardrails (45 min): https://agentic-ai-from-scratch.vercel.app/lessons/12-safety-and-security/07-input-output-guardrails/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/12-safety-and-security/07-input-output-guardrails/docs/en.md - 12.08 Secrets and credentials (35 min): https://agentic-ai-from-scratch.vercel.app/lessons/12-safety-and-security/08-secrets-and-credentials/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/12-safety-and-security/08-secrets-and-credentials/docs/en.md - 12.09 Human-in-the-loop design (40 min): https://agentic-ai-from-scratch.vercel.app/lessons/12-safety-and-security/09-human-in-the-loop-design/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/12-safety-and-security/09-human-in-the-loop-design/docs/en.md - 12.10 Red-teaming your agent (55 min): https://agentic-ai-from-scratch.vercel.app/lessons/12-safety-and-security/10-red-teaming-your-agent/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/12-safety-and-security/10-red-teaming-your-agent/docs/en.md - 12.11 Audit logs (35 min): https://agentic-ai-from-scratch.vercel.app/lessons/12-safety-and-security/11-audit-logs/ | raw: https://raw.githubusercontent.com/Ramakm/agentic-ai-from-scratch/main/phases/12-safety-and-security/11-audit-logs/docs/en.md ## Phase 13: Production Agents Durable execution, queues, caching, routing, cost control, versioning, and incident playbooks. - 13.01 From notebook to service (45 min) [planned] - 13.02 Durable execution (55 min) [planned] - 13.03 Queues, workers & long jobs (50 min) [planned] - 13.04 Prompt caching & latency (45 min) [planned] - 13.05 Cost control at scale (40 min) [planned] - 13.06 Model routing & fallbacks (45 min) [planned] - 13.07 Versioning prompts and tools (40 min) [planned] - 13.08 Deploying with Docker (45 min) [planned] - 13.09 Rate limits & backpressure (40 min) [planned] - 13.10 Incident playbooks (35 min) [planned] ## Phase 14: Agent UX & Interfaces Streaming step views, approvals and undo, voice, background agents, and the design of trust. - 14.01 Streaming UIs for agents (45 min) [planned] - 14.02 Showing the work: step views (40 min) [planned] - 14.03 Approvals & undo (40 min) [planned] - 14.04 Chat is not the only interface (35 min) [planned] - 14.05 Voice agents (55 min) [planned] - 14.06 Background agents & notifications (40 min) [planned] - 14.07 Generative UI (45 min) [planned] - 14.08 Trust and explainability (35 min) [planned] ## Phase 15: Capstone: Your Own Agent Harness Everything at once. A loop, tool registry, memory, MCP, subagents, permissions, and evals, shipped as a CLI. - 15.01 Why build a harness (35 min) [planned] - 15.02 The core loop & tool registry (70 min) [planned] - 15.03 Memory & context manager (70 min) [planned] - 15.04 MCP client integration (60 min) [planned] - 15.05 Subagents & delegation (60 min) [planned] - 15.06 Permissions & sandbox (60 min) [planned] - 15.07 Evals & traces (60 min) [planned] - 15.08 Ship it: CLI + docs (60 min) [planned] ## Interview questions 50 practice questions with short and full answers, follow-ups and common wrong answers: https://agentic-ai-from-scratch.vercel.app/interviews/ - The agent takes a different path every run, even at temperature 0 (level 1 Fundamentals, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/llm-foundations/different-answer-every-run/ - Thirty turns in, the agent forgets what it was asked to do (level 2 Practitioner, Debug): https://agentic-ai-from-scratch.vercel.app/interviews/llm-foundations/forgets-the-task/ - JSON that parses on Monday and breaks on Friday (level 2 Practitioner, Debug): https://agentic-ai-from-scratch.vercel.app/interviews/llm-foundations/json-fails-on-friday/ - Estimate what one support conversation costs (level 2 Practitioner, Estimate): https://agentic-ai-from-scratch.vercel.app/interviews/llm-foundations/cost-of-a-conversation/ - One model for everything, or a different model per step? (level 3 Senior, Trade-off): https://agentic-ai-from-scratch.vercel.app/interviews/llm-foundations/which-model-for-which-step/ - The system prompt says one thing, the user says another (level 1 Fundamentals, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/llm-foundations/system-prompt-loses/ - What actually happens when the model "calls a tool" (level 1 Fundamentals, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/tool-use/what-a-tool-call-is/ - A tool raises an exception and the whole run dies (level 1 Fundamentals, Debug): https://agentic-ai-from-scratch.vercel.app/interviews/tool-use/tool-throws/ - The customer got refunded twice (level 2 Practitioner, Debug): https://agentic-ai-from-scratch.vercel.app/interviews/tool-use/refund-twice/ - Forty tools, and the model keeps picking the wrong one (level 2 Practitioner, Design): https://agentic-ai-from-scratch.vercel.app/interviews/tool-use/forty-tools/ - One tool result ate the context window (level 2 Practitioner, Design): https://agentic-ai-from-scratch.vercel.app/interviews/tool-use/tool-result-eats-context/ - The model asks for three tools in one turn (level 2 Practitioner, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/tool-use/parallel-calls/ - How do you test a tool without calling a model? (level 1 Fundamentals, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/tool-use/test-tools-without-a-model/ - Write the agent loop on a whiteboard (level 1 Fundamentals, Code): https://agentic-ai-from-scratch.vercel.app/interviews/agent-loop/write-the-loop/ - The agent called search forty times with the same query (level 2 Practitioner, Debug): https://agentic-ai-from-scratch.vercel.app/interviews/agent-loop/calls-search-forty-times/ - When should an agent loop stop? (level 1 Fundamentals, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/agent-loop/when-to-stop/ - The model returned a tool call with broken arguments (level 2 Practitioner, Debug): https://agentic-ai-from-scratch.vercel.app/interviews/agent-loop/broken-arguments/ - The user closes the tab halfway through a ten-minute task (level 3 Senior, Design): https://agentic-ai-from-scratch.vercel.app/interviews/agent-loop/user-closes-the-tab/ - A free-running loop or an explicit graph? (level 3 Senior, Trade-off): https://agentic-ai-from-scratch.vercel.app/interviews/agent-loop/loop-or-graph/ - Cap what a single task can spend (level 2 Practitioner, Estimate): https://agentic-ai-from-scratch.vercel.app/interviews/agent-loop/cap-spend-per-task/ - Conversation memory that grows forever (level 2 Practitioner, Design): https://agentic-ai-from-scratch.vercel.app/interviews/memory-rag/memory-grows-forever/ - What should an agent remember about a user? (level 3 Senior, Design): https://agentic-ai-from-scratch.vercel.app/interviews/memory-rag/what-to-remember/ - A note in memory keeps steering every session (level 3 Senior, Debug): https://agentic-ai-from-scratch.vercel.app/interviews/memory-rag/poisoned-memory/ - RAG returns the right document but the wrong answer (level 2 Practitioner, Debug): https://agentic-ai-from-scratch.vercel.app/interviews/memory-rag/right-document-wrong-answer/ - Retrieve on every turn, or give the agent a search tool? (level 2 Practitioner, Trade-off): https://agentic-ai-from-scratch.vercel.app/interviews/memory-rag/retrieval-as-a-tool/ - Keyword search beats your embeddings on product codes (level 2 Practitioner, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/memory-rag/keyword-beats-embeddings/ - Plan first, or act and observe? (level 2 Practitioner, Trade-off): https://agentic-ai-from-scratch.vercel.app/interviews/planning-multi-agent/plan-first-or-act-first/ - The agent confidently says the task is done when it isn't (level 2 Practitioner, Design): https://agentic-ai-from-scratch.vercel.app/interviews/planning-multi-agent/confidently-done/ - Does asking the model to reflect actually help? (level 3 Senior, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/planning-multi-agent/does-reflection-help/ - When is one agent not enough? (level 2 Practitioner, Trade-off): https://agentic-ai-from-scratch.vercel.app/interviews/planning-multi-agent/one-agent-not-enough/ - Design an orchestrator-worker research system (level 3 Senior, Design): https://agentic-ai-from-scratch.vercel.app/interviews/planning-multi-agent/orchestrator-worker-research/ - Five agents, five times the bill, and worse answers (level 4 Staff, Debug): https://agentic-ai-from-scratch.vercel.app/interviews/planning-multi-agent/five-agents-worse-answers/ - What problem does MCP actually solve? (level 1 Fundamentals, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/mcp-frameworks/what-mcp-solves/ - Walk through an MCP tool call over stdio (level 2 Practitioner, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/mcp-frameworks/mcp-call-over-stdio/ - Someone wants to connect a third-party MCP server (level 3 Senior, Design): https://agentic-ai-from-scratch.vercel.app/interviews/mcp-frameworks/third-party-server/ - Framework or no framework? (level 3 Senior, Trade-off): https://agentic-ai-from-scratch.vercel.app/interviews/mcp-frameworks/framework-or-not/ - Port an agent from one framework to another (level 3 Senior, Design): https://agentic-ai-from-scratch.vercel.app/interviews/mcp-frameworks/porting-frameworks/ - Why are agent evals harder than model evals? (level 1 Fundamentals, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/evals-observability/why-agent-evals-are-hard/ - The golden set is all green, and users are unhappy (level 3 Senior, Debug): https://agentic-ai-from-scratch.vercel.app/interviews/evals-observability/green-evals-unhappy-users/ - Grade the path, not just the answer (level 2 Practitioner, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/evals-observability/grade-the-path/ - The LLM judge says 92%. Do you believe it? (level 3 Senior, Trade-off): https://agentic-ai-from-scratch.vercel.app/interviews/evals-observability/llm-judge-says-92/ - A prompt change broke something, but what? (level 2 Practitioner, Debug): https://agentic-ai-from-scratch.vercel.app/interviews/evals-observability/prompt-change-broke-something/ - Design an eval harness for a coding agent (level 4 Staff, Design): https://agentic-ai-from-scratch.vercel.app/interviews/evals-observability/eval-harness-coding-agent/ - Explain prompt injection to a product manager (level 1 Fundamentals, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/safety-security/explain-prompt-injection/ - Which of these three agents is dangerous? (level 2 Practitioner, Concept): https://agentic-ai-from-scratch.vercel.app/interviews/safety-security/lethal-trifecta/ - Data leaked, but the agent never called a send tool (level 2 Practitioner, Debug): https://agentic-ai-from-scratch.vercel.app/interviews/safety-security/leak-without-a-tool/ - The agent needs database access (level 2 Practitioner, Design): https://agentic-ai-from-scratch.vercel.app/interviews/safety-security/give-agent-database-access/ - Run model-written code safely (level 3 Senior, Design): https://agentic-ai-from-scratch.vercel.app/interviews/safety-security/run-model-written-code/ - Approval prompts that everyone clicks through (level 3 Senior, Trade-off): https://agentic-ai-from-scratch.vercel.app/interviews/safety-security/approvals-everyone-clicks/ - The agent paid the wrong supplier. Investigate. (level 4 Staff, Design): https://agentic-ai-from-scratch.vercel.app/interviews/safety-security/investigate-wrong-payment/