1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Session stores: pluggable persistence for conversation history.
//!
//! Every [`Agent`](crate::agent::Agent) keeps per-session chat history in a
//! [`SessionStore`]. The default is [`InMemorySessionStore`] (history lives
//! and dies with the process). For persistence across restarts, enable a
//! backend feature and pass a store to the builder:
//!
//! - [`SqliteSessionStore`] (feature `sqlite-sessions`) — single-file or
//! in-memory SQLite database, no external service needed.
//! - [`RedisSessionStore`] (feature `redis-sessions`) — shared store for
//! multi-instance deployments, with optional TTL expiry.
//!
//! Implement the trait yourself for any other backend (Postgres, DynamoDB, …).
pub use InMemorySessionStore;
pub use RedisSessionStore;
pub use SqliteSessionStore;
use crateResult;
use crateChatMessage;
/// Persistence for per-session conversation history.