Skip to content

LangGraph Over Time

As LangGraph.js continues to evolve and improve, breaking changes are sometimes necessary to enhance functionality, performance, or developer experience. This page serves as a guide to the version history of LangGraph.js, documenting significant changes and providing assistance for upgrading between versions.

Version History

v0.3.0 (Latest)

  • (Breaking) Interrupts are now properly propagated in "values" stream mode and in .invoke().
  • (Breaking) Return type of .stream() is now strictly typed.
  • Added support for node / task caching.
  • Added support for deferred nodes.
  • Added support for preModelHook and postModelHook in createReactAgent.
  • Added support for addSequence and shorthand object syntax for addNode.
  • Added pushMessage() method to allow manually pushing messages to "messages" stream mode.
  • Added isInterrupted() method to check if the state contains an interrupt.
  • Numerous bugfixes.

v0.2.0

v0.1.0

  • (Breaking) Changed checkpoint representations to support namespacing for subgraphs and pending writes.
  • (Breaking) MessagesState was changed to MessagesAnnotation.
  • Added Annotation, a more streamlined way to declare state. Removes the need for separate type and channel declarations.
  • Split checkpointer implementations into different libraries for easier inheritance.
  • Major internal architecture refactor to use more robust patterns.
  • Deprecated MessageGraph in favor of StateGraph + MessagesAnnotation.
  • Numerous bugfixes.

Upgrading

When upgrading LangGraph.js, please refer to the specific version sections below for detailed instructions on how to adapt your code to the latest changes.

Upgrading to v0.3.0

  • If a node is interrupted, it will now be present in the "values" stream mode and in .invoke() under the __interrupts key. You can use the isInterrupted() method to check if the state contains an interrupt and handle it appropriately.
  • The return type of .stream() is no longer IterableReadableStream<any>, which means you may need to fix any type errors.

Upgrading to v0.2.0

  • You will now need to install @langchain/core explicitly. See this page for more information.

Upgrading to v0.1.0

  • Old saved checkpoints will no longer be valid, and you will need to update to use a new prebuilt checkpointer.
  • We recommend switching to the new Annotation syntax when declaring graph state.

Deprecation Notices

This section will list any deprecated features or APIs, along with their planned removal dates and recommended alternatives.

MessageGraph

Use MessagesAnnotation with StateGraph.

createFunctionCallingExecutor

Use createReactAgent with a model that supports tool calling.

ToolExecutor

Use ToolNode instead.

Full changelog

For the most up-to-date information on LangGraph.js versions and changes, please refer to our GitHub repository and release notes.