-
Notifications
You must be signed in to change notification settings - Fork 5
Add project isolation support for multi-project deployments #5
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?
Add project isolation support for multi-project deployments #5
Conversation
- Add projectId to AutoMemConfig interface for project scoping - Update HTTP client to send X-Project-ID header when project is configured - Add --project-id CLI flag to setup command with interactive prompting - Add AUTOMEM_PROJECT_ID environment variable support - Update both main MCP server and recall command to load project ID from env This enables multiple projects to use the same AutoMem backend with isolated memory spaces via the project_id parameter.
📝 WalkthroughWalkthroughThis PR adds optional projectId configuration support throughout the AutoMem system. The projectId can be specified via environment variables, CLI arguments, or programmatic configuration, is validated and persisted through the setup workflow, and is conditionally injected as an X-Project-ID header in client requests. Changes
Sequence DiagramsequenceDiagram
participant User
participant CLI
participant Config
participant AutoMemClient
participant HTTP
User->>CLI: Run setup with --project-id
CLI->>CLI: Read AUTOMEM_PROJECT_ID from env
CLI->>CLI: Parse --project-id argument
CLI->>User: Prompt for Project ID (if interactive)
User->>CLI: Provide projectId
CLI->>Config: Persist projectId to file
Note over User,Config: Later: Using AutoMem with projectId
User->>Config: Initialize with projectId in config
Config->>AutoMemClient: Pass endpoint, apiKey, projectId
User->>AutoMemClient: Make request
AutoMemClient->>AutoMemClient: Check if projectId is set
alt projectId set
AutoMemClient->>HTTP: Add X-Project-ID header
end
AutoMemClient->>HTTP: Send request
HTTP-->>AutoMemClient: Response
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (11)
📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (3)src/automem-client.ts📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/types.ts📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/index.ts📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (7)📓 Common learnings📚 Learning: 2025-10-01T01:11:42.805ZApplied to files:
📚 Learning: 2025-10-01T01:11:42.805ZApplied to files:
📚 Learning: 2025-10-01T01:11:42.805ZApplied to files:
📚 Learning: 2025-10-01T01:13:48.061ZApplied to files:
📚 Learning: 2025-10-01T01:11:42.805ZApplied to files:
📚 Learning: 2025-10-01T01:12:18.800ZApplied to files:
🧬 Code graph analysis (2)src/cli/setup.ts (1)
src/index.ts (2)
🔇 Additional comments (12)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds project isolation support to enable a single AutoMem backend to serve multiple projects with completely separate memory spaces.
Changes
Benefits
Usage
This works with the corresponding backend changes that add project_id scoping to Memory nodes and Qdrant collections.