Persistent, local, encrypted cross-session memory for Google ADK agents — backed by Perseus Vault.
Project description
ADK Perseus Vault Memory
Persistent, local, encrypted cross-session memory for Google ADK agents — backed by Perseus Vault (formerly "Mimir"/"Mneme").
Why Perseus Vault?
| Backend | Dependencies | Encryption | Hybrid Search | Local |
|---|---|---|---|---|
| InMemoryMemoryService | None | ❌ | ❌ | ✅ |
| VertexAiMemoryBankService | GCP + Gemini | ❌ | Gemini-driven | ❌ |
| VertexAiRagMemoryService | GCP + RAG | ❌ | GCP vector | ❌ |
| PerseusVaultMemoryService | Single binary | ✅ AES-256 | ✅ BM25+FTS5+Dense | ✅ |
- Zero cloud dependencies — a single Rust binary, SQLite database, fully local
- AES-256-GCM encryption at rest — your memory data stays private
- Hybrid search — BM25 keyword + FTS5 + dense vector search
- 30+ MCP tools — remember, recall, synthesize, benchmark, federate, and more
- Ebbinghaus confidence decay — memories fade naturally, important ones persist
Installation
pip install adk-perseus-vault-memory
This package requires the perseus-vault binary. Download it from:
https://github.com/Perseus-Computing-LLC/perseus-vault/releases
Or build from source:
cargo install perseus-vault
Quick Start
from google.adk.agents import Agent
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService
from adk_perseus_vault_memory import PerseusVaultMemoryService
agent = Agent(
name="my_agent",
model="gemini-2.5-flash",
instruction="You are a helpful assistant with persistent memory.",
)
# The memory service is configured on the Runner, not on the Agent.
runner = Runner(
agent=agent,
app_name="my_app",
session_service=InMemorySessionService(),
memory_service=PerseusVaultMemoryService(db_path="~/.adk/vault.db"),
)
That's it. Sessions, events, and explicit memories are now persisted across restarts.
Configuration
# Custom database location
PerseusVaultMemoryService(db_path="/data/agent_memory.db")
# Custom perseus-vault binary path (if not on $PATH)
PerseusVaultMemoryService(vault_binary="/usr/local/bin/perseus-vault")
# Both
PerseusVaultMemoryService(
db_path="/data/agent_memory.db",
vault_binary="/usr/local/bin/perseus-vault",
)
Perseus Live Context (Optional)
This package also includes a drop-in agent with live workspace awareness via Perseus:
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService
from adk_perseus_vault_memory.perseus_context import perseus_context_agent
# The agent resolves @file, @search, @memory directives at inference time.
# Bind it on the Runner; run_async takes no `agent` argument.
runner = Runner(
agent=perseus_context_agent,
app_name="my_app",
session_service=InMemorySessionService(),
)
runner.run_async(
user_id="user",
session_id="session",
new_message=types.Content(role="user", parts=[types.Part.from_text(
text="What does the README say about deployment?"
)]),
)
pip install adk-perseus-vault-memory[perseus] # installs perseus-ctx
Set directives via session state:
session = await runner.session_service.create_session(
app_name="my_app",
user_id="user",
state={
"_perseus_directives": "@file AGENTS.md @file README.md @memory deployment",
"_perseus_workspace": "/path/to/project",
},
)
How It Works
┌─────────────┐ JSON-RPC (MCP stdio) ┌────────────────┐
│ ADK Agent │ ──────────────────────────▶ │ Perseus Vault │
│ (Python) │ ◀────────────────────────── │ (Rust) │
└─────────────┘ └───────┬────────┘
│
SQLite + FTS5
(AES-256-GCM)
The PerseusVaultMemoryService spawns a perseus-vault subprocess and communicates via JSON-RPC over stdin/stdout (MCP stdio transport). Each add_session_to_memory, add_memory, and search_memory call translates to a Perseus Vault MCP tool invocation.
License
MIT — see Perseus Vault and Perseus for the backing services.
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 adk_perseus_vault_memory-0.3.0.tar.gz.
File metadata
- Download URL: adk_perseus_vault_memory-0.3.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cca1271cc6c98bd00f0d20ccfe665f00f61b9b4025540c4e035cb110981962f1
|
|
| MD5 |
cf24dd0cc5b406723bc2b3c81f88832e
|
|
| BLAKE2b-256 |
ab74ff690dbed057e37abdb656519cb48dca68de824ebbee678ded5205632f43
|
Provenance
The following attestation bundles were made for adk_perseus_vault_memory-0.3.0.tar.gz:
Publisher:
publish.yml on Perseus-Computing-LLC/adk-mimir-memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
adk_perseus_vault_memory-0.3.0.tar.gz -
Subject digest:
cca1271cc6c98bd00f0d20ccfe665f00f61b9b4025540c4e035cb110981962f1 - Sigstore transparency entry: 2072340832
- Sigstore integration time:
-
Permalink:
Perseus-Computing-LLC/adk-mimir-memory@dc27db6c3a41d5d3ba48304f7ea8c4ac4b072945 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Perseus-Computing-LLC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dc27db6c3a41d5d3ba48304f7ea8c4ac4b072945 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file adk_perseus_vault_memory-0.3.0-py3-none-any.whl.
File metadata
- Download URL: adk_perseus_vault_memory-0.3.0-py3-none-any.whl
- Upload date:
- Size: 11.7 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 |
70e9970aa4490a00c862075697f7ba54efec9212d68a01a16649fc3a8f0f1582
|
|
| MD5 |
14ae87bd07289a9701faec63ca1efd1a
|
|
| BLAKE2b-256 |
9c63daa56f4545c1c911944adf80e37fff7fa20387fa2c919d0d2f1db8c54e12
|
Provenance
The following attestation bundles were made for adk_perseus_vault_memory-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on Perseus-Computing-LLC/adk-mimir-memory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
adk_perseus_vault_memory-0.3.0-py3-none-any.whl -
Subject digest:
70e9970aa4490a00c862075697f7ba54efec9212d68a01a16649fc3a8f0f1582 - Sigstore transparency entry: 2072340874
- Sigstore integration time:
-
Permalink:
Perseus-Computing-LLC/adk-mimir-memory@dc27db6c3a41d5d3ba48304f7ea8c4ac4b072945 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Perseus-Computing-LLC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@dc27db6c3a41d5d3ba48304f7ea8c4ac4b072945 -
Trigger Event:
workflow_dispatch
-
Statement type: