mem-alive
A memory layer for AI agents. Semantic, episodic, and procedural memory, built as a Python package.
Why
Coding agents re-read the whole codebase every time they start a task. That burns tokens and adds round trips between the cloud model and the local harness. This library exists to fix that by giving agents actual memory instead of a blank slate every session.
That said, it's not built just for coding agents. It's a general memory layer that works with any agentic setup or a plain RAG app. The coding-agent problem is the flagship test case, not something baked into the core.
Architecture
One Memory client fronts three stores, each backed by the same pluggable StorageBackend and EmbeddingProvider.
Three kinds of memory
- Semantic - durable facts, no recency weighting. New facts can supersede old, similar ones.
- Episodic - specific past events, timestamped, recency-weighted (exponential half-life decay), never merged.
- Procedural - skills and workflows, retrieved by hybrid search (embedding similarity + keyword overlap).
Each type has its own store with its own retrieval logic, but all three share one schema and one memory_type tag, so a single federated recall() on the Memory client can query across all of them at once.
Scoping
namespace- hard partition, never crossed. Means whatever the caller wants (agent, repo, tenant).metadata- flexible filters within a namespace (session id, tags, etc).
Contradictions
Semantic writes check for contradictions on every remember(): embed the new fact, search for similar existing facts in the same namespace, and if similarity crosses a threshold, mark the old fact as superseded. v0.1 uses a similarity threshold for this. A smarter LLM-arbiter version (duplicate vs contradiction vs refinement) is a future upgrade, not required for the first release.
Storage
The backend stays dumb: vector search, metadata filters, CRUD, nothing else. Recency decay, hybrid scoring, and contradiction logic all live above it, in the store layer, so any backend stays swappable.
v0.1 ships with InMemoryBackend, zero dependencies, good for development and testing. A LanceDB backend (embedded, no server required) is planned as an optional extra (pip install mem-alive[lancedb]) for anything that needs to persist across restarts.
Status
v0.1.0. Core is done: all three stores, the in-memory backend, a local embedding provider (Ollama), and the federated Memory client, all async, with a test suite covering each module plus the integration path. MIT licensed.
Still open: the LanceDB backend, a coding-agent app layer built on top, and eval/benchmark design.
Metadata
Release files for mem-alive 0.1.1
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 |
|---|---|---|---|---|
| mem_alive-0.1.1.tar.gz | 124.7 kB | Without provenance | Details for mem_alive-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mem_alive-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for mem_alive-0.1.1-py3-none-any.whl |
Total release size: 136.1 kB
Release files / mem_alive-0.1.1.tar.gz
| Download URL | mem_alive-0.1.1.tar.gz |
|---|---|
| Size | 124.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
116aa2fda8cfd7812d3fe70ac4169562519ba4f07ecc91a701c5fe23d8526121
|
|
BLAKE2b-256 checksum How to use checksums |
f1dbc187a0f884265a5a4137251d29ad656043eb20b939515d45a42f61c63a07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / mem_alive-0.1.1-py3-none-any.whl
| Download URL | mem_alive-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b685ad17af8ac88e167e97a445a12f6a41d43231802f0e5a0d1081ba67fe458
|
|
BLAKE2b-256 checksum How to use checksums |
40297c0c0bb2fd358e2749f99e7e51629d0d78b2a93978f5bbbaf58d94e38071
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Fedora Linux","version":"43","id":"","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for mem-alive 0.1.1
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.