Modern AI Engineering

Module 12 · Build

Agent Patterns and Frameworks

In this module, we will learn the engineering practices for building reliable agents, and then see how the popular frameworks and coding agents are built.

By the end of this module, we will know how to engineer the harness, the loop, and the graph around an agent, and how real coding agents work under the hood.

Lessons

  1. 12.1 Harness Engineering: The Scaffolding Around AI Agents: What is a Harness in AI? · Why do we need Harness Engineering? · Components of an AI Harness · Harness Engineering for AI Agents · Harness Engineering for Evaluation · Best Practices in Harness Engineering · Putting It All Together
  2. 12.2 Loop Engineering: Designing Reliable Agentic Loops: What is Loop Engineering? · Loop Engineering = Loop + Engineering · Why do we need Loop Engineering? · What is a loop in an AI agent? · The simplest loop and its problems · The parts of the loop that we must engineer · Prompt Engineering vs Context Engineering vs Loop Engineering · Common ways a loop breaks · Techniques of Loop Engineering · A complete example · Where it works well and where it fails
  3. 12.3 Graph Engineering: Stateful Workflows for Agents: What is Graph Engineering? · Graph = Nodes + Edges · Why do we need Graph Engineering? · The three building blocks: Node, Edge, and State · Let's build our first graph · Conditional edges: taking decisions inside the graph · Cycles: doing the work again when needed · One full run, step by step · Parallel branches: doing many things at the same time · Checkpoints: pause and resume the graph · Human in the loop · Handling errors inside a graph · Graph Engineering vs Loop Engineering · Where Graph Engineering works well · Where Graph Engineering fails · Best practices in Graph Engineering · Conclusion
  4. 12.4 Defining Done: Why Exit Criteria Shape Agent Quality: What is a definition of done · Tasks where the definition of done is exact · Tasks where the definition of done is fuzzy · Why AI is so strong exactly where we can measure · How to write a better definition of done
  5. 12.5 LangChain: Composable Components for LLM Applications: What is LangChain? · Why do we need LangChain? · The core idea behind LangChain · LLM and Prompt Template · What is a Chain? · Output Parser · Memory · Retrieval and RAG · Tools and Agents · A complete flow of how LangChain works
  6. 12.6 LangGraph: Graph-Based Agent Orchestration Explained: What is LangGraph? · Why do we need LangGraph? · What is a Graph in LangGraph? · What is State in LangGraph? · Nodes and Edges · Conditional Edges · A complete example · Tools and who calls them · Memory and persistence · Human-in-the-loop · When to use LangGraph
  7. 12.7 Claude Code: AI-Powered Software Engineering at the CLI: What is Claude Code? · The problem with a normal AI chatbot · The agent loop · The tools of Claude Code · Example: Claude Code fixing a bug · How does Claude Code search a big project? · How does Claude Code verify its own work? · CLAUDE.md: The project memory · Permissions: How we stay in control · Plan mode, subagents, and hooks · Putting it all together
  8. 12.8 Cursor: Inside an AI-Native Code Editor: What is Cursor? · Cursor = Code Editor + AI · The big idea behind Cursor · How does Cursor understand our code? · How does Cursor index our codebase? · How does Tab autocomplete work? · How does the Chat work? · How does the Agent mode work? · How does Cursor apply the changes? · Why does Cursor use different models? · How does Cursor keep our code private? · The complete flow of Cursor

← Module 11: Autonomous AI Agents · Module 13: Serving LLMs at Scale →