Pydantic AI vs LangGraph vs Agno: How to Choose a Python Agent Framework

Imagine a team of four people who have just signed a contract to rebuild a customer support script. The current version is simple. A user asks a question, the script pulls three paragraphs from a knowledge base, glues them together, and returns them. Six months in production, the complaints have piled up. Someone asks when the bag they ordered last week will arrive, and the script reads out the return policy, word for word.

The client wants two additions: order lookup and refund initiation. Both sit behind internal APIs, and wiring them up is not the difficult part. The difficult part is deciding what to write the new version in. One teammate wants the official model SDK plus a few conditionals. Another says that if this is going to be an agent, it should be built on a framework. The third spent a few days on GitHub and came back with three names: Pydantic AI, LangGraph, Agno. They wrote no code that afternoon. They argued about what separates those three projects.

That argument deserves the time, and not because the team is overthinking it. The three projects disagree about what the word agent means, and picking one shapes the code you will be maintaining a year from now. Choose badly and you do not simply move more slowly. The code grows into a different shape, and by the time the mismatch is obvious, the rework is expensive.

The afternoon the script ran out of road

It helps to lay out the work first, because framework comparisons are rarely about feature lists. They are about which kind of trouble the framework can absorb for you.

The support bot has four layers of work. The shallowest is reading the question, since users leave out subjects constantly. “That bag” refers to which order, exactly, and the answer lives somewhere in the conversation. The second layer is deciding what to do: look up an order, answer directly, or hand the person to a human. The third is execution, calling an API and turning the result into a sentence someone would actually say. The fourth is the awkward one. A refund cannot happen because a model felt confident. Someone has to approve it, and the process has to stop and wait, possibly overnight, and pick up in the morning where it left off.

Of those four layers, the first and third belong to models and data. The second and fourth belong to process. Most of the gap between frameworks comes down to which layer each one treats as its home ground.

The first version of a bot like this usually lives in a single function. Read the context, assemble the prompt, parse the response, decide whether to call a tool, all inside two hundred lines. It works, and nobody wants to touch it. Adding one tool means editing five places. Changing a prompt means retesting every branch. When something breaks, you read logs and guess which step went sideways. Code like that ships fine. It just does not survive a quarter of feature requests.

Two failures tend to force the issue. The first is a tool result that arrives in a shape nobody planned for, a list where the code expected a dict, a date in a format the parser half understands, and the error surfaces three steps later in a sentence about something else. The second is a prompt change that fixes one complaint and quietly breaks two branches nobody tested that afternoon. Both failures point at the same missing piece: nothing in the file states what a correct intermediate result looks like.

So the real question is who takes responsibility for the inside of that function.

Three projects, three answers to the same word

Pydantic AI reads the word narrowly, and directly: an agent is a function with tools, where the input has a type and so does the output. The project comes from the team behind Pydantic, the validation library, and that origin shows in where it puts its weight. The question it cares about is whether you can trust what the model handed back. You describe the shape you expect as a data model, the response has to pass validation, and when it fails the error goes back to the model for another attempt. Tool arguments carry types too, so a malformed call surfaces before it reaches production rather than after.

The first task people usually try is order extraction. A user message might contain an order number, a product name, a delivery window, and a typo or two. Written with Pydantic AI, the call returns an object rather than a paragraph. A field with the wrong type raises an error, and the retry logic is already handled. It feels like putting a fence around the model’s improvisation. The cost is that Pydantic AI has little to say about process. For multi-step flows with branches and human approval, there is no built-in orchestration layer. You write it in ordinary Python control flow. The project would call that restraint. Your team might call it a gap.

LangGraph takes the opposite view. An agent is a graph. Nodes are actions, edges decide where control goes next, and a single state object moves through the whole thing. The model takes a while to click, because you have to decide what belongs in the state before you can write a node, and then decide what each node reads and writes. Once it clicks, the benefits arrive quickly. Nodes can be tested alone. The flow can be drawn for people who do not read code. A failure points at a specific node. And a run can stop halfway, wait for a person, and continue later.

