Skip to main content
File handling enables agents to persist sessions and search file stores.

Quick Start

1

Persist Agent Sessions

2

Custom Session Directory


User Interaction Flow


FileSessionStore

Persists session data to JSON files on disk.

Configuration Options

Methods

Example


FileSearchCall

Search across file stores (used with Gemini deep research).

Configuration Options

Example


Best Practices

FileSessionStore::new() uses ~/.praisonai/sessions/ which works across platforms.
Use .max_messages(n) to prevent unbounded memory growth in persistent agents.
Session store operations return Result types - always handle potential errors.

Sessions

Session management API

Memory

In-memory storage options