LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Types
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
  • Vitest
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsbackendsStoreBackendOptions
Interface●Since v1.8

StoreBackendOptions

Options for StoreBackend constructor.

Copy
interface StoreBackendOptions

Bases

BackendOptions

Properties

property
fileFormat: "v1" | "v2"

File data format to use for new writes. Defaults to "v2".

property
namespace: string[] | StoreBackendNamespaceFactory<StateT>

Custom namespace for store operations.

Accepts either a static namespace array or a factory that derives the namespace from the current backend context.

If not provided, falls back to legacy assistant-id detection from config metadata, then the injected runtime's assistantId, and finally ["filesystem"].

Copy
// Static namespace
new StoreBackend({
  namespace: ["memories", orgId, userId, "filesystem"],
});

// Dynamic namespace
new StoreBackend({
  namespace: ({ state }) => [
    "memories",
    (state as { userId: string }).userId,
    "filesystem",
  ],
});
property
store: BaseStore

Optional BaseStore for persistent cross-conversation storage

View source on GitHub