mem0-scope

Views or changes the default memory scope for mem0 memory operations.

Updated Jun 29, 2026
One-click install
npx skills add https://github.com/nhatnguyen1122/Agent-Memory-Eval --skill mem0-scope-nhatnguyen1122
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mem0-scope
Source: https://github.com/nhatnguyen1122/Agent-Memory-Eval/tree/main/mem0/integrations/mem0-plugin/.opencode-plugin/opencode-skills/mem0-scope
Command: npx skills add https://github.com/nhatnguyen1122/Agent-Memory-Eval --skill mem0-scope-nhatnguyen1122

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When using mem0 memory tools, memories can be scoped to a project, a session, or globally across all projects. Without a clear way to inspect or change the default scope, users risk saving memories to the wrong context or searching the wrong set of memories. ## Core Features & Use Cases - View current scope: Reads the default_scope value from ~/.mem0/settings.json and displays the active scope alongside user, project, and session identifiers. - Change default scope: Updates default_scope to project, session, or global while preserving all other settings keys such as auto_save and search_limit. - Use Case: You are working in a monorepo and want memories shared across all your projects. Run the skill with "global" to switch the default scope, then all subsequent memory saves and searches apply user-wide until you revert. ## Quick Start Ask the assistant to show the current mem0 memory scope or change it to session scope for this conversation.

Frequently Asked Questions about mem0-scope

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I change the default memory scope in mem0?

Invoke the skill with a target scope word: project, session, or global. It updates the default_scope key in ~/.mem0/settings.json while preserving all other settings, and the change takes effect immediately for memory tools in the current session.

What are the memory scope options in mem0?

There are three scopes: project limits memories to the current repo via user_id and app_id, session isolates memories to the current run via run_id, and global shares memories across all your projects by dropping app_id on writes.

Does changing the default scope affect delete_all_memories?

No. delete_all_memories deliberately ignores the default scope and always requires an explicit scope=global argument to delete user-wide memories, so changing the default can never cause an accidental cross-project wipe.

Can I override the default scope for a single memory call?

Yes. The skill only changes the default. Any memory tool call can still pass an explicit scope parameter to override the default for that one operation without modifying the settings file.

What is the difference between global scope and global_search in mem0?

Global scope means memories span all projects for this user, while global_search is a separate setting that searches across all users. The skill only modifies default_scope and leaves global_search untouched.