[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C57765B1H1CYN45780WTQA":3,"skill-same:01M6C57765B1H1CYN45780WTQA":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":15,"repositoryHtmlUrl":45,"repositoryHomepageUrl":17,"ownerHtmlUrl":46,"ownerBlogUrl":47,"ownerDescription":17,"updatedAt":48,"install":49,"resources":62},"01M6C57765B1H1CYN45780WTQA","deep-agents-memory","Deep Agents 记忆管理","INVOKE THIS SKILL when your Deep Agent needs memory, persistence, or filesystem access. Covers StateBackend (ephemeral), StoreBackend (persistent), FilesystemMiddleware, and CompositeBackend for routing.","当你的 Deep Agent 需要记忆、持久化或文件系统访问时调用此技能。涵盖 StateBackend（临时）、StoreBackend（持久化）、FilesystemMiddleware 以及用于路由的 CompositeBackend。","CoralShades\u002Facm-ai","CoralShades","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F220297585?v=4","01M6C5211QSJHZ8HXSDDWCR507","Coral Shades AI Agency","01M6C52161FNQDRQ0FRR8DAA9D",0,"MIT",null,"https:\u002F\u002Fgithub.com\u002FCoralShades\u002Facm-ai\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdeep-agents-memory\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发","SCENARIO","使用场景",[31,32,33,34,35,36],"memory","deep agents memory","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","1ca81b0a7de199942400f965edd4d7544077ac5d",".agents\u002Fskills\u002Fdeep-agents-memory","https:\u002F\u002Fgithub.com\u002FCoralShades\u002Facm-ai","https:\u002F\u002Fgithub.com\u002FCoralShades","coralshades.com.au","2026-04-18 00:45:07",{"source":9,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add CoralShades\u002Facm-ai --skill deep-agents-memory",{"tool":55,"command":56},"bunx","bunx skills add CoralShades\u002Facm-ai --skill deep-agents-memory",{"tool":58,"command":59},"pnpm","pnpm dlx skills add CoralShades\u002Facm-ai --skill deep-agents-memory","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCoralShades\u002Facm-ai\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fdeep-agents-memory\u002FSKILL.md",true,[],[64,91,110,129,150,164],{"skillNo":65,"name":66,"nameZh":67,"description":68,"descriptionZh":69,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":70,"categories":71,"keywords":78,"publishedAt":37},"01M6C63HKXA890HHV47WBAX0TB","uncodixfy","前端界面去 AI 化设计","Prevents generic AI\u002FCodex UI patterns when generating frontend code. Use this skill whenever generating HTML, CSS, React, Vue, Svelte, or any frontend UI code to enforce clean, human-designed aesthetics inspired by Linear, Raycast, Stripe, and GitHub instead of typical AI-generated UI.","在生成前端代码时避免出现千篇一律的 AI\u002FCodex UI 模式。每当生成 HTML、CSS、React、Vue、Svelte 或任何前端 UI 代码时使用本技能，以强制采用受 Linear、Raycast、Stripe 和 GitHub 启发的简洁、人工设计的美学，而非典型的 AI 生成界面。","https:\u002F\u002Fgithub.com\u002FCoralShades\u002Facm-ai\u002Fblob\u002Fmain\u002F.qwen\u002Fskills\u002Funcodixfy\u002FSKILL.md",[72,75],{"categoryNo":73,"categoryName":74,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师",{"categoryNo":76,"categoryName":77,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRASNPVNJVQQJ4KZX8XM5D","前端开发与界面实现",[66,79,80,81,82,83,84,85,86,87,88,89,90],"github","frontend","css","codex","react","code","linear","ui","vue","generated","use","html",{"skillNo":92,"name":93,"nameZh":94,"description":95,"descriptionZh":96,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":97,"licenseFileUrl":17,"sourceHtmlUrl":98,"categories":99,"keywords":104,"publishedAt":37},"01M6C63FJ2GEBBGZ5XSMV40KXB","runpodctl","Runpod GPU 工作负载管理","Runpod CLI to manage your GPU workloads.","使用 Runpod CLI 管理你的 GPU 工作负载。","Apache-2.0","https:\u002F\u002Fgithub.com\u002FCoralShades\u002Facm-ai\u002Fblob\u002Fmain\u002F.qwen\u002Fskills\u002Frunpodctl\u002FSKILL.md",[100,103],{"categoryNo":101,"categoryName":102,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRYS21JX3JFDVCQ5GG4TFK","AI 平台资源管理",{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},[93,105,106,107,108,109],"macos","cli","linux","gpu","Bash",{"skillNo":111,"name":112,"nameZh":113,"description":114,"descriptionZh":115,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":116,"categories":117,"keywords":120,"publishedAt":37},"01M6C63DPAV46TFVQ01SFYPJ7X","langgraph-persistence","LangGraph 状态持久化","INVOKE THIS SKILL when your LangGraph needs to persist state, remember conversations, travel through history, or configure subgraph checkpointer scoping. Covers checkpointers, thread_id, time travel, Store, and subgraph persistence modes.","当你的 LangGraph 需要持久化状态、记住对话、回溯历史，或配置子图检查点（checkpointer）作用域时请调用本技能。涵盖检查点、thread_id、时间旅行、Store 与子图持久化模式。","https:\u002F\u002Fgithub.com\u002FCoralShades\u002Facm-ai\u002Fblob\u002Fmain\u002F.qwen\u002Fskills\u002Flanggraph-persistence\u002FSKILL.md",[118,119],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[121,122,34,123,124,125,126,127,128],"langgraph persistence","langgraph","travel","history","scoping","remember","state","configure",{"skillNo":130,"name":131,"nameZh":132,"description":133,"descriptionZh":134,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":135,"categories":136,"keywords":139,"publishedAt":37},"01M6C63BNS9CQEBTB8RNSSBFPA","langgraph-human-in-the-loop","LangGraph 人机协作开发","INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph. Covers interrupt(), Command(resume=...), approval\u002Fvalidation workflows, and the 4-tier error handling strategy.","实现人机协作（human-in-the-loop）模式、暂停等待审批，或处理 LangGraph 中的错误时请调用本技能。涵盖 interrupt()、Command(resume=...)、审批\u002F验证工作流以及 4 层错误处理策略。","https:\u002F\u002Fgithub.com\u002FCoralShades\u002Facm-ai\u002Fblob\u002Fmain\u002F.qwen\u002Fskills\u002Flanggraph-human-in-the-loop\u002FSKILL.md",[137,138],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[140,141,122,142,143,144,145,146,147,148,149],"langgraph human in the loop","loop","workflows","error handling","validation","human-in-the-loop","command","strategy","approval","resume",{"skillNo":151,"name":152,"nameZh":153,"description":154,"descriptionZh":155,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":156,"categories":157,"keywords":160,"publishedAt":37},"01M6C639GVYZFX3NFPV5FBDR4F","langgraph-fundamentals","LangGraph 开发基础","INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.","编写任何 LangGraph 代码时请调用本技能。涵盖 StateGraph、状态模式（state schemas）、节点、边、Command、Send、invoke、流式处理与错误处理。","https:\u002F\u002Fgithub.com\u002FCoralShades\u002Facm-ai\u002Fblob\u002Fmain\u002F.qwen\u002Fskills\u002Flanggraph-fundamentals\u002FSKILL.md",[158,159],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[161,122,143,127,162,163,146,84],"langgraph fundamentals","streaming","writing",{"skillNo":165,"name":166,"nameZh":167,"description":168,"descriptionZh":169,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":170,"categories":171,"keywords":176,"publishedAt":37},"01M6C6375N34YX2GZ3SD3R7XR2","langchain-rag","LangChain RAG开发","INVOKE THIS SKILL when building ANY retrieval-augmented generation (RAG) system. Covers document loaders, RecursiveCharacterTextSplitter, embeddings (OpenAI), and vector stores (Chroma, FAISS, Pinecone).","在构建任何检索增强生成（RAG）系统时调用本技能。涵盖文档加载器、RecursiveCharacterTextSplitter、embeddings（OpenAI）以及向量存储（Chroma、FAISS、Pinecone）。","https:\u002F\u002Fgithub.com\u002FCoralShades\u002Facm-ai\u002Fblob\u002Fmain\u002F.qwen\u002Fskills\u002Flangchain-rag\u002FSKILL.md",[172,173],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":174,"categoryName":175,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C8215FRMSQKF7VRNXVQ0MP","RAG 检索增强开发",[177,178,179,180,181,182,183,184,185,186],"rag","langchain rag","langchain","embeddings","vector","openai","chroma","faiss","vector stores","system"]