Quick Start
User Interaction Flow
FileSessionStore
Persists session data to JSON files on disk.Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
session_dir | PathBuf | ~/.praisonai/sessions/ | Directory for session files |
max_messages | usize | 100 | Maximum messages per session |
Methods
| Method | Signature | Description |
|---|---|---|
new() | fn new() -> Self | Create with default directory |
with_dir(dir) | fn with_dir(impl Into<PathBuf>) -> Self | Create with custom directory |
max_messages(n) | fn max_messages(self, usize) -> Self | Set message limit |
Example
FileSearchCall
Search across file stores (used with Gemini deep research).Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
store_names | Vec<String> | [] | Names of stores to search |
Example
Best Practices
Use default paths for simplicity
Use default paths for simplicity
FileSessionStore::new() uses ~/.praisonai/sessions/ which works across platforms.Set message limits for long-running agents
Set message limits for long-running agents
Use
.max_messages(n) to prevent unbounded memory growth in persistent agents.Handle file I/O errors gracefully
Handle file I/O errors gracefully
Session store operations return
Result types - always handle potential errors.
