Skip to main content

Intelligent Memory System - Persistent memory layer for LLM applications

Project description

PowerMem

Persistent, self-evolving 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 ships two-layer Experience + Skill distillation for self-evolving memory, multi-agent isolation, user profiles, and multimodal signals (text, image, audio).


Benchmarks

LOCOMO

Metric PowerMem Baseline Improvement
Accuracy 87.79% 52.9% +65.9%
Search p95 latency 1.44 s 17.12 s -91.6%
Tokens ~0.9 k 26 k -96.5%

AppWorld

Metric PowerMem Baseline Improvement
Pass 39% 24% +62.5%
Avg steps 6.2 9.5 -34.7%
Total tokens 1.74 M 2.56 M -32.0%

Reproduce: benchmark/. Under the hood: two-layer Experience + Skill distillation + 4-way hybrid retrieval + LLM auto-merge (API: memory.distill_all() / add_skill / add_experience / search_*, demo examples/experience_skill_usage.py).


Integrations — pick your client, copy one line

PowerMem ships first-party plugins and setup guides for the most common AI clients. All of them point at the same backend (HTTP server, MCP server, or local pmem CLI) — no per-client schema rewrites. All agents share the same memory server.

AI agents & IDEs

Claude Code
Claude Code
Cursor
Cursor
VS Code
VS Code
Codex
Codex
Windsurf
Windsurf
GitHub Copilot
GitHub Copilot
Qoder
Qoder
OpenCode
OpenCode
OpenClaw
OpenClaw
Claude Desktop
Claude Desktop
Cline
Cline

SDKs & apps

App / framework Details
Python SDK pip install powermem, see Quick start
LangChain / LangGraph pip install powermem, see LangChain guide
Go apps SDKs
Java apps SDKs
TypeScript apps SDKs
Any MCP client powermem-mcp sse (default :8848), see MCP client guide
HTTP REST apps powermem-server --host 0.0.0.0 --port 8848, see API server

OpenClaw (ClawdBot)

OpenClaw gains long-term memory through the memory-powermem plugin.

openclaw plugins install memory-powermem

