The framework layer is where you actually wire a model to tools and get a working agent loop. Each of the five covered here optimizes for a different shape of the same problem — pick based on what your agent actually needs to do, not by star count.
Quick pick: OpenAI-first production loop → OpenAI Agents SDK; typed outputs and tests → Pydantic-AI; minimal Hugging Face stack → smolagents; AWS-native simplicity → Strands; explicit graphs and branching → LangGraph. See our Python AI SDKs comparison for a longer side-by-side.
What Is It?
The frameworks chapter compares OpenAI Agents SDK, Pydantic AI, smolagents, Strands, and LangGraph.
Each child page goes deep on one toolkit's primitives and tradeoffs.
Frameworks implement the think-act-observe loop with different ergonomics.
Why Should I Care?
Choosing the wrong abstraction (graph vs simple loop) wastes weeks when requirements change.
Interviews ask why you picked a framework, not just that you imported one.
Real World Analogy
Frameworks are different kitchen layouts — same ingredients (model, tools, memory) but different counter space for branching workflows.
Visual Mental Model
frameworks hub
|-- OpenAI Agents SDK
|-- Pydantic AI
|-- smolagents / Strands / LangGraphBeginner Explanation
This hub links five frameworks. Pick by what you need: OpenAI-native loop, typed validation, code-as-agent, AWS integration, or explicit graphs — not by GitHub stars alone.
Smallest Possible Example
FRAMEWORKS = ["OpenAI SDK", "Pydantic AI", "smolagents", "Strands", "LangGraph"]
print("options:", len(FRAMEWORKS))Common Mistakes
❌ Adopting LangGraph for a single-tool chatbot.
Graph complexity should match branching and durability needs.
❌ Switching frameworks weekly.
Learn one loop deeply, then compare with intent.
❌ Ignoring vendor lock-in on hosted runners.
Know what is portable (tool schemas, prompts) vs tied to a SDK host.
Real Project Example
OpenAI customers standardize on Agents SDK for hosted tool loops.
LangGraph appears in multi-agent research prototypes and some enterprise orchestration.
Build This Mini Project
Write five bullets: your agent's needs (branching, AWS, HF models, strict types, minimal deps). Map each need to one framework link from this hub.
Interview Question
How do you choose an agent framework?
Match control flow needs (linear vs graph), hosting (OpenAI vs self-run), typing/testing requirements, cloud vendor, and team familiarity — then prototype the riskiest tool call in that framework for a day.
Key Takeaways
- Hub compares five serious options.
- Match framework to workflow shape.
- Child pages hold implementation depth.
- Prototype before committing.
YouTube learning
Core concepts from video walkthroughs:


