Mingraph series.

minimal version of Langchain / Langgraph building from scratch.


  1. Part 1Learning OOP through the design questions I already ask at workHow the idea behind OOP finally made sense, and how I think about it now4 min
  2. Part 2Abstraction and polymorphism, built from three LLM adaptersLangGraph from Scratch, Phase 1: one base class, three providers, and the two OOP ideas hiding inside them.6 min
  3. Part 3Encapsulation, built from an LLM message that can't be wrongLangGraph from Scratch, Phase 2: not hidden data, but checks you never have to write twice9 min
  4. Part 4Strategy and a tool registry for LLM function calling in PythonLangGraph from Scratch, Phase 3: polymorphism again, except this time the model picks.9 min
  5. Part 5Template Method and short-term memory for LLM chat in PythonLangGraph from Scratch, Phase 4: three ways to forget, one set of steps that never changes10 min
  6. Part 6Composite and Decorator in a Python LLM pipelineLangGraph from Scratch, Phase 5: building Sequence, Branch, Parallel and Retry as steps.8 min
  7. Part 7Dependency Injection and Interface Segregation in a Python RAG RetrieverLangGraph from Scratch, Phase 6: building the embedder, the vector store and the retriever as three separate pieces.19 min
  8. Part 8The State and Observer Patterns in a Python Agent LoopLangGraph from Scratch, Phase 7: a loop that calls the model and runs tools until it answers, and a way to watch it run.22 min