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.
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!
Adding a RAG system could be great! For example, when asked, 'Can you show me the cancellation policy for this hotel booking?' the first agent could retrieve specific details from indexed data, making the conversation seamless and informative.
Very helpful video thank you! Thumbs upped. Please make another video about PydanticAI but install on your local machine instead of Colab. Also, please add CAG or RAG (or KAG if you dare) - database and memory options would be interesting to see incorporated.
Certainly gonna make some more videos on Pydantic AI. There were a number of GitHub issues that I was waiting on them to address, but I think they've been done now. Need to check when I get a chance. Regarding the RAG stuff I will certainly be revisiting RAG , I think its about a year since I did that anything on RAG. The Cache Augment stuff is cool as is the Graph/Knowledge stuff, the challenge is giving people a simple code demo etc.to teach it. It might be more suited to a course etc.
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?
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 TH-cam has really dared to tackle this core issue yet. 🎉
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
Thank you for the insightful video on Pydantic AI! I'm curious if you have any suggestions for a workaround since Pydantic AI doesn't have native integration with Supabase. Any advice would be greatly appreciated!
Great videos! As a newbie coder, I would like to build a simple POC for an action AI browser Agent (for signups, filling forms etc.). Which framework do you recommend? (as an intro, I did the CrewAI DeepLearning AI course), but from your videos, it seems that Langraph or the new Microsoft Magentic frameworks seem maybe more suited for my POC use case? Many 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)
Yes using something like this you really want to know at least the basics of Python. Lots of good tutorials on TH-cam and should only take a few hours. The practice with it.
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
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.
Its a mess with this pydanticAI I don’t understand if its hallucinating the responses or i am hallucinating. Unreliable responses its bad in my opinion.
The power of LLMs + the control of Vanilla Python. This is going to be awesome.
Thanks for the detailed walk through. re: RAG system: Yes, please make a video about PydanticAI RAG.
Finally, a simple AI layer that just abstracts what is actually useful to abstract. Can't wait to try it out on my next project!
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.
Great choice of video topic and excellent job demonstrating the potential for the framework, great examples. 5 Stars!
very good video. easy to follow along and i learnt alot. will be using this framework in production. thanks sam
Straight to the point and great insight, thank you!
Great overview! Thanks for the easy to follow walkthrough, excited to use it. Cheers !
Yes please show more about using it as a rag and even how multi genic system can be created.
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?
Your content is amazing! *Subbed*
Thanks glad you like it!
Every time I watch one of your videos it’s a hit.
Thanks Sam, this was great OG style !!
It seems like a very high-level wrapper for langchain with easy to use memory and semi-automated tool response. Very cool.
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
What about a booking assistant? One agent gathers user preferences, and the other uses tools to finalize and confirm the booking.
Adding a RAG system could be great! For example, when asked, 'Can you show me the cancellation policy for this hotel booking?' the first agent could retrieve specific details from indexed data, making the conversation seamless and informative.
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 vid fella. Keep em coming
Very helpful video thank you! Thumbs upped. Please make another video about PydanticAI but install on your local machine instead of Colab. Also, please add CAG or RAG (or KAG if you dare) - database and memory options would be interesting to see incorporated.
Certainly gonna make some more videos on Pydantic AI. There were a number of GitHub issues that I was waiting on them to address, but I think they've been done now. Need to check when I get a chance. Regarding the RAG stuff I will certainly be revisiting RAG , I think its about a year since I did that anything on RAG. The Cache Augment stuff is cool as is the Graph/Knowledge stuff, the challenge is giving people a simple code demo etc.to teach it. It might be more suited to a course etc.
Great overview. Thank you!
I would love this to support Ollama
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?
aitutorialmaker AI fixes this. PydanticAI: New Agent Builder
Please explain?
Fabulous! Extremely useful 🙂
very nice. thanks Sam
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 TH-cam has really dared to tackle this core issue yet. 🎉
This came to mind for me as well. Would be great to get some insights/how to`s for the orchestration. Many thanks for the first walkthrough though!
Thanks Sam for another valuable video.
great walk through! I think the only critique I took from you was it being for “simple” setups. Is that your take?
Love it
Thanks 🎉🎉🎉
Great content as usual, Please make a follow-up for RAG
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
Thank you for the insightful video on Pydantic AI! I'm curious if you have any suggestions for a workaround since Pydantic AI doesn't have native integration with Supabase. Any advice would be greatly appreciated!
Top uitgelegd.
Dammmm nice !
Great videos! As a newbie coder, I would like to build a simple POC for an action AI browser Agent (for signups, filling forms etc.). Which framework do you recommend? (as an intro, I did the CrewAI DeepLearning AI course), but from your videos, it seems that Langraph or the new Microsoft Magentic frameworks seem maybe more suited for my POC use case?
Many 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)
How does it decide on the tool call order? Based on the order of tool injection?
There is no order; the LLM choose the appropriate tool based on the context of the question asked.
can we use this framework to create self-learning autonomous agents that are constantly evolving?
Please do a RAG example!
Where would you recommend going to learn more about the basic python skills that would help a beginner programmer with using PydanticAI?
Yes using something like this you really want to know at least the basics of Python. Lots of good tutorials on TH-cam and should only take a few hours. The practice with it.
I'm using bedrock through AWS to call Claude how easy would it be to hook it up? Would love to see agent RAG with this.
So what's the difference from pydantic AI structured outputs vs using open AI structured outputs of both us gpt-4o?
PydanticAI with LangGraph seems a powerful combo. Very bullish on building with PydanticAI.
I will use this just to spite open ai and anthropic
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 how well would this integrate with the outlines project?
can you use local models like qwen? through ollama
yes you can. I will try make a video of this at some point
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
What AI workflow orchestrator would you use in AWS combined with Bedrock?
How is PydanticAI solving some of the most pressing issues like orchestration of complex tasks?
Pydantic should have done this a long time ago
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.
Would this work with a private model?
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.
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.
Its a mess with this pydanticAI
I don’t understand if its hallucinating the responses or i am hallucinating. Unreliable responses its bad in my opinion.
Glad i can stop building this myself