LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
  • Stream
LangGraph SDK
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Server
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
LangGraph Checkpoint Redis
  • Shallow
  • Store
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
  • Cli
LangGraph API
LangGraph CLI
LangGraph CUA
  • Utils
LangGraph Supervisor
LangGraph Swarm
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangGraph
WebChannelsPregelPrebuiltRemoteStream
LangGraph SDK
ClientAuthReactLoggingReact UiServer
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
LangGraph Checkpoint Redis
ShallowStore
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
Cli
LangGraph API
LangGraph CLI
LangGraph CUA
Utils
LangGraph Supervisor
LangGraph Swarm
Language
Theme
JavaScript@langchain/langgraphwebTaskOptions
Interface●Since v1.0

TaskOptions

Options for the task function

Copy
interface TaskOptions

Properties

property
cachePolicy: CachePolicy

The cache policy for the task. Configures how the task should be cached.

property
name: string

The name of the task, analogous to the node name in StateGraph.

property
retry: RetryPolicy

The retry policy for the task. Configures how many times and under what conditions the task should be retried if it fails.

property
timeout: number | TimeoutPolicy

Maximum duration for a single attempt of this task. Accepts a number of milliseconds (a hard wall-clock cap) or a TimeoutPolicy for finer control. When exceeded, a NodeTimeoutError is raised and the task's retry policy (if any) decides whether to retry.

View source on GitHub