The refund path is the case it was built for. A customer asks for a refund, the order status gets checked, small refunds clear automatically, large ones route to a human, and the refund executes after approval. The middle of that process may sit overnight. In a graph, the branches and the pause are part of the described flow instead of if-statements scattered through a file. LangGraph belongs to the LangChain side of the world, which means a large set of surrounding tools and a large set of concepts. The first week is partly spent working out which concepts you actually need.

Agno reads the word most broadly. It is less a library than a place to build, run, and manage agents. The project is not new. It began as Phidata in 2022 and later changed name and direction. You work in units of agents: one agent carries its own model, tools, knowledge, and memory, and several agents can be assembled into a team. Session handling, run records, and the operational chores around agents have ready-made answers at the platform layer, so you are not building them from scratch.

For some teams that is exactly the right trade. Picture a small e-commerce operations group that wants three agents running at once, one for product selection, one for copywriting, one watching customer messages. Nobody on that team wants to write scheduling and storage code. Using the platform layer saves real setup work. The cost is a thicker layer of abstraction. When output looks wrong, you dig down several levels before you see what the model actually received. More is given to you, and more control is given up.

What a table can settle, and what it cannot

Put the three side by side and only some things can be compared cleanly: who licenses it, how it organizes work, how far types reach, how state is stored, how long it takes to learn, and who it suits. Those columns are not arbitrary. The license decides whether a company can use it at all; if legal says no, nothing else matters. The orchestration model decides what your code looks like, and that is hard to change later. Typing decides where mistakes surface, at review time, at runtime, or in a customer complaint. State and persistence decide whether a process can pause and resume. Learning curve decides whether the team can show something in week one.

On licensing, both MIT and Apache-2.0 are permissive enough for commercial use, and all three projects can sit inside a closed product. The practical difference is paperwork. Apache-2.0 carries an express patent grant and asks you to preserve notices, which is usually what a legal review means when it says it prefers Apache. MIT is shorter and leaves patent language out entirely, so a company with a patent-sensitive legal team may ask questions that the license does not answer. Neither outcome is a reason to pick a framework on its own, but discovering the question after the architecture is settled wastes a month.

Project License Orchestration Typing and validation State and persistence Learning curve Best fit
Pydantic AI MIT Agent-centered; flow comes from Python control flow End-to-end types, strict output schemas, failed validation can be fed back for a retry Light; durable storage is yours to add, built-in checkpointing N/A Fast for teams already writing Pydantic models Output that has to be trustworthy, inside existing Python services, model treated as a typed function
LangGraph MIT Graph of nodes and edges over an explicit state State declared up front, type checking concentrated at the flow level The center of the design; interrupts, resume, and step replay Steep at first; state design comes before code Long flows with branches, human approval, and pauses that may last days
Agno Apache-2.0 Agents and teams, with a runtime and management layer attached Python type hints; validation depth varies by feature, check the docs Platform-level sessions and run management, details move between releases Moderate; basics are quick, platform concepts take longer Several agents at once, no infrastructure staff, wanting built-in run history and a UI

The two columns people misread most are the last two. Learning curve is not an absolute. A developer who has written a few hundred Pydantic models can read the Pydantic AI docs in an afternoon. Give that same developer an afternoon with LangGraph’s state design and everything will feel sideways. The best-fit column is not exclusive either. All three can run a support bot. The difference is which one grows in the direction your requirements already point.

Then there are the star counts, which is where most people look first. As of late October 2026, checking the GitHub API: LangGraph at roughly 43.7k, Agno at roughly 42.9k, Pydantic AI at roughly 20.8k. That ordering says more about age than quality. LangGraph was created in August 2023, Agno’s predecessor in May 2022, Pydantic AI in June 2024. A project that started two years later and still reached twenty thousand stars is responding to a real irritation. Stars work as a rough signal of attention. As a selection criterion they will cost you.

The difference appears after something breaks

Once all three demos run, the differences show up in one place: the failure path.

Take Pydantic AI first. Suppose the model returns an amount field as a string with a currency symbol attached. Validation rejects it, the error message goes back to the model, and the model tries again. Nobody writes parsing code, and nobody spends an hour in the logs. What the framework bought you was a boundary the model’s mistakes cannot cross.

