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
Metadata
Release files for alaya-memory 0.4.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| alaya_memory-0.4.8-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details |
| alaya_memory-0.4.8-cp39-abi3-manylinux_2_38_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.38+ x86-64 | Details |
| alaya_memory-0.4.8-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
| alaya_memory-0.4.8-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 9.7 MB
Release files / alaya_memory-0.4.8-cp39-abi3-win_amd64.whl
| Download URL | alaya_memory-0.4.8-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 3.0 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
6a656e7fb3ae214d11344e489f4f5db0342d41d7f925ef9754f7e98503c982b7
|
|
BLAKE2b-256 checksum How to use checksums |
339543a50feda5155dd2e3036de5180c0194f0d8571569ab921fa0d1e3570cf1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.
Transparency logRelease files / alaya_memory-0.4.8-cp39-abi3-manylinux_2_38_x86_64.whl
| Download URL | alaya_memory-0.4.8-cp39-abi3-manylinux_2_38_x86_64.whl |
|---|---|
| Size | 3.7 MB |
| Tags | CPython 3.9 Linux glibc 2.38+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3dcb69c405cff4e3d3bf6ab451894e68a436ecb99c27f55aafcf5571bf5c7763
|
|
BLAKE2b-256 checksum How to use checksums |
5ddc80b13016b46f1586bbb08c18c1ebd965670c5baa2fc18ba0018f2ae3c83a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.
Transparency logRelease files / alaya_memory-0.4.8-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | alaya_memory-0.4.8-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cb596a3b25dd029c43e117c472d0888c258caeb683b29399db7e026b012d6f7b
|
|
BLAKE2b-256 checksum How to use checksums |
2433783aebaf14c5622ecd1a86d835f0fb4ae72ae2cc20a016e18dfda7ecdb9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.
Transparency logRelease files / alaya_memory-0.4.8-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | alaya_memory-0.4.8-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
7891d2f2b62e1f0e4bff56e8c5883147d7e7d8c97f215d7d91729c07d665ac58
|
|
BLAKE2b-256 checksum How to use checksums |
4b1891bd8fcc0187422f0dc219528f5b25e20e50a90c5cbebbd44fe422459705
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.
Transparency logSecurity for alaya-memory 0.4.8
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.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for alaya_memory-0.4.8-cp39-abi3-win_amd64.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 18, 2026.
Transparency logA 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.