-
Notifications
You must be signed in to change notification settings - Fork 6
Add a long-term memory interface #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Removed duplicate session endpoints from api.py in favor of v1 API structure - Kept vectorstore adapter approach in long_term_memory.py over direct Redis operations - Used feature branch version of uv.lock for latest dependencies 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Configure agent-memory-client as workspace member - Fix ULID field generation in LenientMemoryRecord model - Note: Some tests need updating for new MemoryRecord API structure 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Introduce a pluggable VectorStoreAdapter interface to support multiple LangChain vector backends for long-term memory storage, with Redis as the default.
- Define
VectorStoreAdapter
abstraction withLangChainVectorStoreAdapter
andRedisVectorStoreAdapter
. - Refactor core long‐term memory functions (
index_
,search_
,count_
) to delegate to the adapter. - Update configuration, dependencies, documentation, and tests to cover new backends.
Reviewed Changes
Copilot reviewed 20 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
agent_memory_server/vectorstore_adapter.py | Added adapter interface and implementations |
agent_memory_server/vectorstore_factory.py | Factory logic for selecting and creating adapters |
agent_memory_server/long_term_memory.py | Refactored indexing/search/count to use adapter |
agent_memory_server/config.py | Extended settings for backend and RedisVL names |
pyproject.toml | Updated dependencies and extras for backends |
docs/vector-store-backends.md | New documentation listing supported backends |
tests/test_vectorstore_adapter.py | Added unit tests for adapter methods |
tests/test_memory_compaction.py | Updated compaction tests to use adapter |
tests/test_long_term_memory.py | Refactored long-term memory tests to patch adapter |
tests/conftest.py | Patching of Redis connections and global state |
Comments suppressed due to low confidence (3)
tests/test_memory_compaction.py:165
- [nitpick] Remove debug print statements to keep test output clean; use assertions or logs if inspection is needed.
print(f"🔍 Redis keys after indexing: {keys}")
tests/test_vectorstore_adapter.py:221
- Add a test case for
delete_memories
with non-empty input to verify that deletion logic returns the correct count and propagates to the underlying store.
deleted = await adapter.delete_memories([])
tests/test_memory_compaction.py:176
- [nitpick] Remove debug print statements to keep test output clean; rely on assertions rather than printing.
)
Co-authored-by: Copilot <[email protected]>
@claude Resolve these conflicts. |
Claude encountered an error —— View job I'll analyze this and get back to you. |
- Resolved ULID import conflicts in models and client files - Fixed README.md merge conflict preserving vector store backends doc - Resolved pyproject.toml dependency conflicts - Fixed test file conflicts and cleaned up malformed merge resolutions - Preserved all vector store adapter functionality and interface - Tests passing, vector store factory working correctly 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Move vector search over long-term memories into a new
VectorStoreAdapter
interface instead of only including a concrete Redis implementation. Satisfies the new interface with a generic adapter supporting LangChainVectorStore
instances. Then satisfies the same interface with the langchain-redisRedisVectorStore
, making Redis the default long-term storage layer.