Get early access
Copilot Kit Logo
Introducing Pydantic AI Integration with AG-UI
By Steven Hartland and Nathan Tarbert
July 23, 2025

Pydantic AI is now natively supported with AG-UI

We’re excited to share that AG‑UI, the open Agent–User Interaction Protocol from CopilotKit, is now natively supported in Pydantic AI, thanks to a new integration built by Steven Hartland at Rocket Science, working hand in hand with the Pydantic AI team.

Why it matters

Pydantic AI is quickly becoming the standard for building reliable, type-safe AI agents in Python. But while the backend agent stack was solid, this integrations now enables first-class UI that improves the users experience:

  • Structured, streaming agent output
  • Live user inputs and corrections
  • Human-in-the-loop checkpoints
  • Frontend tools

That’s exactly what AG‑UI is designed for. It’s a composable protocol that connects AI agents to rich, interactive frontends, with minimal glue and strong separation of concerns.

"We originally began the AG‑UI integration as a standalone library, but with support from the Pydantic AI team, it became clear that this functionality belonged in the framework itself.”
"We collaborated closely with the Pydantic AI team to build in native support for AG‑UI, and shipped it alongside their new toolset abstraction."
  • Steven Hartland - VP Engineering @ Rocket Science

The result is a seamless dev experience:

  • No glue code
  • Streaming agent updates in structured JSON
  • Automatic wiring of tool inputs/outputs to UI state

AG‑UI now works out-of-the-box with Pydantic AI - meaning developers can instantly add structured agent interaction to any AG‑UI-compatible frontend.

What’s next

Rocket Science is very close to using this integration in production, and they’re helping drive AG‑UI forward as an open protocol for building real-time agentic systems.

We’re collaborating closely through the AG‑UI working group, and more patterns, docs, and examples are coming soon, especially around structured editing, tool chaining, and UX for error recovery.

If you're building AI agents in Python and need a clean bridge between backend logic and interactive UI, this integration is built for you.

👉 Try it out: https://ai.pydantic.dev/examples/ag-ui/

👉 Check out the docs: https://ai.pydantic.dev/ag-ui/

Stay up to date and follow @CopilotKit, Pydantic AI, and @rocketsciencegg.

Want to learn more?

Top posts

See All
Build Generative UI Agents on Amazon Bedrock AgentCore with AG-UI and CopilotKit
Anmol Baranwal and Nathan TarbertJune 30, 2026
Build Generative UI Agents on Amazon Bedrock AgentCore with AG-UI and CopilotKitAmazon Bedrock AgentCore now runs AG-UI agents natively, so auth, scaling, and session isolation come managed. We build one agent that renders charts inline, syncs a todo canvas both ways, and pauses for human input. Pick Strands or LangGraph at deploy time, and the same frontend runs against either.
Switching to Fable 5: The Tuesday That Cost $22,000
Jordan Ritter June 12, 2026
Switching to Fable 5: The Tuesday That Cost $22,000CopilotKit swapped their coding agents to a new model (fable-5) on a Tuesday, and by Wednesday had run up a ~$22,000 Anthropic bill. No bug or runaway script caused it — five engineers doing normal work triggered it, because the new model interpreted their English-prose behavioral rules ("keep sub-agents small," "converge to zero") far more loosely than older models did. The result was four simultaneous drift modes: bloated sub-agents, runaway review loops, exploding fanout, and oversized single turns. What kept it from being far worse was their "skills" system — small, named instruction packs that agents auto-load to encode team conventions. Their instrumentation caught the runaway in 12 hours instead of 12 days, isolated worktrees contained the blast radius, and the fix lived at the rules layer (swapping vague adjectives for hard numeric budgets and machine-checkable gates) rather than in application code. The takeaway: if you let AI agents do real work, you need a guardrails layer that encodes desired behavior separately from the agents — small, composable, and faster to change than a model. Because models will change, and the team with a rules layer pays $22K and writes a blog post; the team without one pays more and writes a press release.
Build AI Agents That Live Inside Your App — CopilotKit Explained
Nathan Tarbert June 12, 2026
Build AI Agents That Live Inside Your App — CopilotKit ExplainedCopilotKit is a complete set of building blocks for developers and teams who want to add agents to their app and assemble, debug, and ship the interface layer between their agents and users. It's also framework-agnostic and supports any LLM and every popular agent framework. There are two options for chat. Pre-built components, if you want something already built or Headless UI, which allows anyone to build custom agent interfaces.
Are you ready?

Stay in the know

Subscribe to our blog and get updates on CopilotKit in your inbox.