Pydantic releases pydantic-ai v2.77.0 with conversation stores and history compaction
Pydantic AI v2.77.0 adds SQLite, Postgres and MongoDB backends for ConversationStore and a compact_history() capability hook with compaction events. It also adds a thinking_summary setting for readable thinking across providers. The release lists many compatibility changes that developers upgrading should review.
Quick facts
| Released by | Pydantic |
|---|---|
| Version | v2.77.0 |
| Date | 2026-11-27 |
| New storage backends | SQLite, Postgres, MongoDB |
| Dependency change | genai-prices>=0.2.4 |
What it is
Pydantic AI is a Python framework for building agents on top of language models. Version 2.77.0 extends conversation persistence, context compaction and thinking output across model providers. It also tightens behavior in several providers and sub-agent handling.
How it works
ConversationStore gains SQLite, Postgres and MongoDB backends, and the Pax session store is renamed SqliteSessionStore. A compact_history() hook and RunContext.request_compaction() trigger compaction, which emits CompactionStartEvent and CompactionEndEvent in the stream. thinking_summary, with anthropic_thinking_display and bedrock_thinking_display, returns summarized thinking from supported Claude models.
