Skip to main content

Examples

This section contains step-by-step examples with code and explanations in interactive Jupyter notebook format.

Available Scenarios

Each scenario is available as both:

  • Jupyter Notebook (.ipynb) - Interactive, runnable examples
  • Markdown (.md) - Documentation format

Markdown Documentation

Quick Start

Using Jupyter Notebooks

  1. Install Jupyter:

    pip install jupyter notebook
  2. Launch Jupyter Notebook:

    jupyter notebook
  3. Open a scenario notebook:

    • Start with scenario_1_basic_usage.ipynb if you're new to powermem
    • Run each cell sequentially using Shift+Enter
    • Modify code and experiment!

Using Python Scripts

You can also run the examples as Python scripts by copying code from the markdown files.

Notebook Features

Each notebook includes:

  • Step-by-step instructions - Clear explanations for each step
  • Runnable code cells - Execute code directly in the notebook
  • Markdown documentation - Explanations and context
  • Extension exercises - Practice exercises to try on your own
  1. Start with Scenario 1 - Learn basic memory operations
  2. Explore Scenario 2 - Understand intelligent memory features
  3. Try Scenario 3 - Work with multi-agent scenarios
  4. Check Scenario 4 - Learn async operations
  5. Scenario 5 - Custom integrations for advanced users
  6. Scenario 6 - Sub stores for memory partitioning and optimization
  7. Scenario 7 - Multimodal capability for image and multimedia processing
  8. Scenario 8 - Ebbinghaus forgetting curve for time-based memory decay and retention optimization
  9. Scenario 9 - User profile management for automatic user profile extraction and integration with memory search

Requirements

  • Python 3.10+
  • powermem installed (pip install powermem)
  • Jupyter Notebook (for interactive notebooks)
  • LLM provider configured (for intelligent features in Scenario 2+)