Who it is forA developer building a personal assistant who needs it to remember stated preferences between conversations.
The problemEach new session starts without the user's stated preferences, so the assistant repeats questions and ignores earlier choices.
The outcomePreferences are saved to a local database and returned as ranked prompt context when the topic comes up again.
What you need first
- Python 3.12 or newer
- pip to install the octop-memory package
- A database path for local SQLite storage, or a PostgreSQL DSN for server deployments
- An injected LLMClient only if you want automated extraction, promotion, or page regeneration; manual storage and lexical recall work without a model
Steps
- Run
pip install octop-memory - Run
pip install "octop-memory[cli]"to add the command line tool - Create a Memory object with namespace="demo" and backend_config={"db_path": "./demo.sqlite"}, then call memory.store("User prefers Python for backend services", topic="preferences")
- Run
octop-memory --db ./demo.sqlite --namespace demo recall "Python"to confirm the stored preference is found - Call MemoryService(memory).recall("Python") in your assistant and inject result.rendered into the prompt
Prompt for your agent
Use the octop-memory repo to store the preference <preference text> in a local SQLite file at ./demo.sqlite under namespace demo. Then recall it with the query <query term> and return the rendered result. Verify that the returned text contains the stored preference.
Caveat. Manual storage and lexical recall need no model, but automated extraction only runs after you inject an LLMClient, since installing the package does not configure one.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for TencentCloud/octop-memory and "Keep an assistant's preferences across sessions locally"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer