Skip to content

oceanbase/powermem

PowerMem

Persistent memory for AI agents and applications.

PyPI version PyPI downloads Python 3.11+ License Apache 2.0 GitHub Discord

English · 中文 · 日本語

PowerMem combines vector, full-text, and graph retrieval with LLM-driven memory extraction and Ebbinghaus-style time decay. It supports multi-agent isolation, user profiles, and multimodal signals (text, image, audio).

Use the Python SDK, CLI (pmem), or the HTTP API Server (with Dashboard at /dashboard/). An MCP server is also available. All share one .env. See .env.example and the configuration guide.

OpenClaw integration

OpenClaw can use PowerMem as long-term memory via the memory-powermem plugin.

openclaw plugins install memory-powermem

Requires the OpenClaw CLI to be installed.

PowerMem with OpenClaw

Quick start

Prerequisites: Copy .env.example to .env and set LLM and embedding credentials (the default database is SQLite; OceanBase can use embedded SeekDB — see .env.example). Alternatively, after installing PowerMem, run pmem config init to create .env interactively. See Getting started.

Install

pip install powermem

SDK example

Run from a directory that contains your configured .env:

from powermem import Memory, auto_config

config = auto_config()
memory = Memory(config=config)

memory.add("User likes coffee", user_id="user123")

results = memory.search("user preferences", user_id="user123")
for result in results.get("results", []):
    print(f"- {result.get('memory')}")

More patterns: Getting Started.

CLI (pmem, 1.0+)

pmem memory add "User prefers dark mode" --user-id user123
pmem memory search "preferences" --user-id user123

Interactive REPL (run separately; exits with exit or Ctrl+D):

pmem shell

Full reference: CLI usage.

HTTP API Server and Dashboard

Uses the same .env as the SDK. Dashboard is served under /dashboard/.

powermem-server --host 0.0.0.0 --port 8000

Use Docker or Compose as needed — see API Server and Docker & deployment.

Entry points

Mode Typical commands Docs
CLI pmem memory add / pmem memory search; pmem shell CLI usage
HTTP + Dashboard powermem-server --host 0.0.0.0 --port 8000; image oceanbase/powermem-server:latest; from repo root: docker-compose -f docker/docker-compose.yml up -d API Server
MCP Server (optional)

Requires uv and a configured .env in the working directory (see MCP Server).

uvx powermem-mcp sse

Also supports stdio and streamable-http.

Benchmark (LOCOMO)

PowerMem LOCOMO Benchmark Metrics

Compared to stuffing full conversation context on LOCOMO:

Dimension Result
Accuracy 78.70% vs. 52.9%
Retrieval p95 latency 1.44s vs. 17.12s
Tokens ~0.9k vs. ~26k

Capabilities

Interfaces and toolingPython integration; CLI (pmem); HTTP API / Dashboard; MCP (optional); IDE apps (VS Code / Cursor, Claude Code, and more).

Memory pipeline and retrievalSmart extraction and updates; Ebbinghaus-style decay; Hybrid retrieval (vector / full-text / graph); Sub stores and routing.

Profiles and multi-agentUser profile; Shared / isolated memory and scopes.

MultimodalText, image, audio.

Docs

  • Getting started — install, .env, and first Memory usage
  • Configuration — settings model, storage backends, environment variables
  • Architecture — major components, storage layout, and retrieval flow
  • API & services — REST, MCP, HTTP server, and Python-facing APIs
  • CLIpmem commands, interactive shell, backup and migration
  • Multi-agent — scopes, isolation, and cross-agent sharing
  • Integrations — LangChain and other framework wiring
  • Docker & deployment — images, Compose, and running the API server
  • Development — local setup, tests, and contributing

More topics: Sub stores, guides index.

Examples

  • Scenarios & notebooks — walkthroughs by use case (basic usage, multimodal, forgetting curve, and more)
  • LangChain sample — medical support chatbot (LangChain + PowerMem + OceanBase)
  • LangGraph sample — customer service bot (LangGraph + PowerMem + OceanBase)
  • IDE apps — VS Code extension and Claude Code plugin (link PowerMem to Cursor, Copilot, etc.)

Release highlights

Version Date Notes
1.1.0 2026-04-02 Embedded SeekDB for OceanBase storage without a separate database service; IDE integrations (VS Code extension, Claude Code plugin)
1.0.0 2026-03-16 CLI (pmem): memory ops, config, backup/restore/migrate, interactive shell, completions; Web Dashboard
0.5.0 2026-02-06 Unified SDK/API config (pydantic-settings); OceanBase native hybrid search; memory query + list sorting; user-profile language customization
0.4.0 2026-01-20 Sparse vectors for hybrid retrieval; profile-based query rewriting; schema upgrade & migration tools
0.3.0 2026-01-09 Production HTTP API Server; Docker
0.2.0 2025-12-16 Advanced profiles; multimodal (text/image/audio)
0.1.0 2025-11-14 Core memory + hybrid retrieval; LLM extraction; forgetting curve; multi-agent; OceanBase/PostgreSQL/SQLite; graph search

Support

License

Apache License 2.0 — see LICENSE.