feat(memory): SharedMemoryStore — cross-agent shared memory with scoped FTS recall#7758
Draft
leavedrop wants to merge 3 commits into
Draft
feat(memory): SharedMemoryStore — cross-agent shared memory with scoped FTS recall#7758leavedrop wants to merge 3 commits into
leavedrop wants to merge 3 commits into
Conversation
…scoped FTS recall Adds a new memory extension (autogen-ext) implementing the SharedMemoryStore proposed in microsoft#7748. Key design points from community discussion: - SQLite + FTS5 backend, zero external dependencies - Three scopes: agent (private), group (per-team), global (cross-runtime) - Capsule-shaped recall via tool-result position, not prefix-loaded - Write receipts with provenance (agent_id, scope, timestamp, fact_hash) - Per-scope write authorization (global restricted by default) - Soft-delete with audit tombstones - Configurable max capsule size to bound recall payload - FunctionTool factories (memory_search/remember/forget) for agent tool use 20 tests covering scope isolation, auth, TTL, persistence, tools, and Memory protocol compliance. Refs microsoft#7748 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- _scope_filter now returns (where_clause, params) tuple instead of interpolating agent_id/group_id into SQL strings directly - Strip quote characters from FTS5 search terms to prevent query syntax injection - Remove unused imports (json, Optional, Any) - Fix capsule size test that silently passed on empty results Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Author
|
@microsoft-github-policy-service agree |
stale_after + stale_writer fields bind TTL expiry to the asserting agent rather than a bare clock tick, so consumers can refuse staleness per-writer instead of per-timestamp. shadowed_by annotation on scope=all queries marks broader-scope facts when a narrower-scope fact with the same fact_hash exists, closing the authority-drift gap discussed in microsoft#7748.
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
Implementation of the
SharedMemoryStoreproposed in #7748 — a cross-agent shared memory store with scoped FTS recall forautogen-ext.sqlite3)agent(private),group(per-team),global(cross-runtime)memory_search/memory_remember/memory_forget— facts land in tool-result position, not prefix-loadedcreated_by,scope,confidence,timestamp,fact_hash— so consuming agents can distinguish claims from verified factsglobalwrites restricted by default (addressing the memory-poisoning concerns from @msaleme and @redbotster in RFC: Cross-agent shared memory store with on-demand capsule recall (agent/group/global scopes) #7748)v1 scope (per discussion in #7748)
This PR covers the minimal v1 shape the community converged on:
FunctionToolfactories for easy agent integrationMemoryprotocol — works withAssistantAgent(memory=[...])should_recall_memorypolicy hook (deferred — needs runtime integration discussion)Test plan
add,query,clear)run_json)