Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

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 google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService
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.",
)

# 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=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 google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService
from adk_mimir_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-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

MIT — see Mimir and Perseus for the backing services.

Metadata

Release files for adk-mimir-memory 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adk-mimir-memory 0.3.0
File Size Uploaded
adk_mimir_memory-0.3.0.tar.gz 11.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for adk-mimir-memory 0.3.0
File Interpreter ABI Platform
adk_mimir_memory-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.3 kB

Release files / adk_mimir_memory-0.3.0.tar.gz

Download URL adk_mimir_memory-0.3.0.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
29c3d1721dca3c4d7bbd69f40189e7c79831b36e683aacb4d55e097c948f7d88
BLAKE2b-256 checksum
How to use checksums
c8417b0f97f5cd0856456aad028a72a52452bd35cad08b399fee18a654e81bfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 28, 2026.

Transparency log

Release files / adk_mimir_memory-0.3.0-py3-none-any.whl

Download URL adk_mimir_memory-0.3.0-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9669dee5bea2e1d61b3caecf8d5b9aa15b9d54582853e0d020d828b443e78cb1
BLAKE2b-256 checksum
How to use checksums
5eaf06e30df3e8524de5f4475c878dc671601887fd85e936d357c51282bda655
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 28, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page