Cortex Memory — Persistent AI memory as a service
Project description
Cortex Memory — Python SDK
Persistent memory for AI agents. Store, recall, and manage context across sessions.
Install
pip install cortexmemory
Quick Start
from cortexmemory import HybridMemory
mem = HybridMemory(api_key="hm_sk_...", base_url="https://cortex-memory.com")
# Store
mem.store("User prefers dark mode", tags=["preferences"], priority="hot")
# Recall
for r in mem.recall("user preferences"):
print(f"[{r.score:.0%}] {r.content}")
# Compact session
mem.compact("Session transcript...", task_context="Refactoring auth")
mem.close()
Async
from cortexmemory import AsyncHybridMemory
async with AsyncHybridMemory(api_key="hm_sk_...", base_url="https://cortex-memory.com") as mem:
await mem.store("Important context", tags=["project"])
results = await mem.recall("project context")
Get an API Key
curl -X POST https://cortex-memory.com/v1/admin/provision \
-H "Content-Type: application/json" \
-d '{"name": "my-agent", "tos_accepted": true}'
Links
- Website: https://cortex-memory.com
- MCP Server: Works with Cursor, VS Code, Claude Desktop, Windsurf
Project details
Release history Release notifications | RSS feed
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.2.0.tar.gz
(6.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hmc_memory-0.2.0.tar.gz.
File metadata
- Download URL: hmc_memory-0.2.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
975c14c349e329c9f3731872fa8f345277a9260cd6460251b1f8d515751ce45c
|
|
| MD5 |
b4205f2a01c747e1a7debcfa6a47e9c7
|
|
| BLAKE2b-256 |
07186bf0605b410ec803185e8a1e38ab21fb41ea4375c3ce7f07788b52dcdac5
|
File details
Details for the file hmc_memory-0.2.0-py3-none-any.whl.
File metadata
- Download URL: hmc_memory-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16f84ade2d9e6dcbbda6bcb6014e68f2ed82b8a911eba22bf51e66e4c6fc2f4f
|
|
| MD5 |
5333319ec89d482835202c89b5e1d8f2
|
|
| BLAKE2b-256 |
3d9697c07ad057c34df36394f83f86ad18758827692a91c7b2e794af2c8f81b5
|