Agentic AI from Scratch (Python)

Forty short sessions that take you from one language-model call to an agent that acts: prompts, structured output, retrieval with cited sources, tools, LangGraph workflows with routing, memory and human approval, tracing, testing, MCP and multi-agent systems, ending in a capstone.
Read the sessions in order. One project, a helpdesk copilot for an invented company, grows a step at a time and runs on your own laptop with any OpenAI-compatible model. You need basic Python; no machine-learning or maths background is assumed.
Track 1 of the agentic AI ladder: build it on your laptop, then run it on AWS in Agentic AI on AWS. For live sessions and review, see the mentor-led programme Agentic AI Engineering.
- 1. The journey: from one LLM call to an agent that acts
The route from one LLM call to an agent that acts, the HelpDesk Copilot project, and a first working call.
- 2. How an LLM works: from rules to transformers, then tokens, the context window and cost
How a language model turns text into tokens and predicts the next one, and what the context window and tokens cost.
- 3. Temperature, sampling, hallucinations and other limits
How temperature and sampling pick each word, why models make things up, and the other limits to plan around.
- 4. The Chat Completions API: messages, streaming, the model landscape and choosing a model
Sending messages to the Chat Completions API, streaming a reply, and choosing between models.
- 5. Structured Outputs and function calling: replies a program can trust
Getting replies a program can trust: schema-checked JSON output and a first function call.
- 6. Prompt engineering 1: a prompt framework, zero-shot, one-shot, few-shot and persona
Writing prompts with a framework: role, rules, zero-shot, one-shot and few-shot examples, and persona.
- 7. Prompt engineering 2: step by step, Tree and Graph of Thoughts, a first look at ReAct, and chaining
Making the model show its working, exploring options as a tree, a first look at ReAct, and chaining two calls.
- 8. Prompt engineering 3: testing prompts against a test set, and a prompt library
Breaking prompts on purpose, testing them against a test set, and keeping good prompts in a library.
- 9. LangChain v1: chat models, prompt templates, LCEL and typed replies
Rebuilding the Copilot in LangChain: chat models, prompt templates, LCEL chains and typed replies.
- 10. Prompt chaining in LangChain: sort the question first, then answer it
A two-step LangChain chain: sort the question first, then answer it with the right policy.
- 11. Memory: the conversation kept by a checkpointer, trimming long chats, and what not to keep
Giving the Copilot a memory of the conversation, trimming long chats, and deciding what not to keep.
- 12. Document loaders, chunking strategies and metadata
Loading documents, cutting them into chunks two ways, and labelling each chunk with metadata.
- 13. Embeddings: text as numbers, similarity as distance
Embeddings: turning text into numbers so that similar meanings sit close together.
- 14. Vector databases: Chroma, and FAISS, pgvector and Pinecone compared
Storing and searching chunks in a vector database, with Chroma built and the alternatives compared.
- 15. How RAG works: retrieve, add to the prompt, generate
Retrieval-augmented generation: find the right chunks, add them to the prompt, generate the answer.
- 16. Citing sources, saying "I don't know", and checking an answer is grounded
Answers that cite their source, say "I don't know" when they should, and are checked for grounding.
- 17. Better search: top-k, a score threshold, MMR and metadata filters
Tuning search: how many results, a score threshold, varied results (MMR) and metadata filters.
- 18. Hybrid search, reranking and rewriting the question
Better retrieval with keyword-plus-meaning search, reranking, and rewriting vague questions.
- 19. Lab and Milestone 1: answers from documents, with sources
Milestone 1 lab: review and fix your Copilot so it answers from documents with sources.
- 20. What an agent is: the reason, act, observe loop
What makes an agent: the loop of reasoning, acting with a tool and observing the result.
- 21. Writing tools, and building an agent with LangChain's create_agent
Writing good tools and building an agent with LangChain's create_agent.
- 22. When tools fail: tool errors, a step limit, and saying "I can't"
Keeping agents safe when tools fail: handling errors, limiting steps, and saying "I can't".
- 23. LangGraph basics: state, nodes and edges
LangGraph basics: a workflow built from state, nodes and edges.
- 24. Conditional routing and several tools: policy, ticket or fallback
Routing each question down the right path: policy answer, new ticket or fallback.
- 25. Saved progress: checkpoints, threads that survive a restart, and durable execution
Saving progress with checkpoints so conversations survive a restart.
- 26. Human in the loop: pause, approve, resume
Human in the loop: pause the agent, get an approval, then resume.
- 27. Agent design patterns, and long-term memory in a store
Common agent design patterns, a self-check step, and long-term memory across conversations.
- 28. Lab and Milestone 2: a routed agent with human approval
Milestone 2 lab: review and fix your routed Copilot with human approval.
- 29. MCP basics: host, client and server; tools, resources and prompts
MCP basics: hosts, clients and servers, and the tools, resources and prompts a server offers.
- 30. MCP in a company: tool discovery, authorization, secure connections and governance
Running MCP in a company: tool discovery, permissions, secure connections and governance.
- 31. Several agents: a supervisor, hand-offs, and how agents pass work to each other
Several agents working together: a supervisor, hand-offs and passing work between agents.
- 32. Frameworks compared, and Milestone 3: a multi-agent Copilot over MCP
Agent frameworks compared, and Milestone 3: a multi-agent Copilot over MCP.
- 33. Seeing inside the app with Langfuse: traces, cost and timing
Seeing inside the app with Langfuse: traces, cost and timing for every call.
- 34. Testing an AI app: test sets, a model that grades, catching hallucinations, measuring an agent
Testing an AI app: test sets, a model that grades answers, catching made-up answers, and measuring an agent.
- 35. Security: prompt injection, data leakage, access, secrets and a secure RAG
Security: prompt injection, data leaks, access control, secrets and a secure RAG setup.
- 36. Responsible AI and governance: risk, compliance and an audit trail
Responsible AI and governance: risks, compliance and an audit trail for the Copilot.
- 37. Ship it: a chat page with Streamlit, an API with FastAPI, deployment and production monitoring
Shipping it: a chat page, an API, deployment and monitoring in production.
- 38. Capstone build 1: pick a domain, design the solution, start building
Capstone 1: pick a domain, design the solution and start building it.
- 39. Capstone build 2: architecture diagram, evaluation report and security assessment
Capstone 2: architecture diagram, evaluation report and security review, with peer review.
- 40. Final demos, the deployment plan, and next steps
Final demos, the deployment plan, and where to go next.
Want the next course when it is out?
Leave your details and we will tell you when new courses and downloads are ready.
Get course updatesWant someone to review your work as you build? Work with a mentor.
TechEazy Consulting training material — not affiliated with or endorsed by OpenAI, Anthropic, LangChain or any other company named in this course.