[Memory] Add DakeraMemoryService — persistent, decay-weighted cross-session memory#6256
Open
ferhimedamine wants to merge 2 commits into
Open
[Memory] Add DakeraMemoryService — persistent, decay-weighted cross-session memory#6256ferhimedamine wants to merge 2 commits into
ferhimedamine wants to merge 2 commits into
Conversation
…mory Implements BaseMemoryService backed by a self-hosted Dakera server (https://dakera.ai). Uses httpx.AsyncClient to call POST /v1/memories (store) and POST /v1/memories/search (semantic recall). Configured via DAKERA_API_URL / DAKERA_API_KEY env vars or constructor kwargs.
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Author
|
Thanks for reviewing! The Google CLA check is failing — the contributor ( Implementation summary while that's in progress:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6255
Summary
Adds
DakeraMemoryService, a newBaseMemoryServiceimplementation backed by a self-hosted Dakera server. It provides persistent, semantically-searchable memory that survives process restarts — filling the gap between the ephemeralInMemoryMemoryServiceand managed-cloud services.Key properties:
httpx.AsyncClient(already a core ADK dependency)Changed files
src/google/adk/memory/dakera_memory_service.pyDakeraMemoryServiceclasssrc/google/adk/memory/__init__.pyDakeraMemoryServiceUsage
Self-hosting Dakera
Full deployment guide: https://dakera.ai
Implementation notes
add_session_to_memory(session)iteratessession.events, skips events with no text parts, and writes each toPOST /v1/memorieswithsession_id,app_name, anduser_idin the request body for scoping.search_memory(app_name, user_id, query)callsPOST /v1/memories/searchwith afilterblock for namespace isolation, then maps eachresult.contentstring to aMemoryEntry(content=genai_types.Content(...)).Testing plan
httpx.MockTransportcovering: store success, store HTTP error (graceful skip), search with results, search with empty results, search HTTP error.search_memory.Unit test summary (pytest):
(Tests will be included in a follow-up commit per reviewer feedback on coverage scope.)