Skip to main content
The --memory flag and memory command enable persistent memory for agents, allowing them to remember context across sessions.
Install requirement: most praisonai memory subcommands (show, list, add, search, clear) require pip install praisonai (the full wrapper). On a standalone pip install praisonai-code install they exit 1 with memory requires the full wrapper. Install the full wrapper: pip install praisonai โ€” a single-line hint, no Rich traceback (PR #2854). The native memory learn subcommand stays standalone-safe (see the Tip below).
memory learn (and its status, show, add, search, clear sub-subcommands) is a native subcommand โ€” it runs in-process via praisonaiagents.memory.LearnManager and works on a standalone pip install praisonai-code install without the wrapper.

Quick Start

Show Memories

Show stored memories example

Use Memory Flag

With memory flag example

Usage

Manage Persistent Memory

Enable Memory

Expected Output:

Memory Commands

Show Memory

Output:

List Memories

memory list is an alias for memory show โ€” same output, added for parity with tools list, session list, and config list.
Use -l as a short form: praisonai memory list -l 25.
memory show and memory list accept the same flags:

Add Memory

Search Memory

Clear Memory

Behaviour change (PraisonAI PR #4946). praisonai memory clear now prompts before deleting. Automation must pass --force (or -f). Previously the command advertised --force but ignored it, and clear all failed with Got unexpected extra argument.
memory clear and memory clear all prompt for confirmation, matching the memory learn clear sibling commandโ€™s flow:
An unknown target (anything other than short/all) exits 2; aborting the prompt exits 1 with nothing cleared.

Session Management

Checkpoints

Help

Memory Types

How It Works

  1. Capture: Agent extracts important information from conversations
  2. Categorize: Information is sorted into memory types
  3. Store: Memories are persisted to storage
  4. Inject: Relevant memories are injected into future conversations

Storage Options

Programmatic Usage

Advanced Features

Best Practices

Use --user-id to isolate memory per user in multi-user applications.
Memory storage grows over time. Use memory clear periodically to manage storage.