{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "tencentcloud-octop-memory--persist-assistant-preferences-locally",
 "repo": "TencentCloud/octop-memory",
 "repo_url": "https://github.com/TencentCloud/octop-memory",
 "repo_slug": "tencentcloud-octop-memory",
 "title": "Keep an assistant's preferences across sessions locally",
 "page_title": "How to keep an assistant's preferences across sessions locally with Octop Memory",
 "summary": "Store user preferences in a local SQLite file and recall them in later sessions.",
 "who": "A developer building a personal assistant who needs it to remember stated preferences between conversations.",
 "problem": "Each new session starts without the user's stated preferences, so the assistant repeats questions and ignores earlier choices.",
 "outcome": "Preferences are saved to a local database and returned as ranked prompt context when the topic comes up again.",
 "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"
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "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.",
 "category": "Personal productivity",
 "tags": [
  "Personal productivity"
 ],
 "lang": "python",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/tencentcloud-octop-memory/persist-assistant-preferences-locally/",
 "md": "https://dedupedai.com/use-cases/tencentcloud-octop-memory/persist-assistant-preferences-locally/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/tencentcloud-octop-memory--persist-assistant-preferences-locally.json",
 "api_version": "v1"
}
