MemoryAI — Long-term Memory for AI Agents
Your AI never forgets. Preferences, decisions, context — remembered forever.
Install
Note: Package name is
hmc-memorybecausememoryaiwas squatted on PyPI in 2024.
Import name remainsmemoryaifor clean code:from memoryai import MemoryAI.
pip install hmc-memory
Quick Start
from memoryai import MemoryAI
mem = MemoryAI(api_key="hm_sk_your_key")
# Store a memory
mem.store("User prefers dark mode", memory_type="preference")
# Recall
results = mem.recall("what does user prefer")
for r in results:
print(f"[{r['score']:.0%}] {r['content']}")
# Bootstrap (start of session)
context = mem.bootstrap("working on payment feature")
# → Returns ~800 token context block with identity + mood + goals
# Save (end of session)
mem.save("Built payment API with Stripe. User decided on webhook approach.")
# Profile
profile = mem.profile()
print(profile["persona"])
print(profile["mood"])
API
MemoryAI(api_key, endpoint, timeout, graceful)
| Param | Default | Description |
|---|---|---|
api_key |
required | Your API key (hm_sk_...) |
endpoint |
https://memoryai.dev |
API endpoint |
timeout |
30 |
Request timeout (seconds) |
graceful |
False |
Never raise errors, return empty instead |
Methods
| Method | Description |
|---|---|
store(content, memory_type, tags) |
Store a memory |
recall(query, limit, depth, since) |
Search memories |
bootstrap(task, mode) |
Wake up with context (session start) |
save(content) |
Save session summary (session end) |
profile() |
Get cognitive profile (persona, mood, goals) |
health() |
Check memory stats |
guard_check(tokens, max_tokens) |
Check context pressure |
Memory Types
| Type | Lifespan | Use for |
|---|---|---|
preference |
Forever | User likes/dislikes |
decision |
Forever | Choices made |
identity |
Forever | Who the user is |
procedure |
Forever | How to do things |
fact |
Decays | General knowledge |
goal |
Until done | Active objectives |
Zero Dependencies
Pure Python stdlib (urllib). No requests, no httpx, no aiohttp. Works everywhere Python runs.
Links
Metadata
Release files for hmc-memory 2.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hmc_memory-2.6.0.tar.gz | 6.7 kB | Without provenance | Details for hmc_memory-2.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hmc_memory-2.6.0-py3-none-any.whl | Python 3 | none | any | Details for hmc_memory-2.6.0-py3-none-any.whl |
Total release size: 14.2 kB
Release files / hmc_memory-2.6.0.tar.gz
| Download URL | hmc_memory-2.6.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0df57cffe3501ca1cfa1fa84837d3f46c2b6a1339d1c3c7bb7e6db686b8f4d1
|
|
BLAKE2b-256 checksum How to use checksums |
9f82f1009e401fc93b7cf9060b7252c8739e025193e0c40a552fbb4429912db8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / hmc_memory-2.6.0-py3-none-any.whl
| Download URL | hmc_memory-2.6.0-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2f0348174d65ed75fd8fa24466551caf6f0e840c9e74e255e5929160629eba2
|
|
BLAKE2b-256 checksum How to use checksums |
c74d1135bf084e300bad6f0e213affc030612771e476766a1b7018f6edb0b347
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for hmc-memory 2.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.