A persistent memory engine for conversational AI agents
Project description
alaya-memory
A persistent memory engine for conversational AI agents — Python bindings for Alaya.
Install
pip install alaya-memory
Quick start
from alaya import Alaya, NewEpisode, Query
# Open (or create) a memory store
mem = Alaya("agent.db")
# Store an episode
mem.store_episode(NewEpisode(
content="User prefers concise answers",
session_id="sess-001",
role="user",
))
# Query
results = mem.query(Query(text="communication preferences", limit=5))
for r in results:
print(r.score, r.content)
# Run the full dream cycle (consolidate → transform → forget)
mem.dream()
Features
- Episodic memory — store and retrieve conversation turns
- Semantic consolidation — episodes are distilled into durable knowledge nodes
- Forgetting curves — weak or contradicted knowledge decays over time
- Knowledge graph — typed links between episodes, nodes, preferences, and categories
- Encrypted storage — optional SQLCipher encryption (
open_encrypted) - MCP server — expose memory over the Model Context Protocol via
alaya-mcpon npm
Documentation
See the Alaya repository for full API docs and the Rust crate.
License
MIT
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 Distributions
Built Distributions
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 alaya_memory-0.4.8-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: alaya_memory-0.4.8-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a656e7fb3ae214d11344e489f4f5db0342d41d7f925ef9754f7e98503c982b7
|
|
| MD5 |
1aac7484c828c1d207d37e9b42a450db
|
|
| BLAKE2b-256 |
339543a50feda5155dd2e3036de5180c0194f0d8571569ab921fa0d1e3570cf1
|
Provenance
The following attestation bundles were made for alaya_memory-0.4.8-cp39-abi3-win_amd64.whl:
Publisher:
release.yml on SecurityRonin/alaya
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alaya_memory-0.4.8-cp39-abi3-win_amd64.whl -
Subject digest:
6a656e7fb3ae214d11344e489f4f5db0342d41d7f925ef9754f7e98503c982b7 - Sigstore transparency entry: 1334118971
- Sigstore integration time:
-
Permalink:
SecurityRonin/alaya@5835465b9100bb62662748a5e6412f8405d1d8c7 -
Branch / Tag:
refs/tags/v0.4.8 - Owner: https://github.com/SecurityRonin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5835465b9100bb62662748a5e6412f8405d1d8c7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file alaya_memory-0.4.8-cp39-abi3-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: alaya_memory-0.4.8-cp39-abi3-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.9+, manylinux: glibc 2.38+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3dcb69c405cff4e3d3bf6ab451894e68a436ecb99c27f55aafcf5571bf5c7763
|
|
| MD5 |
73770747f341a5c8e9164712acc007fb
|
|
| BLAKE2b-256 |
5ddc80b13016b46f1586bbb08c18c1ebd965670c5baa2fc18ba0018f2ae3c83a
|
Provenance
The following attestation bundles were made for alaya_memory-0.4.8-cp39-abi3-manylinux_2_38_x86_64.whl:
Publisher:
release.yml on SecurityRonin/alaya
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alaya_memory-0.4.8-cp39-abi3-manylinux_2_38_x86_64.whl -
Subject digest:
3dcb69c405cff4e3d3bf6ab451894e68a436ecb99c27f55aafcf5571bf5c7763 - Sigstore transparency entry: 1334118921
- Sigstore integration time:
-
Permalink:
SecurityRonin/alaya@5835465b9100bb62662748a5e6412f8405d1d8c7 -
Branch / Tag:
refs/tags/v0.4.8 - Owner: https://github.com/SecurityRonin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5835465b9100bb62662748a5e6412f8405d1d8c7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file alaya_memory-0.4.8-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: alaya_memory-0.4.8-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb596a3b25dd029c43e117c472d0888c258caeb683b29399db7e026b012d6f7b
|
|
| MD5 |
17a95f61b963f14b47b1b7032cd250cd
|
|
| BLAKE2b-256 |
2433783aebaf14c5622ecd1a86d835f0fb4ae72ae2cc20a016e18dfda7ecdb9a
|
Provenance
The following attestation bundles were made for alaya_memory-0.4.8-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on SecurityRonin/alaya
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alaya_memory-0.4.8-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
cb596a3b25dd029c43e117c472d0888c258caeb683b29399db7e026b012d6f7b - Sigstore transparency entry: 1334119017
- Sigstore integration time:
-
Permalink:
SecurityRonin/alaya@5835465b9100bb62662748a5e6412f8405d1d8c7 -
Branch / Tag:
refs/tags/v0.4.8 - Owner: https://github.com/SecurityRonin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5835465b9100bb62662748a5e6412f8405d1d8c7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file alaya_memory-0.4.8-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: alaya_memory-0.4.8-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.6 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7891d2f2b62e1f0e4bff56e8c5883147d7e7d8c97f215d7d91729c07d665ac58
|
|
| MD5 |
d3d8511804f466a9a15760bacfa9b2e6
|
|
| BLAKE2b-256 |
4b1891bd8fcc0187422f0dc219528f5b25e20e50a90c5cbebbd44fe422459705
|
Provenance
The following attestation bundles were made for alaya_memory-0.4.8-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on SecurityRonin/alaya
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alaya_memory-0.4.8-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
7891d2f2b62e1f0e4bff56e8c5883147d7e7d8c97f215d7d91729c07d665ac58 - Sigstore transparency entry: 1334118872
- Sigstore integration time:
-
Permalink:
SecurityRonin/alaya@5835465b9100bb62662748a5e6412f8405d1d8c7 -
Branch / Tag:
refs/tags/v0.4.8 - Owner: https://github.com/SecurityRonin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5835465b9100bb62662748a5e6412f8405d1d8c7 -
Trigger Event:
push
-
Statement type: