Thank you, @Sam. Great job, as always! It's excellent that Pydantic has incorporated AI. I would love to learn more about what can be achieved with PydanticAI.
Yeah, all these frameworks and examples being presented look great - but as always, the real problem lies elsewhere: Specifically in the orchestration, meaning the decision about which of all these possibilities (tools, workflows, output formats etc.) are even relevant and should be used for the current user prompt. And all of that while considering the complete conversation history! As far as I can tell, nobody on UA-cam has really dared to tackle this core issue yet. 🎉
Thanks for the insightful video on this new framework by Pydantic AI. For a single agent, the developer experience looks certainly lightweight and easygoing. Does this also apply, if one wants to scale this up to multiple agents that require some sort of intelligent agent orchestration?
Great video, Sam! Thanks for breaking down Pydantic Al so well. Quick question: Could you create a video on how you think two agents should communicate and hand off tasks between each other? I’d love to see your perspective on that!
fwiw instructor fast followed prefecthq/marvin, but has broader llm support. anyways, glad to see pydantic make this! PS: i wouldn’t use use nest_asyncio, it causes problems in practice. just don’t use notebooks :)
Colab is a great way to show something so people can see how it works. without having to install all the dependencies etc. Not telling people to use this for prod
I immediately thought about MCP too. So thanks for posing the question. Can we use the pydantic framework to do all the orchestrating in host app and tool call using the MCP etc? I liked the idea of separating the tools logic from the interface logic. Or I have completely lost the plot, boy do these things move fast! Im a biomedical engineer dabbling in the computer sciences, what a ride.
interesting idea. yeah you could use it with MCP. I have a 2nd MCP vid done but I had some issues with timeouts I might look at putting something with this in.
I look forward to seeing it! . And thank you again for your work. Always helpful to watch and challenging my own thoughts about all these things. I’ve just discovered Bret Victor’s DynamicLand and my mind is blowing out of control with all these ideas . All the best to you.
it really depends on your use case. LLMs I generally use Sonnet 3.5, Gemini Flash for proprietary models these days. Open Source I generally am using fine tunes of small models, like Phi, Gemma2 and Qwen
Now I can build amazing tools without thinking of any bugs. Thanks to pydantic AI. I will defintely gonna use it on my apsara2.0. Time to say Bye to Langchain (so complex man)
Given that LLMs are stateless, agents serve as large state models to carry context from action to action and agent to agent. No better model system than Pydantic. This is a better version of Swarm, also using dynamic prompts and context variable injection, automatic function interpretation to drive tool calls, and with a better state model for better context management. I built a backup context manager for my attempt at a personal agent Swarm with pydantic models, and here thye come out and have it built in. I wouldn't bet against these guys. There is no need for complicated agent frameworks and graphs etc beyond this, as llms can now drive their own path.
@@samwitteveenai It might actually be the opposite. Getting started wasn't hard but now that the project has grown, I spend more time dealing with input validation and parsing errors than actually developing, that's why I'm looking at PydanticAI as an alternative. It just seems more production-ready. Plus, I have a feeling that my AI IDE (Widsurf) will have an easier time with conventional python usage instead of having to re-learn CrewAI usage patterns every single dev session.
Unless there is limitless context window and AI can directly manage and interact with an environment. Agentic AI is overrated. You still have to write functions and AI is basically deciding a process flow and fails on simple ones even, due to hallucinations. Also it is extremely hard to debug and expensive to run. It’s a lot easier to write code right now to perform tasks they can do.
Great choice of video topic and excellent job demonstrating the potential for the framework, great examples. 5 Stars!
The power of LLMs + the control of Vanilla Python. This is going to be awesome.
it's time to replace Langchain
Bro, I tried langraph, but its bit complex and I cant integrate very well with openai agents.
True😂 back to basic!
What about CrewAI?
YES! Langchain absolutely is a mess.
Does this have caching?
Great overview! Thanks for the easy to follow walkthrough, excited to use it. Cheers !
Thank you, @Sam. Great job, as always! It's excellent that Pydantic has incorporated AI. I would love to learn more about what can be achieved with PydanticAI.
Straight to the point and great insight, thank you!
Every time I watch one of your videos it’s a hit.
Your content is amazing! *Subbed*
Thanks glad you like it!
Yeah, all these frameworks and examples being presented look great - but as always, the real problem lies elsewhere: Specifically in the orchestration, meaning the decision about which of all these possibilities (tools, workflows, output formats etc.) are even relevant and should be used for the current user prompt. And all of that while considering the complete conversation history! As far as I can tell, nobody on UA-cam has really dared to tackle this core issue yet. 🎉
Thanks for the insightful video on this new framework by Pydantic AI. For a single agent, the developer experience looks certainly lightweight and easygoing.
Does this also apply, if one wants to scale this up to multiple agents that require some sort of intelligent agent orchestration?
Thanks for the detailed walk through. re: RAG system: Yes, please make a video about PydanticAI RAG.
Thanks Sam, this was great OG style !!
Great vid fella. Keep em coming
there has been a serious shortage of frameworks in the AI space so thank god they came out with this.
This is an iteration on Instructor. There have not been many frameworks better than that IMHO, so pretty stoked to see this one come out.
😂
great walk through! I think the only critique I took from you was it being for “simple” setups. Is that your take?
How does it decide on the tool call order? Based on the order of tool injection?
Great video, Sam! Thanks for breaking down Pydantic Al so well. Quick question: Could you create a video on how you think two agents should communicate and hand off tasks between each other? I’d love to see your perspective on that!
Sounds interesting do you have a specific use case. I am looking for a few ideas to make so more examples
Great overview. Thank you!
Great content as usual, Please make a follow-up for RAG
Sam how well would this integrate with the outlines project?
fwiw instructor fast followed prefecthq/marvin, but has broader llm support. anyways, glad to see pydantic make this!
PS: i wouldn’t use use nest_asyncio, it causes problems in practice. just don’t use notebooks :)
Colab is a great way to show something so people can see how it works. without having to install all the dependencies etc. Not telling people to use this for prod
i appreciate that! good video by the way. i’ve just been bitten by nest_asyncio conflicts with normal asyncio before haha
Fabulous! Extremely useful 🙂
What AI workflow orchestrator would you use in AWS combined with Bedrock?
Thanks for dropping this info. So is this essentially competing with Anthropic’s MCP to standardize function calling?
no more competing with LangChain and CrewAI etc
I immediately thought about MCP too. So thanks for posing the question. Can we use the pydantic framework to do all the orchestrating in host app and tool call using the MCP etc? I liked the idea of separating the tools logic from the interface logic. Or I have completely lost the plot, boy do these things move fast! Im a biomedical engineer dabbling in the computer sciences, what a ride.
interesting idea. yeah you could use it with MCP. I have a 2nd MCP vid done but I had some issues with timeouts I might look at putting something with this in.
I look forward to seeing it! . And thank you again for your work. Always helpful to watch and challenging my own thoughts about all these things.
I’ve just discovered Bret Victor’s DynamicLand and my mind is blowing out of control with all these ideas .
All the best to you.
Sam, with all of these agent models, which would you say is generically the best (breadth of functionality, ease of implementation, future ready...)?
it really depends on your use case. LLMs I generally use Sonnet 3.5, Gemini Flash for proprietary models these days. Open Source I generally am using fine tunes of small models, like Phi, Gemma2 and Qwen
very nice. thanks Sam
Thanks 🎉🎉🎉
Now I can build amazing tools without thinking of any bugs. Thanks to pydantic AI. I will defintely gonna use it on my apsara2.0. Time to say Bye to Langchain (so complex man)
Would this work with a private model?
I will use this just to spite open ai and anthropic
Given that LLMs are stateless, agents serve as large state models to carry context from action to action and agent to agent. No better model system than Pydantic. This is a better version of Swarm, also using dynamic prompts and context variable injection, automatic function interpretation to drive tool calls, and with a better state model for better context management. I built a backup context manager for my attempt at a personal agent Swarm with pydantic models, and here thye come out and have it built in. I wouldn't bet against these guys. There is no need for complicated agent frameworks and graphs etc beyond this, as llms can now drive their own path.
Pydantic should have done this a long time ago
This or CrewAI, you think?
this gives you far more control than CrewAI. CrewAI is probably easier to use for non coders though.
@@samwitteveenai It might actually be the opposite. Getting started wasn't hard but now that the project has grown, I spend more time dealing with input validation and parsing errors than actually developing, that's why I'm looking at PydanticAI as an alternative. It just seems more production-ready. Plus, I have a feeling that my AI IDE (Widsurf) will have an easier time with conventional python usage instead of having to re-learn CrewAI usage patterns every single dev session.
Top uitgelegd.
Dammmm nice !
Thanks Sam for another valuable video.
Glad i can stop building this myself
Unless there is limitless context window and AI can directly manage and interact with an environment. Agentic AI is overrated. You still have to write functions and AI is basically deciding a process flow and fails on simple ones even, due to hallucinations. Also it is extremely hard to debug and expensive to run. It’s a lot easier to write code right now to perform tasks they can do.