@langchain/langgraph 1.0.0-alpha.1 → 1.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/graph/index.js +1 -1
- package/dist/graph/message.cjs +36 -0
- package/dist/graph/message.cjs.map +1 -1
- package/dist/graph/message.d.cts +21 -1
- package/dist/graph/message.d.cts.map +1 -1
- package/dist/graph/message.d.ts +21 -1
- package/dist/graph/message.d.ts.map +1 -1
- package/dist/graph/message.js +36 -1
- package/dist/graph/message.js.map +1 -1
- package/dist/graph/messages_annotation.d.cts.map +1 -1
- package/dist/graph/state.cjs.map +1 -1
- package/dist/graph/state.d.cts +9 -1
- package/dist/graph/state.d.cts.map +1 -1
- package/dist/graph/state.d.ts +9 -1
- package/dist/graph/state.d.ts.map +1 -1
- package/dist/graph/state.js.map +1 -1
- package/dist/graph/zod/zod-registry.d.ts.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/prebuilt/agent_executor.d.ts.map +1 -1
- package/dist/prebuilt/react_agent_executor.d.cts.map +1 -1
- package/dist/prebuilt/react_agent_executor.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zod-registry.d.ts","names":["core","$ZodType","$ZodRegistry","$replace","ReducedZodChannel","SchemaMeta","SchemaMetaRegistry","LanggraphZodMetaRegistry","Meta","Schema","S","
|
|
1
|
+
{"version":3,"file":"zod-registry.d.ts","names":["core","$ZodType","$ZodRegistry","$replace","ReducedZodChannel","SchemaMeta","SchemaMetaRegistry","LanggraphZodMetaRegistry","Meta","Schema","S","_0","Output","Input","$ZodTypeInternals","Internals","output","input","TOutput","TInput","R","TInternals","ZodType","sideEffect","ZodMiniType","registry"],"sources":["../../../src/graph/zod/zod-registry.d.ts"],"sourcesContent":["import type * as core from \"zod/v4/core\";\nimport { $ZodType, $ZodRegistry, $replace } from \"zod/v4/core\";\nimport { type ReducedZodChannel, type SchemaMeta, type SchemaMetaRegistry } from \"./meta.js\";\n/**\n * A Zod v4-compatible meta registry that extends the base registry.\n *\n * This registry allows you to associate and retrieve metadata for Zod schemas,\n * leveraging the base registry for storage. It is compatible with Zod v4 and\n * interoperates with the base registry to ensure consistent metadata management\n * across different Zod versions.\n *\n * @template Meta - The type of metadata associated with each schema.\n * @template Schema - The Zod schema type.\n */\nexport declare class LanggraphZodMetaRegistry<Meta extends SchemaMeta = SchemaMeta, Schema extends $ZodType = $ZodType> extends $ZodRegistry<Meta & {\n [key: string]: unknown;\n}, Schema> {\n protected parent: SchemaMetaRegistry;\n /**\n * Creates a new LanggraphZodMetaRegistry instance.\n *\n * @param parent - The base SchemaMetaRegistry to use for metadata storage.\n */\n constructor(parent: SchemaMetaRegistry);\n add<S extends Schema>(schema: S, ..._meta: undefined extends Meta & {\n [key: string]: unknown;\n } ? [$replace<Meta & {\n [key: string]: unknown;\n }, S>?] : [$replace<Meta & {\n [key: string]: unknown;\n }, S>]): this;\n}\n// Augment the zod/v4 module nudging the `register` method\n// to use the user provided input schema if specified.\ndeclare module \"zod/v4\" {\n interface ZodType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {\n register<R extends LanggraphZodMetaRegistry, TOutput = core.output<this>, TInput = core.input<this>, TInternals extends core.$ZodTypeInternals<TOutput, TInput> = core.$ZodTypeInternals<TOutput, TInput>>(registry: R, meta: SchemaMeta<TOutput, TInput>): ReducedZodChannel<this, ZodType<TOutput, TInput, TInternals>>;\n }\n}\ndeclare module \"zod/v4-mini\" {\n interface ZodMiniType<out Output = unknown, out Input = unknown, out Internals extends core.$ZodTypeInternals<Output, Input> = core.$ZodTypeInternals<Output, Input>> extends core.$ZodType<Output, Input, Internals> {\n register<R extends LanggraphZodMetaRegistry, TOutput = core.output<this>, TInput = core.input<this>, TInternals extends core.$ZodTypeInternals<TOutput, TInput> = core.$ZodTypeInternals<TOutput, TInput>>(registry: R, meta: SchemaMeta<TOutput, TInput>): ReducedZodChannel<this, ZodMiniType<TOutput, TInput, TInternals>>;\n }\n}\nexport declare const registry: LanggraphZodMetaRegistry<SchemaMeta<any, any>, $ZodType<unknown, unknown, core.$ZodTypeInternals<unknown, unknown>>>;\n"],"mappings":";;;;;;;;AAcA;;;;;;;;;AASwBM,cATHC,wBASGD,CAAAA,aATmCD,UASnCC,GATgDD,UAShDC,EAAAA,eAT2EL,QAS3EK,GATsFL,QAStFK,CAAAA,SATwGJ,YASxGI,CATqHE,IASrHF,GAAAA;MACNG,EAAAA,MAAAA,CAAAA,EAAAA,OAAAA;GARfA,MAQ+BC,CAAAA,CAAAA;YAA+BF,MAAAA,EAP3CF,kBAO2CE;;;;;;aAIlDL,CAAAA,MAAAA,EALSG,kBAKTH;KAdiHD,CAAAA,UAU9GO,MAV8GP,CAAAA,CAAAA,MAAAA,EAU9FQ,CAV8FR,EAAAA,GAAAA,KAAAA,EAAAA,SAAAA,SAU/DM,IAV+DN,GAAAA;;EAiB/HS,CAAAA,GAAAA,CALQR,QAKR,CALiBK,IAKjB,GAAA;IAAA,CAAA,GAAA,EAAA,MAAA,CAAA,EAAA,OAAA;KAHME,CAOuGE,CAAAA,CAAAA,CAAAA,GAAAA,CAP/FT,QAO+FS,CAPtFJ,IAOsFI,GAAAA;IAAQC,CAAAA,GAAAA,EAAAA,MAAAA,CAAAA,EAAAA,OAAAA;KAL/GH,CAKgFV,CAAAA,CAAAA,CAAAA,EAAKc,IAAAA;;;;eAAgGF,QAAAA,CAAAA;YAAQC,OAAAA,CAAAA,aAAAA,OAAAA,EAAAA,YAAAA,OAAAA,EAAAA,sBAA7Gb,IAAAA,CAAKc,iBAAwGD,CAAtFD,MAAsFC,EAA9EA,KAA8EA,CAAAA,G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,CAKTD,OALSC,EAKAA,MALAA,CAAAA,GAKUnB,IAAAA,CAAKc,iBALfK,CAKiCD,OALjCC,EAK0CA,MAL1CA,CAAAA,CAAAA,CAAAA,QAAAA,EAK6DC,CAL7DD,EAAAA,IAAAA,EAKsEd,UALtEc,CAKiFD,OALjFC,EAK0FA,MAL1FA,CAAAA,CAAAA,EAKoGf,iBALpGe,CAAAA,IAAAA,EAK4HK,WAL5HL,CAKwID,OALxIC,EAKiJA,MALjJA,EAKyJE,UALzJF,CAAAA,CAAAA;;;AAA0CA,cAQrLM,QARqLN,EAQ3KZ,wBAR2KY,CAQlJd,UARkJc,CAAAA,GAAAA,EAAAA,GAAAA,CAAAA,EAQ5HlB,QAR4HkB,CAAAA,OAAAA,EAAAA,OAAAA,EAQjGnB,IAAAA,CAAKc,iBAR4FK,CAAAA,OAAAA,EAAAA,OAAAA,CAAAA,CAAAA,CAAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -106,6 +106,7 @@ exports.isGraphInterrupt = require_errors.isGraphInterrupt;
|
|
|
106
106
|
exports.isInterrupted = require_constants.isInterrupted;
|
|
107
107
|
exports.isParentCommand = require_errors.isParentCommand;
|
|
108
108
|
exports.messagesStateReducer = require_message.messagesStateReducer;
|
|
109
|
+
exports.pushMessage = require_message.pushMessage;
|
|
109
110
|
exports.task = require_index.task;
|
|
110
111
|
exports.writer = require_writer.writer;
|
|
111
112
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["initializeAsyncLocalStorageSingleton"],"sources":["../src/index.ts"],"sourcesContent":["/* __LC_ALLOW_ENTRYPOINT_SIDE_EFFECTS__ */\n\nimport { initializeAsyncLocalStorageSingleton } from \"./setup/async_local_storage.js\";\n\n// Initialize global async local storage instance for tracing\ninitializeAsyncLocalStorageSingleton();\n\nexport * from \"./web.js\";\n\nexport { interrupt } from \"./interrupt.js\";\nexport { writer } from \"./writer.js\";\nexport { getStore, getWriter, getConfig } from \"./pregel/utils/config.js\";\nexport { getPreviousState } from \"./func/index.js\";\nexport { getCurrentTaskInput } from \"./pregel/utils/config.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAKAA"}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["initializeAsyncLocalStorageSingleton"],"sources":["../src/index.ts"],"sourcesContent":["/* __LC_ALLOW_ENTRYPOINT_SIDE_EFFECTS__ */\n\nimport { initializeAsyncLocalStorageSingleton } from \"./setup/async_local_storage.js\";\n\n// Initialize global async local storage instance for tracing\ninitializeAsyncLocalStorageSingleton();\n\nexport * from \"./web.js\";\n\nexport { interrupt } from \"./interrupt.js\";\nexport { writer } from \"./writer.js\";\nexport { pushMessage } from \"./graph/message.js\";\nexport { getStore, getWriter, getConfig } from \"./pregel/utils/config.js\";\nexport { getPreviousState } from \"./func/index.js\";\nexport { getCurrentTaskInput } from \"./pregel/utils/config.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAKAA"}
|
package/dist/index.d.cts
CHANGED
|
@@ -17,10 +17,10 @@ import { CompiledGraph, Graph } from "./graph/graph.cjs";
|
|
|
17
17
|
import { interrupt } from "./interrupt.cjs";
|
|
18
18
|
import { writer } from "./writer.cjs";
|
|
19
19
|
import { CompiledStateGraph, StateGraph, StateGraphArgs } from "./graph/state.cjs";
|
|
20
|
-
import { MessageGraph, Messages, REMOVE_ALL_MESSAGES, messagesStateReducer } from "./graph/message.cjs";
|
|
20
|
+
import { MessageGraph, Messages, REMOVE_ALL_MESSAGES, messagesStateReducer, pushMessage } from "./graph/message.cjs";
|
|
21
21
|
import { BaseLangGraphError, BaseLangGraphErrorFields, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeInterrupt, ParentCommand, RemoteException, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphInterrupt, isParentCommand } from "./errors.cjs";
|
|
22
22
|
import { EntrypointOptions, TaskOptions, entrypoint, getPreviousState, task } from "./func/index.cjs";
|
|
23
23
|
import { MessagesAnnotation, MessagesZodMeta, MessagesZodState } from "./graph/messages_annotation.cjs";
|
|
24
24
|
import { AsyncBatchedStore, BaseCheckpointSaver, BaseStore, Checkpoint, CheckpointMetadata, CheckpointTuple, GetOperation, InMemoryStore, Item, ListNamespacesOperation, MatchCondition, MemorySaver, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PutOperation, SearchOperation, copyCheckpoint, emptyCheckpoint } from "./web.cjs";
|
|
25
25
|
import { getConfig, getCurrentTaskInput, getStore, getWriter } from "./pregel/utils/config.cjs";
|
|
26
|
-
export { Annotation, AnnotationRoot, AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, BinaryOperator, BinaryOperatorAggregate, Checkpoint, CheckpointMetadata, CheckpointTuple, Command, CommandParams, CompiledGraph, CompiledStateGraph, DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, EntrypointOptions, EphemeralValue, GetOperation, GetStateOptions, Graph, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, Interrupt, InvalidUpdateError, Item, LangGraphRunnableConfig, LastValue, ListNamespacesOperation, MatchCondition, MemorySaver, MessageGraph, Messages, MessagesAnnotation, MessagesZodMeta, MessagesZodState, MultipleChannelSubscriptionOptions, MultipleSubgraphsError, NameSpacePath, NamedBarrierValue, NamespaceMatchType, NodeInterrupt, NodeType, Operation, OperationResults, ParentCommand, Pregel, PregelNode, PregelOptions, PregelParams, PutOperation, REMOVE_ALL_MESSAGES, RemoteException, RetryPolicy, Runtime, START, SearchOperation, Send, SingleChannelSubscriptionOptions, SingleReducer, StateDefinition, StateGraph, StateGraphArgs, StateSnapshot, StateType, StreamMode, StreamOutputMap, TaskOptions, Topic, UnreachableNodeError, UpdateType, WaitForNames, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getConfig, getCurrentTaskInput, getPreviousState, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, messagesStateReducer, task, writer };
|
|
26
|
+
export { Annotation, AnnotationRoot, AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, BinaryOperator, BinaryOperatorAggregate, Checkpoint, CheckpointMetadata, CheckpointTuple, Command, CommandParams, CompiledGraph, CompiledStateGraph, DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, EntrypointOptions, EphemeralValue, GetOperation, GetStateOptions, Graph, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, Interrupt, InvalidUpdateError, Item, LangGraphRunnableConfig, LastValue, ListNamespacesOperation, MatchCondition, MemorySaver, MessageGraph, Messages, MessagesAnnotation, MessagesZodMeta, MessagesZodState, MultipleChannelSubscriptionOptions, MultipleSubgraphsError, NameSpacePath, NamedBarrierValue, NamespaceMatchType, NodeInterrupt, NodeType, Operation, OperationResults, ParentCommand, Pregel, PregelNode, PregelOptions, PregelParams, PutOperation, REMOVE_ALL_MESSAGES, RemoteException, RetryPolicy, Runtime, START, SearchOperation, Send, SingleChannelSubscriptionOptions, SingleReducer, StateDefinition, StateGraph, StateGraphArgs, StateSnapshot, StateType, StreamMode, StreamOutputMap, TaskOptions, Topic, UnreachableNodeError, UpdateType, WaitForNames, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getConfig, getCurrentTaskInput, getPreviousState, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, messagesStateReducer, pushMessage, task, writer };
|
package/dist/index.d.ts
CHANGED
|
@@ -17,10 +17,10 @@ import { CompiledGraph, Graph } from "./graph/graph.js";
|
|
|
17
17
|
import { interrupt } from "./interrupt.js";
|
|
18
18
|
import { writer } from "./writer.js";
|
|
19
19
|
import { CompiledStateGraph, StateGraph, StateGraphArgs } from "./graph/state.js";
|
|
20
|
-
import { MessageGraph, Messages, REMOVE_ALL_MESSAGES, messagesStateReducer } from "./graph/message.js";
|
|
20
|
+
import { MessageGraph, Messages, REMOVE_ALL_MESSAGES, messagesStateReducer, pushMessage } from "./graph/message.js";
|
|
21
21
|
import { BaseLangGraphError, BaseLangGraphErrorFields, EmptyChannelError, EmptyInputError, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, InvalidUpdateError, MultipleSubgraphsError, NodeInterrupt, ParentCommand, RemoteException, UnreachableNodeError, getSubgraphsSeenSet, isGraphBubbleUp, isGraphInterrupt, isParentCommand } from "./errors.js";
|
|
22
22
|
import { EntrypointOptions, TaskOptions, entrypoint, getPreviousState, task } from "./func/index.js";
|
|
23
23
|
import { MessagesAnnotation, MessagesZodMeta, MessagesZodState } from "./graph/messages_annotation.js";
|
|
24
24
|
import { AsyncBatchedStore, BaseCheckpointSaver, BaseStore, Checkpoint, CheckpointMetadata, CheckpointTuple, GetOperation, InMemoryStore, Item, ListNamespacesOperation, MatchCondition, MemorySaver, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PutOperation, SearchOperation, copyCheckpoint, emptyCheckpoint } from "./web.js";
|
|
25
25
|
import { getConfig, getCurrentTaskInput, getStore, getWriter } from "./pregel/utils/config.js";
|
|
26
|
-
export { Annotation, AnnotationRoot, AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, BinaryOperator, BinaryOperatorAggregate, Checkpoint, CheckpointMetadata, CheckpointTuple, Command, CommandParams, CompiledGraph, CompiledStateGraph, DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, EntrypointOptions, EphemeralValue, GetOperation, GetStateOptions, Graph, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, Interrupt, InvalidUpdateError, Item, LangGraphRunnableConfig, LastValue, ListNamespacesOperation, MatchCondition, MemorySaver, MessageGraph, Messages, MessagesAnnotation, MessagesZodMeta, MessagesZodState, MultipleChannelSubscriptionOptions, MultipleSubgraphsError, NameSpacePath, NamedBarrierValue, NamespaceMatchType, NodeInterrupt, NodeType, Operation, OperationResults, ParentCommand, Pregel, PregelNode, PregelOptions, PregelParams, PutOperation, REMOVE_ALL_MESSAGES, RemoteException, RetryPolicy, Runtime, START, SearchOperation, Send, SingleChannelSubscriptionOptions, SingleReducer, StateDefinition, StateGraph, StateGraphArgs, StateSnapshot, StateType, StreamMode, StreamOutputMap, TaskOptions, Topic, UnreachableNodeError, UpdateType, WaitForNames, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getConfig, getCurrentTaskInput, getPreviousState, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, messagesStateReducer, task, writer };
|
|
26
|
+
export { Annotation, AnnotationRoot, AnyValue, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseLangGraphErrorFields, BaseStore, BinaryOperator, BinaryOperatorAggregate, Checkpoint, CheckpointMetadata, CheckpointTuple, Command, CommandParams, CompiledGraph, CompiledStateGraph, DynamicBarrierValue, END, EmptyChannelError, EmptyInputError, EntrypointOptions, EphemeralValue, GetOperation, GetStateOptions, Graph, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, Interrupt, InvalidUpdateError, Item, LangGraphRunnableConfig, LastValue, ListNamespacesOperation, MatchCondition, MemorySaver, MessageGraph, Messages, MessagesAnnotation, MessagesZodMeta, MessagesZodState, MultipleChannelSubscriptionOptions, MultipleSubgraphsError, NameSpacePath, NamedBarrierValue, NamespaceMatchType, NodeInterrupt, NodeType, Operation, OperationResults, ParentCommand, Pregel, PregelNode, PregelOptions, PregelParams, PutOperation, REMOVE_ALL_MESSAGES, RemoteException, RetryPolicy, Runtime, START, SearchOperation, Send, SingleChannelSubscriptionOptions, SingleReducer, StateDefinition, StateGraph, StateGraphArgs, StateSnapshot, StateType, StreamMode, StreamOutputMap, TaskOptions, Topic, UnreachableNodeError, UpdateType, WaitForNames, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getConfig, getCurrentTaskInput, getPreviousState, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, messagesStateReducer, pushMessage, task, writer };
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { getConfig, getCurrentTaskInput, getStore, getWriter } from "./pregel/ut
|
|
|
8
8
|
import { interrupt } from "./interrupt.js";
|
|
9
9
|
import { Graph } from "./graph/graph.js";
|
|
10
10
|
import { CompiledStateGraph, StateGraph } from "./graph/state.js";
|
|
11
|
-
import { MessageGraph, REMOVE_ALL_MESSAGES, messagesStateReducer } from "./graph/message.js";
|
|
11
|
+
import { MessageGraph, REMOVE_ALL_MESSAGES, messagesStateReducer, pushMessage } from "./graph/message.js";
|
|
12
12
|
import { entrypoint, getPreviousState, task } from "./func/index.js";
|
|
13
13
|
import { MessagesAnnotation, MessagesZodMeta, MessagesZodState } from "./graph/messages_annotation.js";
|
|
14
14
|
import { AsyncBatchedStore, BaseCheckpointSaver, BaseStore, InMemoryStore, MemorySaver, copyCheckpoint, emptyCheckpoint } from "./web.js";
|
|
@@ -18,5 +18,5 @@ import { writer } from "./writer.js";
|
|
|
18
18
|
initializeAsyncLocalStorageSingleton();
|
|
19
19
|
|
|
20
20
|
//#endregion
|
|
21
|
-
export { Annotation, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseStore, BinaryOperatorAggregate, Command, CompiledStateGraph, END, EmptyChannelError, EmptyInputError, Graph, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, InvalidUpdateError, MemorySaver, MessageGraph, MessagesAnnotation, MessagesZodMeta, MessagesZodState, MultipleSubgraphsError, NodeInterrupt, ParentCommand, REMOVE_ALL_MESSAGES, RemoteException, START, Send, StateGraph, UnreachableNodeError, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getConfig, getCurrentTaskInput, getPreviousState, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, messagesStateReducer, task, writer };
|
|
21
|
+
export { Annotation, AsyncBatchedStore, BaseChannel, BaseCheckpointSaver, BaseLangGraphError, BaseStore, BinaryOperatorAggregate, Command, CompiledStateGraph, END, EmptyChannelError, EmptyInputError, Graph, GraphBubbleUp, GraphInterrupt, GraphRecursionError, GraphValueError, INTERRUPT, InMemoryStore, InvalidUpdateError, MemorySaver, MessageGraph, MessagesAnnotation, MessagesZodMeta, MessagesZodState, MultipleSubgraphsError, NodeInterrupt, ParentCommand, REMOVE_ALL_MESSAGES, RemoteException, START, Send, StateGraph, UnreachableNodeError, messagesStateReducer as addMessages, copyCheckpoint, emptyCheckpoint, entrypoint, getConfig, getCurrentTaskInput, getPreviousState, getStore, getSubgraphsSeenSet, getWriter, interrupt, isCommand, isGraphBubbleUp, isGraphInterrupt, isInterrupted, isParentCommand, messagesStateReducer, pushMessage, task, writer };
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* __LC_ALLOW_ENTRYPOINT_SIDE_EFFECTS__ */\n\nimport { initializeAsyncLocalStorageSingleton } from \"./setup/async_local_storage.js\";\n\n// Initialize global async local storage instance for tracing\ninitializeAsyncLocalStorageSingleton();\n\nexport * from \"./web.js\";\n\nexport { interrupt } from \"./interrupt.js\";\nexport { writer } from \"./writer.js\";\nexport { getStore, getWriter, getConfig } from \"./pregel/utils/config.js\";\nexport { getPreviousState } from \"./func/index.js\";\nexport { getCurrentTaskInput } from \"./pregel/utils/config.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAKA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/* __LC_ALLOW_ENTRYPOINT_SIDE_EFFECTS__ */\n\nimport { initializeAsyncLocalStorageSingleton } from \"./setup/async_local_storage.js\";\n\n// Initialize global async local storage instance for tracing\ninitializeAsyncLocalStorageSingleton();\n\nexport * from \"./web.js\";\n\nexport { interrupt } from \"./interrupt.js\";\nexport { writer } from \"./writer.js\";\nexport { pushMessage } from \"./graph/message.js\";\nexport { getStore, getWriter, getConfig } from \"./pregel/utils/config.js\";\nexport { getPreviousState } from \"./func/index.js\";\nexport { getCurrentTaskInput } from \"./pregel/utils/config.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAKA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent_executor.d.ts","names":["AgentAction","AgentFinish","BaseMessage","Runnable","Tool","ToolExecutor","BaseChannel","Step","AgentExecutorState","Array","createAgentExecutor","agentRunnable","tools","
|
|
1
|
+
{"version":3,"file":"agent_executor.d.ts","names":["AgentAction","AgentFinish","BaseMessage","Runnable","Tool","ToolExecutor","BaseChannel","Step","AgentExecutorState","Array","createAgentExecutor","agentRunnable","tools","___web_js6","StateDefinition","Partial","CompiledStateGraph"],"sources":["../../src/prebuilt/agent_executor.d.ts"],"sourcesContent":["import { AgentAction, AgentFinish } from \"@langchain/core/agents\";\nimport { BaseMessage } from \"@langchain/core/messages\";\nimport { Runnable } from \"@langchain/core/runnables\";\nimport { Tool } from \"@langchain/core/tools\";\nimport { ToolExecutor } from \"./tool_executor.js\";\nimport type { BaseChannel } from \"../channels/base.js\";\ninterface Step {\n action: AgentAction | AgentFinish;\n observation: unknown;\n}\n/** @ignore */\nexport interface AgentExecutorState {\n agentOutcome?: AgentAction | AgentFinish;\n steps: Array<Step>;\n input: string;\n chatHistory?: BaseMessage[];\n}\n/** @ignore */\nexport declare function createAgentExecutor({ agentRunnable, tools }: {\n agentRunnable: Runnable;\n tools: Array<Tool> | ToolExecutor;\n}): import(\"../web.js\").CompiledStateGraph<{\n agentOutcome?: AgentAction | AgentFinish | undefined;\n steps: Step[];\n input: string;\n chatHistory?: BaseMessage[] | undefined;\n}, {\n agentOutcome?: AgentAction | AgentFinish | undefined;\n steps?: Step[] | undefined;\n input?: string | undefined;\n chatHistory?: BaseMessage[] | undefined;\n}, \"__start__\" | \"action\" | \"agent\", {\n agentOutcome?: BaseChannel<AgentAction | AgentFinish | undefined, AgentAction | AgentFinish | undefined, unknown> | undefined;\n steps: BaseChannel<Step[], Step[], unknown>;\n input: BaseChannel<string, string, unknown>;\n chatHistory?: BaseChannel<BaseMessage[] | undefined, BaseMessage[] | undefined, unknown> | undefined;\n}, {\n agentOutcome?: BaseChannel<AgentAction | AgentFinish | undefined, AgentAction | AgentFinish | undefined, unknown> | undefined;\n steps: BaseChannel<Step[], Step[], unknown>;\n input: BaseChannel<string, string, unknown>;\n chatHistory?: BaseChannel<BaseMessage[] | undefined, BaseMessage[] | undefined, unknown> | undefined;\n}, import(\"../web.js\").StateDefinition, {\n action: Partial<AgentExecutorState>;\n agent: {\n agentOutcome: any;\n };\n}, unknown, unknown>;\nexport {};\n"],"mappings":";;;;;;;;;;UAMUO,IAAAA;UACEP,cAAcC;;;AAF6B;AACzC,UAKGO,kBAAAA,CALH;cACFR,CAAAA,EAKOA,WALPA,GAKqBC,WALrBD;OAAcC,EAMfQ,KANeR,CAMTM,IANSN,CAAAA;;EAITO,WAAAA,CAAAA,EAICN,WAJiB,EAAA;;;AACFD,iBAMTS,mBAAAA,CANST;EAAAA,aAAAA;EAAAA;CAAAA,EAAAA;eAChBM,EAMEJ,QANFI;OAANE,EAOAA,KAPAA,CAOML,IAPNK,CAAAA,GAOcJ,YAPdI;sBAEOP,CAAAA;iBAOCF,cAAcC;EAJTS,KAAAA,EAKbH,IALaG,EAAAA;EAAmB,KA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c,OAVwEd,CAUhEO,kBAVgEP,CAAAA;OAAjEK,EAAAA;IACIC,YAAAA,EAAAA,GAAAA;;UAAZD,EAAAA,OAAAA,CAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react_agent_executor.d.cts","names":["_langchain_core_messages0","_langchain_core_language_models_chat_models0","___web_js1","BaseChatModel","LanguageModelLike","BaseMessage","BaseMessageLike","SystemMessage","Runnable","RunnableToolLike","RunnableSequence","RunnableBinding","RunnableLike","DynamicTool","StructuredToolInterface","InteropZodObject","InteropZodType","All","BaseCheckpointSaver","BaseStore","CompiledStateGraph","AnnotationRoot","MessagesAnnotation","ToolNode","LangGraphRunnableConfig","Runtime","Messages","START","InteropZodToStateDefinition","AgentState","Record","StructuredResponseType","N","StructuredResponseSchemaOptions","ServerTool","ClientTool","ConfigurableModelInterface","Promise","_shouldBindTools","_bindTools","_langchain_core_language_models_base0","BaseLanguageModelInput","AIMessageChunk","BaseChatModelCallOptions","_getModel","Prompt","State","StateModifier","MessageModifier","createReactAgentAnnotation","BinaryOperatorAggregate","T","LastValue","SingleReducer","StateDefinition","S","PreHookAnnotation","AnyAnnotationRoot","ToAnnotationRoot","A","CreateReactAgentParams","C","createReactAgent","StructuredResponseFormat","spec","ReturnType"],"sources":["../../src/prebuilt/react_agent_executor.d.ts"],"sourcesContent":["import { BaseChatModel } from \"@langchain/core/language_models/chat_models\";\nimport { LanguageModelLike } from \"@langchain/core/language_models/base\";\nimport { BaseMessage, BaseMessageLike, SystemMessage } from \"@langchain/core/messages\";\nimport { Runnable, RunnableToolLike, RunnableSequence, RunnableBinding, type RunnableLike } from \"@langchain/core/runnables\";\nimport { DynamicTool, StructuredToolInterface } from \"@langchain/core/tools\";\nimport type { InteropZodObject, InteropZodType } from \"@langchain/core/utils/types\";\nimport { All, BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport { type CompiledStateGraph, AnnotationRoot } from \"../graph/index.js\";\nimport { MessagesAnnotation } from \"../graph/messages_annotation.js\";\nimport { ToolNode } from \"./tool_node.js\";\nimport { LangGraphRunnableConfig, Runtime } from \"../pregel/runnable_types.js\";\nimport { Messages } from \"../graph/message.js\";\nimport { START } from \"../constants.js\";\nimport type { InteropZodToStateDefinition } from \"../graph/zod/meta.js\";\n/**\n * @deprecated `AgentState` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { AgentState } from \"langchain\";`\n */\nexport interface AgentState<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseType extends Record<string, any> = Record<string, any>> {\n messages: BaseMessage[];\n // TODO: This won't be set until we\n // implement managed values in LangGraphJS\n // Will be useful for inserting a message on\n // graph recursion end\n // is_last_step: boolean;\n structuredResponse: StructuredResponseType;\n}\nexport type N = typeof START | \"agent\" | \"tools\";\ntype StructuredResponseSchemaOptions<StructuredResponseType> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n schema: InteropZodType<StructuredResponseType> | Record<string, any>;\n prompt?: string;\n strict?: boolean;\n [key: string]: unknown;\n};\ntype ServerTool = Record<string, unknown>;\ntype ClientTool = StructuredToolInterface | DynamicTool | RunnableToolLike;\ninterface ConfigurableModelInterface {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _queuedMethodOperations: Record<string, any>;\n _model: () => Promise<BaseChatModel>;\n}\nexport declare function _shouldBindTools(llm: LanguageModelLike, tools: (ClientTool | ServerTool)[]): Promise<boolean>;\nexport declare function _bindTools(llm: LanguageModelLike, toolClasses: (ClientTool | ServerTool)[]): Promise<Runnable<import(\"@langchain/core/language_models/base\").BaseLanguageModelInput, import(\"@langchain/core/messages\").AIMessageChunk, import(\"@langchain/core/language_models/chat_models\").BaseChatModelCallOptions> | RunnableBinding<any, any, any> | RunnableSequence<any, any>>;\nexport declare function _getModel(llm: LanguageModelLike | ConfigurableModelInterface): Promise<LanguageModelLike>;\nexport type Prompt = SystemMessage | string | ((state: typeof MessagesAnnotation.State, config: LangGraphRunnableConfig) => BaseMessageLike[]) | ((state: typeof MessagesAnnotation.State, config: LangGraphRunnableConfig) => Promise<BaseMessageLike[]>) | Runnable;\n/** @deprecated Use Prompt instead. */\nexport type StateModifier = Prompt;\n/** @deprecated Use Prompt instead. */\nexport type MessageModifier = SystemMessage | string | ((messages: BaseMessage[]) => BaseMessage[]) | ((messages: BaseMessage[]) => Promise<BaseMessage[]>) | Runnable;\nexport declare const createReactAgentAnnotation: <\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nT extends Record<string, any> = Record<string, any>>() => AnnotationRoot<{\n messages: import(\"../web.js\").BinaryOperatorAggregate<BaseMessage[], Messages>;\n structuredResponse: {\n (): import(\"../web.js\").LastValue<T>;\n (annotation: import(\"../web.js\").SingleReducer<T, T>): import(\"../web.js\").BinaryOperatorAggregate<T, T>;\n Root: <S extends import(\"../web.js\").StateDefinition>(sd: S) => AnnotationRoot<S>;\n };\n}>;\ndeclare const PreHookAnnotation: AnnotationRoot<{\n llmInputMessages: import(\"../web.js\").BinaryOperatorAggregate<BaseMessage[], Messages>;\n}>;\ntype PreHookAnnotation = typeof PreHookAnnotation;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyAnnotationRoot = AnnotationRoot<any>;\ntype ToAnnotationRoot<A extends AnyAnnotationRoot | InteropZodObject> = A extends AnyAnnotationRoot ? A : A extends InteropZodObject ? AnnotationRoot<InteropZodToStateDefinition<A>> : never;\n/**\n * @deprecated `CreateReactAgentParams` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { CreateAgentParams } from \"langchain\";`\n */\nexport type CreateReactAgentParams<A extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseType extends Record<string, any> = Record<string, any>, C extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot> = {\n /** The chat model that can utilize OpenAI-style tool calling. */\n llm: LanguageModelLike | ((state: ToAnnotationRoot<A>[\"State\"] & PreHookAnnotation[\"State\"], runtime: Runtime<ToAnnotationRoot<C>[\"State\"]>) => Promise<LanguageModelLike> | LanguageModelLike);\n /** A list of tools or a ToolNode. */\n tools: ToolNode | (ServerTool | ClientTool)[];\n /**\n * @deprecated Use prompt instead.\n */\n messageModifier?: MessageModifier;\n /**\n * @deprecated Use prompt instead.\n */\n stateModifier?: StateModifier;\n /**\n * An optional prompt for the LLM. This takes full graph state BEFORE the LLM is called and prepares the input to LLM.\n *\n * Can take a few different forms:\n *\n * - str: This is converted to a SystemMessage and added to the beginning of the list of messages in state[\"messages\"].\n * - SystemMessage: this is added to the beginning of the list of messages in state[\"messages\"].\n * - Function: This function should take in full graph state and the output is then passed to the language model.\n * - Runnable: This runnable should take in full graph state and the output is then passed to the language model.\n *\n * Note:\n * Prior to `v0.2.46`, the prompt was set using `stateModifier` / `messagesModifier` parameters.\n * This is now deprecated and will be removed in a future release.\n */\n prompt?: Prompt;\n /**\n * Additional state schema for the agent.\n */\n stateSchema?: A;\n /**\n * An optional schema for the context.\n */\n contextSchema?: C;\n /** An optional checkpoint saver to persist the agent's state. */\n checkpointSaver?: BaseCheckpointSaver | boolean;\n /** An optional checkpoint saver to persist the agent's state. Alias of \"checkpointSaver\". */\n checkpointer?: BaseCheckpointSaver | boolean;\n /** An optional list of node names to interrupt before running. */\n interruptBefore?: N[] | All;\n /** An optional list of node names to interrupt after running. */\n interruptAfter?: N[] | All;\n store?: BaseStore;\n /**\n * An optional schema for the final agent output.\n *\n * If provided, output will be formatted to match the given schema and returned in the 'structuredResponse' state key.\n * If not provided, `structuredResponse` will not be present in the output state.\n *\n * Can be passed in as:\n * - Zod schema\n * - JSON schema\n * - { prompt, schema }, where schema is one of the above.\n * The prompt will be used together with the model that is being used to generate the structured response.\n *\n * @remarks\n * **Important**: `responseFormat` requires the model to support `.withStructuredOutput()`.\n *\n * **Note**: The graph will make a separate call to the LLM to generate the structured response after the agent loop is finished.\n * This is not the only strategy to get structured responses, see more options in [this guide](https://langchain-ai.github.io/langgraph/how-tos/react-agent-structured-output/).\n */\n responseFormat?: InteropZodType<StructuredResponseType> | StructuredResponseSchemaOptions<StructuredResponseType>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | Record<string, any>;\n /**\n * An optional name for the agent.\n */\n name?: string;\n /**\n * An optional description for the agent.\n * This can be used to describe the agent to the underlying supervisor LLM.\n */\n description?: string | undefined;\n /**\n * Use to specify how to expose the agent name to the underlying supervisor LLM.\n \n - undefined: Relies on the LLM provider {@link AIMessage#name}. Currently, only OpenAI supports this.\n - `\"inline\"`: Add the agent name directly into the content field of the {@link AIMessage} using XML-style tags.\n Example: `\"How can I help you\"` -> `\"<name>agent_name</name><content>How can I help you?</content>\"`\n */\n includeAgentName?: \"inline\" | undefined;\n /**\n * An optional node to add before the `agent` node (i.e., the node that calls the LLM).\n * Useful for managing long message histories (e.g., message trimming, summarization, etc.).\n */\n preModelHook?: RunnableLike<ToAnnotationRoot<A>[\"State\"] & PreHookAnnotation[\"State\"], ToAnnotationRoot<A>[\"Update\"] & PreHookAnnotation[\"Update\"], LangGraphRunnableConfig>;\n /**\n * An optional node to add after the `agent` node (i.e., the node that calls the LLM).\n * Useful for implementing human-in-the-loop, guardrails, validation, or other post-processing.\n */\n postModelHook?: RunnableLike<ToAnnotationRoot<A>[\"State\"], ToAnnotationRoot<A>[\"Update\"], LangGraphRunnableConfig>;\n /**\n * Determines the version of the graph to create.\n *\n * Can be one of\n * - `\"v1\"`: The tool node processes a single message. All tool calls in the message are\n * executed in parallel within the tool node.\n * - `\"v2\"`: The tool node processes a single tool call. Tool calls are distributed across\n * multiple instances of the tool node using the Send API.\n *\n * @default `\"v1\"`\n */\n version?: \"v1\" | \"v2\";\n};\n/**\n * @deprecated `createReactAgent` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { createAgent } from \"langchain\";`\n *\n * Creates a StateGraph agent that relies on a chat model utilizing tool calling.\n *\n * @example\n * ```ts\n * import { ChatOpenAI } from \"@langchain/openai\";\n * import { tool } from \"@langchain/core/tools\";\n * import { z } from \"zod\";\n * import { createReactAgent } from \"@langchain/langgraph/prebuilt\";\n *\n * const model = new ChatOpenAI({\n * model: \"gpt-4o\",\n * });\n *\n * const getWeather = tool((input) => {\n * if ([\"sf\", \"san francisco\"].includes(input.location.toLowerCase())) {\n * return \"It's 60 degrees and foggy.\";\n * } else {\n * return \"It's 90 degrees and sunny.\";\n * }\n * }, {\n * name: \"get_weather\",\n * description: \"Call to get the current weather.\",\n * schema: z.object({\n * location: z.string().describe(\"Location to get the weather for.\"),\n * })\n * })\n *\n * const agent = createReactAgent({ llm: model, tools: [getWeather] });\n *\n * const inputs = {\n * messages: [{ role: \"user\", content: \"what is the weather in SF?\" }],\n * };\n *\n * const stream = await agent.stream(inputs, { streamMode: \"values\" });\n *\n * for await (const { messages } of stream) {\n * console.log(messages);\n * }\n * // Returns the messages in the state at each step of execution\n * ```\n */\nexport declare function createReactAgent<A extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseFormat extends Record<string, any> = Record<string, any>, C extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateReactAgentParams<A, StructuredResponseFormat, C>): CompiledStateGraph<ToAnnotationRoot<A>[\"State\"], ToAnnotationRoot<A>[\"Update\"], \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nany, typeof MessagesAnnotation.spec & ToAnnotationRoot<A>[\"spec\"], ReturnType<typeof createReactAgentAnnotation<StructuredResponseFormat>>[\"spec\"] & ToAnnotationRoot<A>[\"spec\"]>;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkBiB6B,UAAAA,UAAU;;+BAEIC,MAAAA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,GAAsBA,MAAtBA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,CAAAA,CAAAA;UAAsBA,EACvCzB,WADuCyB,EAAAA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BA6DqDD,CA7DpCE,CA6DoCF,CAAAA,CAAAA,OAAAA,CAAAA,EA7DvBC,gBA6DuBD,CA7DNE,CA6DMF,CAAAA,CAAAA,QAAAA,CAAAA,EA7DQjC,uBA6DRiC,CAAAA;;;;;;;;;;;;SAE/BE,CAAAA,EAAAA,IAAAA,GAAAA,IAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAJ/BG,2BAA2BL,oBAAoB1C,0BAA0BO;;iCAEhEQ,sBAAsBA,+BAA+B2B,oBAAoB1C,mBAAmB0C,2BAA2BG,uBAAuBD,GAAGI,0BAA0BF,KAAKzC,mBAAmBsC,iBAAiBC,aAAaD,iBAAiBC;;YAEvQrC,kBAAAA,CAAmB0C,OAAON,iBAAiBC,YAAYM,kBAAkBhB,2BAA2Bc,qCAAqCL,iBAAiBC"}
|
|
1
|
+
{"version":3,"file":"react_agent_executor.d.cts","names":["_langchain_core_messages0","_langchain_core_language_models_chat_models0","___web_js2","BaseChatModel","LanguageModelLike","BaseMessage","BaseMessageLike","SystemMessage","Runnable","RunnableToolLike","RunnableSequence","RunnableBinding","RunnableLike","DynamicTool","StructuredToolInterface","InteropZodObject","InteropZodType","All","BaseCheckpointSaver","BaseStore","CompiledStateGraph","AnnotationRoot","MessagesAnnotation","ToolNode","LangGraphRunnableConfig","Runtime","Messages","START","InteropZodToStateDefinition","AgentState","Record","StructuredResponseType","N","StructuredResponseSchemaOptions","ServerTool","ClientTool","ConfigurableModelInterface","Promise","_shouldBindTools","_bindTools","_langchain_core_language_models_base0","BaseLanguageModelInput","AIMessageChunk","BaseChatModelCallOptions","_getModel","Prompt","State","StateModifier","MessageModifier","createReactAgentAnnotation","BinaryOperatorAggregate","T","LastValue","SingleReducer","StateDefinition","S","PreHookAnnotation","AnyAnnotationRoot","ToAnnotationRoot","A","CreateReactAgentParams","C","createReactAgent","StructuredResponseFormat","spec","ReturnType"],"sources":["../../src/prebuilt/react_agent_executor.d.ts"],"sourcesContent":["import { BaseChatModel } from \"@langchain/core/language_models/chat_models\";\nimport { LanguageModelLike } from \"@langchain/core/language_models/base\";\nimport { BaseMessage, BaseMessageLike, SystemMessage } from \"@langchain/core/messages\";\nimport { Runnable, RunnableToolLike, RunnableSequence, RunnableBinding, type RunnableLike } from \"@langchain/core/runnables\";\nimport { DynamicTool, StructuredToolInterface } from \"@langchain/core/tools\";\nimport type { InteropZodObject, InteropZodType } from \"@langchain/core/utils/types\";\nimport { All, BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport { type CompiledStateGraph, AnnotationRoot } from \"../graph/index.js\";\nimport { MessagesAnnotation } from \"../graph/messages_annotation.js\";\nimport { ToolNode } from \"./tool_node.js\";\nimport { LangGraphRunnableConfig, Runtime } from \"../pregel/runnable_types.js\";\nimport { Messages } from \"../graph/message.js\";\nimport { START } from \"../constants.js\";\nimport type { InteropZodToStateDefinition } from \"../graph/zod/meta.js\";\n/**\n * @deprecated `AgentState` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { AgentState } from \"langchain\";`\n */\nexport interface AgentState<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseType extends Record<string, any> = Record<string, any>> {\n messages: BaseMessage[];\n // TODO: This won't be set until we\n // implement managed values in LangGraphJS\n // Will be useful for inserting a message on\n // graph recursion end\n // is_last_step: boolean;\n structuredResponse: StructuredResponseType;\n}\nexport type N = typeof START | \"agent\" | \"tools\";\ntype StructuredResponseSchemaOptions<StructuredResponseType> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n schema: InteropZodType<StructuredResponseType> | Record<string, any>;\n prompt?: string;\n strict?: boolean;\n [key: string]: unknown;\n};\ntype ServerTool = Record<string, unknown>;\ntype ClientTool = StructuredToolInterface | DynamicTool | RunnableToolLike;\ninterface ConfigurableModelInterface {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _queuedMethodOperations: Record<string, any>;\n _model: () => Promise<BaseChatModel>;\n}\nexport declare function _shouldBindTools(llm: LanguageModelLike, tools: (ClientTool | ServerTool)[]): Promise<boolean>;\nexport declare function _bindTools(llm: LanguageModelLike, toolClasses: (ClientTool | ServerTool)[]): Promise<Runnable<import(\"@langchain/core/language_models/base\").BaseLanguageModelInput, import(\"@langchain/core/messages\").AIMessageChunk, import(\"@langchain/core/language_models/chat_models\").BaseChatModelCallOptions> | RunnableBinding<any, any, any> | RunnableSequence<any, any>>;\nexport declare function _getModel(llm: LanguageModelLike | ConfigurableModelInterface): Promise<LanguageModelLike>;\nexport type Prompt = SystemMessage | string | ((state: typeof MessagesAnnotation.State, config: LangGraphRunnableConfig) => BaseMessageLike[]) | ((state: typeof MessagesAnnotation.State, config: LangGraphRunnableConfig) => Promise<BaseMessageLike[]>) | Runnable;\n/** @deprecated Use Prompt instead. */\nexport type StateModifier = Prompt;\n/** @deprecated Use Prompt instead. */\nexport type MessageModifier = SystemMessage | string | ((messages: BaseMessage[]) => BaseMessage[]) | ((messages: BaseMessage[]) => Promise<BaseMessage[]>) | Runnable;\nexport declare const createReactAgentAnnotation: <\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nT extends Record<string, any> = Record<string, any>>() => AnnotationRoot<{\n messages: import(\"../web.js\").BinaryOperatorAggregate<BaseMessage[], Messages>;\n structuredResponse: {\n (): import(\"../web.js\").LastValue<T>;\n (annotation: import(\"../web.js\").SingleReducer<T, T>): import(\"../web.js\").BinaryOperatorAggregate<T, T>;\n Root: <S extends import(\"../web.js\").StateDefinition>(sd: S) => AnnotationRoot<S>;\n };\n}>;\ndeclare const PreHookAnnotation: AnnotationRoot<{\n llmInputMessages: import(\"../web.js\").BinaryOperatorAggregate<BaseMessage[], Messages>;\n}>;\ntype PreHookAnnotation = typeof PreHookAnnotation;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyAnnotationRoot = AnnotationRoot<any>;\ntype ToAnnotationRoot<A extends AnyAnnotationRoot | InteropZodObject> = A extends AnyAnnotationRoot ? A : A extends InteropZodObject ? AnnotationRoot<InteropZodToStateDefinition<A>> : never;\n/**\n * @deprecated `CreateReactAgentParams` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { CreateAgentParams } from \"langchain\";`\n */\nexport type CreateReactAgentParams<A extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseType extends Record<string, any> = Record<string, any>, C extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot> = {\n /** The chat model that can utilize OpenAI-style tool calling. */\n llm: LanguageModelLike | ((state: ToAnnotationRoot<A>[\"State\"] & PreHookAnnotation[\"State\"], runtime: Runtime<ToAnnotationRoot<C>[\"State\"]>) => Promise<LanguageModelLike> | LanguageModelLike);\n /** A list of tools or a ToolNode. */\n tools: ToolNode | (ServerTool | ClientTool)[];\n /**\n * @deprecated Use prompt instead.\n */\n messageModifier?: MessageModifier;\n /**\n * @deprecated Use prompt instead.\n */\n stateModifier?: StateModifier;\n /**\n * An optional prompt for the LLM. This takes full graph state BEFORE the LLM is called and prepares the input to LLM.\n *\n * Can take a few different forms:\n *\n * - str: This is converted to a SystemMessage and added to the beginning of the list of messages in state[\"messages\"].\n * - SystemMessage: this is added to the beginning of the list of messages in state[\"messages\"].\n * - Function: This function should take in full graph state and the output is then passed to the language model.\n * - Runnable: This runnable should take in full graph state and the output is then passed to the language model.\n *\n * Note:\n * Prior to `v0.2.46`, the prompt was set using `stateModifier` / `messagesModifier` parameters.\n * This is now deprecated and will be removed in a future release.\n */\n prompt?: Prompt;\n /**\n * Additional state schema for the agent.\n */\n stateSchema?: A;\n /**\n * An optional schema for the context.\n */\n contextSchema?: C;\n /** An optional checkpoint saver to persist the agent's state. */\n checkpointSaver?: BaseCheckpointSaver | boolean;\n /** An optional checkpoint saver to persist the agent's state. Alias of \"checkpointSaver\". */\n checkpointer?: BaseCheckpointSaver | boolean;\n /** An optional list of node names to interrupt before running. */\n interruptBefore?: N[] | All;\n /** An optional list of node names to interrupt after running. */\n interruptAfter?: N[] | All;\n store?: BaseStore;\n /**\n * An optional schema for the final agent output.\n *\n * If provided, output will be formatted to match the given schema and returned in the 'structuredResponse' state key.\n * If not provided, `structuredResponse` will not be present in the output state.\n *\n * Can be passed in as:\n * - Zod schema\n * - JSON schema\n * - { prompt, schema }, where schema is one of the above.\n * The prompt will be used together with the model that is being used to generate the structured response.\n *\n * @remarks\n * **Important**: `responseFormat` requires the model to support `.withStructuredOutput()`.\n *\n * **Note**: The graph will make a separate call to the LLM to generate the structured response after the agent loop is finished.\n * This is not the only strategy to get structured responses, see more options in [this guide](https://langchain-ai.github.io/langgraph/how-tos/react-agent-structured-output/).\n */\n responseFormat?: InteropZodType<StructuredResponseType> | StructuredResponseSchemaOptions<StructuredResponseType>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | Record<string, any>;\n /**\n * An optional name for the agent.\n */\n name?: string;\n /**\n * An optional description for the agent.\n * This can be used to describe the agent to the underlying supervisor LLM.\n */\n description?: string | undefined;\n /**\n * Use to specify how to expose the agent name to the underlying supervisor LLM.\n \n - undefined: Relies on the LLM provider {@link AIMessage#name}. Currently, only OpenAI supports this.\n - `\"inline\"`: Add the agent name directly into the content field of the {@link AIMessage} using XML-style tags.\n Example: `\"How can I help you\"` -> `\"<name>agent_name</name><content>How can I help you?</content>\"`\n */\n includeAgentName?: \"inline\" | undefined;\n /**\n * An optional node to add before the `agent` node (i.e., the node that calls the LLM).\n * Useful for managing long message histories (e.g., message trimming, summarization, etc.).\n */\n preModelHook?: RunnableLike<ToAnnotationRoot<A>[\"State\"] & PreHookAnnotation[\"State\"], ToAnnotationRoot<A>[\"Update\"] & PreHookAnnotation[\"Update\"], LangGraphRunnableConfig>;\n /**\n * An optional node to add after the `agent` node (i.e., the node that calls the LLM).\n * Useful for implementing human-in-the-loop, guardrails, validation, or other post-processing.\n */\n postModelHook?: RunnableLike<ToAnnotationRoot<A>[\"State\"], ToAnnotationRoot<A>[\"Update\"], LangGraphRunnableConfig>;\n /**\n * Determines the version of the graph to create.\n *\n * Can be one of\n * - `\"v1\"`: The tool node processes a single message. All tool calls in the message are\n * executed in parallel within the tool node.\n * - `\"v2\"`: The tool node processes a single tool call. Tool calls are distributed across\n * multiple instances of the tool node using the Send API.\n *\n * @default `\"v1\"`\n */\n version?: \"v1\" | \"v2\";\n};\n/**\n * @deprecated `createReactAgent` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { createAgent } from \"langchain\";`\n *\n * Creates a StateGraph agent that relies on a chat model utilizing tool calling.\n *\n * @example\n * ```ts\n * import { ChatOpenAI } from \"@langchain/openai\";\n * import { tool } from \"@langchain/core/tools\";\n * import { z } from \"zod\";\n * import { createReactAgent } from \"@langchain/langgraph/prebuilt\";\n *\n * const model = new ChatOpenAI({\n * model: \"gpt-4o\",\n * });\n *\n * const getWeather = tool((input) => {\n * if ([\"sf\", \"san francisco\"].includes(input.location.toLowerCase())) {\n * return \"It's 60 degrees and foggy.\";\n * } else {\n * return \"It's 90 degrees and sunny.\";\n * }\n * }, {\n * name: \"get_weather\",\n * description: \"Call to get the current weather.\",\n * schema: z.object({\n * location: z.string().describe(\"Location to get the weather for.\"),\n * })\n * })\n *\n * const agent = createReactAgent({ llm: model, tools: [getWeather] });\n *\n * const inputs = {\n * messages: [{ role: \"user\", content: \"what is the weather in SF?\" }],\n * };\n *\n * const stream = await agent.stream(inputs, { streamMode: \"values\" });\n *\n * for await (const { messages } of stream) {\n * console.log(messages);\n * }\n * // Returns the messages in the state at each step of execution\n * ```\n */\nexport declare function createReactAgent<A extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseFormat extends Record<string, any> = Record<string, any>, C extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateReactAgentParams<A, StructuredResponseFormat, C>): CompiledStateGraph<ToAnnotationRoot<A>[\"State\"], ToAnnotationRoot<A>[\"Update\"], \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nany, typeof MessagesAnnotation.spec & ToAnnotationRoot<A>[\"spec\"], ReturnType<typeof createReactAgentAnnotation<StructuredResponseFormat>>[\"spec\"] & ToAnnotationRoot<A>[\"spec\"]>;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkBiB6B,UAAAA,UAAU;;+BAEIC,MAAAA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,GAAsBA,MAAtBA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,CAAAA,CAAAA;UAAsBA,EACvCzB,WADuCyB,EAAAA;;;;EASzCE;EACPC;EAA+B,kBAAA,EAHZF,sBAGY;;AAExBf,KAHAgB,CAAAA,GAGAhB,OAHWW,KAGXX,GAAAA,OAAAA,GAAAA,OAAAA;KAFPiB,+BAEgDH,CAAAA,sBAAAA,CAAAA,GAAAA;;EAKhDI,MAAAA,EALOlB,cAKG,CALYe,sBAKTD,CAAAA,GALmCA,MAKnCA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;EACbK,MAAAA,CAAAA,EAAAA,MAAU;EAAA,MAAA,CAAA,EAAA,OAAA;MAAGrB,EAAAA,MAAAA,CAAAA,EAAAA,OAAAA;;KADboB,UAAAA,GAAaJ,MACwCrB,CAAAA,MAAAA,EAAAA,OAAAA,CAAAA;KAArD0B,UAAAA,GAAarB,0BAA0BD,cAAcJ;AAS6KH,KAA3NuC,MAAAA,GAAStC,aAAkND,GAAAA,MAAAA,GAAAA,CAAAA,CAAAA,KAAAA,EAAAA,OAAzKgB,kBAAAA,CAAmBwB,KAAsJxC,EAAAA,MAAAA,EAAvIkB,uBAAuIlB,EAAAA,GAA3GA,eAA2GA,EAAAA,CAAAA,GAAAA,CAAAA,CAAAA,KAAAA,EAAAA,OAAtEgB,kBAAAA,CAAmBwB,KAAmDxC,EAAAA,MAAAA,EAApCkB,uBAAoClB,EAAAA,GAAR+B,OAAQ/B,CAAAA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AAA;;;;;;;kBAKGlC,CAAAA,EAAAA,QAAAA,GAAAA,SAAAA;;;AA2D9F;;cAAmDiC,CAAAA,EAhEhC7C,YAgEgC6C,CAhEnBC,gBAgEmBD,CAhEFE,CAgEEF,CAAAA,CAAAA,OAAAA,CAAAA,GAhEYD,iBAgEZC,CAAAA,OAAAA,CAAAA,EAhEwCC,gBAgExCD,CAhEyDE,CAgEzDF,CAAAA,CAAAA,QAAAA,CAAAA,GAhEwED,iBAgExEC,CAAAA,QAAAA,CAAAA,EAhEqGjC,uBAgErGiC,CAAAA;;;;;eAEmCA,CAAAA,EA7DlE7C,YA6DkE6C,CA7DrDC,gBA6DqDD,CA7DpCE,CA6DoCF,CAAAA,CAAAA,OAAAA,CAAAA,EA7DvBC,gBA6DuBD,CA7DNE,CA6DMF,CAAAA,CAAAA,QAAAA,CAAAA,EA7DQjC,uBA6DRiC,CAAAA;;;;;;;;;;;;SAE/BE,CAAAA,EAAAA,IAAAA,GAAAA,IAAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAJ/BG,2BAA2BL,oBAAoB1C,0BAA0BO;;iCAEhEQ,sBAAsBA,+BAA+B2B,oBAAoB1C,mBAAmB0C,2BAA2BG,uBAAuBD,GAAGI,0BAA0BF,KAAKzC,mBAAmBsC,iBAAiBC,aAAaD,iBAAiBC;;YAEvQrC,kBAAAA,CAAmB0C,OAAON,iBAAiBC,YAAYM,kBAAkBhB,2BAA2Bc,qCAAqCL,iBAAiBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react_agent_executor.d.ts","names":["_langchain_core_messages0","_langchain_core_language_models_chat_models0","___web_js2","BaseChatModel","LanguageModelLike","BaseMessage","BaseMessageLike","SystemMessage","Runnable","RunnableToolLike","RunnableSequence","RunnableBinding","RunnableLike","DynamicTool","StructuredToolInterface","InteropZodObject","InteropZodType","All","BaseCheckpointSaver","BaseStore","CompiledStateGraph","AnnotationRoot","MessagesAnnotation","ToolNode","LangGraphRunnableConfig","Runtime","Messages","START","InteropZodToStateDefinition","AgentState","Record","StructuredResponseType","N","StructuredResponseSchemaOptions","ServerTool","ClientTool","ConfigurableModelInterface","Promise","_shouldBindTools","_bindTools","_langchain_core_language_models_base0","BaseLanguageModelInput","AIMessageChunk","BaseChatModelCallOptions","_getModel","Prompt","State","StateModifier","MessageModifier","createReactAgentAnnotation","BinaryOperatorAggregate","T","LastValue","SingleReducer","StateDefinition","S","PreHookAnnotation","AnyAnnotationRoot","ToAnnotationRoot","A","CreateReactAgentParams","C","createReactAgent","StructuredResponseFormat","spec","ReturnType"],"sources":["../../src/prebuilt/react_agent_executor.d.ts"],"sourcesContent":["import { BaseChatModel } from \"@langchain/core/language_models/chat_models\";\nimport { LanguageModelLike } from \"@langchain/core/language_models/base\";\nimport { BaseMessage, BaseMessageLike, SystemMessage } from \"@langchain/core/messages\";\nimport { Runnable, RunnableToolLike, RunnableSequence, RunnableBinding, type RunnableLike } from \"@langchain/core/runnables\";\nimport { DynamicTool, StructuredToolInterface } from \"@langchain/core/tools\";\nimport type { InteropZodObject, InteropZodType } from \"@langchain/core/utils/types\";\nimport { All, BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport { type CompiledStateGraph, AnnotationRoot } from \"../graph/index.js\";\nimport { MessagesAnnotation } from \"../graph/messages_annotation.js\";\nimport { ToolNode } from \"./tool_node.js\";\nimport { LangGraphRunnableConfig, Runtime } from \"../pregel/runnable_types.js\";\nimport { Messages } from \"../graph/message.js\";\nimport { START } from \"../constants.js\";\nimport type { InteropZodToStateDefinition } from \"../graph/zod/meta.js\";\n/**\n * @deprecated `AgentState` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { AgentState } from \"langchain\";`\n */\nexport interface AgentState<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseType extends Record<string, any> = Record<string, any>> {\n messages: BaseMessage[];\n // TODO: This won't be set until we\n // implement managed values in LangGraphJS\n // Will be useful for inserting a message on\n // graph recursion end\n // is_last_step: boolean;\n structuredResponse: StructuredResponseType;\n}\nexport type N = typeof START | \"agent\" | \"tools\";\ntype StructuredResponseSchemaOptions<StructuredResponseType> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n schema: InteropZodType<StructuredResponseType> | Record<string, any>;\n prompt?: string;\n strict?: boolean;\n [key: string]: unknown;\n};\ntype ServerTool = Record<string, unknown>;\ntype ClientTool = StructuredToolInterface | DynamicTool | RunnableToolLike;\ninterface ConfigurableModelInterface {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _queuedMethodOperations: Record<string, any>;\n _model: () => Promise<BaseChatModel>;\n}\nexport declare function _shouldBindTools(llm: LanguageModelLike, tools: (ClientTool | ServerTool)[]): Promise<boolean>;\nexport declare function _bindTools(llm: LanguageModelLike, toolClasses: (ClientTool | ServerTool)[]): Promise<Runnable<import(\"@langchain/core/language_models/base\").BaseLanguageModelInput, import(\"@langchain/core/messages\").AIMessageChunk, import(\"@langchain/core/language_models/chat_models\").BaseChatModelCallOptions> | RunnableBinding<any, any, any> | RunnableSequence<any, any>>;\nexport declare function _getModel(llm: LanguageModelLike | ConfigurableModelInterface): Promise<LanguageModelLike>;\nexport type Prompt = SystemMessage | string | ((state: typeof MessagesAnnotation.State, config: LangGraphRunnableConfig) => BaseMessageLike[]) | ((state: typeof MessagesAnnotation.State, config: LangGraphRunnableConfig) => Promise<BaseMessageLike[]>) | Runnable;\n/** @deprecated Use Prompt instead. */\nexport type StateModifier = Prompt;\n/** @deprecated Use Prompt instead. */\nexport type MessageModifier = SystemMessage | string | ((messages: BaseMessage[]) => BaseMessage[]) | ((messages: BaseMessage[]) => Promise<BaseMessage[]>) | Runnable;\nexport declare const createReactAgentAnnotation: <\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nT extends Record<string, any> = Record<string, any>>() => AnnotationRoot<{\n messages: import(\"../web.js\").BinaryOperatorAggregate<BaseMessage[], Messages>;\n structuredResponse: {\n (): import(\"../web.js\").LastValue<T>;\n (annotation: import(\"../web.js\").SingleReducer<T, T>): import(\"../web.js\").BinaryOperatorAggregate<T, T>;\n Root: <S extends import(\"../web.js\").StateDefinition>(sd: S) => AnnotationRoot<S>;\n };\n}>;\ndeclare const PreHookAnnotation: AnnotationRoot<{\n llmInputMessages: import(\"../web.js\").BinaryOperatorAggregate<BaseMessage[], Messages>;\n}>;\ntype PreHookAnnotation = typeof PreHookAnnotation;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyAnnotationRoot = AnnotationRoot<any>;\ntype ToAnnotationRoot<A extends AnyAnnotationRoot | InteropZodObject> = A extends AnyAnnotationRoot ? A : A extends InteropZodObject ? AnnotationRoot<InteropZodToStateDefinition<A>> : never;\n/**\n * @deprecated `CreateReactAgentParams` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { CreateAgentParams } from \"langchain\";`\n */\nexport type CreateReactAgentParams<A extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseType extends Record<string, any> = Record<string, any>, C extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot> = {\n /** The chat model that can utilize OpenAI-style tool calling. */\n llm: LanguageModelLike | ((state: ToAnnotationRoot<A>[\"State\"] & PreHookAnnotation[\"State\"], runtime: Runtime<ToAnnotationRoot<C>[\"State\"]>) => Promise<LanguageModelLike> | LanguageModelLike);\n /** A list of tools or a ToolNode. */\n tools: ToolNode | (ServerTool | ClientTool)[];\n /**\n * @deprecated Use prompt instead.\n */\n messageModifier?: MessageModifier;\n /**\n * @deprecated Use prompt instead.\n */\n stateModifier?: StateModifier;\n /**\n * An optional prompt for the LLM. This takes full graph state BEFORE the LLM is called and prepares the input to LLM.\n *\n * Can take a few different forms:\n *\n * - str: This is converted to a SystemMessage and added to the beginning of the list of messages in state[\"messages\"].\n * - SystemMessage: this is added to the beginning of the list of messages in state[\"messages\"].\n * - Function: This function should take in full graph state and the output is then passed to the language model.\n * - Runnable: This runnable should take in full graph state and the output is then passed to the language model.\n *\n * Note:\n * Prior to `v0.2.46`, the prompt was set using `stateModifier` / `messagesModifier` parameters.\n * This is now deprecated and will be removed in a future release.\n */\n prompt?: Prompt;\n /**\n * Additional state schema for the agent.\n */\n stateSchema?: A;\n /**\n * An optional schema for the context.\n */\n contextSchema?: C;\n /** An optional checkpoint saver to persist the agent's state. */\n checkpointSaver?: BaseCheckpointSaver | boolean;\n /** An optional checkpoint saver to persist the agent's state. Alias of \"checkpointSaver\". */\n checkpointer?: BaseCheckpointSaver | boolean;\n /** An optional list of node names to interrupt before running. */\n interruptBefore?: N[] | All;\n /** An optional list of node names to interrupt after running. */\n interruptAfter?: N[] | All;\n store?: BaseStore;\n /**\n * An optional schema for the final agent output.\n *\n * If provided, output will be formatted to match the given schema and returned in the 'structuredResponse' state key.\n * If not provided, `structuredResponse` will not be present in the output state.\n *\n * Can be passed in as:\n * - Zod schema\n * - JSON schema\n * - { prompt, schema }, where schema is one of the above.\n * The prompt will be used together with the model that is being used to generate the structured response.\n *\n * @remarks\n * **Important**: `responseFormat` requires the model to support `.withStructuredOutput()`.\n *\n * **Note**: The graph will make a separate call to the LLM to generate the structured response after the agent loop is finished.\n * This is not the only strategy to get structured responses, see more options in [this guide](https://langchain-ai.github.io/langgraph/how-tos/react-agent-structured-output/).\n */\n responseFormat?: InteropZodType<StructuredResponseType> | StructuredResponseSchemaOptions<StructuredResponseType>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | Record<string, any>;\n /**\n * An optional name for the agent.\n */\n name?: string;\n /**\n * An optional description for the agent.\n * This can be used to describe the agent to the underlying supervisor LLM.\n */\n description?: string | undefined;\n /**\n * Use to specify how to expose the agent name to the underlying supervisor LLM.\n \n - undefined: Relies on the LLM provider {@link AIMessage#name}. Currently, only OpenAI supports this.\n - `\"inline\"`: Add the agent name directly into the content field of the {@link AIMessage} using XML-style tags.\n Example: `\"How can I help you\"` -> `\"<name>agent_name</name><content>How can I help you?</content>\"`\n */\n includeAgentName?: \"inline\" | undefined;\n /**\n * An optional node to add before the `agent` node (i.e., the node that calls the LLM).\n * Useful for managing long message histories (e.g., message trimming, summarization, etc.).\n */\n preModelHook?: RunnableLike<ToAnnotationRoot<A>[\"State\"] & PreHookAnnotation[\"State\"], ToAnnotationRoot<A>[\"Update\"] & PreHookAnnotation[\"Update\"], LangGraphRunnableConfig>;\n /**\n * An optional node to add after the `agent` node (i.e., the node that calls the LLM).\n * Useful for implementing human-in-the-loop, guardrails, validation, or other post-processing.\n */\n postModelHook?: RunnableLike<ToAnnotationRoot<A>[\"State\"], ToAnnotationRoot<A>[\"Update\"], LangGraphRunnableConfig>;\n /**\n * Determines the version of the graph to create.\n *\n * Can be one of\n * - `\"v1\"`: The tool node processes a single message. All tool calls in the message are\n * executed in parallel within the tool node.\n * - `\"v2\"`: The tool node processes a single tool call. Tool calls are distributed across\n * multiple instances of the tool node using the Send API.\n *\n * @default `\"v1\"`\n */\n version?: \"v1\" | \"v2\";\n};\n/**\n * @deprecated `createReactAgent` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { createAgent } from \"langchain\";`\n *\n * Creates a StateGraph agent that relies on a chat model utilizing tool calling.\n *\n * @example\n * ```ts\n * import { ChatOpenAI } from \"@langchain/openai\";\n * import { tool } from \"@langchain/core/tools\";\n * import { z } from \"zod\";\n * import { createReactAgent } from \"@langchain/langgraph/prebuilt\";\n *\n * const model = new ChatOpenAI({\n * model: \"gpt-4o\",\n * });\n *\n * const getWeather = tool((input) => {\n * if ([\"sf\", \"san francisco\"].includes(input.location.toLowerCase())) {\n * return \"It's 60 degrees and foggy.\";\n * } else {\n * return \"It's 90 degrees and sunny.\";\n * }\n * }, {\n * name: \"get_weather\",\n * description: \"Call to get the current weather.\",\n * schema: z.object({\n * location: z.string().describe(\"Location to get the weather for.\"),\n * })\n * })\n *\n * const agent = createReactAgent({ llm: model, tools: [getWeather] });\n *\n * const inputs = {\n * messages: [{ role: \"user\", content: \"what is the weather in SF?\" }],\n * };\n *\n * const stream = await agent.stream(inputs, { streamMode: \"values\" });\n *\n * for await (const { messages } of stream) {\n * console.log(messages);\n * }\n * // Returns the messages in the state at each step of execution\n * ```\n */\nexport declare function createReactAgent<A extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseFormat extends Record<string, any> = Record<string, any>, C extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateReactAgentParams<A, StructuredResponseFormat, C>): CompiledStateGraph<ToAnnotationRoot<A>[\"State\"], ToAnnotationRoot<A>[\"Update\"], \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nany, typeof MessagesAnnotation.spec & ToAnnotationRoot<A>[\"spec\"], ReturnType<typeof createReactAgentAnnotation<StructuredResponseFormat>>[\"spec\"] & ToAnnotationRoot<A>[\"spec\"]>;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkBiB6B,UAAAA,UAAU;;+BAEIC,MAAAA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,GAAsBA,MAAtBA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,CAAAA,CAAAA;UAAsBA,EACvCzB,WADuCyB,EAAAA;;;;EASzCE;EACPC;EAA+B,kBAAA,EAHZF,sBAGY;;AAExBf,KAHAgB,CAAAA,GAGAhB,OAHWW,KAGXX,GAAAA,OAAAA,GAAAA,OAAAA;KAFPiB,+BAEgDH,CAAAA,sBAAAA,CAAAA,GAAAA;;EAKhDI,MAAAA,EALOlB,cAKG,CALYe,sBAKTD,CAAAA,GALmCA,MAKnCA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;EACbK,MAAAA,CAAAA,EAAAA,MAAU;EAAA,MAAA,CAAA,EAAA,OAAA;MAAGrB,EAAAA,MAAAA,CAAAA,EAAAA,OAAAA;;KADboB,UAAAA,GAAaJ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mBAAmBsC,iBAAiBC,aAAaD,iBAAiBC;;YAEvQrC,kBAAAA,CAAmB0C,OAAON,iBAAiBC,YAAYM,kBAAkBhB,2BAA2Bc,qCAAqCL,iBAAiBC"}
|
|
1
|
+
{"version":3,"file":"react_agent_executor.d.ts","names":["_langchain_core_messages0","_langchain_core_language_models_chat_models0","___web_js0","BaseChatModel","LanguageModelLike","BaseMessage","BaseMessageLike","SystemMessage","Runnable","RunnableToolLike","RunnableSequence","RunnableBinding","RunnableLike","DynamicTool","StructuredToolInterface","InteropZodObject","InteropZodType","All","BaseCheckpointSaver","BaseStore","CompiledStateGraph","AnnotationRoot","MessagesAnnotation","ToolNode","LangGraphRunnableConfig","Runtime","Messages","START","InteropZodToStateDefinition","AgentState","Record","StructuredResponseType","N","StructuredResponseSchemaOptions","ServerTool","ClientTool","ConfigurableModelInterface","Promise","_shouldBindTools","_bindTools","_langchain_core_language_models_base0","BaseLanguageModelInput","AIMessageChunk","BaseChatModelCallOptions","_getModel","Prompt","State","StateModifier","MessageModifier","createReactAgentAnnotation","BinaryOperatorAggregate","T","LastValue","SingleReducer","StateDefinition","S","PreHookAnnotation","AnyAnnotationRoot","ToAnnotationRoot","A","CreateReactAgentParams","C","createReactAgent","StructuredResponseFormat","spec","ReturnType"],"sources":["../../src/prebuilt/react_agent_executor.d.ts"],"sourcesContent":["import { BaseChatModel } from \"@langchain/core/language_models/chat_models\";\nimport { LanguageModelLike } from \"@langchain/core/language_models/base\";\nimport { BaseMessage, BaseMessageLike, SystemMessage } from \"@langchain/core/messages\";\nimport { Runnable, RunnableToolLike, RunnableSequence, RunnableBinding, type RunnableLike } from \"@langchain/core/runnables\";\nimport { DynamicTool, StructuredToolInterface } from \"@langchain/core/tools\";\nimport type { InteropZodObject, InteropZodType } from \"@langchain/core/utils/types\";\nimport { All, BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport { type CompiledStateGraph, AnnotationRoot } from \"../graph/index.js\";\nimport { MessagesAnnotation } from \"../graph/messages_annotation.js\";\nimport { ToolNode } from \"./tool_node.js\";\nimport { LangGraphRunnableConfig, Runtime } from \"../pregel/runnable_types.js\";\nimport { Messages } from \"../graph/message.js\";\nimport { START } from \"../constants.js\";\nimport type { InteropZodToStateDefinition } from \"../graph/zod/meta.js\";\n/**\n * @deprecated `AgentState` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { AgentState } from \"langchain\";`\n */\nexport interface AgentState<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseType extends Record<string, any> = Record<string, any>> {\n messages: BaseMessage[];\n // TODO: This won't be set until we\n // implement managed values in LangGraphJS\n // Will be useful for inserting a message on\n // graph recursion end\n // is_last_step: boolean;\n structuredResponse: StructuredResponseType;\n}\nexport type N = typeof START | \"agent\" | \"tools\";\ntype StructuredResponseSchemaOptions<StructuredResponseType> = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n schema: InteropZodType<StructuredResponseType> | Record<string, any>;\n prompt?: string;\n strict?: boolean;\n [key: string]: unknown;\n};\ntype ServerTool = Record<string, unknown>;\ntype ClientTool = StructuredToolInterface | DynamicTool | RunnableToolLike;\ninterface ConfigurableModelInterface {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _queuedMethodOperations: Record<string, any>;\n _model: () => Promise<BaseChatModel>;\n}\nexport declare function _shouldBindTools(llm: LanguageModelLike, tools: (ClientTool | ServerTool)[]): Promise<boolean>;\nexport declare function _bindTools(llm: LanguageModelLike, toolClasses: (ClientTool | ServerTool)[]): Promise<Runnable<import(\"@langchain/core/language_models/base\").BaseLanguageModelInput, import(\"@langchain/core/messages\").AIMessageChunk, import(\"@langchain/core/language_models/chat_models\").BaseChatModelCallOptions> | RunnableBinding<any, any, any> | RunnableSequence<any, any>>;\nexport declare function _getModel(llm: LanguageModelLike | ConfigurableModelInterface): Promise<LanguageModelLike>;\nexport type Prompt = SystemMessage | string | ((state: typeof MessagesAnnotation.State, config: LangGraphRunnableConfig) => BaseMessageLike[]) | ((state: typeof MessagesAnnotation.State, config: LangGraphRunnableConfig) => Promise<BaseMessageLike[]>) | Runnable;\n/** @deprecated Use Prompt instead. */\nexport type StateModifier = Prompt;\n/** @deprecated Use Prompt instead. */\nexport type MessageModifier = SystemMessage | string | ((messages: BaseMessage[]) => BaseMessage[]) | ((messages: BaseMessage[]) => Promise<BaseMessage[]>) | Runnable;\nexport declare const createReactAgentAnnotation: <\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nT extends Record<string, any> = Record<string, any>>() => AnnotationRoot<{\n messages: import(\"../web.js\").BinaryOperatorAggregate<BaseMessage[], Messages>;\n structuredResponse: {\n (): import(\"../web.js\").LastValue<T>;\n (annotation: import(\"../web.js\").SingleReducer<T, T>): import(\"../web.js\").BinaryOperatorAggregate<T, T>;\n Root: <S extends import(\"../web.js\").StateDefinition>(sd: S) => AnnotationRoot<S>;\n };\n}>;\ndeclare const PreHookAnnotation: AnnotationRoot<{\n llmInputMessages: import(\"../web.js\").BinaryOperatorAggregate<BaseMessage[], Messages>;\n}>;\ntype PreHookAnnotation = typeof PreHookAnnotation;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyAnnotationRoot = AnnotationRoot<any>;\ntype ToAnnotationRoot<A extends AnyAnnotationRoot | InteropZodObject> = A extends AnyAnnotationRoot ? A : A extends InteropZodObject ? AnnotationRoot<InteropZodToStateDefinition<A>> : never;\n/**\n * @deprecated `CreateReactAgentParams` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { CreateAgentParams } from \"langchain\";`\n */\nexport type CreateReactAgentParams<A extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseType extends Record<string, any> = Record<string, any>, C extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot> = {\n /** The chat model that can utilize OpenAI-style tool calling. */\n llm: LanguageModelLike | ((state: ToAnnotationRoot<A>[\"State\"] & PreHookAnnotation[\"State\"], runtime: Runtime<ToAnnotationRoot<C>[\"State\"]>) => Promise<LanguageModelLike> | LanguageModelLike);\n /** A list of tools or a ToolNode. */\n tools: ToolNode | (ServerTool | ClientTool)[];\n /**\n * @deprecated Use prompt instead.\n */\n messageModifier?: MessageModifier;\n /**\n * @deprecated Use prompt instead.\n */\n stateModifier?: StateModifier;\n /**\n * An optional prompt for the LLM. This takes full graph state BEFORE the LLM is called and prepares the input to LLM.\n *\n * Can take a few different forms:\n *\n * - str: This is converted to a SystemMessage and added to the beginning of the list of messages in state[\"messages\"].\n * - SystemMessage: this is added to the beginning of the list of messages in state[\"messages\"].\n * - Function: This function should take in full graph state and the output is then passed to the language model.\n * - Runnable: This runnable should take in full graph state and the output is then passed to the language model.\n *\n * Note:\n * Prior to `v0.2.46`, the prompt was set using `stateModifier` / `messagesModifier` parameters.\n * This is now deprecated and will be removed in a future release.\n */\n prompt?: Prompt;\n /**\n * Additional state schema for the agent.\n */\n stateSchema?: A;\n /**\n * An optional schema for the context.\n */\n contextSchema?: C;\n /** An optional checkpoint saver to persist the agent's state. */\n checkpointSaver?: BaseCheckpointSaver | boolean;\n /** An optional checkpoint saver to persist the agent's state. Alias of \"checkpointSaver\". */\n checkpointer?: BaseCheckpointSaver | boolean;\n /** An optional list of node names to interrupt before running. */\n interruptBefore?: N[] | All;\n /** An optional list of node names to interrupt after running. */\n interruptAfter?: N[] | All;\n store?: BaseStore;\n /**\n * An optional schema for the final agent output.\n *\n * If provided, output will be formatted to match the given schema and returned in the 'structuredResponse' state key.\n * If not provided, `structuredResponse` will not be present in the output state.\n *\n * Can be passed in as:\n * - Zod schema\n * - JSON schema\n * - { prompt, schema }, where schema is one of the above.\n * The prompt will be used together with the model that is being used to generate the structured response.\n *\n * @remarks\n * **Important**: `responseFormat` requires the model to support `.withStructuredOutput()`.\n *\n * **Note**: The graph will make a separate call to the LLM to generate the structured response after the agent loop is finished.\n * This is not the only strategy to get structured responses, see more options in [this guide](https://langchain-ai.github.io/langgraph/how-tos/react-agent-structured-output/).\n */\n responseFormat?: InteropZodType<StructuredResponseType> | StructuredResponseSchemaOptions<StructuredResponseType>\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n | Record<string, any>;\n /**\n * An optional name for the agent.\n */\n name?: string;\n /**\n * An optional description for the agent.\n * This can be used to describe the agent to the underlying supervisor LLM.\n */\n description?: string | undefined;\n /**\n * Use to specify how to expose the agent name to the underlying supervisor LLM.\n \n - undefined: Relies on the LLM provider {@link AIMessage#name}. Currently, only OpenAI supports this.\n - `\"inline\"`: Add the agent name directly into the content field of the {@link AIMessage} using XML-style tags.\n Example: `\"How can I help you\"` -> `\"<name>agent_name</name><content>How can I help you?</content>\"`\n */\n includeAgentName?: \"inline\" | undefined;\n /**\n * An optional node to add before the `agent` node (i.e., the node that calls the LLM).\n * Useful for managing long message histories (e.g., message trimming, summarization, etc.).\n */\n preModelHook?: RunnableLike<ToAnnotationRoot<A>[\"State\"] & PreHookAnnotation[\"State\"], ToAnnotationRoot<A>[\"Update\"] & PreHookAnnotation[\"Update\"], LangGraphRunnableConfig>;\n /**\n * An optional node to add after the `agent` node (i.e., the node that calls the LLM).\n * Useful for implementing human-in-the-loop, guardrails, validation, or other post-processing.\n */\n postModelHook?: RunnableLike<ToAnnotationRoot<A>[\"State\"], ToAnnotationRoot<A>[\"Update\"], LangGraphRunnableConfig>;\n /**\n * Determines the version of the graph to create.\n *\n * Can be one of\n * - `\"v1\"`: The tool node processes a single message. All tool calls in the message are\n * executed in parallel within the tool node.\n * - `\"v2\"`: The tool node processes a single tool call. Tool calls are distributed across\n * multiple instances of the tool node using the Send API.\n *\n * @default `\"v1\"`\n */\n version?: \"v1\" | \"v2\";\n};\n/**\n * @deprecated `createReactAgent` has been moved to {@link https://www.npmjs.com/package/langchain langchain} package.\n * Update your import to `import { createAgent } from \"langchain\";`\n *\n * Creates a StateGraph agent that relies on a chat model utilizing tool calling.\n *\n * @example\n * ```ts\n * import { ChatOpenAI } from \"@langchain/openai\";\n * import { tool } from \"@langchain/core/tools\";\n * import { z } from \"zod\";\n * import { createReactAgent } from \"@langchain/langgraph/prebuilt\";\n *\n * const model = new ChatOpenAI({\n * model: \"gpt-4o\",\n * });\n *\n * const getWeather = tool((input) => {\n * if ([\"sf\", \"san francisco\"].includes(input.location.toLowerCase())) {\n * return \"It's 60 degrees and foggy.\";\n * } else {\n * return \"It's 90 degrees and sunny.\";\n * }\n * }, {\n * name: \"get_weather\",\n * description: \"Call to get the current weather.\",\n * schema: z.object({\n * location: z.string().describe(\"Location to get the weather for.\"),\n * })\n * })\n *\n * const agent = createReactAgent({ llm: model, tools: [getWeather] });\n *\n * const inputs = {\n * messages: [{ role: \"user\", content: \"what is the weather in SF?\" }],\n * };\n *\n * const stream = await agent.stream(inputs, { streamMode: \"values\" });\n *\n * for await (const { messages } of stream) {\n * console.log(messages);\n * }\n * // Returns the messages in the state at each step of execution\n * ```\n */\nexport declare function createReactAgent<A extends AnyAnnotationRoot | InteropZodObject = typeof MessagesAnnotation, \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseFormat extends Record<string, any> = Record<string, any>, C extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot>(params: CreateReactAgentParams<A, StructuredResponseFormat, C>): CompiledStateGraph<ToAnnotationRoot<A>[\"State\"], ToAnnotationRoot<A>[\"Update\"], \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nany, typeof MessagesAnnotation.spec & ToAnnotationRoot<A>[\"spec\"], ReturnType<typeof createReactAgentAnnotation<StructuredResponseFormat>>[\"spec\"] & ToAnnotationRoot<A>[\"spec\"]>;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAkBiB6B,UAAAA,UAAU;;+BAEIC,MAAAA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,GAAsBA,MAAtBA,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA,CAAAA,CAAAA;UAAsBA,EACvCzB,WADuCyB,EAAAA;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