LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
LangGraph SDK
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Server
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
  • Store
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
WebChannelsPregelPrebuiltRemote
LangGraph SDK
ClientAuthReactLoggingReact UiServer
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
Store
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/langgraphindexUntrackedValue
Class●Since v0.3

UntrackedValue

Represents a state field whose value is transient and never checkpointed.

Use UntrackedValue for state fields that should be tracked for the lifetime of the process, but should not participate in durable checkpoints or recovery.

Copy
class UntrackedValue

Used in Docs

  • Graph API overview

Example

Copy
// Create an untracked in-memory cache
const cache = new UntrackedValue<Record<string, number>>();

// Use with a type schema for basic runtime validation
import { z } from "zod";
const tempSession = new UntrackedValue(z.object({ token: z.string() }), { guard: false });

// You can customize whether to throw on multiple updates per step:
const session = new UntrackedValue(undefined, { guard: false });

Constructors

constructor
constructor

Properties

property
guard: boolean

Whether to guard against multiple updates to this untracked value in a single step.

  • If true (default), throws an error if multiple updates are received in one step.
  • If false, only the last value from that step is kept, others are ignored.

This helps prevent accidental state replacement within a step.

property
schema: SerializableSchema<Value, Value>

Optional schema describing the type and shape of the value stored in this field.

If provided, this can be used for runtime validation or code generation.

property
ValueType: Value

Methods

method
isInstance→ value is ReducedValue<Value, Input>

Type guard to check if a value is a ReducedValue instance.

View source on GitHub