feat(memory): add three-layer memory system with embedders and vector stores#954
feat(memory): add three-layer memory system with embedders and vector stores#954murdore wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (35)
📒 Files selected for processing (140)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
✅ Single Commit Policy - COMPLIANTStatus: Policy requirements met • 1 commit • Valid format • Ready for merge 📊 View validation details📝 Commit Details
✅ Validation Results
🤖 Automated validation by NeuroLink Single Commit Enforcement |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds documentation and verification assets for the new three-layer memory system, while migrating docs infrastructure back to MkDocs and removing the previous Docusaurus docs-site.
Changes:
- Added a memory test/verification documentation set (configuration, test guide, CLI coverage, manual verification checklist).
- Added feature/status tracking docs for the memory system.
- Updated a handful of internal doc anchors/links and replaced the docs GitHub Pages workflow to build with MkDocs (removing
docs-site/).
Reviewed changes
Copilot reviewed 85 out of 188 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/memory-tests/VERIFICATION.md | Adds manual verification checklist for three-layer memory + CLI/SDK scenarios. |
| docs/memory-tests/TESTING.md | Adds instructions for running the memory test suites and troubleshooting. |
| docs/memory-tests/CONFIGURATION.md | Adds detailed configuration reference for token budgets, embedders, vector stores, and layers. |
| docs/memory-tests/CLI-COVERAGE.md | Documents CLI memory command test coverage expectations. |
| docs/THREE-LAYER-MEMORY-STATUS.md | Tracks implementation status and summarizes memory architecture/components. |
| docs/FEATURE-STATUS.md | Adds a condensed status snapshot of memory-related components and files. |
| docs/guides/examples/code-patterns.md | Adjusts ToC anchor formatting. |
| docs/features/tts.md | Adjusts an internal anchor link. |
| docs/features/multimodal.md | Adjusts an internal anchor link. |
| docs/features/thinking-configuration.md | Retargets API reference link to a specific section. |
| docs/features/structured-output.md | Retargets API reference link to a specific section. |
| docs/cookbook/structured-output.md | Retargets API reference link to a specific section. |
| docs/cookbook/streaming-with-retry.md | Retargets API reference link to a specific section. |
| docs/advanced/mcp-integration.md | Changes an API reference link target (potentially incorrect path). |
| .github/workflows/docs.yml | Adds/replaces docs deployment workflow to build and deploy MkDocs site. |
| docs-site/** (many) | Removes Docusaurus docs site and its tooling/config/scripts. |
| docs/guides/migration/index.md | Removes migration guides index page (landing page). |
| docs/guides/enterprise/index.md | Removes enterprise guides index page (landing page). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ### Customizing Token Budget | ||
|
|
||
| ```typescript | ||
| import { NeuroLink, MemoryCoordinator } from "neurolink-sdk"; |
There was a problem hiding this comment.
The import specifier \"neurolink-sdk\" is inconsistent with other new docs in this PR (e.g., @juspay/neurolink/memory in THREE-LAYER-MEMORY-STATUS.md). If the published package name is @juspay/neurolink, these examples will not work as written. Please standardize the package name across docs (and ideally match the actual npm package users install).
| import { NeuroLink, MemoryCoordinator } from "neurolink-sdk"; | |
| import { NeuroLink, MemoryCoordinator } from "@juspay/neurolink"; |
| ## Complete Configuration Example | ||
|
|
||
| ```typescript | ||
| import { NeuroLink } from "neurolink-sdk"; |
There was a problem hiding this comment.
The import specifier \"neurolink-sdk\" is inconsistent with other new docs in this PR (e.g., @juspay/neurolink/memory in THREE-LAYER-MEMORY-STATUS.md). If the published package name is @juspay/neurolink, these examples will not work as written. Please standardize the package name across docs (and ideally match the actual npm package users install).
| import { NeuroLink } from "neurolink-sdk"; | |
| import { NeuroLink } from "@juspay/neurolink"; |
| - [MCP Testing Guide](mcp-testing-guide.md) | ||
| - [CLI Command Reference](../cli/commands.md#mcp) | ||
| - [API Integration](../sdk/api-reference.md) | ||
| - [API Integration](api-reference.md#mcp-integration) |
There was a problem hiding this comment.
This link target was changed from ../sdk/api-reference.md to api-reference.md, which now points to a different relative path (the same folder as mcp-integration.md). Unless docs/advanced/api-reference.md exists, this will become a broken link in MkDocs (especially with --strict). Consider pointing back to the SDK API reference (e.g., ../sdk/api-reference.md#...) or updating the path to the actual file location.
| - [API Integration](api-reference.md#mcp-integration) | |
| - [API Integration](../sdk/api-reference.md#mcp-integration) |
|
|
||
| 1. [Error Handling Patterns](#error-handling-patterns) | ||
| 2. [Retry & Backoff Strategies](#retry--backoff-strategies) | ||
| 2. [Retry & Backoff Strategies](#retry-backoff-strategies) |
There was a problem hiding this comment.
The anchor change may not match MkDocs’ generated heading IDs for titles containing & (many slugifiers produce retry--backoff-strategies). Similar anchor changes appear in other docs in this PR. To avoid fragile links, consider adding explicit heading IDs (e.g., ## Retry & Backoff Strategies {#retry-backoff-strategies}) or verify the generated IDs under MkDocs so these links don’t break.
| 2. [Retry & Backoff Strategies](#retry-backoff-strategies) | |
| 2. [Retry & Backoff Strategies](#retry--backoff-strategies) |
| - name: Build documentation | ||
| run: | | ||
| mkdocs build --strict --clean | ||
|
|
||
| - name: Upload artifact | ||
| if: github.event_name != 'pull_request' | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: _site |
There was a problem hiding this comment.
MkDocs defaults to outputting into site/ unless site_dir is configured in mkdocs.yml. This workflow uploads _site, which will fail to deploy if the repo doesn’t explicitly set site_dir: _site (or if it changes later). Recommendation: either (a) set the output directory explicitly in the build command (mkdocs build -d _site ...) or (b) upload site/ to match MkDocs defaults.
| # Navigate to the worktree | ||
| cd /path/to/feat/three-layer-memory |
There was a problem hiding this comment.
The quick-start path cd /path/to/feat/three-layer-memory is branch/worktree-specific and may confuse readers following the guide from a normal clone. Consider replacing with a repo-agnostic instruction (e.g., cd neurolink) or describing both options (clone vs worktree).
| # Navigate to the worktree | |
| cd /path/to/feat/three-layer-memory | |
| # Navigate to the repository root | |
| cd neurolink |
🤖 AI Review & Build Compliance ✅Status: AI analysis complete • Build rules validated • Ready for review 📊 View detailed analysis results🛡️ Analysis Complete
📋 Ready for Merge When
🤖 AI analysis complete - check individual code comments for specific feedback |
50c7d08 to
1940372
Compare
🤖 AI Review & Build Compliance ✅Status: AI analysis complete • Build rules validated • Ready for review 📊 View detailed analysis results🛡️ Analysis Complete
📋 Ready for Merge When
🤖 AI analysis complete - check individual code comments for specific feedback |
1940372 to
fdbf5d4
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
fdbf5d4 to
c2715f4
Compare
🤖 AI Review & Build Compliance ✅Status: AI analysis complete • Build rules validated • Ready for review 📊 View detailed analysis results🛡️ Analysis Complete
📋 Ready for Merge When
🤖 AI analysis complete - check individual code comments for specific feedback |
c2715f4 to
6b677d3
Compare
… stores - 3 memory layers (Conversation History, Semantic Recall, Working Memory) - 6 embedders (OpenAI, Vertex, Ollama, Bedrock, Mistral, Cohere) - 5 vector stores (In-Memory, Redis, Qdrant, PGVector, Pinecone) - MemoryCoordinator for unified memory access - Memory processors for context management - CLI memory commands (list, stats, search, clear, export, import) - SDK methods: createThreeLayerMemory, getWorkingMemory, updateWorkingMemory, getThreeLayerMemoryStats, searchMemory, storeConversation - Continuous test suite: 46/46 tests passing (7 skipped - optional API keys), including E2E tests for generate()/stream() SDK and CLI with memory
6b677d3 to
1a9a939
Compare
🤖 AI Review & Build Compliance ✅Status: AI analysis complete • Build rules validated • Ready for review 📊 View detailed analysis results🛡️ Analysis Complete
📋 Ready for Merge When
🤖 AI analysis complete - check individual code comments for specific feedback |
Description
What does this PR do?
Adds a complete three-layer memory system to NeuroLink, providing AI conversations with contextual recall across three distinct layers:
Key additions:
ThreeLayerMemoryManager— main orchestrator, wired intoNeuroLinkclassMemoryCoordinator+MemoryFactory+MemoryRegistry— advanced factory/registry patternupdateWorkingMemorytool — AI agent can update working memory mid-conversationneurolink memory {list,stats,search,clear,export,import}createThreeLayerMemory(),getWorkingMemory(),updateWorkingMemory(),getThreeLayerMemoryStats(),searchMemory(),storeConversation()ConversationMemoryConfigto new formatAlso in this commit:
docs-site/(Docusaurus) — reverted to MkDocssrc/lib/features/ppt/(PPT generation feature)typenotinterface, no local types dirs, unique type names withMemoryVectorStoreprefix)Type of Change
Validation
All checks pass on the rebased branch (
origin/release@ 9.54.4):pnpm run check(svelte-check)pnpm run lint(prettier + eslint)no-explicit-any)pnpm run build(SDK + CLI + publint)pnpm run check:all(lint + format + validate + commit validation)pnpm run test:memoryTest Suite Breakdown (46 tests across 10 suites)
E2E Tests (real Vertex AI calls)
generate()— two-turn conversation with shared sessionId, memory threads throughstream()— streamed generation with conversation memory enabledcreateThreeLayerMemory()— dynamic three-layer init + stats retrievalupdateWorkingMemory()/getWorkingMemory()— write-read round-tripgenerate— subprocess end-to-endstream— subprocess end-to-end