Skip to content

Conversation

@abrookins
Copy link
Collaborator

@abrookins abrookins commented Jun 25, 2025

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.

Copilot AI review requested due to automatic review settings June 25, 2025 23:57
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 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})")

@abrookins abrookins marked this pull request as draft June 26, 2025 00:07
@abrookins abrookins marked this pull request as draft June 26, 2025 00:07
@abrookins abrookins marked this pull request as ready for review June 26, 2025 22:57
@abrookins abrookins merged commit d1bffa0 into main Jun 26, 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