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
@Kludex I think the agent config params that @seunggs is referring to are mostly stored in the GraphAgentDeps as configuration parameters, and I'm not sure whether storing that is in scope of that state persistence initiative (AFAIK the plan is to just store the Node state and the GraphAgentState).
So @seunggs you might need a custom implementation to store & retrieve those agent config params that you are interested in
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: