Add a Pydantic AI example Bot - #56
Open
andreolf wants to merge 1 commit into
Open
Conversation
A third framework example beside LangGraph and Mastra, and the first in another language. A real Pydantic AI agent served over AG-UI: the surface's tools arrive per run and their calls stream back to OpenBot to run through the gateway, so the process drives a governed browser it has no direct access to, the same contract as the Bot in the box. Self-contained (its own pyproject.toml, outside the Bun workspaces), imports the AG-UI helper from whichever module path the installed pydantic-ai exposes, and answers /health like the other examples. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
andreolf
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso and
tylerslaton
as code owners
August 20, 2026 20:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
A third framework example beside
examples/langgraph-botandexamples/mastra-bot, and the first in another language. A real Pydantic AI agent served over AG-UI: the surface's tools arrive per run inRunAgentInput.tools, Pydantic AI exposes them to the model as external tools, and their calls stream back to OpenBot to run through the governed gateway — so the process drives a browser it has no direct access to, the same contract as the Bot in the box and the two existing examples.Worth doing because the README names Pydantic AI among the frameworks a Bot can be written in, and the strongest evidence that OpenBot is framework- and language-agnostic is a working example in a language that is not TypeScript.
Self-contained: its own
pyproject.tomloutside the Bun workspaces, so it does not touch the JS build. It imports the AG-UI helper from whichever module path the installedpydantic-aiexposes (pydantic_ai.ui.ag_uiin current releases,pydantic_ai.ag_uiin earlier ones) and answers/healthlike the other examples.Where it runs
A customer's own agent process, exactly like
langgraph-botandmastra-bot— reached by OpenBot only as an AG-UI endpoint URL. It holds no OpenBot state; the tool loop stays on the OpenBot client.RunAgentInput.PORT(default 4202), run by the developer the same way the other examples are; not part of the deployed ingress.Boundary and audit
Proof