Defaults to CLI mode — the plugin invokes a bundled pmem against SQLite under ~/.openclaw/, using the model OpenClaw already injects. No separate server, no extra .env. Switch to HTTP mode when a team-shared PowerMem API is preferred (see the plugin's README for requestConfig.memory_db).

Full guide: OpenClaw integration.

PowerMem with OpenClaw

Claude Code

Fastest path — let Claude Code set itself up

First download the code and enter the directory:

git clone https://github.com/oceanbase/powermem
cd powermem

Then open Claude Code in your terminal and paste this one line:

Read and follow apps/claude-code-plugin/SETUP.md to set up PowerMem memory for Claude Code.

Claude Code reads apps/claude-code-plugin/SETUP.md, asks you for the few required secrets, and wires everything up end-to-end.

Manual setup

Prefer to wire it by hand? See the full walkthrough — environment variables, MCP mode, the remember / recall skills, Windows hooks, troubleshooting, and uninstall — in docs/integrations/claude_code.md.

Cursor, VS Code, Windsurf, GitHub Copilot, Qoder

Recommended setup — let your IDE agent set it up

First download the code and enter the directory:

git clone https://github.com/oceanbase/powermem
cd powermem

Then open the AI agent window in your IDE and paste this one line:

Read and follow apps/vscode-extension/SETUP.md to setup PowerMem

The agent follows apps/vscode-extension/SETUP.md: it prefers a reusable powermem-server HTTP API backend, falls back to MCP-only only when HTTP is unavailable, and configures the current IDE/client instead of unrelated tools.

Manual setup

Prefer to wire it by hand? Use the per-IDE guide:

Client Details
VS Code docs/integrations/vs_code.md
Cursor docs/integrations/cursor.md
Windsurf docs/integrations/windsurf.md
GitHub Copilot docs/integrations/github_copilot.md
Qoder docs/integrations/qoder.md

The same extension also provides Query memories, Add selection to memory, Quick note, and a status-bar Dashboard. See apps/vscode-extension/README.md and the full VS Code guide.

Any MCP client

For Claude Desktop, Codex, Cline, OpenCode, Roo Code, Goose, or any other MCP-compatible client. please use MCP Client mode. First download the code and enter the directory:

git clone https://github.com/oceanbase/powermem
cd powermem

Then open the AI agent window in your MCP client or IDE and paste this one line:

Read and follow apps/mcp-client/SETUP.md to setup PowerMem

The agent follows apps/mcp-client/SETUP.md: it uses powermem-mcp directly, prefers SSE on port 8848, falls back to streamable HTTP or stdio only when needed, and configures only the target MCP client.

Prefer to wire it by hand? Use the Generic MCP client guide. To remove the integration later, follow apps/mcp-client/UNINSTALL.md. Exposed tools: add_memory, search_memories, get_memory_by_id, update_memory, delete_memory, delete_all_memories, list_memories. Full reference: MCP Server. Client-specific notes: Cline, Codex, and OpenCode.

LangChain & LangGraph

pip install powermem langchain langchain-openai

End-to-end runnable demos:

Full framework guide: LangChain and LangGraph integration.

SDKs

Language Package
Python pip install powermem (this repo)
Go ob-labs/powermem-go
Java ob-labs/powermem-java
TypeScript ob-labs/powermem-ts

Quick start (Python SDK)

Prerequisites: Copy .env.example to .env and set your LLM API key — that is the only required credential. For zero-config local storage, install the seekdb extra (pip install "powermem[seekdb]", or combine it with server / mcp) so the default OceanBase provider can boot embedded seekdb on disk. Without seekdb, set OCEANBASE_HOST to point at a remote OceanBase cluster, or switch to sqlite / postgres. The default embedder is a local all-MiniLM-L6-v2 model (384 dims) that needs no API key and auto-downloads on first use. Need to tune providers or unlock advanced features? Copy .env.example.full instead — it documents every available knob, grouped by component. After install, pmem config init walks you through the same setup interactively. See Getting started.

Install

# Core only (SDK; no optional CLI/server/MCP/seekdb)
pip install powermem

# With CLI (pmem / powermem-cli)
pip install "powermem[cli]"

# With HTTP API server only (powermem-server; does not install seekdb)
pip install "powermem[server]"

# With MCP server only (powermem-mcp; does not install seekdb)
pip install "powermem[mcp]"

# With seekdb for zero-config local storage/embedder
pip install "powermem[seekdb]"

# HTTP API server + seekdb
pip install "powermem[server,seekdb]"

# MCP server + seekdb
pip install "powermem[mcp,seekdb]"

# Common full local install
pip install "powermem[cli,server,mcp,seekdb]"

SDK

Run from a directory that contains your configured .env:

from powermem import Memory, auto_config

memory = Memory(config=auto_config())

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

for r in memory.search("user preferences", user_id="user123").get("results", []):
    print("-", r.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
pmem shell                           # interactive REPL

Full reference: CLI usage.

HTTP API server + Dashboard

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

powermem-server --host 0.0.0.0 --port 8848

Open the dashboard at http://localhost:8848/dashboard/ to browse memories, view analytics, and monitor system health. See the Web Dashboard Guide for a complete walkthrough.

Docker / Compose: see API Server and Docker & deployment. The official image is oceanbase/powermem-server:latest.


Capabilities

Memory pipeline and retrievalSmart extraction and updates; Experience + Skill distillation (self-evolving); 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.

Provider matrix

Layer Providers (built in)
LLM Anthropic, OpenAI, Azure OpenAI, Gemini, Qwen (+ ASR), DeepSeek, Ollama, vLLM, SiliconFlow, Z.AI, LangChain-wrapped
Embedding OpenAI, Azure OpenAI, Qwen (+ VL multimodal, sparse), Gemini, Vertex AI, AWS Bedrock, Ollama, LM Studio, HuggingFace, Together, SiliconFlow, Z.AI, OceanBase MASS, LangChain-wrapped
Rerank Jina, Qwen, Z.AI, generic
Storage OceanBase (+ graph), embedded seekdb, PostgreSQL/pgvector, SQLite

Docs

More topics: Sub stores, guides index.

Examples

  • Scenarios & notebooks — walkthroughs by use case (basic usage, multimodal, forgetting curve, sparse vectors, sub stores, and more)
  • See Integrations above for client-side and IDE-side entry points (OpenClaw, Claude Code, VS Code extension, MCP, LangChain, LangGraph).

Release highlights

Version Date Notes
1.2.0 2026-04 Experience + Skill two-layer distillation and distill_all() (self-evolving memory; AppWorld +15 pts); OB MASS embedding; Qwen VL multimodal embedding; OceanBase Zero Mode compatibility; LOCOMO accuracy lifted to 87.79%
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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powermem-1.1.2.tar.gz (694.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

powermem-1.1.2-py3-none-any.whl (809.3 kB view details)

Uploaded Python 3

File details

Details for the file powermem-1.1.2.tar.gz.

File metadata

  • Download URL: powermem-1.1.2.tar.gz
  • Upload date:
  • Size: 694.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for powermem-1.1.2.tar.gz
Algorithm Hash digest
SHA256 1066367f6106bf90c23dcc7f61ab967495ffe8abf427ea4ec7c18a6eeb597ed3
MD5 d9380c132615b6bb2f4b026a7bf673d0
BLAKE2b-256 3446ad4a529d951a56122e23268fd9c4f48af76de6ed3df1bca45a23d81937df

See more details on using hashes here.

Provenance

The following attestation bundles were made for powermem-1.1.2.tar.gz:

Publisher: publish.yml on oceanbase/powermem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file powermem-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: powermem-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 809.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for powermem-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f57c90d7ed138b819dadce3976c390debc7f43e66fa4fce33ee4981976c274b6
MD5 3b81ae7c7f390342d20e3ca38ed0c0da
BLAKE2b-256 cd6766a1815634be42e4d83158ba6dea1b2d5e3fc958459dc4ffb373d56ca772

See more details on using hashes here.

Provenance

The following attestation bundles were made for powermem-1.1.2-py3-none-any.whl:

Publisher: publish.yml on oceanbase/powermem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page