Agent SDKs and Frameworks
Survey the options (provider agent SDKs, LangGraph, LlamaIndex, Pydantic AI and others) and learn when a framework helps versus hides too much.
Intermediate · about 6 hours · difficulty 3/5
Learn first: The Agent Loop
Once you have written an agent loop by hand, a framework can save time on the boring parts: retries, streaming, tool schemas, state persistence, tracing and human approval steps. The risk is abstraction you cannot debug.
The main families
- Provider agent SDKs: the Claude Agent SDK, the OpenAI Agents SDK and Google's Agent Development Kit. Thin, well integrated with their models, with built-in tools, handoffs and tracing.
- Graph and state machine frameworks: LangGraph models an agent as nodes and edges with persisted state, which suits long-running, resumable, human-in-the-loop workflows.
- Data-centric frameworks: LlamaIndex focuses on connecting agents to documents and indexes.
- Typed, lightweight libraries: Pydantic AI (Python) and the Vercel AI SDK (TypeScript) keep things close to plain code with strong typing.
- Multi-agent frameworks: CrewAI, AutoGen and similar tools for role-based agent teams.
How to choose
- Does it work with the models you need, including a switch to another provider?
- Can you see every prompt and tool call it sends? Hidden prompts are a red flag.
- Does it support streaming, persistence, and interrupts for approvals?
- Is it stable and well documented, or changing weekly?
Advice
Pick one, learn it well, and keep your tools and prompts in plain modules so you could move away later. Frameworks change fast; the underlying loop does not.
Good enough to move on
You can port your hand-written agent to one framework, explain what it now does for you, and still find the raw prompts and tool calls in its traces.
Key concepts
- Claude Agent SDK
- OpenAI Agents SDK
- Google Agent Development Kit
- LangGraph: Stateful graphs, resumable runs
- LlamaIndex agents
- Pydantic AI / Vercel AI SDK
- CrewAI / AutoGen
- Evaluating framework lock-in
Mini project
Re-implement your hand-written research agent in one framework, add a human approval step before any write tool, and compare lines of code, latency and trace readability with the original.
Check yourself
What three questions would you ask before adopting an agent framework for a production system?
Free resources
- Claude Agent SDK overview (Anthropic)
- OpenAI Agents SDK (OpenAI)
- LangGraph documentation (LangChain)
- Pydantic AI documentation (Pydantic)