LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Configuration
  • 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

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsConfigurationTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsbackendsStateAndStore
Interface●Since v1.4

StateAndStore

Copy
interface StateAndStore

Properties

View source on GitHub
property
assistantId: string
property
state: unknown
property
store: BaseStore

State and store container for backend initialization.

This provides a clean interface for what backends need to access:

  • state: Current agent state (with files, messages, etc.)
  • store: Optional persistent store for cross-conversation data

Different contexts build this differently:

  • Tools: Extract state via getCurrentTaskInput(config)
  • Middleware: Use request.state directly

Optional assistant ID for per-assistant isolation in store

Current agent state with files, messages, etc.

Optional BaseStore for persistent cross-conversation storage