Skip to main content

MemoryAI v0.6 — Auto-Extract & Auto-Dream. A brain for your AI agent with persistent memory that learns and grows.

Project description

MemoryAI — Python SDK

PyPI Python

A brain for your AI agent. Store, recall, and manage context across sessions — memories persist and strengthen with use, just like the human mind.

Install

pip install hmc-memory

Quick Start

from memoryai import MemoryAI

mem = MemoryAI(api_key="hm_sk_...", base_url="https://memoryai.dev")

# Bootstrap — load context at session start
ctx = mem.bootstrap(task_description="Fix auth bug", project_name="my-app")
print(ctx["context_block"])

# Store — save what you learn
mem.store("User prefers dark mode", tags=["preferences"], priority="hot")

# Recall — search memory
for r in mem.recall("user preferences"):
    print(f"[{r.score:.0%}] {r.content}")

# Learn — store action + result + lesson
mem.learn(action="Fixed N+1 query", result="Response time 2s → 50ms", lesson="Always check ORM queries")

# Compact — consolidate session into key memories
mem.compact("Session transcript...", task_context="Refactoring auth")

mem.close()

Async

from memoryai import AsyncMemoryAI

async with AsyncMemoryAI(api_key="hm_sk_...", base_url="https://memoryai.dev") as mem:
    await mem.store("Important context", tags=["project"])
    results = await mem.recall("project context")

IDE Integration (MCP)

Works with Cursor, VS Code, Claude Desktop, Windsurf, Kiro, and OpenClaw via MCP server. See Integration Guide.

How Your Agent's Brain Works

Memories are processed through 4 stages — just like the human brain:

Stage What it does Like...
Instant Recall What's on the tip of your tongue. Always ready, zero delay. Remembering your own name
🔍 Deep Search Scans long-term memory, finds matches by meaning — not just keywords. "Where did I put that...?"
🧠 Reasoning Reads multiple memories, connects the dots, synthesizes a precise answer. (Pro) Thinking hard about it
📦 Archive Compressed long-term storage. Memories age naturally, but nothing is truly forgotten. That thing from 6 months ago

The more you recall a memory, the stronger it gets. Unused memories gently fade to deeper storage — but deeper recall can always bring them back.

Features

  • 🔥 Hot / 🌤️ Warm / ❄️ Cold — Priority levels mirror how the brain stores memories
  • Associative connections — Related memories link automatically, like neurons forming pathways
  • Entity tracking — Recognizes files, people, packages, and URLs in your context
  • Session recovery — Pick up exactly where you left off, every time
  • Collective knowledge — Shared intelligence pool across users (anonymized, opt-in)
  • Smart deduplication — Same knowledge stored once, no matter how many times you mention it
  • Contradiction detection — Outdated info is flagged when newer facts arrive

Legacy Imports

Backward compatible — these still work:

from cortexmemory import MemoryAI      # OK
from hybridmemory import HybridMemory  # OK — alias for MemoryAI

Get an API Key

curl -X POST https://memoryai.dev/v1/admin/provision \
  -H "Content-Type: application/json" \
  -d '{"name": "my-agent", "tos_accepted": true}'

Or visit https://memoryai.dev to create one instantly.

Links

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

hmc_memory-0.6.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

hmc_memory-0.6.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file hmc_memory-0.6.0.tar.gz.

File metadata

  • Download URL: hmc_memory-0.6.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hmc_memory-0.6.0.tar.gz
Algorithm Hash digest
SHA256 4e4886a7c5ed0bb1b18664c25ede3008e5bdba6c8f6f6620bad25a2ffa4067f0
MD5 4ed8a20b2cfb6334f935a26e742dbd81
BLAKE2b-256 36249e122c7d0dabdd52feb08604cc7a5c5e645913b9a5dab738e0dfddc6fc3f

See more details on using hashes here.

File details

Details for the file hmc_memory-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: hmc_memory-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for hmc_memory-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d448e2f2527a476a7ff54906371e161eb8fa4438bc1cb79b6a97c404ddbc8c5
MD5 2ebf363f324b0eda7aa3551b898be52c
BLAKE2b-256 7b6dfb9186f7e1384336dac1c0ed1c91622960bbc2414adf24e141d973a2fcb9

See more details on using hashes here.

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