Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds support for an optional user ID across memory management operations to facilitate multi-user environments while remaining backward compatible for single-user setups. Key changes include updates to test cases and API endpoints to include the user_id parameter, modifications to Redis key generation, and corresponding documentation and configuration updates.
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_mcp.py | Updated expected test payloads to pass user_id. |
| tests/test_api.py | Added user_id query parameter in multiple API endpoints. |
| pyproject.toml | Added uv.sources configuration and dev dependency for agent-memory-client. |
| docs/memory-types.md | Removed unused search settings to streamline the documentation. |
| docs/getting-started.md | Modified instructions to reflect the additional worker component and CLI commands. |
| agent_memory_server/working_memory.py | Integrated user_id into list, get, set, and delete working memory operations. |
| agent_memory_server/utils/keys.py | Updated working_memory_key() to include an optional user_id in the key construction. |
| agent_memory_server/models.py | Added user_id field to WorkingMemoryRequest and GetSessionsQuery. |
| agent_memory_server/mcp.py | Passed user_id in the memory_prompt function call. |
| agent_memory_server/long_term_memory.py | Updated long term memory search queries and removed redundant constants. |
| agent_memory_server/config.py | Reorganized window_size setting under working memory configurations. |
| agent_memory_server/api.py | Added optional user_id parameter in API endpoints for working memory management. |
| agent_memory_server/init.py | Bumped version to 0.9.0b4. |
| agent-memory-client/agent_memory_client/client.py | Updated client functions to support user_id in API calls and adjusted logging in search queries. |
| agent-memory-client/agent_memory_client/init.py | Bumped version to 0.9.0b4. |
| CLAUDE.md | Added a command for running all tests, including API tests. |
Comments suppressed due to low confidence (2)
agent_memory_server/utils/keys.py:69
- [nitpick] Consider adding a clarifying comment on the key parts ordering (i.e. namespace, user_id, session_id) to help maintainers understand the rationale behind this structure.
if user_id:
agent-memory-client/agent_memory_client/client.py:588
- Ensure that the use of 'dist' instead of 'distance' is consistently applied across the codebase and documented appropriately, so consumers of this API are aware of the change.
print(f"- {memory.text[:100]}... (distance: {memory.dist})")
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.
A multi-user environment requires supporting user IDs for every operation. It should be optional, so the server continues to work for single-user environments.
NOTE: Significant AI slop in this one, still tweaking it.