LangGraph’s case is more specific. The refund reaches human approval, the approver has gone home, and the run stops at that node. The next morning they click approve, and the flow continues from that point without re-querying the order status, because the state was saved. Without that layer you write a task table yourself, tracking which step each request reached and what context it carried. Writing it is not hard. Maintaining it is a hole with no bottom. What LangGraph actually changes is that a pause becomes a normal state in the flow rather than an exception you handle badly.

Agno shows a third pattern. Several agents run at once, and the runtime and management layer keeps session and run records. For a team without an operations person, that matters, because debugging does not begin with building a logging stack. The cost is that abstraction covers the details. When output looks wrong, you peel back layers from the top. Which details you can see depends on the feature and the release, so the docs are the authority rather than a blog post.

Behind all three is one judgment: choosing a framework is choosing which errors you will spend your time on. Pydantic AI stops errors at the data boundary, so you spend time designing models. LangGraph turns errors into explicit states in a flow, so you spend time designing graphs. Agno absorbs errors into the platform, so you spend time learning which layer to inspect.

There is a pleasant side effect to the LangGraph approach that the other two do not offer in the same way. Because the flow is written down as nodes and edges, a product manager can look at the diagram and point at the node where the customer experience goes wrong. That does not make the graph correct. It makes the argument about correctness concrete, which is often the harder problem.

Back to the support bot

Return to the team from the opening. A reasonable answer for them is Pydantic AI plus a small state machine they write themselves. The reasoning is plain. Their flow has four steps, the refund approval needs a to-do table and nothing more, and adopting a full graph would mean spending the first week on concepts instead of shipping. Meanwhile unreliable output is a daily annoyance, and that is precisely the part Pydantic AI handles. If the refund path later grows seven branches, with cancellations and reshipments and partial refunds, the choice flips toward LangGraph.

So the useful advice is not which project is better. It is which kind of demand each one matches.

If your recurring problem is that the model’s output cannot be used, fields missing here, formats wrong there, while the business process itself is simple, choose Pydantic AI. It puts types and validation at the front, and it drops into an existing Python service without asking you to reorganize the service. If someone on the team already knows Pydantic, the ramp is close to nothing.

If the problem is the process itself, many steps, real branches, a person in the middle, a run that may sit for days, and a need to see what happened at each step afterward, choose LangGraph. It forces you to think about state before you write code, and that upfront cost keeps paying back. Accept the density of concepts, and accept the association with the LangChain world, then decide for yourself how much of that surrounding tooling you want.

If you do not want to spend effort on the runtime layer, have several agents to manage at once, want session records and a UI without building them, and have nobody on the team for infrastructure, Agno is the better trade. Its predecessor has been around for years, so the platform side is fairly complete. Just go in knowing that it hides more of the details, and be willing to dig when something strange happens.

One combination also works. Use Pydantic AI inside each node for input and output, and LangGraph between nodes for routing. The two do not conflict. One handles data you can trust, the other handles process you can follow.

If the team still cannot decide, the fastest path is not more reading. Give the same small task to each framework and write it three times: look up one order, then answer in one sentence. Half a day is enough. Watch which one gets you to a working result first, listen to whether the errors it prints are readable, and count how many files you touch to change one requirement. Those three answers will tell you more than any comparison table, including this one.

Spend the trial on the part that is expensive to move later. A handful of Pydantic models can usually be carried to another framework in an afternoon, since the models describe your data rather than the framework’s opinions. Graph wiring is harder to transplant, and platform-level session records are harder still, because by then the surrounding code has started to assume them. A team that prototypes the graph or the platform layer first and the data models second learns the opposite lesson from the one it needs.

Facts here come from the repositories themselves, and the repositories are the place to check them:

https://github.com/pydantic/pydantic-ai

https://github.com/langchain-ai/langgraph

https://github.com/agno-agi/agno

Related reading

Browse the full guide →

Stay updated with our latest AI insights

Follow FuturePicker on Google
Scroll to Top