feat(memory): extract and persist fluid memory after chat turns - #166
Merged
Conversation
Add workspace-scoped fluid memory tables, lexical dedup token index, QStash extraction workflow, and fire-and-forget trigger after successful chat answers so durable user insights are stored for later cognition. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
4 tasks
EricNGOntos
added a commit
that referenced
this pull request
Sep 1, 2026
* feat(chat): add agentic retrieval toggle to chat composer * feat(chat): refine deep search toggle UI * feat(memory): extract and persist fluid memory after chat turns (#166) Add workspace-scoped fluid memory tables, lexical dedup token index, QStash extraction workflow, and fire-and-forget trigger after successful chat answers so durable user insights are stored for later cognition. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: suguanYang <wangbinqi77@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Ships Phase 1 fluid memory so successful chat turns extract durable user insights (indicator preferences, stances, decision rules, entities of interest) and persist them per workspace.
fluid_memory_items,memory_diffs, andfluid_memory_tokens(lexical inverted index for dedup candidate retrieval; no pgvector).POST /api/memory/extractloads the turn, retrieves lexically similar active memories by kind, runs structured LLM extraction, then applies create/skip/merge/deprecate with audit diffs.workspaceId(one workspace per user), so users do not share memory rows.Why
Offline/crystal document memory alone is not enough for personal cognition. This lands the online fluid-memory capture path required before activating offline facts with user-owned indicators and entities.
Test plan
tsc --noEmitclean on changed treeeslinton memory + chat trigger pathssrc/domains/memory+ chat route trigger coverage0013+0014on staging Neonfluid_memory_items/ tokens / diffsDeploy notes
Staging already has
QSTASH_*,NOTEBOOK_PUBLIC_URL,AI_GATEWAY_API_KEY,CHAT_MODEL, andDATABASE_DRIVER=pg. No new required env vars. Optional override:MEMORY_EXTRACTION_MODEL(defaults toCHAT_MODEL).Made with Cursor