integrations/google-adk/v0.1.0
firecrawl/pdf-inspectorintegrations/google-adk/v0.1.0Sep 28, 2026by het0814
Upgrading?
AI Summary
First release of the `memanto-google-adk` integration, providing a persistent long-term memory backend for Google ADK agents. It implements the `BaseMemoryService` interface, allowing ADK tools to read and write memories using typed extraction and per-user scoping.
Key Highlights
- Implements `BaseMemoryService` for drop-in ADK memory backend support
- Supports `adk web`, `adk api_server`, and `adk run` via `memanto://` URI
- Utilizes typed memories (preference, fact, decision) rather than raw transcripts
- Includes a `remember_tool` for explicit memory writing by agents
- Features cross-process session recovery and incremental saves
New Features
- MemantoMemoryService implementation with add_session_to_memory, add_events_to_memory, add_memory, and search_memory methods
- ConversationMemoryExtractionService for storing typed memories and skipping tool calls/small talk
- Per-user memory scoping with SHA256 tagging and agent isolation
- ADK-native search results returning MemoryEntry objects with custom metadata
- add_memory for explicit writes without extraction
- remember_tool / memanto_remember FunctionTool for agents
- Packaging as `memanto-google-adk` requiring Python 3.10+
Full Release Notes
# Release Notes for google-adk v0.1.0 First release of **`memanto-google-adk`**, a persistent long-term memory backend for Google ADK agents. The package implements ADK's `BaseMemoryService`, so ADK's own `preload_memory` and `load_memory` tools read from Memanto without changes. Conversations are stored as typed memories rather than raw transcripts, each ADK user's memories are private, and saving a session many times stores each turn only once. It also works with `adk web`, `adk api_server` and `adk run` through a `memanto://` service URI. ## New Features - **`MemantoMemoryService`, a drop-in ADK memory backend** (`integrations/google-adk/memanto_google_adk/memory.py`) - Implements all four `BaseMemoryService` methods: `add_session_to_memory`, `add_events_to_memory`, `add_memory` and `search_memory`. - Enabled with `Runner(..., memory_service=MemantoMemoryService())`. The API key comes from `$MOORCHEH_API_KEY` or `api_key=`. - Options: `agent_id`, `recall_limit` (1–100, default 10) and `extract_max_memories` (1–100, default 20), checked when the service is created. - **Typed memories through Memanto's extraction** (`memanto_google_adk/memory.py`) - New user and agent text is run through `ConversationMemoryExtractionService` and stored as typed memories (preference, fact, decision, commitment…); small talk is dropped. - Tool calls, tool results, partial streaming events and turns without user speech are skipped. - Long backlogs are split into chunks that fit the extractor's 200-message and 120k-character limits instead of being cut off. - **Each turn stored once, even across processes** (`memanto_google_adk/memory.py`) - Each stored batch carries a `retained-<hash>` marker for the last event it covered. The next `add_session_to_memory` extracts only later events, even from a different process, so calling it after every turn is safe. - A retried `add_events_to_memory` call with the same events stores nothing. - If a save fails part-way, the next save resumes after the last chunk that was stored, so turns missed during a Memanto outage are picked up automatically. - **Per-user memory scoping** (`memanto_google_adk/memory.py`) - One Memanto agent per ADK app (`adk-<app_name>`, created on first use). Pass `agent_id=` to share one agent across apps. - Every memory is tagged `user-<sha256 of user_id>`. The user is taken from ADK's session, never from the model, and every recall result is checked against the tag again, so a missed tag filter on the backend cannot show one user another user's memories. - **ADK-native search results** (`memanto_google_adk/memory.py`) - `search_memory` returns ADK `MemoryEntry` objects with `timestamp`, plus `custom_metadata` carrying `type`, `title`, `confidence`, `provenance`, `tags` and `score`. Only active memories are returned; an empty query returns nothing without calling Memanto. - **`add_memory` for explicit writes** (`memanto_google_adk/memory.py`) - Stores `MemoryEntry` items as they are, without extraction. `custom_metadata["type"]` sets the Memanto type (default `fact`). - Large writes are sent in slices of `batch_remember`'s 100-item limit, and memories Memanto rejects are logged instead of silently dropped. - **`remember_tool` / `memanto_remember`** (`integrations/google-adk/memanto_google_adk/tools.py`) - An optional ADK `FunctionTool` that lets the agent save a fact as soon as it hears one. It writes through `tool_context.add_memory`, so the app and user come from ADK and the model cannot choose whose memory it writes. - **`adk web` / `adk run` support** (`memanto_google_adk/memory.py`) - `MemantoMemoryService.from_uri` registers as a service-registry factory for `memanto://` (one agent per app) or `memanto://<agent_id>` (one shared agent). - **Session reuse and recovery** (`memanto_google_adk/memory.py`) - Each Memanto agent keeps its own client and activates once; the service re-activates once on a `SessionError`. - SDK calls run in `asyncio.to_thread` so they don't block ADK's event loop. - **Packaging** (`integrations/google-adk/pyproject.toml`) - Published as `memanto-google-adk`. Requires Python 3.10+, `memanto>=0.2.21` and `google-adk>=2.0,<3`. The ADK major version is capped so a future ADK 3.0 cannot break existing installs. ## Tests - `integrations/google-adk/tests/test_google_adk.py`: 20 tests against a fake Memanto client, covering: - user isolation when the backend tag filter misses - agent ID sanitization - incremental and cross-process saves, and retry idempotency - chunking of long sessions and resuming after a chunk fails - 100-item batch slicing and logging of rejected items - validation of settings - end-to-end ADK `Runner` flows: `remember_tool` → `preload_memory` in a new session, and the README's `after_agent_callback` surviving a Memanto outage and catching up on the next turn - Passes on ADK 2.0.0 and 2.10.0, and on Python 3.10. ## Full Changelog Full Changelog: https://github.com/moorcheh-ai/memanto/compare/v0.2.24...integrations/google-adk/v0.1.0
Related Repositories
A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io
An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
π RuView turns commodity WiFi signals into real-time spatial intelligence, vital sign monitoring, and presence detection — all without a single pixel of video.
Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one