[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EAD4B42YVYDSKTR16DFXB1":3,"skill-same:01M6EAD4B42YVYDSKTR16DFXB1":102},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":42,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M6EAD4B42YVYDSKTR16DFXB1","deep-agents-memory",null,"INVOKE THIS SKILL when your Deep Agent needs memory, persistence, or filesystem access. Covers StateBackend (ephemeral), StoreBackend (persistent), FilesystemMiddleware, and CompositeBackend for routing.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FHarmeet10000\u002Fskills\u002Fdeep-agents-memory\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31],"memory","deep agents memory","deep agents","deep","routing","persistence","access","filesystem","2026-11-10 10:12:30",false,"---\nname: deep-agents-memory\ndescription: \"INVOKE THIS SKILL when your Deep Agent needs memory, persistence, or filesystem access. Covers StateBackend (ephemeral), StoreBackend (persistent), FilesystemMiddleware, and CompositeBackend for routing.\"\n---\n\n\u003Coverview>\nDeep Agents use pluggable backends for file operations and memory:\n\n**Short-term (StateBackend)**: Persists within a single thread, lost when thread ends\n**Long-term (StoreBackend)**: Persists across threads and sessions\n**Hybrid (CompositeBackend)**: Route different paths to different backends\n\nFilesystemMiddleware provides tools: `ls`, `read_file`, `write_file`, `edit_file`, `glob`, `grep`\n\u003C\u002Foverview>\n\n\u003Cbackend-selection>\n\n| Use Case | Backend | Why |\n|----------|---------|-----|\n| Temporary working files | StateBackend | Default, no setup |\n| Local development CLI | FilesystemBackend | Direct disk access |\n| Cross-session memory | StoreBackend | Persists across threads |\n| Hybrid storage | CompositeBackend | Mix ephemeral + persistent |\n\n\u003C\u002Fbackend-selection>\n\n\u003Cex-default-state-backend>\n\u003Cpython>\nDefault StateBackend stores files ephemerally within a thread.\n```python\nfrom deepagents import create_deep_agent\n\nagent = create_deep_agent()  # Default: StateBackend\nresult = agent.invoke({\n    \"messages\": [{\"role\": \"user\", \"content\": \"Write notes to \u002Fdraft.txt\"}]\n}, config={\"configurable\": {\"thread_id\": \"thread-1\"}})\n# \u002Fdraft.txt is lost when thread ends\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nDefault StateBackend stores files ephemerally within a thread.\n```typescript\nimport { createDeepAgent } from \"deepagents\";\n\nconst agent = await createDeepAgent();  \u002F\u002F Default: StateBackend\nconst result = await agent.invoke({\n  messages: [{ role: \"user\", content: \"Write notes to \u002Fdraft.txt\" }]\n}, { configurable: { thread_id: \"thread-1\" } });\n\u002F\u002F \u002Fdraft.txt is lost when thread ends\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-default-state-backend>\n\n\u003Cex-composite-backend-for-hybrid>\n\u003Cpython>\nConfigure CompositeBackend to route paths to different storage backends.\n```python\nfrom deepagents import create_deep_agent\nfrom deepagents.backends import CompositeBackend, StateBackend, StoreBackend\nfrom langgraph.store.memory import InMemoryStore\n\nstore = InMemoryStore()\n\ncomposite_backend = lambda rt: CompositeBackend(\n    default=StateBackend(rt),\n    routes={\"\u002Fmemories\u002F\": StoreBackend(rt)}\n)\n\nagent = create_deep_agent(backend=composite_backend, store=store)\n\n# \u002Fdraft.txt -> ephemeral (StateBackend)\n# \u002Fmemories\u002Fuser-prefs.txt -> persistent (StoreBackend)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nConfigure CompositeBackend to route paths to different storage backends.\n```typescript\nimport { createDeepAgent, CompositeBackend, StateBackend, StoreBackend } from \"deepagents\";\nimport { InMemoryStore } from \"@langchain\u002Flanggraph\";\n\nconst store = new InMemoryStore();\n\nconst agent = await createDeepAgent({\n  backend: (config) => new CompositeBackend(\n    new StateBackend(config),\n    { \"\u002Fmemories\u002F\": new StoreBackend(config) }\n  ),\n  store\n});\n\n\u002F\u002F \u002Fdraft.txt -> ephemeral (StateBackend)\n\u002F\u002F \u002Fmemories\u002Fuser-prefs.txt -> persistent (StoreBackend)\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-composite-backend-for-hybrid>\n\n\u003Cex-cross-session-memory>\n\u003Cpython>\nFiles in \u002Fmemories\u002F persist across threads via StoreBackend routing.\n```python\n# Using CompositeBackend from previous example\nconfig1 = {\"configurable\": {\"thread_id\": \"thread-1\"}}\nagent.invoke({\"messages\": [{\"role\": \"user\", \"content\": \"Save to \u002Fmemories\u002Fstyle.txt\"}]}, config=config1)\n\nconfig2 = {\"configurable\": {\"thread_id\": \"thread-2\"}}\nagent.invoke({\"messages\": [{\"role\": \"user\", \"content\": \"Read \u002Fmemories\u002Fstyle.txt\"}]}, config=config2)\n# Thread 2 can read file saved by Thread 1\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nFiles in \u002Fmemories\u002F persist across threads via StoreBackend routing.\n```typescript\n\u002F\u002F Using CompositeBackend from previous example\nconst config1 = { configurable: { thread_id: \"thread-1\" } };\nawait agent.invoke({ messages: [{ role: \"user\", content: \"Save to \u002Fmemories\u002Fstyle.txt\" }] }, config1);\n\nconst config2 = { configurable: { thread_id: \"thread-2\" } };\nawait agent.invoke({ messages: [{ role: \"user\", content: \"Read \u002Fmemories\u002Fstyle.txt\" }] }, config2);\n\u002F\u002F Thread 2 can read file saved by Thread 1\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-cross-session-memory>\n\n\u003Cex-filesystem-backend-local-dev>\n\u003Cpython>\nUse FilesystemBackend for local development with real disk access and human-in-the-loop.\n```python\nfrom deepagents import create_deep_agent\nfrom deepagents.backends import FilesystemBackend\nfrom langgraph.checkpoint.memory import MemorySaver\n\nagent = create_deep_agent(\n    backend=FilesystemBackend(root_dir=\".\", virtual_mode=True),  # Restrict access\n    interrupt_on={\"write_file\": True, \"edit_file\": True},\n    checkpointer=MemorySaver()\n)\n\n# Agent can read\u002Fwrite actual files on disk\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse FilesystemBackend for local development with real disk access and human-in-the-loop.\n```typescript\nimport { createDeepAgent, FilesystemBackend } from \"deepagents\";\nimport { MemorySaver } from \"@langchain\u002Flanggraph\";\n\nconst agent = await createDeepAgent({\n  backend: new FilesystemBackend({ rootDir: \".\", virtualMode: true }),\n  interruptOn: { write_file: true, edit_file: true },\n  checkpointer: new MemorySaver()\n});\n```\n\u003C\u002Ftypescript>\n\n**Security: Never use FilesystemBackend in web servers - use StateBackend or sandbox instead.**\n\u003C\u002Fex-filesystem-backend-local-dev>\n\n\u003Cex-store-in-custom-tools>\n\u003Cpython>\nAccess the store directly in custom tools for long-term memory operations.\n```python\nfrom langchain.tools import tool, ToolRuntime\nfrom langchain.agents import create_agent\nfrom langgraph.store.memory import InMemoryStore\n\n@tool\ndef get_user_preference(key: str, runtime: ToolRuntime) -> str:\n    \"\"\"Get a user preference from long-term storage.\"\"\"\n    store = runtime.store\n    result = store.get((\"user_prefs\",), key)\n    return str(result.value) if result else \"Not found\"\n\n@tool\ndef save_user_preference(key: str, value: str, runtime: ToolRuntime) -> str:\n    \"\"\"Save a user preference to long-term storage.\"\"\"\n    store = runtime.store\n    store.put((\"user_prefs\",), key, {\"value\": value})\n    return f\"Saved {key}={value}\"\n\nstore = InMemoryStore()\n\nagent = create_agent(\n    model=\"gpt-4.1\",\n    tools=[get_user_preference, save_user_preference],\n    store=store\n)\n```\n\u003C\u002Fpython>\n\u003C\u002Fex-store-in-custom-tools>\n\n\u003Cboundaries>\n### What Agents CAN Configure\n\n- Backend type and configuration\n- Routing rules for CompositeBackend\n- Root directory for FilesystemBackend\n- Human-in-the-loop for file operations\n\n### What Agents CANNOT Configure\n\n- Tool names (ls, read_file, write_file, edit_file, glob, grep)\n- Access files outside virtual_mode restrictions\n- Cross-thread file access without proper backend setup\n\u003C\u002Fboundaries>\n\n\u003Cfix-storebackend-requires-store>\n\u003Cpython>\nStoreBackend requires a store instance.\n```python\n# WRONG\nagent = create_deep_agent(backend=lambda rt: StoreBackend(rt))\n\n# CORRECT\nagent = create_deep_agent(backend=lambda rt: StoreBackend(rt), store=InMemoryStore())\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nStoreBackend requires a store instance.\n```typescript\n\u002F\u002F WRONG\nconst agent = await createDeepAgent({ backend: (c) => new StoreBackend(c) });\n\n\u002F\u002F CORRECT\nconst agent = await createDeepAgent({ backend: (c) => new StoreBackend(c), store: new InMemoryStore() });\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-storebackend-requires-store>\n\n\u003Cfix-statebackend-files-dont-persist>\n\u003Cpython>\nStateBackend files are thread-scoped - use same thread_id or StoreBackend for cross-thread access.\n```python\n# WRONG: thread-2 can't read file from thread-1\nagent.invoke({\"messages\": [...]}, config={\"configurable\": {\"thread_id\": \"thread-1\"}})  # Write\nagent.invoke({\"messages\": [...]}, config={\"configurable\": {\"thread_id\": \"thread-2\"}})  # File not found!\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nStateBackend files are thread-scoped - use same thread_id or StoreBackend for cross-thread access.\n```typescript\n\u002F\u002F WRONG: thread-2 can't read file from thread-1\nawait agent.invoke({ messages: [...] }, { configurable: { thread_id: \"thread-1\" } });  \u002F\u002F Write\nawait agent.invoke({ messages: [...] }, { configurable: { thread_id: \"thread-2\" } });  \u002F\u002F File not found!\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-statebackend-files-dont-persist>\n\n\u003Cfix-path-prefix-for-persistence>\n\u003Cpython>\nPath must match CompositeBackend route prefix for persistence.\n```python\n# With routes={\"\u002Fmemories\u002F\": StoreBackend(rt)}:\nagent.invoke(...)  # \u002Fprefs.txt -> ephemeral (no match)\nagent.invoke(...)  # \u002Fmemories\u002Fprefs.txt -> persistent (matches route)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nPath must match CompositeBackend route prefix for persistence.\n```typescript\n\u002F\u002F With routes: { \"\u002Fmemories\u002F\": StoreBackend }:\nawait agent.invoke(...);  \u002F\u002F \u002Fprefs.txt -> ephemeral (no match)\nawait agent.invoke(...);  \u002F\u002F \u002Fmemories\u002Fprefs.txt -> persistent (matches route)\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-path-prefix-for-persistence>\n\n\u003Cfix-production-store>\n\u003Cpython>\nUse PostgresStore for production (InMemoryStore lost on restart).\n```python\n# WRONG                              # CORRECT\nstore = InMemoryStore()              store = PostgresStore(connection_string=\"postgresql:\u002F\u002F...\")\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse PostgresStore for production (InMemoryStore lost on restart).\n```typescript\n\u002F\u002F WRONG                                    \u002F\u002F CORRECT\nconst store = new InMemoryStore();          const store = new PostgresStore({ connectionString: \"...\" });\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-production-store>\n\n\u003Cfix-filesystem-backend-needs-virtual-mode>\n\u003Cpython>\nEnable virtual_mode=True to restrict path access (prevents ..\u002F and ~\u002F escapes).\n```python\nbackend = FilesystemBackend(root_dir=\"\u002Fproject\", virtual_mode=True)  # Secure\n```\n\u003C\u002Fpython>\n\u003C\u002Ffix-filesystem-backend-needs-virtual-mode>\n\n\u003Cfix-longest-prefix-match>\n\u003Cpython>\nCompositeBackend matches longest prefix first.\n```python\nroutes = {\"\u002Fmem\u002F\": StoreBackend(rt), \"\u002Fmem\u002Ftemp\u002F\": StateBackend(rt)}\n# \u002Fmem\u002Ffile.txt -> StoreBackend, \u002Fmem\u002Ftemp\u002Ffile.txt -> StateBackend (longer match)\n```\n\u003C\u002Fpython>\n\u003C\u002Ffix-longest-prefix-match>\n","\u003Coverview>\nDeep Agents use pluggable backends for file operations and memory:\n\n**Short-term (StateBackend)**: Persists within a single thread, lost when thread ends\n**Long-term (StoreBackend)**: Persists across threads and sessions\n**Hybrid (CompositeBackend)**: Route different paths to different backends\n\nFilesystemMiddleware provides tools: `ls`, `read_file`, `write_file`, `edit_file`, `glob`, `grep`\n\u003C\u002Foverview>\n\n\u003Cbackend-selection>\n\n| Use Case | Backend | Why |\n|----------|---------|-----|\n| Temporary working files | StateBackend | Default, no setup |\n| Local development CLI | FilesystemBackend | Direct disk access |\n| Cross-session memory | StoreBackend | Persists across threads |\n| Hybrid storage | CompositeBackend | Mix ephemeral + persistent |\n\n\u003C\u002Fbackend-selection>\n\n\u003Cex-default-state-backend>\n\u003Cpython>\nDefault StateBackend stores files ephemerally within a thread.\n```python\nfrom deepagents import create_deep_agent\n\nagent = create_deep_agent()  # Default: StateBackend\nresult = agent.invoke({\n    \"messages\": [{\"role\": \"user\", \"content\": \"Write notes to \u002Fdraft.txt\"}]\n}, config={\"configurable\": {\"thread_id\": \"thread-1\"}})\n# \u002Fdraft.txt is lost when thread ends\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nDefault StateBackend stores files ephemerally within a thread.\n```typescript\nimport { createDeepAgent } from \"deepagents\";\n\nconst agent = await createDeepAgent();  \u002F\u002F Default: StateBackend\nconst result = await agent.invoke({\n  messages: [{ role: \"user\", content: \"Write notes to \u002Fdraft.txt\" }]\n}, { configurable: { thread_id: \"thread-1\" } });\n\u002F\u002F \u002Fdraft.txt is lost when thread ends\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-default-state-backend>\n\n\u003Cex-composite-backend-for-hybrid>\n\u003Cpython>\nConfigure CompositeBackend to route paths to different storage backends.\n```python\nfrom deepagents import create_deep_agent\nfrom deepagents.backends import CompositeBackend, StateBackend, StoreBackend\nfrom langgraph.store.memory import InMemoryStore\n\nstore = InMemoryStore()\n\ncomposite_backend = lambda rt: CompositeBackend(\n    default=StateBackend(rt),\n    routes={\"\u002Fmemories\u002F\": StoreBackend(rt)}\n)\n\nagent = create_deep_agent(backend=composite_backend, store=store)\n\n# \u002Fdraft.txt -> ephemeral (StateBackend)\n# \u002Fmemories\u002Fuser-prefs.txt -> persistent (StoreBackend)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nConfigure CompositeBackend to route paths to different storage backends.\n```typescript\nimport { createDeepAgent, CompositeBackend, StateBackend, StoreBackend } from \"deepagents\";\nimport { InMemoryStore } from \"@langchain\u002Flanggraph\";\n\nconst store = new InMemoryStore();\n\nconst agent = await createDeepAgent({\n  backend: (config) => new CompositeBackend(\n    new StateBackend(config),\n    { \"\u002Fmemories\u002F\": new StoreBackend(config) }\n  ),\n  store\n});\n\n\u002F\u002F \u002Fdraft.txt -> ephemeral (StateBackend)\n\u002F\u002F \u002Fmemories\u002Fuser-prefs.txt -> persistent (StoreBackend)\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-composite-backend-for-hybrid>\n\n\u003Cex-cross-session-memory>\n\u003Cpython>\nFiles in \u002Fmemories\u002F persist across threads via StoreBackend routing.\n```python\n# Using CompositeBackend from previous example\nconfig1 = {\"configurable\": {\"thread_id\": \"thread-1\"}}\nagent.invoke({\"messages\": [{\"role\": \"user\", \"content\": \"Save to \u002Fmemories\u002Fstyle.txt\"}]}, config=config1)\n\nconfig2 = {\"configurable\": {\"thread_id\": \"thread-2\"}}\nagent.invoke({\"messages\": [{\"role\": \"user\", \"content\": \"Read \u002Fmemories\u002Fstyle.txt\"}]}, config=config2)\n# Thread 2 can read file saved by Thread 1\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nFiles in \u002Fmemories\u002F persist across threads via StoreBackend routing.\n```typescript\n\u002F\u002F Using CompositeBackend from previous example\nconst config1 = { configurable: { thread_id: \"thread-1\" } };\nawait agent.invoke({ messages: [{ role: \"user\", content: \"Save to \u002Fmemories\u002Fstyle.txt\" }] }, config1);\n\nconst config2 = { configurable: { thread_id: \"thread-2\" } };\nawait agent.invoke({ messages: [{ role: \"user\", content: \"Read \u002Fmemories\u002Fstyle.txt\" }] }, config2);\n\u002F\u002F Thread 2 can read file saved by Thread 1\n```\n\u003C\u002Ftypescript>\n\u003C\u002Fex-cross-session-memory>\n\n\u003Cex-filesystem-backend-local-dev>\n\u003Cpython>\nUse FilesystemBackend for local development with real disk access and human-in-the-loop.\n```python\nfrom deepagents import create_deep_agent\nfrom deepagents.backends import FilesystemBackend\nfrom langgraph.checkpoint.memory import MemorySaver\n\nagent = create_deep_agent(\n    backend=FilesystemBackend(root_dir=\".\", virtual_mode=True),  # Restrict access\n    interrupt_on={\"write_file\": True, \"edit_file\": True},\n    checkpointer=MemorySaver()\n)\n\n# Agent can read\u002Fwrite actual files on disk\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse FilesystemBackend for local development with real disk access and human-in-the-loop.\n```typescript\nimport { createDeepAgent, FilesystemBackend } from \"deepagents\";\nimport { MemorySaver } from \"@langchain\u002Flanggraph\";\n\nconst agent = await createDeepAgent({\n  backend: new FilesystemBackend({ rootDir: \".\", virtualMode: true }),\n  interruptOn: { write_file: true, edit_file: true },\n  checkpointer: new MemorySaver()\n});\n```\n\u003C\u002Ftypescript>\n\n**Security: Never use FilesystemBackend in web servers - use StateBackend or sandbox instead.**\n\u003C\u002Fex-filesystem-backend-local-dev>\n\n\u003Cex-store-in-custom-tools>\n\u003Cpython>\nAccess the store directly in custom tools for long-term memory operations.\n```python\nfrom langchain.tools import tool, ToolRuntime\nfrom langchain.agents import create_agent\nfrom langgraph.store.memory import InMemoryStore\n\n@tool\ndef get_user_preference(key: str, runtime: ToolRuntime) -> str:\n    \"\"\"Get a user preference from long-term storage.\"\"\"\n    store = runtime.store\n    result = store.get((\"user_prefs\",), key)\n    return str(result.value) if result else \"Not found\"\n\n@tool\ndef save_user_preference(key: str, value: str, runtime: ToolRuntime) -> str:\n    \"\"\"Save a user preference to long-term storage.\"\"\"\n    store = runtime.store\n    store.put((\"user_prefs\",), key, {\"value\": value})\n    return f\"Saved {key}={value}\"\n\nstore = InMemoryStore()\n\nagent = create_agent(\n    model=\"gpt-4.1\",\n    tools=[get_user_preference, save_user_preference],\n    store=store\n)\n```\n\u003C\u002Fpython>\n\u003C\u002Fex-store-in-custom-tools>\n\n\u003Cboundaries>\n### What Agents CAN Configure\n\n- Backend type and configuration\n- Routing rules for CompositeBackend\n- Root directory for FilesystemBackend\n- Human-in-the-loop for file operations\n\n### What Agents CANNOT Configure\n\n- Tool names (ls, read_file, write_file, edit_file, glob, grep)\n- Access files outside virtual_mode restrictions\n- Cross-thread file access without proper backend setup\n\u003C\u002Fboundaries>\n\n\u003Cfix-storebackend-requires-store>\n\u003Cpython>\nStoreBackend requires a store instance.\n```python\n# WRONG\nagent = create_deep_agent(backend=lambda rt: StoreBackend(rt))\n\n# CORRECT\nagent = create_deep_agent(backend=lambda rt: StoreBackend(rt), store=InMemoryStore())\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nStoreBackend requires a store instance.\n```typescript\n\u002F\u002F WRONG\nconst agent = await createDeepAgent({ backend: (c) => new StoreBackend(c) });\n\n\u002F\u002F CORRECT\nconst agent = await createDeepAgent({ backend: (c) => new StoreBackend(c), store: new InMemoryStore() });\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-storebackend-requires-store>\n\n\u003Cfix-statebackend-files-dont-persist>\n\u003Cpython>\nStateBackend files are thread-scoped - use same thread_id or StoreBackend for cross-thread access.\n```python\n# WRONG: thread-2 can't read file from thread-1\nagent.invoke({\"messages\": [...]}, config={\"configurable\": {\"thread_id\": \"thread-1\"}})  # Write\nagent.invoke({\"messages\": [...]}, config={\"configurable\": {\"thread_id\": \"thread-2\"}})  # File not found!\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nStateBackend files are thread-scoped - use same thread_id or StoreBackend for cross-thread access.\n```typescript\n\u002F\u002F WRONG: thread-2 can't read file from thread-1\nawait agent.invoke({ messages: [...] }, { configurable: { thread_id: \"thread-1\" } });  \u002F\u002F Write\nawait agent.invoke({ messages: [...] }, { configurable: { thread_id: \"thread-2\" } });  \u002F\u002F File not found!\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-statebackend-files-dont-persist>\n\n\u003Cfix-path-prefix-for-persistence>\n\u003Cpython>\nPath must match CompositeBackend route prefix for persistence.\n```python\n# With routes={\"\u002Fmemories\u002F\": StoreBackend(rt)}:\nagent.invoke(...)  # \u002Fprefs.txt -> ephemeral (no match)\nagent.invoke(...)  # \u002Fmemories\u002Fprefs.txt -> persistent (matches route)\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nPath must match CompositeBackend route prefix for persistence.\n```typescript\n\u002F\u002F With routes: { \"\u002Fmemories\u002F\": StoreBackend }:\nawait agent.invoke(...);  \u002F\u002F \u002Fprefs.txt -> ephemeral (no match)\nawait agent.invoke(...);  \u002F\u002F \u002Fmemories\u002Fprefs.txt -> persistent (matches route)\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-path-prefix-for-persistence>\n\n\u003Cfix-production-store>\n\u003Cpython>\nUse PostgresStore for production (InMemoryStore lost on restart).\n```python\n# WRONG                              # CORRECT\nstore = InMemoryStore()              store = PostgresStore(connection_string=\"postgresql:\u002F\u002F...\")\n```\n\u003C\u002Fpython>\n\u003Ctypescript>\nUse PostgresStore for production (InMemoryStore lost on restart).\n```typescript\n\u002F\u002F WRONG                                    \u002F\u002F CORRECT\nconst store = new InMemoryStore();          const store = new PostgresStore({ connectionString: \"...\" });\n```\n\u003C\u002Ftypescript>\n\u003C\u002Ffix-production-store>\n\n\u003Cfix-filesystem-backend-needs-virtual-mode>\n\u003Cpython>\nEnable virtual_mode=True to restrict path access (prevents ..\u002F and ~\u002F escapes).\n```python\nbackend = FilesystemBackend(root_dir=\"\u002Fproject\", virtual_mode=True)  # Secure\n```\n\u003C\u002Fpython>\n\u003C\u002Ffix-filesystem-backend-needs-virtual-mode>\n\n\u003Cfix-longest-prefix-match>\n\u003Cpython>\nCompositeBackend matches longest prefix first.\n```python\nroutes = {\"\u002Fmem\u002F\": StoreBackend(rt), \"\u002Fmem\u002Ftemp\u002F\": StateBackend(rt)}\n# \u002Fmem\u002Ffile.txt -> StoreBackend, \u002Fmem\u002Ftemp\u002Ffile.txt -> StateBackend (longer match)\n```\n\u003C\u002Fpython>\n\u003C\u002Ffix-longest-prefix-match>\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002FHarmeet10000\u002Fskills\u002Fdeep-agents-memory",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill deep-agents-memory",{"tool":52,"command":53},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill deep-agents-memory",{"tool":55,"command":56},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill deep-agents-memory","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002FHarmeet10000\u002Fskills\u002Fdeep-agents-memory\u002FSKILL.md",true,[60,66,70,74,78,82,86,90,94,98],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"agents\u002Fartifact-analyzer.md","REFERENCE","参考文档",2501,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Fbmad-product-brief\u002Fagents\u002Fartifact-analyzer.md",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"agents\u002Fopportunity-reviewer.md",1755,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Fbmad-product-brief\u002Fagents\u002Fopportunity-reviewer.md",{"path":71,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":72,"sourceHtmlUrl":73},"agents\u002Fskeptic-reviewer.md",1562,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Fbmad-product-brief\u002Fagents\u002Fskeptic-reviewer.md",{"path":75,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":76,"sourceHtmlUrl":77},"agents\u002Fweb-researcher.md",1674,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Fbmad-product-brief\u002Fagents\u002Fweb-researcher.md",{"path":79,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":80,"sourceHtmlUrl":81},"bmad-manifest.json",496,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Fbmad-product-brief\u002Fbmad-manifest.json",{"path":83,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":84,"sourceHtmlUrl":85},"prompts\u002Fcontextual-discovery.md",2596,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Fbmad-product-brief\u002Fprompts\u002Fcontextual-discovery.md",{"path":87,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":88,"sourceHtmlUrl":89},"prompts\u002Fdraft-and-review.md",4038,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Fbmad-product-brief\u002Fprompts\u002Fdraft-and-review.md",{"path":91,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":92,"sourceHtmlUrl":93},"prompts\u002Ffinalize.md",3933,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Fbmad-product-brief\u002Fprompts\u002Ffinalize.md",{"path":95,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":96,"sourceHtmlUrl":97},"prompts\u002Fguided-elicitation.md",3418,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Fbmad-product-brief\u002Fprompts\u002Fguided-elicitation.md",{"path":99,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":100,"sourceHtmlUrl":101},"resources\u002Fbrief-template.md",2304,"https:\u002F\u002Fgithub.com\u002FdevelopAgent\u002Fbmad-start\u002Fblob\u002Fmain\u002F.gemini\u002Fskills\u002Fbmad-product-brief\u002Fresources\u002Fbrief-template.md",[103,113,123,132,138,145],{"skillNo":104,"name":105,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":109,"publishedAt":32},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[108],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[110,111,112],"model","model hierarchy","model hierarchy skill",{"skillNo":114,"name":115,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":119,"publishedAt":32},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[118],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[120,121,122],"MCP","zoom","zoom mcp",{"skillNo":124,"name":125,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":32},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[129,130,131,121],"sdk","zoom apps sdk","apps",{"skillNo":133,"name":134,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":32},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[134],{"skillNo":139,"name":140,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":144,"publishedAt":32},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[143],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[140],{"skillNo":146,"name":147,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":32},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[147]]