feat(memory): add DakeraMemoryService (community integration, follow-up to #6256)#166
Open
ferhimedamine wants to merge 1 commit into
Open
feat(memory): add DakeraMemoryService (community integration, follow-up to #6256)#166ferhimedamine wants to merge 1 commit into
ferhimedamine wants to merge 1 commit into
Conversation
Add a BaseMemoryService implementation backed by Dakera (https://dakera.ai), a self-hosted memory server with access-weighted importance decay for persistent, cross-session agent memory. - Stores session events via POST /v1/memory/store and retrieves them with semantic recall via POST /v1/memory/recall. - Namespaces memories by a Dakera agent_id derived from app_name + user_id so each app/user has an isolated memory space; session_id is preserved for provenance. - Author-weighted importance seeds Dakera's decay engine; enriched content prefix lets recall recover author/timestamp. - Mirrors the existing OpenMemoryService structure (httpx async client, config model, utils.extract_text_from_event) — no new dependencies. - Unit tests cover store, recall, namespacing, config validation, env fallback, and error handling (17 tests, all green). Follow-up to #6256, which was closed with a recommendation to release this integration in the community repo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
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. |
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.
Summary
Adds
DakeraMemoryService, aBaseMemoryServiceimplementation backed by Dakera — a self-hosted memory server that persists agent memories across sessions and ranks recall using an access-weighted importance decay model.This is a follow-up to #6256, which @rohityan kindly closed with the recommendation to release the integration here in the community repo. Thank you for the pointer — I've re-implemented it to match this repo's conventions.
What it does
add_session_to_memorystores each text-bearing session event viaPOST /v1/memory/store.search_memoryretrieves relevant memories via semantic recall (POST /v1/memory/recall).agent_idderived fromapp_name+user_id, so each app/user keeps an isolated memory space;session_idis preserved for provenance.[Author: …, Time: …]) lets recall recover the author/timestamp.DakeraMemoryServiceConfig(pydantic) exposessearch_top_k,timeout, per-author importance,min_importance,memory_type, andenable_metadata_tags.Design notes
OpenMemoryServicestructure — asynchttpxclient, config model, and the sharedutils.extract_text_from_event. No new dependencies (httpxis already a base dependency).DAKERA_API_URL/DAKERA_API_KEYenvironment variables. An API key is required (fails fast otherwise).Setup for reviewers
Dakera is self-hosted; the public compose file provisions the server and its object store:
Testing plan
tests/unittests/memory/test_dakera_memory_service.py— 17 unit tests mirroring the OpenMemory suite: store payload shape + endpoint, author→importance mapping, empty-event filtering, metadata-tag toggling, recall payload + namespace scoping, enriched-content parsing,min_importanceforwarding, config validation, env-var fallback, and error handling (store logs & continues; recall returns an empty response).google-adkon Python 3.12:pytest tests/unittests/memory→ 30 passed (17 new + 13 existing OpenMemory).isort(google profile) +pyink(--checkclean).Happy to open a tracking issue if the team would like one for this integration, and to adjust anything to fit your conventions.