Eigen RadarAI
Analysis

Pydantic AI adds database options for saving agent conversations

Pydantic AI, a toolkit for building AI agents in Python, added three database options for applications to store conversations. Developers can also choose when to condense the history that a model receives and see when that process starts and ends. The full conversation record and the shorter version passed to a model serve separate purposes.

Artificial Intelligence··Midday
Wide view of a daylit software and database-engineering lab where three distinct storage server units sit side by side on a steel workbench, linked by Ethernet patch cables to a network switch and compact workstation.AI image

Developers decide when the model gets a shorter history

Pydantic AI, a Python toolkit for building AI agents, added a way for applications to decide when a model should receive a shorter version of a conversation. Applications can ask to condense the history on demand or pass in a function that determines when to do it. The framework can now also signal the start and end of the work in the stream of updates it sends to an application.[1]

The same release adds ways to store conversations

Version 2.77.0, dated November 27, added support for SQLite, PostgreSQL and MongoDB as places to keep conversation records. Each database now has an implementation of ConversationStore, an interface that applications use to save a conversation. Saving the conversation through that interface is separate from deciding how much conversation history to give a model for its next turn.[1]

The session browser gets a new storage name

The update also renamed the older SQLite store used by Pax, which includes a browser for sessions. An application using the older names can still load them, though it now gets a warning that the names are deprecated. For agents that never request history compaction, the sequence of updates sent to the application stays the same. Applications that handle every type of update separately need to recognise the new signals for the start and end of compaction.[1]

References

  1. News sourcePydantic AIPydantic AI adds database storage for agent conversations↩1↩2↩3