Add agent memory example for hybrid context retrieval - #1
Open
CalebKiragu wants to merge 1 commit into
Open
Conversation
Make the hosted Memory demo reproducible from the OSS checkout with a runnable SQL walkthrough, quickstart mode, and user guide for durable agent decision memory over ordinary Postgres tables. 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
users,sessions,decisions) with filtered dense search, hybrid retrieval (pgcontext.query), and a hydrated context pack for LLM prompts.scripts/quickstart.sh agent-memory, playground script, and user guide so the hosted Memory demo story is reproducible from the OSS checkout.Motivation
Polygres markets Postgres-as-agent-memory, but the open-source quickstart did not yet show how to model durable decision memory or run hybrid retrieval locally. This closes that adoption gap without touching extension internals.
Implementation
examples/sql/06_agent_memory.sql— full walkthrough with 4-D fixture embeddingsplayground/agent_memory.sql— Docker-friendly demo with stage outputdocs/user_guide/agent_memory.md— schema, walkthrough, optional GraphRAG appendixscripts/quickstart.sh agent-memory— one-command local runBenefits
Tradeoffs
Testing
Verified locally: filtered billing search returns
d-billing-refund; hybrid search ranks billing decision first; context pack hydrates summary + session topic.Future work
Made with Cursor