Skip to content

Commit

Permalink
feat: Allow checkpointer as an alias to createReactAgent (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 authored Jan 29, 2025
1 parent 0536e83 commit 0baefdc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libs/langgraph/src/prebuilt/react_agent_executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ export type CreateReactAgentParams<
stateSchema?: A;
/** An optional checkpoint saver to persist the agent's state. */
checkpointSaver?: BaseCheckpointSaver;
/** An optional checkpoint saver to persist the agent's state. Alias of "checkpointSaver". */
checkpointer?: BaseCheckpointSaver;
/** An optional list of node names to interrupt before running. */
interruptBefore?: N[] | All;
/** An optional list of node names to interrupt after running. */
Expand Down Expand Up @@ -337,6 +339,7 @@ export function createReactAgent<
stateModifier,
stateSchema,
checkpointSaver,
checkpointer,
interruptBefore,
interruptAfter,
store,
Expand Down Expand Up @@ -465,7 +468,7 @@ export function createReactAgent<
}

return workflow.compile({
checkpointer: checkpointSaver,
checkpointer: checkpointer ?? checkpointSaver,
interruptBefore,
interruptAfter,
store,
Expand Down

0 comments on commit 0baefdc

Please sign in to comment.