Zeno memory protocols, context-bound handles, and SQLite defaults.
Project description
zeno-memory
Memory protocols, per-turn view handles, and SQLite-backed defaults for the Zeno framework.
Install
uv add 'zeno-framework[memory]'
What's in here
- Protocols:
SessionStore,UserMemoryStore,KnowledgeStore,ConversationStore,VectorStore. - Per-turn handles:
MemoryView,UserMemoryView,KnowledgeView,ConversationHandle,SessionHandle. - SQLite defaults:
SqliteSessionStore,SqliteUserMemoryStore,SqliteConversationStore. - Composer:
ThreeLayer(session + user memory + knowledge + conversation). - Adapter:
VectorBackedUserMemoryStore— wraps anyKnowledgeStoreto make user memory semantically searchable.
Wiring
from pathlib import Path
from zeno.app import ZenoApp
from zeno.memory import ThreeLayer
from zeno.memory.sqlite.conversation_store import SqliteConversationStore
from zeno.memory.sqlite.session_store import SqliteSessionStore
from zeno.memory.sqlite.user_memory_store import SqliteUserMemoryStore
data = Path.home() / ".zeno"
data.mkdir(parents=True, exist_ok=True)
# `knowledge=` is a `KnowledgeStore` from a vector backend — see
# `zeno-chroma` or `zeno-qdrant` for concrete adapters. The example below
# uses `SqliteUserMemoryStore` for user memory; swap in
# `VectorBackedUserMemoryStore(knowledge_store=...)` to make user memory
# semantically searchable.
memory = ThreeLayer(
session=SqliteSessionStore(data / "sessions.db"),
user_memory=SqliteUserMemoryStore(data / "user_memory.db"),
knowledge=..., # ChromaKnowledgeStore | QdrantKnowledgeStore | …
conversation=SqliteConversationStore(data / "conversations.db"),
)
app = ZenoApp(agent=..., memory=memory, channels=..., provider=...)
ZenoApp calls memory.view_for(user_id=, channel=, thread_key=) once per
turn and binds the resulting MemoryView into Ctx. Tools use
ctx.memory.user, ctx.memory.knowledge, ctx.memory.session, and
ctx.memory.conversation without ever seeing the underlying store.
Choosing a UserMemoryStore
| Store | Use when |
|---|---|
SqliteUserMemoryStore |
You want exact-match recall on stored facts. Cheap, no embedding model required. |
VectorBackedUserMemoryStore(knowledge_store=…) |
You want semantic recall (e.g. "what did the user say about their job?"). Reuses the same vector backend you wired for knowledge. |
Both implement the same UserMemoryStore protocol — swap freely without
changing tool code.
ConversationStore (provider portability)
Non-Claude providers (e.g. OpenAIProvider) write each turn's assistant,
tool, and user messages through ConversationStore so the next turn has
prior context. ClaudeSDKProvider does not use it — the SDK owns its own
session history.
Vector backends
Concrete KnowledgeStore adapters live in sibling packages:
zeno-chroma— ChromaDB-backed.zeno-qdrant— Qdrant-backed.
See also: zeno-core
for Ctx, @tool, and the MemoryBinderProtocol.
Part of the Zeno framework.
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
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 zeno_memory-1.0.2.tar.gz.
File metadata
- Download URL: zeno_memory-1.0.2.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c649e38499913faa01fffef901652a0320a6b9894d68cb104e96c8252d32638
|
|
| MD5 |
752850920bbd1bc18aeefc4b53cbf0b4
|
|
| BLAKE2b-256 |
c950829a411e8da700f81806a6278f08434d67ed28266baa4a43b569fd5a326f
|
Provenance
The following attestation bundles were made for zeno_memory-1.0.2.tar.gz:
Publisher:
publish.yml on nkootstra/zeno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zeno_memory-1.0.2.tar.gz -
Subject digest:
7c649e38499913faa01fffef901652a0320a6b9894d68cb104e96c8252d32638 - Sigstore transparency entry: 1397578994
- Sigstore integration time:
-
Permalink:
nkootstra/zeno@72ad0b64cf2f613e651164797f20ce1efb2a7c36 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/nkootstra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@72ad0b64cf2f613e651164797f20ce1efb2a7c36 -
Trigger Event:
push
-
Statement type:
File details
Details for the file zeno_memory-1.0.2-py3-none-any.whl.
File metadata
- Download URL: zeno_memory-1.0.2-py3-none-any.whl
- Upload date:
- Size: 20.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19dd4e96a5a6f35a615ab0fed57152fcee9af521119cde0e960858697cfef6da
|
|
| MD5 |
3ed7cc69ef1683c88ce278ea347a91ff
|
|
| BLAKE2b-256 |
307e1637bf0cea7a85e9875117d2783a8de01c57cbfdec47906eaba38f9222fb
|
Provenance
The following attestation bundles were made for zeno_memory-1.0.2-py3-none-any.whl:
Publisher:
publish.yml on nkootstra/zeno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
zeno_memory-1.0.2-py3-none-any.whl -
Subject digest:
19dd4e96a5a6f35a615ab0fed57152fcee9af521119cde0e960858697cfef6da - Sigstore transparency entry: 1397579014
- Sigstore integration time:
-
Permalink:
nkootstra/zeno@72ad0b64cf2f613e651164797f20ce1efb2a7c36 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/nkootstra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@72ad0b64cf2f613e651164797f20ce1efb2a7c36 -
Trigger Event:
push
-
Statement type: