Skip to content

Conversation

@samuelcolvin
Copy link
Member

@samuelcolvin samuelcolvin commented Sep 16, 2025

To do:


This adds support for Vercel AI Elements streams to Pydantic AI.

There's an example frontend in a separate repo github.com/pydantic/pydantic-ai-chat the plan is to either make that into a more complete template, or release a pydantic-ai-chat python library which contains a pre-built react frontend.

@DouweM we should rename this to use the proper terminology of the "Vercel AI Data Stream Protocol"

Here's a demo of basic usage:

pydantic-ai-chat.mp4

@github-actions
Copy link

github-actions bot commented Sep 16, 2025

Docs Preview

commit: e770176
Preview URL: https://b30d1e83-pydantic-ai-previews.pydantic.workers.dev

@DouweM DouweM self-assigned this Sep 16, 2025
@edwinjosechittilappilly

This would be a wonderful addon, looking forward to see it soon in main.

@edwinjosechittilappilly

@samuelcolvin can you add it to docs such that it would be integrated as chat service in existing Fullstack apps that uses pydantic-ai as Agent stack.

Copy link

@183amir 183amir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this! I left some comments on the code and I will try to test this and get back.

@DouweM DouweM added this to the October 2025 milestone Sep 30, 2025
DouweM added 3 commits October 8, 2025 10:19
# Conflicts:
#	examples/pydantic_ai_examples/chat_app.py
#	pydantic_ai_slim/pydantic_ai/agent/abstract.py
#	pydantic_ai_slim/pydantic_ai/run.py
@DouweM DouweM changed the title Vercel AI Elements types Support Vercel AI Data Stream Protocol Oct 8, 2025
@DouweM DouweM enabled auto-merge (squash) October 29, 2025 22:24
@DouweM DouweM merged commit e300251 into main Oct 29, 2025
30 checks passed
@DouweM DouweM deleted the vercel-ai-chat branch October 29, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ModelRetry bug with pydantic AI, AG-UI, and Open AI

9 participants