Skip to main content
The local backend keeps sessions in process memory. It needs no external service and never touches disk — when the process exits, sessions are gone. It is the default backend of ShortTermMemory.

When to use

  • Local development and debugging;
  • Unit tests, example scripts, and other ephemeral scenarios;
  • When sessions don’t need to survive across processes or restarts.

Usage

Because local is the default, the following are all equivalent:
If the Runner receives no short_term_memory or session_service, it automatically creates a local instance as a fallback, so running an agent locally needs no extra configuration.

Parameters

local has no backend-specific settings. Use the common ShortTermMemory parameters below; most have no effect on local.

ShortTermMemory constructor parameters (local)

The local backend does not persist to disk; all session data is lost when the process exits. Do not use it in production for sessions that must survive. For persistence use SQLite, MySQL, or PostgreSQL.

Environment variables

The local backend reads no environment variables.
Last modified on September 19, 2026