Skip to main content
Async conversation stores provide non-blocking persistence for conversation sessions and messages, enabling high-performance multi-agent systems.
The user resumes a long chat; the async store loads session history without blocking other agents on the same event loop.

Quick Start

1

Use Built-in Async Store

Use a built-in async conversation store with automatic resource management:
2

Implement Custom Async Store

Create a custom async store by inheriting from AsyncConversationStore:

How It Works


Configuration Options

AsyncConversationStore API Reference

Complete method signatures and configuration options

Common Patterns

Context Manager Usage

Always use async with for automatic resource management:

Upsert Session Helper

Use the built-in upsert_session() method for create-or-update operations:

Custom Async Store Implementation

When implementing a custom async store, inherit from AsyncConversationStore:

Best Practices

The async context manager ensures proper resource cleanup:
The orchestrator uses isinstance() checks to dispatch correctly:
Use either sync or async consistently:

Breaking Change in PR #1829: The async_* prefixed methods have been removed from async stores:
Update your code to use the non-prefixed async methods.

Async DB Hooks

Event-driven persistence hooks for async stores

Persistence Overview

Architecture and backend options