Agent Track

Agent Framework Comparison

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

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.

  1. Install an HTTP proxy (any tool that can intercept HTTPS)
  2. Configure SSL certificate to intercept HTTPS traffic
  3. Set HTTP_PROXY and HTTPS_PROXY environment variables
  4. 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:

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?

Task 5: Implement Handoff in PydanticAI

Port the handoff pattern to PydanticAI.

Resources

LangGraph Docs

State machine agents and tool loops

PydanticAI Docs

Type-safe agents with structured outputs

OpenAI Assistants API

OpenAI's agent framework

Building Effective Agents

Anthropic's guide to agent patterns

✓ Success Criteria

📋 Progress Checklist

Reflection Questions