Build identical agents across frameworks. Use HTTP proxy inspection to discover how they really work under the hood.
🎯 The Mission
You've built agents with raw API calls, Pydantic AI, and LangGraph. But have you ever wondered what's actually being sent to the LLM? Documentation tells you the "what"—but not the "how."
Build the same vacation planner agent in three frameworks, intercept the raw HTTP traffic, and discover the implementation differences that documentation doesn't reveal.
What You'll Learn
How different frameworks format tool definitions for the LLM
Structured output strategies (JSON mode, function calling, schema enforcement)
Validation error handling and retry mechanisms
Hidden LLM calls that frameworks make behind the scenes
Agent handoff patterns across frameworks
The Agent: Vacation Planner
Build a vacation planner agent with a web_search tool. The agent should help users find destinations, check availability, and make recommendations. Keep it simple—the goal is comparison, not a production system.
Key Requirement: The agent must be functionally identical across all three frameworks. Same system prompt, same tool, same behavior. This isolates framework differences from implementation differences.
The Frameworks
LangGraph
State Machine
Graph-based orchestration with explicit state management. Uses LangChain's tool format.
PydanticAI
Type-First
Lightweight framework with Pydantic models for tool inputs and structured outputs.
OpenAI Agents SDK
Native
OpenAI's own agent framework using the Assistants API.
Part 1: HTTP Proxy Setup
Set up an HTTP proxy to intercept HTTPS traffic to the LLM APIs. This lets you see exactly what each framework sends.
Install an HTTP proxy (any tool that can intercept HTTPS)
Configure SSL certificate to intercept HTTPS traffic
Set HTTP_PROXY and HTTPS_PROXY environment variables
Verify interception works by running a test API call
Part 2: Build the Agents
Implement the vacation planner in each framework with the same functionality:
System prompt: "You are a helpful vacation planner..."
One tool: web_search(query: str) -> str
Test query: "Find beach destinations for a March vacation"
Part 3: Investigation Tasks
Task 1: Structured Output Comparison
How does each framework get the model to return structured output?
Task 2: Validation Error Handling
What happens when the LLM returns invalid tool arguments?
Task 3: Hidden LLM Calls (PydanticAI)
In what situations can PydanticAI trigger LLM calls behind the scenes?
Task 4: Agent Handoffs (OpenAI Agents SDK)
How does OpenAI Agents SDK implement handoffs between agents?