You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where the users are able to create a custom agent with desired system_prompt, result_type, etc which get stored in a relational database (Postgres in my case). During the chat with the agent, the frontend just sends the agent_id and the backend grabs the rest of the information from the DB to instantiate a Pydantic AI Agent.
But I learned that Pydantic models cannot be easily serialized to JSON to be persisted in DB. What is the recommended strategy here to enable my dynamic agent creation use case?
Any guidance is appreciated!
The text was updated successfully, but these errors were encountered:
seunggs
changed the title
Dynamic agent creation (i.e. storing system_prompt, result_type, etc in DB)
Dynamic agent creation (i.e. persisting system_prompt, result_type, etc in DB)
Feb 23, 2025
I have a use case where the users are able to create a custom agent with desired system_prompt, result_type, etc which get stored in a relational database (Postgres in my case). During the chat with the agent, the frontend just sends the agent_id and the backend grabs the rest of the information from the DB to instantiate a Pydantic AI Agent.
But I learned that Pydantic models cannot be easily serialized to JSON to be persisted in DB. What is the recommended strategy here to enable my dynamic agent creation use case?
Any guidance is appreciated!
The text was updated successfully, but these errors were encountered: