Skip to main content

Intelligent Memory System - Persistent memory layer for LLM applications

Project description

OceanBase Logo

PowerMem PyPI - Downloads GitHub commit activity Package version license pyversions Ask DeepWiki Join Discord

English | 中文 | 日本語

✨ Highlights

PowerMem LOCOMO Benchmark Metrics
  • 🎯 More Accurate: [48.77% Accuracy Improvement] More accurate than full-context in the LOCOMO benchmark (78.70% VS 52.9%)
  • Faster: [91.83% Faster Response] Significantly reduced p95 latency for retrieval compared to full-context (1.44s VS 17.12s)
  • 💰 More Economical: [96.53% Token Reduction] Significantly reduced costs compared to full-context without sacrificing performance (0.9k VS 26k)

🧠 PowerMem - Intelligent Memory System

In AI application development, enabling large language models to persistently "remember" historical conversations, user preferences, and contextual information is a core challenge. PowerMem combines a hybrid storage architecture of vector retrieval, full-text search, and graph databases, and introduces the Ebbinghaus forgetting curve theory from cognitive science to build a powerful memory infrastructure for AI applications. The system also provides comprehensive multi-agent support capabilities, including agent memory isolation, cross-agent collaboration and sharing, fine-grained permission control, and privacy protection mechanisms, enabling multiple AI agents to achieve efficient collaboration while maintaining independent memory spaces.

🚀 Core Features

👨‍💻 Developer Friendly

  • 🔌 Lightweight Integration: Provides a simple Python SDK, automatically loads configuration from .env files, enabling developers to quickly integrate into existing projects

🧠 Intelligent Memory Management

  • 🔍 Intelligent Memory Extraction: Automatically extracts key facts from conversations through LLM, intelligently detects duplicates, updates conflicting information, and merges related memories to ensure accuracy and consistency of the memory database
  • 📉 Ebbinghaus Forgetting Curve: Based on the memory forgetting patterns from cognitive science, automatically calculates memory retention rates and implements time-decay weighting, prioritizing recent and relevant memories, allowing AI systems to naturally "forget" outdated information like humans

🤖 Multi-Agent Support

  • 🔐 Agent Shared/Isolated Memory: Provides independent memory spaces for each agent, supports cross-agent memory sharing and collaboration, and enables flexible permission management through scope control

🎨 Multimodal Support

  • 🖼️ Text, Image, and Audio Memory: Automatically converts images and audio to text descriptions for storage, supports retrieval of multimodal mixed content (text + image + audio), enabling AI systems to understand richer contextual information

💾 Deeply Optimized Data Storage

  • 📦 Sub Stores Support: Implements data partition management through sub stores, supports automatic query routing, significantly improving query performance and resource utilization for ultra-large-scale data
  • 🔗 Hybrid Retrieval: Combines multi-channel recall capabilities of vector retrieval, full-text search, and graph retrieval, builds knowledge graphs through LLM and supports multi-hop graph traversal for precise retrieval of complex memory relationships

🚀 Quick Start

📥 Installation

pip install powermem

💡 Basic Usage

✨ Simplest Way: Create memory from .env file automatically! Configuration Reference

from powermem import Memory, auto_config

# Load configuration (auto-loads from .env)
config = auto_config()
# Create memory instance
memory = Memory(config=config)

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

# Search memories
memories = memory.search("user preferences", user_id="user123")
for memory in memories:
    print(f"- {memory.get('memory')}")

For more detailed examples and usage patterns, see the Getting Started Guide.

🔗 Integrations & Demos

  • 🔗 LangChain Integration: Build medical support chatbot using LangChain + PowerMem + OceanBase, View Example
  • 🔗 LangGraph Integration: Build customer service chatbot using LangGraph + PowerMem + OceanBase, View Example

📚 Documentation

💬 Support


📄 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

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-0.1.0.tar.gz (184.0 kB view details)

Uploaded Source

Built Distribution

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

powermem-0.1.0-py3-none-any.whl (245.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for powermem-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4607167c150ae2c5201e26761c7b081296095289f711d8d72c3435258be30e8d
MD5 b7ef56f287f26d5824def21f08505156
BLAKE2b-256 cd2a7824e4e6d479159978a1fb3893815c0fee1e9dc12354f36062894e3a2a8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for powermem-0.1.0.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-0.1.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for powermem-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54b7ca6f68441a9a84575148bb8b8e40821b6c0d325fac75454ef2e380eb61ec
MD5 e7b27465aae10f46bee09674ff809ebe
BLAKE2b-256 a2908f37dfa7e3089bff505e47fe44028687e8d761318ac37ce80cb993940911

See more details on using hashes here.

Provenance

The following attestation bundles were made for powermem-0.1.0-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