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
JavaScriptdeepagentsBackends

Backends

Backends control how deep agents store files and manage state. Choose a backend based on your persistence and isolation requirements.

Learn more: For detailed guidance on choosing and configuring backends, see the Backends documentation.

Classes

Class

StateBackend

Backend that stores files in agent state (ephemeral).

Uses LangGraph's state management and checkpointing. Files persist within a conversation thread but not across threads. State is automatically ch

Class

StoreBackend

Backend that stores files in LangGraph's BaseStore (persistent).

Uses LangGraph's Store for persistent, cross-conversation storage. Files are organized via namespaces and persist across all threads.

Class

FilesystemBackend

Backend that reads and writes files directly from the filesystem.

Files are accessed using their actual filesystem paths. Relative paths are resolved relative to the current working directory. Conten

Class

CompositeBackend

Backend that routes file operations to different backends based on path prefix.

This enables hybrid storage strategies like:

  • /memories/ → StoreBackend (persistent, cross-thread)
  • Everything else
Class

BaseSandbox

Base sandbox implementation with execute() as the only abstract method.

This class provides default implementations for all SandboxBackendProtocol methods using shell commands executed via execute().

Interfaces

Interface

ExecuteResponse

Result of code execution. Simplified schema optimized for LLM consumption.

Interface

FileUploadResponse

Result of a single file upload operation.

Interface

FileDownloadResponse

Result of a single file download operation.

Interface

SandboxBackendProtocol

deprecated
Interface

BackendProtocol

deprecated

Types

Type

BackendFactory

deprecated

Factory function type for creating backend instances.

Backends receive BackendRuntime which contains the current state and runtime information, extracted from the execution context.