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
JavaScriptdeepagentsnodeSkillsMiddlewareOptions
Interface●Since v1.10

SkillsMiddlewareOptions

See More

Options for the skills middleware.

Copy
interface SkillsMiddlewareOptions

Properties

View source on GitHub
property
backend: AnyBackendProtocol | BackendFactory | (config: __type) => StateBackend
property
sources: readonly string[]

Backend instance or factory function for file operations. Use a factory for StateBackend since it requires runtime state.

List of skill source paths to load. Paths must use POSIX conventions (forward slashes). Later sources override earlier ones for skills with the same name (last one wins).

Two formats are accepted for each entry:

  • Parent directory (e.g. "/skills/", "/skills/user/"): the directory is scanned and every subdirectory that contains a SKILL.md is loaded as a separate skill.

  • Direct skill path (e.g. "/skills/my-skill/"): the path points to a single skill directory whose SKILL.md lives at its root. Detected automatically when the directory listing contains a SKILL.md file.

Both formats can be mixed in the same array:

sources: [
  "/skills/",                         // loads all skills in the directory
  "/skills/my-skill/",                // loads a single skill by path
]