-
Notifications
You must be signed in to change notification settings - Fork 990
feat: AG-UI adapter (toolsets) #2101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: toolsets
Are you sure you want to change the base?
Conversation
AG-UI adapter enabling integration with the AG-UI protocol via the Agent.to_ag_ui() method. This includes a full example for all features in the AG-UI dojo. Fixes: ag-ui-protocol/ag-ui/issues/5
Move pydantic_ai_ag_ui to pydantic_ai_slim as ag_ui, updating references and documentation accordingly.
Refactor to_ag_ui so it now returns a ASGI compatible server based off starlette. This makes it easier for users setup apps with minimal code. Fix some invalid references missed in the package refactor for cli and examples. Made enums, and exceptions private to the package, so they are not exposed in the public API.
Eliminate the use of match statement and dataclass(kw_only=True) to ensure compatibility with Python 3.9. Remove duplicate import of starlette outside try block, causing tests to fail when it's not installed.
Disable the deprecation warning for model_fields in Mistral.
Remove invalid no cover comment from Mistral model flagged by strict-no-cover check.
Add support for the new tool call returns and thinking parts to the AG UI adapter. This eliminates the need to build a message snapshot while sill providing the necessary information for the UI.
Allow the agent path to be specified when using to_ag_ui.
Reduce the log level for the request done message in the AG-UI adapter to debug level.
Add missing `from __future__ import annotations` imports to ensure ensure that only relevant type annotations are processed at runtime. Fix incorrect import of `dataclass` in `args.py`.
PR Change SummaryImplemented the AG-UI adapter for seamless integration with the AG-UI protocol, enhancing user interaction capabilities for PydanticAI agents.
Modified Files
Added Files
How can I customize these reviews?Check out the Hyperlint AI Reviewer docs for more information on how to customize the review. If you just want to ignore it on this PR, you can add the Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add |
ae3a968
to
caddcc0
Compare
Switch from additional tools to the new toolset system.
caddcc0
to
6671164
Compare
Hey! I know this is still a draft, but have been following the development of ag-ui support since I wish to build my MVP with pydantic-ai & ag-ui. Did a test run today on this branch, dropping my findings in case they are helpful:
|
Great info, keep it coming! |
AG-UI adapter enabling integration with the AG-UI protocol via the Agent.to_ag_ui() method.
This includes examples for all features in the AG-UI dojo.
Fixes: ag-ui-protocol/ag-ui#5