Source · release

Pydantic AI v2.77.0: conversation stores, compaction hooks, thinking summaries

Author
Pydantic
Published
27 November 2026
Added
30 November 2026
Original
https://github.com/pydantic/pydantic-ai/releases/tag/v2.77.0

Summary

Pydantic AI v2.77.0 (2026-11-27, late UTC) adds persistent conversation stores for SQLite, Postgres, and MongoDB, a hook for compacting long histories, and a cross-provider thinking_summary setting. This note is based on the release notes; part of them was read through an automated summary.

Key points

  • Conversation stores: SQLite, Postgres, and MongoDB backends for saving and resuming conversations. Pax's session store is renamed SqliteSessionStore.
  • Compaction: a compact_history() capability hook, RunContext.request_compaction() to ask for compaction from a tool, and CompactionStartEvent / CompactionEndEvent stream events.
  • Thinking: thinking_summary works across providers, with anthropic_thinking_display and bedrock_thinking_display for provider-specific control.
  • Skills: missing or unreadable skill directories are now skipped by default; missing_directories='error' restores the old failure.
  • Errors: clearer errors for image output on OpenAIChatModel and for tools with reasoning on GPT-5.4/5.6 (ModelRequestRejectedError).
  • Upgrade with pip install -U pydantic-ai.

Why it matters

Built-in stores and an explicit compaction hook cover two things most production agents otherwise build by hand: resuming sessions and keeping long runs inside the context window.