What this video shows
Ryan live-codes agent programs with DSPy signatures, modules and optimizers, then rebuilds workflow ideas with LangGraph state, nodes and edges. The comparison shows that the frameworks solve different parts of the design problem instead of forming a simple winner-takes-all choice.
The lecture also surveys open-source harnesses such as mini-SWE-agent, OpenHands and Pi, then separates workflow definition from durable execution and observation. That distinction helps teams decide whether they need a programming abstraction, an agent runtime, an orchestrator or telemetry.
Follow the current DSPy documentation for signatures, modules and optimizers. Check the LangGraph overview for graph state, persistence and human review. Use Temporal's durable execution documentation when a workflow must survive worker and network failures.
What you will learn
- Choose an abstraction from the failure and change patterns in your workflow, rather than from a generic framework ranking.
- Use DSPy when you want to define a multi-stage LM program and optimize its prompts or examples against a metric.
- Use LangGraph when explicit state, branches, loops, persistence and human checkpoints are central to the workflow.
- Treat durable execution, traces and evaluations as separate requirements that either programming framework may still need.
How to apply this safely
- Draw one real workflow with inputs, state, tools, branches, retries and a measurable final result.
- Build the smallest version in plain code so the team can see which complexity a framework would remove.
- Prototype the same critical path with the framework that best matches the workflow's main constraint.
- Inject a tool timeout, worker restart and invalid model response, then verify recovery and recorded state.
- Run an evaluation set before and after optimization, and keep framework-specific code behind a narrow application interface.
Important limitations
- The lecture introduces several tools in one session and cannot cover their full APIs, operational costs or upgrade risks.
- Recorded examples use the framework versions available in October 2026, while the video was published in November.
- A classroom comparison does not establish which framework performs better on a particular production workload.
Sources to check
- DSPy vs. LangGraph: AI Agent Frameworks Explained Stanford CS329Z lecture published November 13, 2026.
- Stanford CS329Z course Course materials for Engineering AI Agents.
- DSPy Official framework documentation.
- LangGraph Official framework overview.
- Temporal Official durable execution documentation.
Continue learning on Learnetto
Build an AI agent test set
Define tasks and metrics before optimizing an agent program.
AI evals guide
Choose graders, traces and production checks.
Sandbox AI coding agents
Constrain tools and environments around an agent harness.