First-Tree vs Pydantic AI
One builds the agent. The other gives it your team's memory. They sit at different layers of the stack — and they work best together.
Searching for "Pydantic AI vs First-Tree" usually means you're wiring up an agent and trying to figure out which tool owns which job. The honest answer is that they don't compete — they sit at different layers. Pydantic AI builds the agent. First-Tree gives the agent your team's context. This page lays out the distinction so you can use both without overlap.
They solve different problems
Pydantic AI is a Python agent framework from the team behind Pydantic. Its job is agent construction: define tools with typed schemas, validate model outputs against your types, inject dependencies, and run the agent loop with confidence that what comes back is structurally correct. It's one of the cleanest ways to build a single, reliable agent in Python.
First-Tree is not a framework. It's a context tree — a Git repository where every directory is a domain and every file is a node capturing decisions, designs, and ownership. It's the persistent, versioned, owned memory that any agent reads to understand your codebase and your team's choices. The agent reads the tree; First-Tree never runs the agent.
| Dimension | Pydantic AI | First-Tree |
|---|---|---|
| What it is | Agent framework (Python) | Orchestration platform (chat + GitHub queue + memory) |
| Owns | Tool calls, type validation, the agent loop | Decisions, ownership, cross-domain knowledge |
| Scope | One agent, one run | Every agent + human, across sessions |
| Lives | In your application code | In a versioned Git repo |
| Answers | "Did the model return valid output?" | "What did our team decide, and why?" |
| Framework lock-in | Python + Pydantic | None — any agent, any language |
Where Pydantic AI stops
Pydantic AI gets you a capable, type-safe agent. But it has no opinion about what the agent knows beyond the current request. Build a second agent, or run the same one tomorrow, or hand the work to a teammate's agent, and it starts from zero again: it doesn't know that your team standardized on one auth approach, that a previous refactor was reverted for a specific reason, or who owns the billing module.
That's not a flaw in Pydantic AI — it's simply out of scope. Validated outputs are a per-run concern. Team knowledge is a cross-run, cross-agent, cross-person concern. Different problem, different layer.
What First-Tree adds
First-Tree captures the knowledge that would otherwise scatter across pull requests, documents, and people's heads, and puts it where an agent can read it. Nodes are Markdown. Each has an owner declared in frontmatter. The tree is organized by concern, not by repo — so an agent working on "add SSO" finds the auth context in one place instead of spread across four services. And the tree is the current state, not a snapshot: when a decision changes, the tree changes, and a stale node is treated as a bug.
The combination: a Pydantic AI agent that loads your First-Tree context tree.
Pydantic AI guarantees the agent's output is well-formed. First-Tree guarantees the agent is working from your team's actual decisions instead of guessing. One makes the agent reliable; the other makes it informed.
Use them together
The integration is deliberately boring: at the start of an agent run,
read the relevant NODE.md files from the context tree and
include them in the agent's system context. The agent now reasons with
your team's conventions in hand. Because the tree is plain Git, you get
review, history, and ownership for free — the same workflow your code
already uses.
This is also why First-Tree doesn't lock you in. The same tree that feeds a Pydantic AI agent today feeds a Claude Agent SDK agent, a LangGraph graph, or Claude Code across your team tomorrow. The framework is a choice you can change; the context is the asset you keep.
If your agents are graduating from "one capable agent" to "a team of agents and humans working the same codebase," that shared-context problem is exactly what the AI agent teams approach is built for — First-Tree is the orchestration platform underneath it.