Skip to content

Conversation

@abrookins
Copy link
Collaborator

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 LangChain VectorStore instances. Then satisfies the same interface with the langchain-redis RedisVectorStore, making Redis the default long-term storage layer.

abrookins and others added 4 commits June 2, 2025 11:07
- 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 <noreply@anthropic.com>
- 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 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 25, 2025 23:39

This comment was marked as outdated.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@abrookins
Copy link
Collaborator Author

@claude Resolve these conflicts.

@claude
Copy link
Contributor

claude bot commented Jun 25, 2025

Claude encountered an error —— View job


I'll analyze this and get back to you.

@abrookins abrookins marked this pull request as draft June 26, 2025 00:07
abrookins and others added 6 commits June 25, 2025 17:09
- 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 <noreply@anthropic.com>
@abrookins abrookins marked this pull request as ready for review June 27, 2025 00:12
@abrookins abrookins requested a review from Copilot June 27, 2025 15:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors how long‐term memories are stored and retrieved by introducing a pluggable VectorStoreAdapter interface that decouples the memory server from a single Redis implementation. Key changes include:

  • Introducing generic and Redis-specific vector store adapters (LangChainVectorStoreAdapter and RedisVectorStoreAdapter) that wrap underlying LangChain VectorStore instances.
  • Refactoring core long-term memory functions (index, search, deduplication, compaction) to delegate operations to the adapter.
  • Updating tests, configuration, documentation, and related client code to align with the new abstraction layer.

Reviewed Changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/* Updated tests to use adapter-based memory indexing and search
agent_memory_server/vectorstore_adapter.py New VectorStoreAdapter interface and implementations
agent_memory_server/vectorstore_factory.py Factory functions for creating backend-specific VectorStore adapters
agent_memory_server/long_term_memory.py Refactored functions (index, search, deduplication) to use the adapter
docs/* and README.md Updated documentation for vector store backends and configuration
Other files (models, api, extraction, config, etc.) Consistent changes including ULID usage, dependency updates, and refactoring
Comments suppressed due to low confidence (2)

agent_memory_server/api.py:448

  • The redis client parameter is still being obtained in this endpoint even though adapter methods no longer require it. Consider removing obsolete redis parameters from API calls to simplify the interface and reduce confusion.
    """

agent_memory_server/extraction.py:323

  • [nitpick] Consider adding an update method to the VectorStoreAdapter so that both write and update operations can be performed uniformly through the adapter instead of mixing direct Redis calls with adapter-based operations.
                        )

@abrookins abrookins merged commit 20ae946 into main Jul 3, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants