CrewAI vs OpenAI Agents SDK vs LangGraph in Python

Compare three Python agent frameworks using file tools, SQLite session history, guardrails and a LangGraph coder-reviewer workflow.

Player not loading? Watch on YouTube

This overview compares CrewAI, OpenAI Agents SDK and LangGraph through Python examples with the same four tools: listing, reading and writing files, plus running commands. It explains framework structure rather than walking through every line of code.

CrewAI defines agents through roles, goals, backstories and tasks. The speaker shows a planner passing work to a coder, then requests a Tetris game using Pygame. He does not check whether the generated game works. The example uses GPT-5 Mini and an OpenAI API key; he says a local LLM can also work with an adjusted model configuration, but does not demonstrate that setup.

The OpenAI Agents SDK example explicitly configures a SQLite session for conversation history. A larger example adds coder and explainer handoffs, plus a guardrail agent with Pydantic structured output. The deletion request is blocked in the demonstration, while a later request fails to route to the coder as intended.

LangGraph makes the agent loop explicit through state, nodes and conditional edges. Its larger example routes work through a coder and reviewer, with a revision limit and checkpoints. The speaker recommends CrewAI for simpler prototypes, the Agents SDK for handoffs and built-in guardrails, and LangGraph when detailed control over state and execution matters. These are his assessments, not benchmark results.