Packages

@langchain/langgraph

1.7.5 · 17 Nov 2026MIT5.2M / weekRepositoryHomepagenpmAtom feed

Your version

1.1.2

23 Jan 2026Where it was published

1.7.5 is the newest release of 1.x.

In short

2 new1 fixed

Release note

Patch Changes

  • Fix ConditionalEdgeRouter type rejection

  • Add unified schema support for StateGraph constructor

    • Support mixing AnnotationRoot, Zod schemas, and StateSchema for state, input, and output definitions

    • Add { input, output } only pattern where state is inferred from input schema

    • Add per-node input schema support via addNode options

    • Deprecate stateSchema property in favor of state

    • Simplify constructor overloads with unified StateGraphInit type

  • Add type bag pattern for GraphNode and ConditionalEdgeRouter type utilities.

    New types:

    • GraphNodeTypes<InputSchema, OutputSchema, ContextSchema, Nodes> - Type bag interface for GraphNode

    • GraphNodeReturnValue<Update, Nodes> - Return type helper for node functions

    • ConditionalEdgeRouterTypes<InputSchema, ContextSchema, Nodes> - Type bag interface for ConditionalEdgeRouter

    Usage:

    Both GraphNode and ConditionalEdgeRouter now support two patterns:

    1. Single schema (backward compatible):

      const node: GraphNode<typeof AgentState, MyContext, "agent" | "tool"> = ...
    2. Type bag pattern (new):

      const node: GraphNode<{
        InputSchema: typeof InputSchema;
        OutputSchema: typeof OutputSchema;
        ContextSchema: typeof ContextSchema;
        Nodes: "agent" | "tool";
      }> = (state, runtime) => {
        // state type inferred from InputSchema
        // return type validated against OutputSchema
        // runtime.configurable type inferred from ContextSchema
        return { answer: "response" };
      };

    The type bag pattern enables nodes that receive a subset of state fields and return different fields, with full type safety.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.