Persistent, local, encrypted cross-session memory for Google ADK agents — backed by Mimir.
Project description
ADK Mimir Memory
Persistent, local, encrypted cross-session memory for Google ADK agents — backed by Mimir.
Why Mimir?
| Backend | Dependencies | Encryption | Hybrid Search | Local |
|---|---|---|---|---|
| InMemoryMemoryService | None | ❌ | ❌ | ✅ |
| VertexAiMemoryBankService | GCP + Gemini | ❌ | Gemini-driven | ❌ |
| VertexAiRagMemoryService | GCP + RAG | ❌ | GCP vector | ❌ |
| MimirMemoryService | 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-mimir-memory
This package requires the mimir binary. Download it from:
https://github.com/Perseus-Computing-LLC/mimir/releases
Or build from source:
cargo install mimir
Quick Start
from google.adk.agents import Agent
from adk_mimir_memory import MimirMemoryService
agent = Agent(
name="my_agent",
model="gemini-2.5-flash",
instruction="You are a helpful assistant with persistent memory.",
memory_service=MimirMemoryService(
db_path="~/.adk/mimir.db",
),
)
That's it. Sessions, events, and explicit memories are now persisted across restarts.
Configuration
# Custom database location
MimirMemoryService(db_path="/data/agent_memory.db")
# Custom mimir binary path (if not on $PATH)
MimirMemoryService(mimir_binary="/usr/local/bin/mimir")
# Both
MimirMemoryService(
db_path="/data/agent_memory.db",
mimir_binary="/usr/local/bin/mimir",
)
Perseus Live Context (Optional)
This package also includes a drop-in agent with live workspace awareness via Perseus:
from adk_mimir_memory.perseus_context import perseus_context_agent
# The agent resolves @file, @search, @memory directives at inference time
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?"
)]),
agent=perseus_context_agent,
)
pip install adk-mimir-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 │ ──────────────────────────▶ │ Mimir │
│ (Python) │ ◀────────────────────────── │ (Rust) │
└─────────────┘ └────┬─────┘
│
SQLite + FTS5
(AES-256-GCM)
The MimirMemoryService spawns a mimir 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 Mimir MCP tool invocation.
License
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_mimir_memory-0.2.0.tar.gz.
File metadata
- Download URL: adk_mimir_memory-0.2.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35e66bef6e03a26e115707b1fd651aaf19a3bc03d2efb6007dda85899ad79088
|
|
| MD5 |
1e06edc5d724f9f0fce6946eeb0b23de
|
|
| BLAKE2b-256 |
8dae64ffe26d8ee28504d04b035c70ad41e4111af4748e83aac2aecbce2cb817
|
Provenance
The following attestation bundles were made for adk_mimir_memory-0.2.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_mimir_memory-0.2.0.tar.gz -
Subject digest:
35e66bef6e03a26e115707b1fd651aaf19a3bc03d2efb6007dda85899ad79088 - Sigstore transparency entry: 1970343758
- Sigstore integration time:
-
Permalink:
Perseus-Computing-LLC/adk-mimir-memory@c6cb61f071893f4a3b21d627094c2677f965909b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Perseus-Computing-LLC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c6cb61f071893f4a3b21d627094c2677f965909b -
Trigger Event:
push
-
Statement type:
File details
Details for the file adk_mimir_memory-0.2.0-py3-none-any.whl.
File metadata
- Download URL: adk_mimir_memory-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.0 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 |
23670de103f3860bfd3c0507c39d92e030dc74afe602e46832af2d3a7bc8af7e
|
|
| MD5 |
07096fabc077866ab25db4470195ecd0
|
|
| BLAKE2b-256 |
0e220fbcbb4efce3101785f0cd0029a4427df8ed9bbdd53cea8cc1dcfe65c460
|
Provenance
The following attestation bundles were made for adk_mimir_memory-0.2.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_mimir_memory-0.2.0-py3-none-any.whl -
Subject digest:
23670de103f3860bfd3c0507c39d92e030dc74afe602e46832af2d3a7bc8af7e - Sigstore transparency entry: 1970343819
- Sigstore integration time:
-
Permalink:
Perseus-Computing-LLC/adk-mimir-memory@c6cb61f071893f4a3b21d627094c2677f965909b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Perseus-Computing-LLC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c6cb61f071893f4a3b21d627094c2677f965909b -
Trigger Event:
push
-
Statement type: