Q: What are AI agent frameworks?
A framework is a library that writes the rudimentary code for you. Running the agent loop, passing messages between agents, wiring up tools, managing state: a framework handles these things so you don't build them from scratch every time. In exchange, the framework makes some decisions for you.
How many decisions it makes is the real difference between frameworks. They sit on a spectrum from flexible to opinionated.
At one end there is no framework at all: raw Python and direct API calls. You see everything and you decide everything. Next come the flexible frameworks, like the OpenAI Agents SDK and the Pydantic AI stack. They give you light structure and stay out of your way. Further along sits CrewAI, which is more opinionated: it has stronger conventions about how agents and their roles should be organized. Then AutoGen by Microsoft, and at the far end LangGraph, the most opinionated of the group, with a full graph structure for how your agents connect and run.
Which end is better? Neither. They trade different things. Flexible gives you transparency (you see exactly what's happening, which is better for learning), portability (you're not locked into an ecosystem), and simplicity (less to learn, easier to debug). Opinionated gives you speed (fewer decisions to make, the conventions are already set), structure (useful when your team is large or the problem is complex), and power (you can build things that would be very hard to wire up manually).