langchain 1.0.0-alpha.5 → 1.0.0-alpha.7
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/dist/agents/ReactAgent.cjs +5 -5
- package/dist/agents/ReactAgent.cjs.map +1 -1
- package/dist/agents/ReactAgent.d.cts +2 -5
- package/dist/agents/ReactAgent.d.cts.map +1 -1
- package/dist/agents/ReactAgent.d.ts +2 -5
- package/dist/agents/ReactAgent.d.ts.map +1 -1
- package/dist/agents/ReactAgent.js +6 -6
- package/dist/agents/ReactAgent.js.map +1 -1
- package/dist/agents/annotation.cjs.map +1 -1
- package/dist/agents/annotation.d.cts +13 -8
- package/dist/agents/annotation.d.cts.map +1 -1
- package/dist/agents/annotation.d.ts +13 -8
- package/dist/agents/annotation.d.ts.map +1 -1
- package/dist/agents/annotation.js.map +1 -1
- package/dist/agents/createAgent.cjs.map +1 -1
- package/dist/agents/createAgent.js.map +1 -1
- package/dist/agents/index.cjs +2 -2
- package/dist/agents/index.cjs.map +1 -1
- package/dist/agents/index.d.cts +50 -50
- package/dist/agents/index.d.cts.map +1 -1
- package/dist/agents/index.d.ts +50 -50
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +2 -2
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/interrupt.d.cts +14 -1
- package/dist/agents/interrupt.d.cts.map +1 -1
- package/dist/agents/interrupt.d.ts +14 -1
- package/dist/agents/interrupt.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/ReactAgent.cjs +273 -66
- package/dist/agents/middlewareAgent/ReactAgent.cjs.map +1 -1
- package/dist/agents/middlewareAgent/ReactAgent.d.cts +102 -16
- package/dist/agents/middlewareAgent/ReactAgent.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/ReactAgent.d.ts +102 -16
- package/dist/agents/middlewareAgent/ReactAgent.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/ReactAgent.js +275 -68
- package/dist/agents/middlewareAgent/ReactAgent.js.map +1 -1
- package/dist/agents/middlewareAgent/annotation.cjs +12 -6
- package/dist/agents/middlewareAgent/annotation.cjs.map +1 -1
- package/dist/agents/middlewareAgent/annotation.js +12 -6
- package/dist/agents/middlewareAgent/annotation.js.map +1 -1
- package/dist/agents/middlewareAgent/constants.d.cts +5 -0
- package/dist/agents/middlewareAgent/constants.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/constants.d.ts +5 -0
- package/dist/agents/middlewareAgent/constants.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/index.cjs.map +1 -1
- package/dist/agents/middlewareAgent/index.js.map +1 -1
- package/dist/agents/middlewareAgent/middleware/bigTool.cjs +162 -0
- package/dist/agents/middlewareAgent/middleware/bigTool.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/bigTool.d.cts +113 -0
- package/dist/agents/middlewareAgent/middleware/bigTool.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/bigTool.d.ts +113 -0
- package/dist/agents/middlewareAgent/middleware/bigTool.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/bigTool.js +161 -0
- package/dist/agents/middlewareAgent/middleware/bigTool.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.cjs +58 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.cts +46 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.ts +46 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.js +58 -0
- package/dist/agents/middlewareAgent/middleware/dynamicSystemPrompt.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/hitl.cjs +311 -0
- package/dist/agents/middlewareAgent/middleware/hitl.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/hitl.d.cts +419 -0
- package/dist/agents/middlewareAgent/middleware/hitl.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/hitl.d.ts +419 -0
- package/dist/agents/middlewareAgent/middleware/hitl.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/middleware/hitl.js +310 -0
- package/dist/agents/middlewareAgent/middleware/hitl.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware/index.cjs +32 -0
- package/dist/agents/middlewareAgent/middleware/index.cjs.map +1 -0
- package/dist/agents/middlewareAgent/middleware/index.d.cts +6 -0
- package/dist/agents/middlewareAgent/middleware/index.d.ts +6 -0
- package/dist/agents/middlewareAgent/middleware/index.js +21 -0
- package/dist/agents/middlewareAgent/middleware/index.js.map +1 -0
- package/dist/agents/middlewareAgent/{middlewares → middleware}/promptCaching.cjs +72 -27
- package/dist/agents/middlewareAgent/middleware/promptCaching.cjs.map +1 -0
- package/dist/agents/middlewareAgent/{middlewares → middleware}/promptCaching.d.cts +60 -15
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/{middlewares → middleware}/promptCaching.d.ts +60 -15
- package/dist/agents/middlewareAgent/middleware/promptCaching.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/{middlewares → middleware}/promptCaching.js +71 -26
- package/dist/agents/middlewareAgent/middleware/promptCaching.js.map +1 -0
- package/dist/agents/middlewareAgent/{middlewares → middleware}/summarization.cjs +35 -23
- package/dist/agents/middlewareAgent/middleware/summarization.cjs.map +1 -0
- package/dist/agents/middlewareAgent/{middlewares → middleware}/summarization.d.cts +7 -5
- package/dist/agents/middlewareAgent/middleware/summarization.d.cts.map +1 -0
- package/dist/agents/middlewareAgent/{middlewares → middleware}/summarization.d.ts +7 -5
- package/dist/agents/middlewareAgent/middleware/summarization.d.ts.map +1 -0
- package/dist/agents/middlewareAgent/{middlewares → middleware}/summarization.js +29 -17
- package/dist/agents/middlewareAgent/middleware/summarization.js.map +1 -0
- package/dist/agents/middlewareAgent/middleware.cjs +8 -5
- package/dist/agents/middlewareAgent/middleware.cjs.map +1 -1
- package/dist/agents/middlewareAgent/middleware.d.cts +67 -7
- package/dist/agents/middlewareAgent/middleware.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/middleware.d.ts +67 -7
- package/dist/agents/middlewareAgent/middleware.d.ts.map +1 -1
- package/dist/agents/middlewareAgent/middleware.js +8 -5
- package/dist/agents/middlewareAgent/middleware.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.cjs +2 -2
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.js +2 -2
- package/dist/agents/middlewareAgent/nodes/AfterModalNode.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/AgentNode.cjs +125 -83
- package/dist/agents/middlewareAgent/nodes/AgentNode.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/AgentNode.js +128 -86
- package/dist/agents/middlewareAgent/nodes/AgentNode.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.cjs +2 -2
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.js +2 -2
- package/dist/agents/middlewareAgent/nodes/BeforeModalNode.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/middleware.cjs +42 -17
- package/dist/agents/middlewareAgent/nodes/middleware.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/middleware.js +42 -18
- package/dist/agents/middlewareAgent/nodes/middleware.js.map +1 -1
- package/dist/agents/middlewareAgent/nodes/utils.cjs +30 -16
- package/dist/agents/middlewareAgent/nodes/utils.cjs.map +1 -1
- package/dist/agents/middlewareAgent/nodes/utils.js +28 -14
- package/dist/agents/middlewareAgent/nodes/utils.js.map +1 -1
- package/dist/agents/middlewareAgent/types.d.cts +162 -88
- package/dist/agents/middlewareAgent/types.d.cts.map +1 -1
- package/dist/agents/middlewareAgent/types.d.ts +162 -88
- package/dist/agents/middlewareAgent/types.d.ts.map +1 -1
- package/dist/agents/model.cjs +13 -0
- package/dist/agents/model.cjs.map +1 -0
- package/dist/agents/model.js +11 -0
- package/dist/agents/model.js.map +1 -0
- package/dist/agents/nodes/AgentNode.cjs +60 -32
- package/dist/agents/nodes/AgentNode.cjs.map +1 -1
- package/dist/agents/nodes/AgentNode.js +61 -33
- package/dist/agents/nodes/AgentNode.js.map +1 -1
- package/dist/agents/nodes/ToolNode.cjs +4 -4
- package/dist/agents/nodes/ToolNode.cjs.map +1 -1
- package/dist/agents/nodes/ToolNode.d.cts +2 -3
- package/dist/agents/nodes/ToolNode.d.cts.map +1 -1
- package/dist/agents/nodes/ToolNode.d.ts +1 -2
- package/dist/agents/nodes/ToolNode.d.ts.map +1 -1
- package/dist/agents/nodes/ToolNode.js +5 -5
- package/dist/agents/nodes/ToolNode.js.map +1 -1
- package/dist/agents/responses.cjs +53 -11
- package/dist/agents/responses.cjs.map +1 -1
- package/dist/agents/responses.d.cts +12 -20
- package/dist/agents/responses.d.cts.map +1 -1
- package/dist/agents/responses.d.ts +12 -20
- package/dist/agents/responses.d.ts.map +1 -1
- package/dist/agents/responses.js +53 -12
- package/dist/agents/responses.js.map +1 -1
- package/dist/agents/types.d.cts +3 -6
- package/dist/agents/types.d.cts.map +1 -1
- package/dist/agents/types.d.ts +3 -6
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/agents/utils.cjs +11 -29
- package/dist/agents/utils.cjs.map +1 -1
- package/dist/agents/utils.js +9 -26
- package/dist/agents/utils.js.map +1 -1
- package/dist/agents/withAgentName.cjs.map +1 -1
- package/dist/agents/withAgentName.js.map +1 -1
- package/dist/chains/api/prompts.cjs.map +1 -1
- package/dist/chains/api/prompts.js.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_chain.cjs.map +1 -1
- package/dist/chains/constitutional_ai/constitutional_chain.js.map +1 -1
- package/dist/chains/index.cjs +0 -3
- package/dist/chains/index.cjs.map +1 -1
- package/dist/chains/index.d.cts +1 -2
- package/dist/chains/index.d.ts +1 -2
- package/dist/chains/index.js +1 -3
- package/dist/chains/index.js.map +1 -1
- package/dist/chains/openai_functions/extraction.cjs.map +1 -1
- package/dist/chains/openai_functions/extraction.d.cts +1 -3
- package/dist/chains/openai_functions/extraction.d.cts.map +1 -1
- package/dist/chains/openai_functions/extraction.d.ts +1 -3
- package/dist/chains/openai_functions/extraction.d.ts.map +1 -1
- package/dist/chains/openai_functions/extraction.js.map +1 -1
- package/dist/chains/openai_functions/index.cjs +0 -5
- package/dist/chains/openai_functions/index.cjs.map +1 -1
- package/dist/chains/openai_functions/index.d.cts +1 -2
- package/dist/chains/openai_functions/index.d.ts +1 -2
- package/dist/chains/openai_functions/index.js +1 -4
- package/dist/chains/openai_functions/index.js.map +1 -1
- package/dist/chains/openai_functions/openapi.cjs +4 -4
- package/dist/chains/openai_functions/openapi.cjs.map +1 -1
- package/dist/chains/openai_functions/openapi.d.cts +1 -1
- package/dist/chains/openai_functions/openapi.js +4 -4
- package/dist/chains/openai_functions/openapi.js.map +1 -1
- package/dist/chains/openai_functions/tagging.cjs.map +1 -1
- package/dist/chains/openai_functions/tagging.d.cts +1 -3
- package/dist/chains/openai_functions/tagging.d.cts.map +1 -1
- package/dist/chains/openai_functions/tagging.d.ts +1 -3
- package/dist/chains/openai_functions/tagging.d.ts.map +1 -1
- package/dist/chains/openai_functions/tagging.js.map +1 -1
- package/dist/chains/query_constructor/index.cjs +4 -4
- package/dist/chains/query_constructor/index.cjs.map +1 -1
- package/dist/chains/query_constructor/index.d.cts +4 -2
- package/dist/chains/query_constructor/index.d.cts.map +1 -1
- package/dist/chains/query_constructor/index.d.ts +4 -2
- package/dist/chains/query_constructor/index.d.ts.map +1 -1
- package/dist/chains/query_constructor/index.js +1 -1
- package/dist/chains/query_constructor/index.js.map +1 -1
- package/dist/chains/question_answering/load.d.ts +2 -2
- package/dist/chains/question_answering/load.d.ts.map +1 -1
- package/dist/chains/question_answering/map_reduce_prompts.cjs.map +1 -1
- package/dist/chains/question_answering/map_reduce_prompts.js.map +1 -1
- package/dist/chains/question_answering/refine_prompts.cjs.map +1 -1
- package/dist/chains/question_answering/refine_prompts.js.map +1 -1
- package/dist/chains/question_answering/stuff_prompts.cjs.map +1 -1
- package/dist/chains/question_answering/stuff_prompts.js.map +1 -1
- package/dist/chains/router/multi_prompt.cjs +4 -4
- package/dist/chains/router/multi_prompt.cjs.map +1 -1
- package/dist/chains/router/multi_prompt.js +1 -1
- package/dist/chains/router/multi_prompt.js.map +1 -1
- package/dist/chains/router/multi_retrieval_qa.cjs +4 -4
- package/dist/chains/router/multi_retrieval_qa.cjs.map +1 -1
- package/dist/chains/router/multi_retrieval_qa.js +1 -1
- package/dist/chains/router/multi_retrieval_qa.js.map +1 -1
- package/dist/chains/sql_db/sql_db_prompt.cjs.map +1 -1
- package/dist/chains/sql_db/sql_db_prompt.d.cts.map +1 -1
- package/dist/chains/sql_db/sql_db_prompt.d.ts.map +1 -1
- package/dist/chains/sql_db/sql_db_prompt.js.map +1 -1
- package/dist/chains/summarization/stuff_prompts.cjs.map +1 -1
- package/dist/chains/summarization/stuff_prompts.js.map +1 -1
- package/dist/chat_models/universal.cjs +8 -5
- package/dist/chat_models/universal.cjs.map +1 -1
- package/dist/chat_models/universal.d.cts +2 -2
- package/dist/chat_models/universal.d.cts.map +1 -1
- package/dist/chat_models/universal.d.ts +2 -2
- package/dist/chat_models/universal.d.ts.map +1 -1
- package/dist/chat_models/universal.js +8 -5
- package/dist/chat_models/universal.js.map +1 -1
- package/dist/document_loaders/fs/directory.cjs.map +1 -1
- package/dist/document_loaders/fs/directory.d.cts +0 -1
- package/dist/document_loaders/fs/directory.d.cts.map +1 -1
- package/dist/document_loaders/fs/directory.d.ts +0 -1
- package/dist/document_loaders/fs/directory.d.ts.map +1 -1
- package/dist/document_loaders/fs/directory.js.map +1 -1
- package/dist/document_loaders/fs/json.cjs +7 -1
- package/dist/document_loaders/fs/json.cjs.map +1 -1
- package/dist/document_loaders/fs/json.js +7 -1
- package/dist/document_loaders/fs/json.js.map +1 -1
- package/dist/embeddings/cache_backed.cjs +1 -1
- package/dist/embeddings/cache_backed.cjs.map +1 -1
- package/dist/embeddings/cache_backed.d.cts +1 -1
- package/dist/embeddings/cache_backed.d.ts +2 -2
- package/dist/embeddings/cache_backed.js +2 -2
- package/dist/embeddings/cache_backed.js.map +1 -1
- package/dist/evaluation/agents/trajectory.d.cts.map +1 -1
- package/dist/evaluation/comparison/pairwise.d.cts.map +1 -1
- package/dist/evaluation/criteria/criteria.d.cts.map +1 -1
- package/dist/evaluation/embedding_distance/base.cjs +2 -4
- package/dist/evaluation/embedding_distance/base.cjs.map +1 -1
- package/dist/evaluation/embedding_distance/base.js +2 -3
- package/dist/evaluation/embedding_distance/base.js.map +1 -1
- package/dist/evaluation/loader.cjs +7 -12
- package/dist/evaluation/loader.cjs.map +1 -1
- package/dist/evaluation/loader.d.cts +8 -2
- package/dist/evaluation/loader.d.cts.map +1 -1
- package/dist/evaluation/loader.d.ts +8 -2
- package/dist/evaluation/loader.d.ts.map +1 -1
- package/dist/evaluation/loader.js +7 -12
- package/dist/evaluation/loader.js.map +1 -1
- package/dist/hub/base.cjs.map +1 -1
- package/dist/hub/base.js.map +1 -1
- package/dist/index.cjs +38 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/langchain-core/dist/load/serializable.d.cts.map +1 -1
- package/dist/langchain-core/dist/messages/base.d.cts +24 -33
- package/dist/langchain-core/dist/messages/base.d.cts.map +1 -1
- package/dist/langchain-core/dist/messages/content/index.d.cts +21 -2
- package/dist/langchain-core/dist/messages/content/index.d.cts.map +1 -1
- package/dist/langchain-core/dist/messages/content/tools.d.cts +67 -6
- package/dist/langchain-core/dist/messages/content/tools.d.cts.map +1 -1
- package/dist/langchain-core/dist/messages/message.d.cts +598 -0
- package/dist/langchain-core/dist/messages/message.d.cts.map +1 -0
- package/dist/langchain-core/dist/messages/metadata.d.cts +97 -0
- package/dist/langchain-core/dist/messages/metadata.d.cts.map +1 -0
- package/dist/langchain-core/dist/messages/utils.d.cts +75 -0
- package/dist/langchain-core/dist/messages/utils.d.cts.map +1 -0
- package/dist/langchain-core/dist/prompt_values.d.cts.map +1 -1
- package/dist/langchain-core/dist/utils/types/index.d.cts.map +1 -1
- package/dist/libs/langchain-core/dist/load/serializable.d.ts.map +1 -1
- package/dist/libs/langchain-core/dist/messages/base.d.ts +24 -33
- package/dist/libs/langchain-core/dist/messages/base.d.ts.map +1 -1
- package/dist/libs/langchain-core/dist/messages/content/index.d.ts +21 -2
- package/dist/libs/langchain-core/dist/messages/content/index.d.ts.map +1 -1
- package/dist/libs/langchain-core/dist/messages/content/tools.d.ts +67 -6
- package/dist/libs/langchain-core/dist/messages/content/tools.d.ts.map +1 -1
- package/dist/libs/langchain-core/dist/messages/message.d.ts +598 -0
- package/dist/libs/langchain-core/dist/messages/message.d.ts.map +1 -0
- package/dist/libs/langchain-core/dist/messages/metadata.d.ts +97 -0
- package/dist/libs/langchain-core/dist/messages/metadata.d.ts.map +1 -0
- package/dist/libs/langchain-core/dist/messages/utils.d.ts +75 -0
- package/dist/libs/langchain-core/dist/messages/utils.d.ts.map +1 -0
- package/dist/libs/langchain-core/dist/prompt_values.d.ts.map +1 -1
- package/dist/libs/langchain-core/dist/utils/types/index.d.ts +2 -0
- package/dist/libs/langchain-core/dist/utils/types/index.d.ts.map +1 -1
- package/dist/libs/langchain-core/dist/utils/types/zod.d.ts +1 -0
- package/dist/load/import_map.cjs +3 -14
- package/dist/load/import_map.cjs.map +1 -1
- package/dist/load/import_map.js +3 -14
- package/dist/load/import_map.js.map +1 -1
- package/dist/memory/prompt.cjs.map +1 -1
- package/dist/memory/prompt.d.cts.map +1 -1
- package/dist/memory/prompt.d.ts.map +1 -1
- package/dist/memory/prompt.js.map +1 -1
- package/dist/output_parsers/combining.cjs +1 -1
- package/dist/output_parsers/combining.cjs.map +1 -1
- package/dist/output_parsers/combining.js +1 -1
- package/dist/output_parsers/combining.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/array_literal_expression_handler.js.map +1 -1
- package/dist/output_parsers/expression_type_handlers/base.cjs +1 -1
- package/dist/output_parsers/expression_type_handlers/base.cjs.map +1 -1
- package/dist/output_parsers/expression_type_handlers/base.js +1 -1
- package/dist/output_parsers/expression_type_handlers/base.js.map +1 -1
- package/dist/output_parsers/regex.cjs.map +1 -1
- package/dist/output_parsers/regex.js.map +1 -1
- package/dist/output_parsers/structured.cjs +4 -4
- package/dist/output_parsers/structured.cjs.map +1 -1
- package/dist/output_parsers/structured.d.cts +1 -1
- package/dist/output_parsers/structured.d.cts.map +1 -1
- package/dist/output_parsers/structured.d.ts +1 -1
- package/dist/output_parsers/structured.d.ts.map +1 -1
- package/dist/output_parsers/structured.js +2 -2
- package/dist/output_parsers/structured.js.map +1 -1
- package/dist/retrievers/ensemble.cjs.map +1 -1
- package/dist/retrievers/ensemble.js.map +1 -1
- package/dist/storage/file_system.cjs +1 -1
- package/dist/storage/file_system.cjs.map +1 -1
- package/dist/storage/file_system.js +1 -1
- package/dist/storage/file_system.js.map +1 -1
- package/dist/tools/fs.cjs +5 -5
- package/dist/tools/fs.cjs.map +1 -1
- package/dist/tools/fs.d.cts +1 -1
- package/dist/tools/fs.d.cts.map +1 -1
- package/dist/tools/fs.d.ts +1 -1
- package/dist/tools/fs.d.ts.map +1 -1
- package/dist/tools/fs.js +1 -1
- package/dist/tools/fs.js.map +1 -1
- package/dist/tools/retriever.cjs +2 -2
- package/dist/tools/retriever.cjs.map +1 -1
- package/dist/tools/retriever.d.cts +1 -1
- package/dist/tools/retriever.d.cts.map +1 -1
- package/dist/tools/retriever.d.ts +1 -1
- package/dist/tools/retriever.d.ts.map +1 -1
- package/dist/tools/retriever.js +1 -1
- package/dist/tools/retriever.js.map +1 -1
- package/dist/tools/sql.cjs +1 -2
- package/dist/tools/sql.cjs.map +1 -1
- package/dist/tools/sql.d.cts +1 -1
- package/dist/tools/sql.d.cts.map +1 -1
- package/dist/tools/sql.d.ts +1 -1
- package/dist/tools/sql.d.ts.map +1 -1
- package/dist/tools/sql.js +1 -2
- package/dist/tools/sql.js.map +1 -1
- package/dist/types/expression-parser.d.cts +2 -0
- package/dist/types/expression-parser.d.cts.map +1 -1
- package/dist/types/expression-parser.d.ts +2 -0
- package/dist/types/expression-parser.d.ts.map +1 -1
- package/dist/util/hub.cjs +1 -1
- package/dist/util/hub.js +1 -1
- package/dist/util/openapi.cjs +1 -1
- package/dist/util/openapi.cjs.map +1 -1
- package/dist/util/openapi.js +1 -1
- package/dist/util/openapi.js.map +1 -1
- package/package.json +15 -21
- package/dist/agents/middlewareAgent/middlewares/hitl.cjs +0 -235
- package/dist/agents/middlewareAgent/middlewares/hitl.cjs.map +0 -1
- package/dist/agents/middlewareAgent/middlewares/hitl.d.cts +0 -199
- package/dist/agents/middlewareAgent/middlewares/hitl.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/middlewares/hitl.d.ts +0 -199
- package/dist/agents/middlewareAgent/middlewares/hitl.d.ts.map +0 -1
- package/dist/agents/middlewareAgent/middlewares/hitl.js +0 -234
- package/dist/agents/middlewareAgent/middlewares/hitl.js.map +0 -1
- package/dist/agents/middlewareAgent/middlewares/index.cjs +0 -8
- package/dist/agents/middlewareAgent/middlewares/index.d.cts +0 -4
- package/dist/agents/middlewareAgent/middlewares/index.d.ts +0 -4
- package/dist/agents/middlewareAgent/middlewares/index.js +0 -5
- package/dist/agents/middlewareAgent/middlewares/promptCaching.cjs.map +0 -1
- package/dist/agents/middlewareAgent/middlewares/promptCaching.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/middlewares/promptCaching.d.ts.map +0 -1
- package/dist/agents/middlewareAgent/middlewares/promptCaching.js.map +0 -1
- package/dist/agents/middlewareAgent/middlewares/summarization.cjs.map +0 -1
- package/dist/agents/middlewareAgent/middlewares/summarization.d.cts.map +0 -1
- package/dist/agents/middlewareAgent/middlewares/summarization.d.ts.map +0 -1
- package/dist/agents/middlewareAgent/middlewares/summarization.js.map +0 -1
- package/dist/chains/openai_functions/structured_output.cjs +0 -107
- package/dist/chains/openai_functions/structured_output.cjs.map +0 -1
- package/dist/chains/openai_functions/structured_output.d.cts +0 -38
- package/dist/chains/openai_functions/structured_output.d.cts.map +0 -1
- package/dist/chains/openai_functions/structured_output.d.ts +0 -38
- package/dist/chains/openai_functions/structured_output.d.ts.map +0 -1
- package/dist/chains/openai_functions/structured_output.js +0 -105
- package/dist/chains/openai_functions/structured_output.js.map +0 -1
- package/dist/chains/openai_moderation.cjs +0 -107
- package/dist/chains/openai_moderation.cjs.map +0 -1
- package/dist/chains/openai_moderation.d.cts +0 -74
- package/dist/chains/openai_moderation.d.cts.map +0 -1
- package/dist/chains/openai_moderation.d.ts +0 -74
- package/dist/chains/openai_moderation.d.ts.map +0 -1
- package/dist/chains/openai_moderation.js +0 -106
- package/dist/chains/openai_moderation.js.map +0 -1
|
@@ -1,19 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AnyAnnotationRoot,
|
|
1
|
+
import { JUMP_TO_TARGETS } from "./constants.js";
|
|
2
|
+
import { AnyAnnotationRoot, ResponseFormatUndefined, ToAnnotationRoot } from "../annotation.js";
|
|
3
|
+
import { JsonSchemaFormat, ProviderStrategy, ResponseFormat, ToolStrategy, TypedToolStrategy } from "../responses.js";
|
|
4
|
+
import { Interrupt } from "../interrupt.js";
|
|
3
5
|
import { ToolNode } from "../nodes/ToolNode.js";
|
|
4
|
-
import {
|
|
5
|
-
import { BaseMessage
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { InferInteropZodInput, InteropZodObject, InteropZodType } from "@langchain/core/utils/types";
|
|
9
|
-
import { z } from "zod";
|
|
6
|
+
import { ClientTool, ServerTool } from "../types.js";
|
|
7
|
+
import { BaseMessage } from "@langchain/core/messages";
|
|
8
|
+
import { END, LangGraphRunnableConfig, PregelOptions, Runtime, START } from "@langchain/langgraph";
|
|
9
|
+
import { InferInteropZodInput, InferInteropZodOutput, InteropZodDefault, InteropZodObject, InteropZodOptional, InteropZodType } from "@langchain/core/utils/types";
|
|
10
10
|
import { LanguageModelLike } from "@langchain/core/language_models/base";
|
|
11
|
-
import {
|
|
11
|
+
import { BaseCheckpointSaver, BaseStore } from "@langchain/langgraph-checkpoint";
|
|
12
12
|
|
|
13
13
|
//#region src/agents/middlewareAgent/types.d.ts
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
interface BuiltInState {
|
|
16
16
|
messages: BaseMessage[];
|
|
17
|
+
__interrupt__?: Interrupt[];
|
|
18
|
+
/**
|
|
19
|
+
* Optional property to control routing after afterModel middleware execution.
|
|
20
|
+
* When set by middleware, the agent will jump to the specified node instead of
|
|
21
|
+
* following normal routing logic. The property is automatically cleared after use.
|
|
22
|
+
*
|
|
23
|
+
* - "model_request": Jump back to the model for another LLM call
|
|
24
|
+
* - "tools": Jump to tool execution (requires tools to be available)
|
|
25
|
+
*/
|
|
26
|
+
jumpTo?: JumpToTarget;
|
|
17
27
|
}
|
|
18
28
|
/**
|
|
19
29
|
* Information about a tool call that has been executed.
|
|
@@ -31,30 +41,19 @@ interface ToolCall {
|
|
|
31
41
|
* The arguments that were passed to the tool.
|
|
32
42
|
*/
|
|
33
43
|
args: Record<string, any>;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Information about a tool result from a tool execution.
|
|
37
|
-
*/
|
|
38
|
-
interface ToolResult {
|
|
39
|
-
/**
|
|
40
|
-
* The ID of the tool call.
|
|
41
|
-
*/
|
|
42
|
-
id: string;
|
|
43
44
|
/**
|
|
44
45
|
* The result of the tool call.
|
|
45
46
|
*/
|
|
46
|
-
result
|
|
47
|
+
result?: unknown;
|
|
47
48
|
/**
|
|
48
49
|
* An optional error message if the tool call failed.
|
|
49
50
|
*/
|
|
50
51
|
error?: string;
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
};
|
|
57
|
-
}
|
|
53
|
+
/**
|
|
54
|
+
* Information about a tool result from a tool execution.
|
|
55
|
+
*/
|
|
56
|
+
|
|
58
57
|
/**
|
|
59
58
|
* Configuration for modifying a model call at runtime.
|
|
60
59
|
* All fields are optional and only provided fields will override defaults.
|
|
@@ -71,7 +70,7 @@ interface ModelRequest {
|
|
|
71
70
|
/**
|
|
72
71
|
* The system message for this step.
|
|
73
72
|
*/
|
|
74
|
-
|
|
73
|
+
systemPrompt?: string;
|
|
75
74
|
/**
|
|
76
75
|
* Tool choice configuration (model-specific format).
|
|
77
76
|
* Can be one of:
|
|
@@ -88,40 +87,43 @@ interface ModelRequest {
|
|
|
88
87
|
};
|
|
89
88
|
/**
|
|
90
89
|
* The tools to make available for this step.
|
|
91
|
-
* Can be tool names (strings) or tool instances.
|
|
92
|
-
*/
|
|
93
|
-
tools: (ClientTool | ServerTool)[];
|
|
94
|
-
/**
|
|
95
|
-
* The model settings to use for this step.
|
|
96
|
-
* Currently only supported for Anthropic models.
|
|
97
90
|
*/
|
|
98
|
-
|
|
91
|
+
tools: string[];
|
|
99
92
|
}
|
|
100
93
|
/**
|
|
101
|
-
*
|
|
94
|
+
* Type helper to check if TContext is an optional Zod schema
|
|
102
95
|
*/
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
96
|
+
type IsOptionalZodObject<T> = T extends InteropZodOptional<any> ? true : false;
|
|
97
|
+
type IsDefaultZodObject<T> = T extends InteropZodDefault<any> ? true : false;
|
|
98
|
+
type WithMaybeContext<TContext> = undefined extends TContext ? {
|
|
99
|
+
readonly context?: TContext;
|
|
100
|
+
} : IsOptionalZodObject<TContext> extends true ? {
|
|
101
|
+
readonly context?: TContext;
|
|
102
|
+
} : IsDefaultZodObject<TContext> extends true ? {
|
|
103
|
+
readonly context?: TContext;
|
|
104
|
+
} : {
|
|
111
105
|
readonly context: TContext;
|
|
112
|
-
}
|
|
106
|
+
};
|
|
113
107
|
/**
|
|
114
|
-
*
|
|
108
|
+
* Runtime information available to middleware (readonly).
|
|
115
109
|
*/
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
110
|
+
type Runtime$1<TState = unknown, TContext = unknown> = Partial<Omit<Runtime<TContext>, "context" | "configurable">> & {
|
|
111
|
+
readonly toolCalls: ToolCall[];
|
|
112
|
+
/**
|
|
113
|
+
* All tool instances that are provided to the agent.
|
|
114
|
+
*/
|
|
115
|
+
readonly tools: (ClientTool | ServerTool)[];
|
|
116
|
+
/**
|
|
117
|
+
* Terminates the agent with an update to the state or throws an error.
|
|
118
|
+
* @param result - The result to terminate the agent with.
|
|
119
|
+
*/
|
|
120
|
+
terminate(result: Partial<TState> | Error): ControlAction<TState>;
|
|
121
|
+
} & WithMaybeContext<TContext>;
|
|
120
122
|
/**
|
|
121
123
|
* Control action type returned by control methods.
|
|
122
124
|
*/
|
|
123
125
|
type ControlAction<TStateSchema> = {
|
|
124
|
-
type: "
|
|
126
|
+
type: "terminate";
|
|
125
127
|
target?: string;
|
|
126
128
|
stateUpdate?: Partial<TStateSchema>;
|
|
127
129
|
result?: any;
|
|
@@ -145,43 +147,58 @@ type FilterPrivateProps<T> = { [K in keyof T as K extends `_${string}` ? never :
|
|
|
145
147
|
* Helper type to infer the state schema type from a middleware
|
|
146
148
|
* This filters out private properties (those starting with underscore)
|
|
147
149
|
*/
|
|
148
|
-
type InferMiddlewareState<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<infer S, any, any> ? S extends
|
|
150
|
+
type InferMiddlewareState<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<infer S, any, any> ? S extends InteropZodObject ? FilterPrivateProps<InferInteropZodOutput<S>> : {} : {};
|
|
149
151
|
/**
|
|
150
152
|
* Helper type to infer the input state schema type from a middleware (all properties optional)
|
|
151
153
|
* This filters out private properties (those starting with underscore)
|
|
152
154
|
*/
|
|
153
|
-
type InferMiddlewareInputState<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<infer S, any, any> ? S extends
|
|
155
|
+
type InferMiddlewareInputState<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<infer S, any, any> ? S extends InteropZodObject ? FilterPrivateProps<InferInteropZodInput<S>> : {} : {};
|
|
154
156
|
/**
|
|
155
|
-
* Helper type to infer merged state from an array of
|
|
157
|
+
* Helper type to infer merged state from an array of middleware (just the middleware states)
|
|
156
158
|
*/
|
|
157
159
|
type InferMiddlewareStates<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareState<First> & InferMiddlewareStates<Rest> : InferMiddlewareState<First> : {} : {};
|
|
158
160
|
/**
|
|
159
|
-
* Helper type to infer merged input state from an array of
|
|
161
|
+
* Helper type to infer merged input state from an array of middleware (with optional defaults)
|
|
160
162
|
*/
|
|
161
163
|
type InferMiddlewareInputStates<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareInputState<First> & InferMiddlewareInputStates<Rest> : InferMiddlewareInputState<First> : {} : {};
|
|
162
164
|
/**
|
|
163
|
-
* Helper type to infer merged state from an array of
|
|
165
|
+
* Helper type to infer merged state from an array of middleware (includes built-in state)
|
|
164
166
|
*/
|
|
165
167
|
|
|
166
168
|
/**
|
|
167
169
|
* Helper type to infer the input context schema type from a middleware (with optional defaults)
|
|
168
170
|
*/
|
|
169
|
-
type InferMiddlewareContextInput<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<any, infer C, any> ? C extends
|
|
171
|
+
type InferMiddlewareContextInput<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<any, infer C, any> ? C extends InteropZodOptional<infer Inner> ? InferInteropZodInput<Inner> | undefined : C extends InteropZodObject ? InferInteropZodInput<C> : {} : {};
|
|
170
172
|
/**
|
|
171
|
-
* Helper type to infer merged context from an array of
|
|
173
|
+
* Helper type to infer merged context from an array of middleware
|
|
172
174
|
*/
|
|
173
175
|
|
|
174
176
|
/**
|
|
175
|
-
* Helper
|
|
177
|
+
* Helper to merge two context types, preserving undefined unions
|
|
176
178
|
*/
|
|
177
|
-
type
|
|
179
|
+
type MergeContextTypes<A, B> = [A] extends [undefined] ? [B] extends [undefined] ? undefined : B | undefined : [B] extends [undefined] ? A | undefined : [A] extends [B] ? A : [B] extends [A] ? B : A & B;
|
|
180
|
+
/**
|
|
181
|
+
* Helper type to infer merged input context from an array of middleware (with optional defaults)
|
|
182
|
+
*/
|
|
183
|
+
type InferMiddlewareContextInputs<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? MergeContextTypes<InferMiddlewareContextInput<First>, InferMiddlewareContextInputs<Rest>> : InferMiddlewareContextInput<First> : {} : {};
|
|
184
|
+
/**
|
|
185
|
+
* jump targets (user facing)
|
|
186
|
+
*/
|
|
187
|
+
type JumpToTarget = (typeof JUMP_TO_TARGETS)[number];
|
|
188
|
+
/**
|
|
189
|
+
* jump targets (internal)
|
|
190
|
+
*/
|
|
191
|
+
|
|
178
192
|
/**
|
|
179
193
|
* Base middleware interface.
|
|
180
194
|
*/
|
|
181
|
-
interface AgentMiddleware<TSchema extends
|
|
195
|
+
interface AgentMiddleware<TSchema extends InteropZodObject | undefined = undefined, TContextSchema extends InteropZodObject | InteropZodDefault<InteropZodObject> | InteropZodOptional<InteropZodObject> | undefined = undefined, TFullContext = any> {
|
|
182
196
|
stateSchema?: TSchema;
|
|
183
197
|
contextSchema?: TContextSchema;
|
|
184
198
|
name: string;
|
|
199
|
+
beforeModelJumpTo?: JumpToTarget[];
|
|
200
|
+
afterModelJumpTo?: JumpToTarget[];
|
|
201
|
+
tools?: (ClientTool | ServerTool)[];
|
|
185
202
|
/**
|
|
186
203
|
* Runs before each LLM call, can modify call parameters, changes are not persistent
|
|
187
204
|
* e.g. if you change `model`, it will only be changed for the next model call
|
|
@@ -191,26 +208,18 @@ interface AgentMiddleware<TSchema extends z.ZodObject<z.ZodRawShape> | undefined
|
|
|
191
208
|
* @param runtime - Runtime context and metadata
|
|
192
209
|
* @returns Modified options or undefined to pass through
|
|
193
210
|
*/
|
|
194
|
-
|
|
195
|
-
beforeModel?(state: (TSchema extends
|
|
196
|
-
afterModel?(state: (TSchema extends
|
|
211
|
+
modifyModelRequest?(request: ModelRequest, state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime$1<TFullContext>): Promise<Partial<ModelRequest> | void> | Partial<ModelRequest> | void;
|
|
212
|
+
beforeModel?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime$1<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;
|
|
213
|
+
afterModel?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime$1<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;
|
|
197
214
|
}
|
|
198
215
|
/**
|
|
199
216
|
* Information about a tool call that has been executed.
|
|
200
217
|
*/
|
|
201
218
|
|
|
202
|
-
|
|
203
|
-
* Duplicate of the Prompt type from ../types.ts
|
|
204
|
-
*/
|
|
205
|
-
type Prompt<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot> = SystemMessage | string | ((state: AgentBuiltInState, config: LangGraphRunnableConfig<ToAnnotationRoot<ContextSchema>["State"]>) => BaseMessageLike[] | Promise<BaseMessageLike[]>) | Runnable;
|
|
206
|
-
type DynamicLLMFunction<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot> = (state: AgentBuiltInState & PreHookAnnotation["State"], runtime: AgentRuntime<ToAnnotationRoot<ContextSchema>["State"]>) => Promise<LanguageModelLike> | LanguageModelLike;
|
|
207
|
-
type CreateAgentParams<
|
|
208
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
209
|
-
StructuredResponseType extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, ResponseFormatType = InteropZodType<StructuredResponseType> | InteropZodType<unknown>[] | JsonSchemaFormat | JsonSchemaFormat[] | ResponseFormat | TypedToolStrategy<StructuredResponseType> | ToolStrategy<StructuredResponseType> | ProviderStrategy<StructuredResponseType> | ResponseFormatUndefined> = {
|
|
210
|
-
/** The chat model that can utilize OpenAI-style tool calling. */
|
|
211
|
-
llm?: LanguageModelLike | DynamicLLMFunction<ContextSchema>;
|
|
219
|
+
type CreateAgentParams<StructuredResponseType extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, ResponseFormatType = InteropZodType<StructuredResponseType> | InteropZodType<unknown>[] | JsonSchemaFormat | JsonSchemaFormat[] | ResponseFormat | TypedToolStrategy<StructuredResponseType> | ToolStrategy<StructuredResponseType> | ProviderStrategy<StructuredResponseType> | ResponseFormatUndefined> = {
|
|
212
220
|
/**
|
|
213
|
-
*
|
|
221
|
+
* Defines a model to use for the agent. You can either pass in an instance of a LangChain chat model
|
|
222
|
+
* or a string. If a string is provided the agent initializes a ChatModel based on the provided model name and provider.
|
|
214
223
|
* It supports various model providers and allows for runtime configuration of model parameters.
|
|
215
224
|
*
|
|
216
225
|
* @uses {@link initChatModel}
|
|
@@ -221,9 +230,38 @@ StructuredResponseType extends Record<string, any> = Record<string, any>, Contex
|
|
|
221
230
|
* // ...
|
|
222
231
|
* });
|
|
223
232
|
* ```
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* ```ts
|
|
236
|
+
* import { ChatOpenAI } from "@langchain/openai";
|
|
237
|
+
* const agent = createAgent({
|
|
238
|
+
* model: new ChatOpenAI({ model: "gpt-4o" }),
|
|
239
|
+
* // ...
|
|
240
|
+
* });
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
model?: string | LanguageModelLike;
|
|
244
|
+
/**
|
|
245
|
+
* A list of tools or a ToolNode.
|
|
246
|
+
*
|
|
247
|
+
* @example
|
|
248
|
+
* ```ts
|
|
249
|
+
* import { tool } from "langchain";
|
|
250
|
+
*
|
|
251
|
+
* const weatherTool = tool(() => "Sunny!", {
|
|
252
|
+
* name: "get_weather",
|
|
253
|
+
* description: "Get the weather for a location",
|
|
254
|
+
* schema: z.object({
|
|
255
|
+
* location: z.string().describe("The location to get weather for"),
|
|
256
|
+
* }),
|
|
257
|
+
* });
|
|
258
|
+
*
|
|
259
|
+
* const agent = createAgent({
|
|
260
|
+
* tools: [weatherTool],
|
|
261
|
+
* // ...
|
|
262
|
+
* });
|
|
263
|
+
* ```
|
|
224
264
|
*/
|
|
225
|
-
model?: string;
|
|
226
|
-
/** A list of tools or a ToolNode. */
|
|
227
265
|
tools?: ToolNode | (ServerTool | ClientTool)[];
|
|
228
266
|
/**
|
|
229
267
|
* An optional prompt for the LLM. This takes full graph state BEFORE the LLM is called and prepares the input to LLM.
|
|
@@ -239,12 +277,12 @@ StructuredResponseType extends Record<string, any> = Record<string, any>, Contex
|
|
|
239
277
|
* Prior to `v0.2.46`, the prompt was set using `stateModifier` / `messagesModifier` parameters.
|
|
240
278
|
* This is now deprecated and will be removed in a future release.
|
|
241
279
|
*
|
|
242
|
-
* Cannot be used together with `
|
|
280
|
+
* Cannot be used together with `modifyModelRequest`.
|
|
243
281
|
*/
|
|
244
|
-
|
|
282
|
+
systemPrompt?: string;
|
|
245
283
|
/**
|
|
246
284
|
* An optional schema for the context. It allows to pass in a typed context object into the agent
|
|
247
|
-
* invocation and allows to access it in hooks such as `prompt` and
|
|
285
|
+
* invocation and allows to access it in hooks such as `prompt` and middleware.
|
|
248
286
|
* As opposed to the agent state, defined in `stateSchema`, the context is not persisted between
|
|
249
287
|
* agent invocations.
|
|
250
288
|
*
|
|
@@ -280,10 +318,10 @@ StructuredResponseType extends Record<string, any> = Record<string, any>, Contex
|
|
|
280
318
|
checkpointSaver?: BaseCheckpointSaver | boolean;
|
|
281
319
|
/** An optional checkpoint saver to persist the agent's state. Alias of "checkpointSaver". */
|
|
282
320
|
checkpointer?: BaseCheckpointSaver | boolean;
|
|
283
|
-
/**
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
321
|
+
/**
|
|
322
|
+
* An optional store to persist the agent's state.
|
|
323
|
+
* @see {@link https://docs.langchain.com/oss/javascript/langgraph/memory#memory-storage | Long-term memory}
|
|
324
|
+
*/
|
|
287
325
|
store?: BaseStore;
|
|
288
326
|
/**
|
|
289
327
|
* An optional schema for the final agent output.
|
|
@@ -340,10 +378,10 @@ StructuredResponseType extends Record<string, any> = Record<string, any>, Contex
|
|
|
340
378
|
*/
|
|
341
379
|
responseFormat?: ResponseFormatType;
|
|
342
380
|
/**
|
|
343
|
-
*
|
|
381
|
+
* Middleware instances to run during agent execution.
|
|
344
382
|
* Each middleware can define its own state schema and hook into the agent lifecycle.
|
|
345
383
|
*/
|
|
346
|
-
|
|
384
|
+
middleware?: readonly AgentMiddleware<any, any, any>[];
|
|
347
385
|
/**
|
|
348
386
|
* An optional name for the agent.
|
|
349
387
|
*/
|
|
@@ -377,17 +415,53 @@ StructuredResponseType extends Record<string, any> = Record<string, any>, Contex
|
|
|
377
415
|
*/
|
|
378
416
|
version?: "v1" | "v2";
|
|
379
417
|
};
|
|
418
|
+
/**
|
|
419
|
+
* Helper type to check if a type is optional (includes undefined)
|
|
420
|
+
*/
|
|
421
|
+
type IsOptionalType<T> = undefined extends T ? true : false;
|
|
422
|
+
/**
|
|
423
|
+
* Extract non-undefined part of a union that includes undefined
|
|
424
|
+
*/
|
|
425
|
+
type ExtractNonUndefined<T> = T extends undefined ? never : T;
|
|
380
426
|
/**
|
|
381
427
|
* Helper type to check if all properties of a type are optional
|
|
382
428
|
*/
|
|
383
|
-
type IsAllOptional<T> =
|
|
429
|
+
type IsAllOptional<T> =
|
|
430
|
+
// If T includes undefined, then it's optional (can be omitted entirely)
|
|
431
|
+
undefined extends T ? true : IsOptionalType<T> extends true ? true : ExtractNonUndefined<T> extends Record<string, any> ? {} extends ExtractNonUndefined<T> ? true : false : IsOptionalType<T>;
|
|
384
432
|
/**
|
|
385
433
|
* Helper type to extract input type from context schema (with optional defaults)
|
|
386
434
|
*/
|
|
387
435
|
type InferContextInput<ContextSchema extends AnyAnnotationRoot | InteropZodObject> = ContextSchema extends InteropZodObject ? InferInteropZodInput<ContextSchema> : ContextSchema extends AnyAnnotationRoot ? ToAnnotationRoot<ContextSchema>["State"] : {};
|
|
388
436
|
/**
|
|
389
|
-
* Helper
|
|
437
|
+
* Helper to check if ContextSchema is the default (AnyAnnotationRoot)
|
|
438
|
+
*/
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Pregel options that are propagated to the agent
|
|
442
|
+
*/
|
|
443
|
+
type CreateAgentPregelOptions = "configurable" | "durability" | "store" | "cache" | "signal" | "recursionLimit" | "maxConcurrency" | "timeout";
|
|
444
|
+
/**
|
|
445
|
+
* Decide whether provided configuration requires a context
|
|
446
|
+
*/
|
|
447
|
+
type InvokeConfiguration<ContextSchema extends Record<string, any>> =
|
|
448
|
+
/**
|
|
449
|
+
* If the context schema is a default object, `context` can be optional
|
|
450
|
+
*/
|
|
451
|
+
ContextSchema extends InteropZodDefault<any> ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & {
|
|
452
|
+
context?: Partial<ContextSchema>;
|
|
453
|
+
} : IsAllOptional<ContextSchema> extends true ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & {
|
|
454
|
+
context?: Partial<ContextSchema>;
|
|
455
|
+
} : Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & WithMaybeContext<ContextSchema>;
|
|
456
|
+
type StreamConfiguration<ContextSchema extends Record<string, any>> =
|
|
457
|
+
/**
|
|
458
|
+
* If the context schema is a default object, `context` can be optional
|
|
390
459
|
*/
|
|
460
|
+
ContextSchema extends InteropZodDefault<any> ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & {
|
|
461
|
+
context?: Partial<ContextSchema>;
|
|
462
|
+
} : IsAllOptional<ContextSchema> extends true ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions | "streamMode">> & {
|
|
463
|
+
context?: Partial<ContextSchema>;
|
|
464
|
+
} : Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions | "streamMode">> & WithMaybeContext<ContextSchema>;
|
|
391
465
|
//#endregion
|
|
392
|
-
export { AgentBuiltInState, AgentMiddleware, BuiltInState,
|
|
466
|
+
export { AgentBuiltInState, AgentMiddleware, BuiltInState, CreateAgentParams, InferContextInput, InferMiddlewareContextInputs, InferMiddlewareInputStates, InferMiddlewareStates, InvokeConfiguration, JumpToTarget, MiddlewareResult, ModelRequest, Runtime$1 as Runtime, StreamConfiguration };
|
|
393
467
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":["z","InteropZodObject","InteropZodType","InferInteropZodInput","LangGraphRunnableConfig","START","LanguageModelLike","SystemMessage","BaseMessageLike","BaseMessage","All","BaseCheckpointSaver","BaseStore","Runnable","PreHookAnnotation","AnyAnnotationRoot","ToAnnotationRoot","ResponseFormat","ToolStrategy","TypedToolStrategy","ProviderStrategy","ResponseFormatUndefined","JsonSchemaFormat","ToolNode","ClientTool","ServerTool","AgentRuntime","N","BuiltInState","ToolCall","Record","ToolResult","AnthropicModelSettings","ModelRequest","Runtime","TContext","Controls","TState","Partial","ControlAction","Error","TStateSchema","MiddlewareResult","AgentBuiltInState","FilterPrivateProps","T","K","InferMiddlewareState","AgentMiddleware","S","ZodObject","infer","InferMiddlewareInputState","input","InferMiddlewareStates","First","Rest","InferMiddlewareInputStates","InferMergedState","InferMergedInputState","InferMiddlewareContext","C","InferMiddlewareContextInput","InferMiddlewareContexts","InferMiddlewareContextInputs","ZodRawShape","TSchema","TContextSchema","TFullContext","Promise","ExecutedToolCall","LLMCall","Prompt","ContextSchema","DynamicLLMFunction","CreateAgentParams","StructuredResponseType","ResponseFormatType","AbortSignal","IsAllOptional","InferContextInput","InferAgentConfig","TMiddlewares","InternalAgentState"],"sources":["../../../src/agents/middlewareAgent/types.d.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport { z } from \"zod\";\nimport type { InteropZodObject, InteropZodType, InferInteropZodInput } from \"@langchain/core/utils/types\";\nimport type { LangGraphRunnableConfig, START } from \"@langchain/langgraph\";\nimport type { LanguageModelLike } from \"@langchain/core/language_models/base\";\nimport type { SystemMessage, BaseMessageLike, BaseMessage } from \"@langchain/core/messages\";\nimport type { All, BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport type { Runnable } from \"@langchain/core/runnables\";\nimport type { PreHookAnnotation, AnyAnnotationRoot, ToAnnotationRoot } from \"../annotation.js\";\nimport type { ResponseFormat, ToolStrategy, TypedToolStrategy, ProviderStrategy, ResponseFormatUndefined, JsonSchemaFormat } from \"../responses.js\";\nimport type { ToolNode } from \"../nodes/ToolNode.js\";\nimport type { ClientTool, ServerTool, AgentRuntime } from \"../types.js\";\nexport type N = typeof START | \"model_request\" | \"tools\";\nexport interface BuiltInState {\n messages: BaseMessage[];\n}\n/**\n * Information about a tool call that has been executed.\n */\nexport interface ToolCall {\n /**\n * The ID of the tool call.\n */\n id: string;\n /**\n * The name of the tool that was called.\n */\n name: string;\n /**\n * The arguments that were passed to the tool.\n */\n args: Record<string, any>;\n}\n/**\n * Information about a tool result from a tool execution.\n */\nexport interface ToolResult {\n /**\n * The ID of the tool call.\n */\n id: string;\n /**\n * The result of the tool call.\n */\n result: any;\n /**\n * An optional error message if the tool call failed.\n */\n error?: string;\n}\nexport interface AnthropicModelSettings {\n cache_control: {\n type: string;\n ttl: string;\n };\n}\n/**\n * Configuration for modifying a model call at runtime.\n * All fields are optional and only provided fields will override defaults.\n */\nexport interface ModelRequest {\n /**\n * The model to use for this step.\n */\n model: LanguageModelLike;\n /**\n * The messages to send to the model.\n */\n messages: BaseMessage[];\n /**\n * The system message for this step.\n */\n systemMessage?: BaseMessage;\n /**\n * Tool choice configuration (model-specific format).\n * Can be one of:\n * - `\"auto\"`: means the model can pick between generating a message or calling one or more tools.\n * - `\"none\"`: means the model will not call any tool and instead generates a message.\n * - `\"required\"`: means the model must call one or more tools.\n * - `{ type: \"function\", function: { name: string } }`: The model will use the specified function.\n */\n toolChoice?: \"auto\" | \"none\" | \"required\" | {\n type: \"function\";\n function: {\n name: string;\n };\n };\n /**\n * The tools to make available for this step.\n * Can be tool names (strings) or tool instances.\n */\n tools: (ClientTool | ServerTool)[];\n /**\n * The model settings to use for this step.\n * Currently only supported for Anthropic models.\n */\n modelSettings?: AnthropicModelSettings | Record<string, any>;\n}\n/**\n * Runtime information available to middleware (readonly).\n */\nexport interface Runtime<TContext = unknown> {\n readonly toolCalls: ToolCall[];\n readonly toolResults: ToolResult[];\n // readonly tokenUsage: {\n // readonly inputTokens: number;\n // readonly outputTokens: number;\n // readonly totalTokens: number;\n // };\n readonly context: TContext;\n}\n/**\n * Control flow interface for middleware.\n */\nexport interface Controls<TState = unknown> {\n jumpTo(target: \"model\" | \"tools\", stateUpdate?: Partial<TState>): ControlAction<TState>;\n terminate(result?: Partial<TState> | Error): ControlAction<TState>;\n}\n/**\n * Control action type returned by control methods.\n */\nexport type ControlAction<TStateSchema> = {\n type: \"jump\" | \"terminate\" | \"retry\";\n target?: string;\n stateUpdate?: Partial<TStateSchema>;\n result?: any;\n error?: Error;\n};\n/**\n * Result type for middleware functions.\n */\nexport type MiddlewareResult<TState> = TState | void;\n/**\n * Type for the agent's built-in state properties.\n */\nexport type AgentBuiltInState = {\n messages: BaseMessage[];\n};\n/**\n * Helper type to filter out properties that start with underscore (private properties)\n */\ntype FilterPrivateProps<T> = {\n [K in keyof T as K extends `_${string}` ? never : K]: T[K];\n};\n/**\n * Helper type to infer the state schema type from a middleware\n * This filters out private properties (those starting with underscore)\n */\nexport type InferMiddlewareState<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<infer S, any, any> ? S extends z.ZodObject<any> ? FilterPrivateProps<z.infer<S>> : {} : {};\n/**\n * Helper type to infer the input state schema type from a middleware (all properties optional)\n * This filters out private properties (those starting with underscore)\n */\nexport type InferMiddlewareInputState<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<infer S, any, any> ? S extends z.ZodObject<any> ? FilterPrivateProps<z.input<S>> : {} : {};\n/**\n * Helper type to infer merged state from an array of middlewares (just the middleware states)\n */\nexport type InferMiddlewareStates<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareState<First> & InferMiddlewareStates<Rest> : InferMiddlewareState<First> : {} : {};\n/**\n * Helper type to infer merged input state from an array of middlewares (with optional defaults)\n */\nexport type InferMiddlewareInputStates<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareInputState<First> & InferMiddlewareInputStates<Rest> : InferMiddlewareInputState<First> : {} : {};\n/**\n * Helper type to infer merged state from an array of middlewares (includes built-in state)\n */\nexport type InferMergedState<T extends readonly AgentMiddleware<any, any, any>[]> = InferMiddlewareStates<T> & AgentBuiltInState;\n/**\n * Helper type to infer merged input state from an array of middlewares (includes built-in state)\n */\nexport type InferMergedInputState<T extends readonly AgentMiddleware<any, any, any>[]> = InferMiddlewareInputStates<T> & AgentBuiltInState;\n/**\n * Helper type to infer the context schema type from a middleware\n */\nexport type InferMiddlewareContext<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<any, infer C, any> ? C extends z.ZodObject<any> ? z.infer<C> : {} : {};\n/**\n * Helper type to infer the input context schema type from a middleware (with optional defaults)\n */\nexport type InferMiddlewareContextInput<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<any, infer C, any> ? C extends z.ZodObject<any> ? z.input<C> : {} : {};\n/**\n * Helper type to infer merged context from an array of middlewares\n */\nexport type InferMiddlewareContexts<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareContext<First> & InferMiddlewareContexts<Rest> : InferMiddlewareContext<First> : {} : {};\n/**\n * Helper type to infer merged input context from an array of middlewares (with optional defaults)\n */\nexport type InferMiddlewareContextInputs<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareContextInput<First> & InferMiddlewareContextInputs<Rest> : InferMiddlewareContextInput<First> : {} : {};\n/**\n * Base middleware interface.\n */\nexport interface AgentMiddleware<TSchema extends z.ZodObject<z.ZodRawShape> | undefined = undefined, TContextSchema extends z.ZodObject<z.ZodRawShape> | undefined = undefined, TFullContext = any> {\n stateSchema?: TSchema;\n contextSchema?: TContextSchema;\n name: string;\n /**\n * Runs before each LLM call, can modify call parameters, changes are not persistent\n * e.g. if you change `model`, it will only be changed for the next model call\n *\n * @param options - Current call options (can be modified by previous middleware)\n * @param state - Current state (read-only in this phase)\n * @param runtime - Runtime context and metadata\n * @returns Modified options or undefined to pass through\n */\n prepareModelRequest?(request: ModelRequest, state: (TSchema extends z.ZodObject<any> ? z.infer<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<Partial<ModelRequest> | void> | Partial<ModelRequest> | void;\n beforeModel?(state: (TSchema extends z.ZodObject<any> ? z.infer<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>, controls: Controls<(TSchema extends z.ZodObject<any> ? z.infer<TSchema> : {}) & AgentBuiltInState>): Promise<MiddlewareResult<Partial<TSchema extends z.ZodObject<any> ? z.infer<TSchema> : {}>>>;\n afterModel?(state: (TSchema extends z.ZodObject<any> ? z.infer<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>, controls: Controls<(TSchema extends z.ZodObject<any> ? z.infer<TSchema> : {}) & AgentBuiltInState>): Promise<MiddlewareResult<Partial<TSchema extends z.ZodObject<any> ? z.infer<TSchema> : {}>>>;\n}\n/**\n * Information about a tool call that has been executed.\n */\nexport interface ExecutedToolCall {\n /**\n * The name of the tool that was called.\n */\n name: string;\n /**\n * The arguments that were passed to the tool.\n */\n args: Record<string, unknown>;\n /**\n * The ID of the tool call.\n */\n tool_id: string;\n /**\n * The result of the tool call (if available).\n */\n result?: unknown;\n}\n/**\n * Information about an LLM invocation.\n */\nexport interface LLMCall {\n /**\n * The messages that were sent to the LLM.\n */\n messages: BaseMessage[];\n /**\n * The response from the LLM.\n */\n response?: BaseMessage;\n}\n/**\n * Duplicate of the Prompt type from ../types.ts\n */\nexport type Prompt<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot> = SystemMessage | string | ((state: AgentBuiltInState, config: LangGraphRunnableConfig<ToAnnotationRoot<ContextSchema>[\"State\"]>) => BaseMessageLike[] | Promise<BaseMessageLike[]>) | Runnable;\nexport type DynamicLLMFunction<ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot> = (state: AgentBuiltInState & PreHookAnnotation[\"State\"], runtime: AgentRuntime<ToAnnotationRoot<ContextSchema>[\"State\"]>) => Promise<LanguageModelLike> | LanguageModelLike;\nexport type CreateAgentParams<\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nStructuredResponseType extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, ResponseFormatType = InteropZodType<StructuredResponseType> | InteropZodType<unknown>[] | JsonSchemaFormat | JsonSchemaFormat[] | ResponseFormat | TypedToolStrategy<StructuredResponseType> | ToolStrategy<StructuredResponseType> | ProviderStrategy<StructuredResponseType> | ResponseFormatUndefined> = {\n /** The chat model that can utilize OpenAI-style tool calling. */\n llm?: LanguageModelLike | DynamicLLMFunction<ContextSchema>;\n /**\n * Initializes a ChatModel based on the provided model name and provider.\n * It supports various model providers and allows for runtime configuration of model parameters.\n *\n * @uses {@link initChatModel}\n * @example\n * ```ts\n * const agent = createAgent({\n * model: \"anthropic:claude-3-7-sonnet-latest\",\n * // ...\n * });\n * ```\n */\n model?: string;\n /** A list of tools or a ToolNode. */\n tools?: ToolNode | (ServerTool | ClientTool)[];\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 * Cannot be used together with `prepareModelRequest`.\n */\n prompt?: Prompt<ContextSchema>;\n /**\n * An optional schema for the context. It allows to pass in a typed context object into the agent\n * invocation and allows to access it in hooks such as `prompt` and middlewares.\n * As opposed to the agent state, defined in `stateSchema`, the context is not persisted between\n * agent invocations.\n *\n * @example\n * ```ts\n * const agent = createAgent({\n * llm: model,\n * tools: [getWeather],\n * contextSchema: z.object({\n * capital: z.string(),\n * }),\n * prompt: (state, config) => {\n * return [\n * new SystemMessage(`You are a helpful assistant. The capital of France is ${config.context.capital}.`),\n * ];\n * },\n * });\n *\n * const result = await agent.invoke({\n * messages: [\n * new SystemMessage(\"You are a helpful assistant.\"),\n * new HumanMessage(\"What is the capital of France?\"),\n * ],\n * }, {\n * context: {\n * capital: \"Paris\",\n * },\n * });\n * ```\n */\n contextSchema?: ContextSchema;\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 * ```ts\n * const agent = createAgent({\n * responseFormat: z.object({\n * capital: z.string(),\n * }),\n * // ...\n * });\n * ```\n * - JSON schema\n * ```ts\n * const agent = createAgent({\n * responseFormat: {\n * type: \"json_schema\",\n * schema: {\n * type: \"object\",\n * properties: {\n * capital: { type: \"string\" },\n * },\n * required: [\"capital\"],\n * },\n * },\n * // ...\n * });\n * ```\n * - Create React Agent ResponseFormat\n * ```ts\n * import { providerStrategy, toolStrategy } from \"langchain\";\n * const agent = createAgent({\n * responseFormat: providerStrategy(\n * z.object({\n * capital: z.string(),\n * })\n * ),\n * // or\n * responseFormat: [\n * toolStrategy({ ... }),\n * toolStrategy({ ... }),\n * ]\n * // ...\n * });\n * ```\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?: ResponseFormatType;\n /**\n * Middlewares to run during agent execution.\n * Each middleware can define its own state schema and hook into the agent lifecycle.\n */\n middlewares?: readonly AgentMiddleware<any, any, 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;\n /**\n * Use to specify how to expose the agent name to the underlying supervisor LLM.\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 abort signal that indicates that the overall operation should be aborted.\n */\n signal?: AbortSignal;\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 `\"v2\"`\n */\n version?: \"v1\" | \"v2\";\n};\n/**\n * Helper type to check if all properties of a type are optional\n */\nexport type IsAllOptional<T> = T extends Record<string, any> ? {} extends T ? true : false : true;\n/**\n * Helper type to extract input type from context schema (with optional defaults)\n */\nexport type InferContextInput<ContextSchema extends AnyAnnotationRoot | InteropZodObject> = ContextSchema extends InteropZodObject ? InferInteropZodInput<ContextSchema> : ContextSchema extends AnyAnnotationRoot ? ToAnnotationRoot<ContextSchema>[\"State\"] : {};\n/**\n * Helper type to get the required config type based on context schema\n */\nexport type InferAgentConfig<ContextSchema extends AnyAnnotationRoot | InteropZodObject, TMiddlewares extends readonly AgentMiddleware<any, any, any>[]> = IsAllOptional<InferContextInput<ContextSchema> & InferMiddlewareContextInputs<TMiddlewares>> extends true ? LangGraphRunnableConfig<{\n context?: InferContextInput<ContextSchema> & InferMiddlewareContextInputs<TMiddlewares>;\n}> | undefined : LangGraphRunnableConfig<{\n context: InferContextInput<ContextSchema> & InferMiddlewareContextInputs<TMiddlewares>;\n}>;\nexport type InternalAgentState<StructuredResponseType extends Record<string, unknown> | undefined = Record<string, unknown>> = {\n messages: BaseMessage[];\n __preparedModelOptions?: ModelRequest;\n} & (StructuredResponseType extends ResponseFormatUndefined ? Record<string, never> : {\n structuredResponse: StructuredResponseType;\n});\nexport {};\n"],"mappings":";;;;;;;;;;;;;KAYY2B,CAAAA,UAAWtB;AAAXsB,UACKC,YAAAA,CADW;EACXA,QAAAA,EACHnB,WADe,EAAA;AAM7B;AAiBA;AAcA;AAUA;AAA6B,UAzCZoB,QAAAA,CAyCY;EAAA;;;EAYE,EAAA,EAmBnBL,MAAAA;EAAU;;;EAK6B,IAAA,EAAA,MAAA;EAKlCU;;;EACe,IACNH,EAxEhBD,MAwEgBC,CAAAA,MAAAA,EAAAA,GAAAA,CAAAA;;AAMI;AAK9B;;AAC4DM,UA/E3CN,UAAAA,CA+E2CM;EAAM;;;EAAiB,EAAA,EACpDA,MAAAA;EAAM;;;EAAgC,MAApBE,EAAAA,GAAAA;EAAa;AAK9D;;EAAyB,KAGCE,CAAAA,EAAAA,MAAAA;;AAEdD,UA5EKR,sBAAAA,CA4ELQ;EAAK,aAAA,EAAA;IAKLE,IAAAA,EAAAA,MAAAA;IAIAC,GAAAA,EAAAA,MAAAA;EAMPC,CAAAA;;;;;;AACuDE,UAlF3Cb,YAAAA,CAkF2Ca;EAAC;AAM7D;;EAAgC,KAAWE,EApFhC1C,iBAoFgC0C;EAAe;;;EAAmE,QAAWE,EAhF1HzC,WAgF0HyC,EAAAA;EAAS;;;EAA0B,aAAA,CAAA,EA5EvJzC,WA4EuJ;EAK/J2C;;;;;;;;EAA8K,UAAPC,CAAAA,EAAAA,MAAAA,GAAAA,MAAAA,GAAAA,UAAAA,GAAAA;IAArBT,IAAAA,EAAAA,UAAAA;IAAkB,QAAA,EAAA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CAzDJe,UAyDIf,GAzDSc,UAyDTd,CAAAA,EAAAA;EAAG;;;;;;AAkFP;AAiBxB;;;;;AAA2E;AAI3E;;;EAAqE,MAAGT,CAAAA,EA/I3DuE,MA+I2DvE,CA/IpDwE,aA+IoDxE,CAAAA;EAAgB;;;;;;;;AAA6I;;;;;;;;;;;;;;;;;;;;;;;;;kBA7GjNwE;;oBAEE9D;;iBAEHA;;oBAEGgB,MAAMjB;;mBAEPiB,MAAMjB;UACfE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAsDSiE;;;;;yBAKM7B;;;;;;;;;;;;;;;;;;;;WAoBd8B;;;;;;;;;;;;;;;;;KAiBDC,mBAAmBlC,UAAUf,iCAAiCe;;;;KAI9DmC,wCAAwCjE,oBAAoBd,oBAAoBwE,sBAAsBxE,mBAAmBE,qBAAqBsE,iBAAiBA,sBAAsB1D,oBAAoBC,iBAAiByD"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":["InteropZodObject","InteropZodDefault","InteropZodOptional","InteropZodType","InferInteropZodInput","InferInteropZodOutput","LangGraphRunnableConfig","START","PregelOptions","Runtime","LangGraphRuntime","END","LanguageModelLike","BaseMessage","BaseCheckpointSaver","BaseStore","JUMP_TO_TARGETS","AnyAnnotationRoot","ToAnnotationRoot","ResponseFormat","ToolStrategy","TypedToolStrategy","ProviderStrategy","JsonSchemaFormat","ResponseFormatUndefined","Interrupt","ToolNode","ClientTool","ServerTool","N","BuiltInState","JumpToTarget","ToolCall","Record","ToolResult","ModelRequest","IsOptionalZodObject","T","IsDefaultZodObject","WithMaybeContext","TContext","Omit","Partial","TState","Error","ControlAction","TStateSchema","MiddlewareResult","AgentBuiltInState","FilterPrivateProps","K","InferMiddlewareState","AgentMiddleware","S","InferMiddlewareInputState","InferMiddlewareStates","First","Rest","InferMiddlewareInputStates","InferMergedState","InferMergedInputState","InferMiddlewareContext","C","InferMiddlewareContextInput","Inner","InferMiddlewareContexts","MergeContextTypes","A","B","InferMiddlewareContextInputs","JumpTo","TSchema","TContextSchema","TFullContext","Promise","ExecutedToolCall","LLMCall","CreateAgentParams","StructuredResponseType","ContextSchema","ResponseFormatType","AbortSignal","IsOptionalType","ExtractNonUndefined","IsAllOptional","InferContextInput","IsDefaultContext","InferAgentConfig","TMiddleware","InternalAgentState","CreateAgentPregelOptions","InvokeConfiguration","Pick","StreamConfiguration"],"sources":["../../../src/agents/middlewareAgent/types.d.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { InteropZodObject, InteropZodDefault, InteropZodOptional, InteropZodType, InferInteropZodInput, InferInteropZodOutput } from \"@langchain/core/utils/types\";\nimport type { LangGraphRunnableConfig, START, PregelOptions, Runtime as LangGraphRuntime, END } from \"@langchain/langgraph\";\nimport type { LanguageModelLike } from \"@langchain/core/language_models/base\";\nimport type { BaseMessage } from \"@langchain/core/messages\";\nimport type { BaseCheckpointSaver, BaseStore } from \"@langchain/langgraph-checkpoint\";\nimport { JUMP_TO_TARGETS } from \"./constants.js\";\nimport type { AnyAnnotationRoot, ToAnnotationRoot } from \"../annotation.js\";\nimport type { ResponseFormat, ToolStrategy, TypedToolStrategy, ProviderStrategy, JsonSchemaFormat } from \"../responses.js\";\nimport type { ResponseFormatUndefined } from \"../annotation.js\";\nimport type { Interrupt } from \"../interrupt.js\";\nimport type { ToolNode } from \"../nodes/ToolNode.js\";\nimport type { ClientTool, ServerTool } from \"../types.js\";\nexport type N = typeof START | \"model_request\" | \"tools\";\nexport interface BuiltInState {\n messages: BaseMessage[];\n __interrupt__?: Interrupt[];\n /**\n * Optional property to control routing after afterModel middleware execution.\n * When set by middleware, the agent will jump to the specified node instead of\n * following normal routing logic. The property is automatically cleared after use.\n *\n * - \"model_request\": Jump back to the model for another LLM call\n * - \"tools\": Jump to tool execution (requires tools to be available)\n */\n jumpTo?: JumpToTarget;\n}\n/**\n * Information about a tool call that has been executed.\n */\nexport interface ToolCall {\n /**\n * The ID of the tool call.\n */\n id: string;\n /**\n * The name of the tool that was called.\n */\n name: string;\n /**\n * The arguments that were passed to the tool.\n */\n args: Record<string, any>;\n /**\n * The result of the tool call.\n */\n result?: unknown;\n /**\n * An optional error message if the tool call failed.\n */\n error?: string;\n}\n/**\n * Information about a tool result from a tool execution.\n */\nexport interface ToolResult {\n /**\n * The ID of the tool call.\n */\n id: string;\n /**\n * The result of the tool call.\n */\n result: any;\n /**\n * An optional error message if the tool call failed.\n */\n error?: string;\n}\n/**\n * Configuration for modifying a model call at runtime.\n * All fields are optional and only provided fields will override defaults.\n */\nexport interface ModelRequest {\n /**\n * The model to use for this step.\n */\n model: LanguageModelLike;\n /**\n * The messages to send to the model.\n */\n messages: BaseMessage[];\n /**\n * The system message for this step.\n */\n systemPrompt?: string;\n /**\n * Tool choice configuration (model-specific format).\n * Can be one of:\n * - `\"auto\"`: means the model can pick between generating a message or calling one or more tools.\n * - `\"none\"`: means the model will not call any tool and instead generates a message.\n * - `\"required\"`: means the model must call one or more tools.\n * - `{ type: \"function\", function: { name: string } }`: The model will use the specified function.\n */\n toolChoice?: \"auto\" | \"none\" | \"required\" | {\n type: \"function\";\n function: {\n name: string;\n };\n };\n /**\n * The tools to make available for this step.\n */\n tools: string[];\n}\n/**\n * Type helper to check if TContext is an optional Zod schema\n */\ntype IsOptionalZodObject<T> = T extends InteropZodOptional<any> ? true : false;\ntype IsDefaultZodObject<T> = T extends InteropZodDefault<any> ? true : false;\nexport type WithMaybeContext<TContext> = undefined extends TContext ? {\n readonly context?: TContext;\n} : IsOptionalZodObject<TContext> extends true ? {\n readonly context?: TContext;\n} : IsDefaultZodObject<TContext> extends true ? {\n readonly context?: TContext;\n} : {\n readonly context: TContext;\n};\n/**\n * Runtime information available to middleware (readonly).\n */\nexport type Runtime<TState = unknown, TContext = unknown> = Partial<Omit<LangGraphRuntime<TContext>, \"context\" | \"configurable\">> & {\n readonly toolCalls: ToolCall[];\n /**\n * All tool instances that are provided to the agent.\n */\n readonly tools: (ClientTool | ServerTool)[];\n /**\n * Terminates the agent with an update to the state or throws an error.\n * @param result - The result to terminate the agent with.\n */\n terminate(result: Partial<TState> | Error): ControlAction<TState>;\n} & WithMaybeContext<TContext>;\n/**\n * Control action type returned by control methods.\n */\nexport type ControlAction<TStateSchema> = {\n type: \"terminate\";\n target?: string;\n stateUpdate?: Partial<TStateSchema>;\n result?: any;\n error?: Error;\n};\n/**\n * Result type for middleware functions.\n */\nexport type MiddlewareResult<TState> = TState | void;\n/**\n * Type for the agent's built-in state properties.\n */\nexport type AgentBuiltInState = {\n messages: BaseMessage[];\n};\n/**\n * Helper type to filter out properties that start with underscore (private properties)\n */\ntype FilterPrivateProps<T> = {\n [K in keyof T as K extends `_${string}` ? never : K]: T[K];\n};\n/**\n * Helper type to infer the state schema type from a middleware\n * This filters out private properties (those starting with underscore)\n */\nexport type InferMiddlewareState<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<infer S, any, any> ? S extends InteropZodObject ? FilterPrivateProps<InferInteropZodOutput<S>> : {} : {};\n/**\n * Helper type to infer the input state schema type from a middleware (all properties optional)\n * This filters out private properties (those starting with underscore)\n */\nexport type InferMiddlewareInputState<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<infer S, any, any> ? S extends InteropZodObject ? FilterPrivateProps<InferInteropZodInput<S>> : {} : {};\n/**\n * Helper type to infer merged state from an array of middleware (just the middleware states)\n */\nexport type InferMiddlewareStates<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareState<First> & InferMiddlewareStates<Rest> : InferMiddlewareState<First> : {} : {};\n/**\n * Helper type to infer merged input state from an array of middleware (with optional defaults)\n */\nexport type InferMiddlewareInputStates<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareInputState<First> & InferMiddlewareInputStates<Rest> : InferMiddlewareInputState<First> : {} : {};\n/**\n * Helper type to infer merged state from an array of middleware (includes built-in state)\n */\nexport type InferMergedState<T extends readonly AgentMiddleware<any, any, any>[]> = InferMiddlewareStates<T> & AgentBuiltInState;\n/**\n * Helper type to infer merged input state from an array of middleware (includes built-in state)\n */\nexport type InferMergedInputState<T extends readonly AgentMiddleware<any, any, any>[]> = InferMiddlewareInputStates<T> & AgentBuiltInState;\n/**\n * Helper type to infer the context schema type from a middleware\n */\nexport type InferMiddlewareContext<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<any, infer C, any> ? C extends InteropZodObject ? InferInteropZodInput<C> : {} : {};\n/**\n * Helper type to infer the input context schema type from a middleware (with optional defaults)\n */\nexport type InferMiddlewareContextInput<T extends AgentMiddleware<any, any, any>> = T extends AgentMiddleware<any, infer C, any> ? C extends InteropZodOptional<infer Inner> ? InferInteropZodInput<Inner> | undefined : C extends InteropZodObject ? InferInteropZodInput<C> : {} : {};\n/**\n * Helper type to infer merged context from an array of middleware\n */\nexport type InferMiddlewareContexts<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? InferMiddlewareContext<First> & InferMiddlewareContexts<Rest> : InferMiddlewareContext<First> : {} : {};\n/**\n * Helper to merge two context types, preserving undefined unions\n */\ntype MergeContextTypes<A, B> = [A] extends [undefined] ? [B] extends [undefined] ? undefined : B | undefined : [B] extends [undefined] ? A | undefined : [A] extends [B] ? A : [B] extends [A] ? B : A & B;\n/**\n * Helper type to infer merged input context from an array of middleware (with optional defaults)\n */\nexport type InferMiddlewareContextInputs<T extends readonly AgentMiddleware<any, any, any>[]> = T extends readonly [] ? {} : T extends readonly [infer First, ...infer Rest] ? First extends AgentMiddleware<any, any, any> ? Rest extends readonly AgentMiddleware<any, any, any>[] ? MergeContextTypes<InferMiddlewareContextInput<First>, InferMiddlewareContextInputs<Rest>> : InferMiddlewareContextInput<First> : {} : {};\n/**\n * jump targets (user facing)\n */\nexport type JumpToTarget = (typeof JUMP_TO_TARGETS)[number];\n/**\n * jump targets (internal)\n */\nexport type JumpTo = \"model_request\" | \"tools\" | typeof END;\n/**\n * Base middleware interface.\n */\nexport interface AgentMiddleware<TSchema extends InteropZodObject | undefined = undefined, TContextSchema extends InteropZodObject | InteropZodDefault<InteropZodObject> | InteropZodOptional<InteropZodObject> | undefined = undefined, TFullContext = any> {\n stateSchema?: TSchema;\n contextSchema?: TContextSchema;\n name: string;\n beforeModelJumpTo?: JumpToTarget[];\n afterModelJumpTo?: JumpToTarget[];\n tools?: (ClientTool | ServerTool)[];\n /**\n * Runs before each LLM call, can modify call parameters, changes are not persistent\n * e.g. if you change `model`, it will only be changed for the next model call\n *\n * @param options - Current call options (can be modified by previous middleware)\n * @param state - Current state (read-only in this phase)\n * @param runtime - Runtime context and metadata\n * @returns Modified options or undefined to pass through\n */\n modifyModelRequest?(request: ModelRequest, state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<Partial<ModelRequest> | void> | Partial<ModelRequest> | void;\n beforeModel?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;\n afterModel?(state: (TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}) & AgentBuiltInState, runtime: Runtime<TFullContext>): Promise<MiddlewareResult<Partial<TSchema extends InteropZodObject ? InferInteropZodInput<TSchema> : {}>>>;\n}\n/**\n * Information about a tool call that has been executed.\n */\nexport interface ExecutedToolCall {\n /**\n * The name of the tool that was called.\n */\n name: string;\n /**\n * The arguments that were passed to the tool.\n */\n args: Record<string, unknown>;\n /**\n * The ID of the tool call.\n */\n tool_id: string;\n /**\n * The result of the tool call (if available).\n */\n result?: unknown;\n}\n/**\n * Information about an LLM invocation.\n */\nexport interface LLMCall {\n /**\n * The messages that were sent to the LLM.\n */\n messages: BaseMessage[];\n /**\n * The response from the LLM.\n */\n response?: BaseMessage;\n}\nexport type CreateAgentParams<StructuredResponseType extends Record<string, any> = Record<string, any>, ContextSchema extends AnyAnnotationRoot | InteropZodObject = AnyAnnotationRoot, ResponseFormatType = InteropZodType<StructuredResponseType> | InteropZodType<unknown>[] | JsonSchemaFormat | JsonSchemaFormat[] | ResponseFormat | TypedToolStrategy<StructuredResponseType> | ToolStrategy<StructuredResponseType> | ProviderStrategy<StructuredResponseType> | ResponseFormatUndefined> = {\n /**\n * Defines a model to use for the agent. You can either pass in an instance of a LangChain chat model\n * or a string. If a string is provided the agent initializes a ChatModel based on the provided model name and provider.\n * It supports various model providers and allows for runtime configuration of model parameters.\n *\n * @uses {@link initChatModel}\n * @example\n * ```ts\n * const agent = createAgent({\n * model: \"anthropic:claude-3-7-sonnet-latest\",\n * // ...\n * });\n * ```\n *\n * @example\n * ```ts\n * import { ChatOpenAI } from \"@langchain/openai\";\n * const agent = createAgent({\n * model: new ChatOpenAI({ model: \"gpt-4o\" }),\n * // ...\n * });\n * ```\n */\n model?: string | LanguageModelLike;\n /**\n * A list of tools or a ToolNode.\n *\n * @example\n * ```ts\n * import { tool } from \"langchain\";\n *\n * const weatherTool = tool(() => \"Sunny!\", {\n * name: \"get_weather\",\n * description: \"Get the weather for a location\",\n * schema: z.object({\n * location: z.string().describe(\"The location to get weather for\"),\n * }),\n * });\n *\n * const agent = createAgent({\n * tools: [weatherTool],\n * // ...\n * });\n * ```\n */\n tools?: ToolNode | (ServerTool | ClientTool)[];\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 * Cannot be used together with `modifyModelRequest`.\n */\n systemPrompt?: string;\n /**\n * An optional schema for the context. It allows to pass in a typed context object into the agent\n * invocation and allows to access it in hooks such as `prompt` and middleware.\n * As opposed to the agent state, defined in `stateSchema`, the context is not persisted between\n * agent invocations.\n *\n * @example\n * ```ts\n * const agent = createAgent({\n * llm: model,\n * tools: [getWeather],\n * contextSchema: z.object({\n * capital: z.string(),\n * }),\n * prompt: (state, config) => {\n * return [\n * new SystemMessage(`You are a helpful assistant. The capital of France is ${config.context.capital}.`),\n * ];\n * },\n * });\n *\n * const result = await agent.invoke({\n * messages: [\n * new SystemMessage(\"You are a helpful assistant.\"),\n * new HumanMessage(\"What is the capital of France?\"),\n * ],\n * }, {\n * context: {\n * capital: \"Paris\",\n * },\n * });\n * ```\n */\n contextSchema?: ContextSchema;\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 /**\n * An optional store to persist the agent's state.\n * @see {@link https://docs.langchain.com/oss/javascript/langgraph/memory#memory-storage | Long-term memory}\n */\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 * ```ts\n * const agent = createAgent({\n * responseFormat: z.object({\n * capital: z.string(),\n * }),\n * // ...\n * });\n * ```\n * - JSON schema\n * ```ts\n * const agent = createAgent({\n * responseFormat: {\n * type: \"json_schema\",\n * schema: {\n * type: \"object\",\n * properties: {\n * capital: { type: \"string\" },\n * },\n * required: [\"capital\"],\n * },\n * },\n * // ...\n * });\n * ```\n * - Create React Agent ResponseFormat\n * ```ts\n * import { providerStrategy, toolStrategy } from \"langchain\";\n * const agent = createAgent({\n * responseFormat: providerStrategy(\n * z.object({\n * capital: z.string(),\n * })\n * ),\n * // or\n * responseFormat: [\n * toolStrategy({ ... }),\n * toolStrategy({ ... }),\n * ]\n * // ...\n * });\n * ```\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?: ResponseFormatType;\n /**\n * Middleware instances to run during agent execution.\n * Each middleware can define its own state schema and hook into the agent lifecycle.\n */\n middleware?: readonly AgentMiddleware<any, any, 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;\n /**\n * Use to specify how to expose the agent name to the underlying supervisor LLM.\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 abort signal that indicates that the overall operation should be aborted.\n */\n signal?: AbortSignal;\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 `\"v2\"`\n */\n version?: \"v1\" | \"v2\";\n};\n/**\n * Helper type to check if a type is optional (includes undefined)\n */\ntype IsOptionalType<T> = undefined extends T ? true : false;\n/**\n * Extract non-undefined part of a union that includes undefined\n */\ntype ExtractNonUndefined<T> = T extends undefined ? never : T;\n/**\n * Helper type to check if all properties of a type are optional\n */\nexport type IsAllOptional<T> = \n// If T includes undefined, then it's optional (can be omitted entirely)\nundefined extends T ? true : IsOptionalType<T> extends true ? true : ExtractNonUndefined<T> extends Record<string, any> ? {} extends ExtractNonUndefined<T> ? true : false : IsOptionalType<T>;\n/**\n * Helper type to extract input type from context schema (with optional defaults)\n */\nexport type InferContextInput<ContextSchema extends AnyAnnotationRoot | InteropZodObject> = ContextSchema extends InteropZodObject ? InferInteropZodInput<ContextSchema> : ContextSchema extends AnyAnnotationRoot ? ToAnnotationRoot<ContextSchema>[\"State\"] : {};\n/**\n * Helper to check if ContextSchema is the default (AnyAnnotationRoot)\n */\ntype IsDefaultContext<T> = [T] extends [AnyAnnotationRoot] ? any extends T ? true : false : false;\n/**\n * Helper type to get the required config type based on context schema\n */\nexport type InferAgentConfig<ContextSchema extends AnyAnnotationRoot | InteropZodObject, TMiddleware extends readonly AgentMiddleware<any, any, any>[]> = IsDefaultContext<ContextSchema> extends true ? TMiddleware extends readonly [] ? LangGraphRunnableConfig | undefined // No middleware, no context needed\n : WithMaybeContext<InferMiddlewareContextInputs<TMiddleware>> extends {\n readonly context?: any;\n} ? LangGraphRunnableConfig<{\n context?: InferMiddlewareContextInputs<TMiddleware>;\n}> | undefined : LangGraphRunnableConfig<{\n context: InferMiddlewareContextInputs<TMiddleware>;\n}> : WithMaybeContext<InferContextInput<ContextSchema> & InferMiddlewareContextInputs<TMiddleware>> extends {\n readonly context?: any;\n} ? LangGraphRunnableConfig<{\n context?: InferContextInput<ContextSchema> & InferMiddlewareContextInputs<TMiddleware>;\n}> | undefined : LangGraphRunnableConfig<{\n context: InferContextInput<ContextSchema> & InferMiddlewareContextInputs<TMiddleware>;\n}>;\nexport type InternalAgentState<StructuredResponseType extends Record<string, unknown> | undefined = Record<string, unknown>> = {\n messages: BaseMessage[];\n __preparedModelOptions?: ModelRequest;\n} & (StructuredResponseType extends ResponseFormatUndefined ? Record<string, never> : {\n structuredResponse: StructuredResponseType;\n});\n/**\n * Pregel options that are propagated to the agent\n */\ntype CreateAgentPregelOptions = \"configurable\" | \"durability\" | \"store\" | \"cache\" | \"signal\" | \"recursionLimit\" | \"maxConcurrency\" | \"timeout\";\n/**\n * Decide whether provided configuration requires a context\n */\nexport type InvokeConfiguration<ContextSchema extends Record<string, any>> = \n/**\n * If the context schema is a default object, `context` can be optional\n */\nContextSchema extends InteropZodDefault<any> ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & {\n context?: Partial<ContextSchema>;\n} : IsAllOptional<ContextSchema> extends true ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & {\n context?: Partial<ContextSchema>;\n} : Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & WithMaybeContext<ContextSchema>;\nexport type StreamConfiguration<ContextSchema extends Record<string, any>> = \n/**\n * If the context schema is a default object, `context` can be optional\n */\nContextSchema extends InteropZodDefault<any> ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions>> & {\n context?: Partial<ContextSchema>;\n} : IsAllOptional<ContextSchema> extends true ? Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions | \"streamMode\">> & {\n context?: Partial<ContextSchema>;\n} : Partial<Pick<PregelOptions<any, any, any>, CreateAgentPregelOptions | \"streamMode\">> & WithMaybeContext<ContextSchema>;\nexport {};\n"],"mappings":";;;;;;;;;;;;;;AAc6B,UAAZ8B,YAAAA,CAAY;EAAA,QACfjB,EAAAA,WAAAA,EAAAA;EAAW,aACLY,CAAAA,EAAAA,SAAAA,EAAAA;EAAS;AASJ;AAKzB;AA2CA;;;;AAQyB;EA2BpBW,MAAAA,CAAAA,EAnFQL,YAmFRK;;;;AAAqD;AACrDE,UA/EYN,QAAAA,CA+EM;EAAA;;;EAAiC,EAAA,EAAA,MAAA;EAC5CO;;;EAAuD,IAC5CC,EAAAA,MAAAA;EAAQ;;;EAEA,IACRA,EAxEbP,MAwEaO,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BAAyByC,QAAQkD,KAAKpF,8BAA8BkF;YAC5EhD,QAAQqC;IAClBK,cAAcL,8BAA8BrC,QAAQkD,KAAKpF,8BAA8BkF;YAC7EhD,QAAQqC;IAClBrC,QAAQkD,KAAKpF,8BAA8BkF,6BAA6BnD,iBAAiBwC;KACjFc,0CAA0C5D;;;;AAItD8C,sBAAsB9E,yBAAyByC,QAAQkD,KAAKpF,8BAA8BkF;YAC5EhD,QAAQqC;IAClBK,cAAcL,8BAA8BrC,QAAQkD,KAAKpF,8BAA8BkF;YAC7EhD,QAAQqC;IAClBrC,QAAQkD,KAAKpF,8BAA8BkF,4CAA4CnD,iBAAiBwC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/agents/model.ts
|
|
3
|
+
function isBaseChatModel(model) {
|
|
4
|
+
return "invoke" in model && typeof model.invoke === "function" && "_streamResponseChunks" in model;
|
|
5
|
+
}
|
|
6
|
+
function isConfigurableModel(model) {
|
|
7
|
+
return typeof model === "object" && model != null && "_queuedMethodOperations" in model && "_model" in model && typeof model._model === "function";
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.isBaseChatModel = isBaseChatModel;
|
|
12
|
+
exports.isConfigurableModel = isConfigurableModel;
|
|
13
|
+
//# sourceMappingURL=model.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.cjs","names":["model: LanguageModelLike","model: unknown"],"sources":["../../src/agents/model.ts"],"sourcesContent":["import type { LanguageModelLike } from \"@langchain/core/language_models/base\";\nimport type { BaseChatModel } from \"@langchain/core/language_models/chat_models\";\n\nexport interface ConfigurableModelInterface {\n _queuedMethodOperations: Record<string, unknown>;\n _model: () => Promise<BaseChatModel>;\n}\n\nexport function isBaseChatModel(\n model: LanguageModelLike\n): model is BaseChatModel {\n return (\n \"invoke\" in model &&\n typeof model.invoke === \"function\" &&\n \"_streamResponseChunks\" in model\n );\n}\n\nexport function isConfigurableModel(\n model: unknown\n): model is ConfigurableModelInterface {\n return (\n typeof model === \"object\" &&\n model != null &&\n \"_queuedMethodOperations\" in model &&\n \"_model\" in model &&\n typeof model._model === \"function\"\n );\n}\n"],"mappings":";;AAQA,SAAgB,gBACdA,OACwB;AACxB,QACE,YAAY,SACZ,OAAO,MAAM,WAAW,cACxB,2BAA2B;AAE9B;AAED,SAAgB,oBACdC,OACqC;AACrC,QACE,OAAO,UAAU,YACjB,SAAS,QACT,6BAA6B,SAC7B,YAAY,SACZ,OAAO,MAAM,WAAW;AAE3B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/agents/model.ts
|
|
2
|
+
function isBaseChatModel(model) {
|
|
3
|
+
return "invoke" in model && typeof model.invoke === "function" && "_streamResponseChunks" in model;
|
|
4
|
+
}
|
|
5
|
+
function isConfigurableModel(model) {
|
|
6
|
+
return typeof model === "object" && model != null && "_queuedMethodOperations" in model && "_model" in model && typeof model._model === "function";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { isBaseChatModel, isConfigurableModel };
|
|
11
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","names":["model: LanguageModelLike","model: unknown"],"sources":["../../src/agents/model.ts"],"sourcesContent":["import type { LanguageModelLike } from \"@langchain/core/language_models/base\";\nimport type { BaseChatModel } from \"@langchain/core/language_models/chat_models\";\n\nexport interface ConfigurableModelInterface {\n _queuedMethodOperations: Record<string, unknown>;\n _model: () => Promise<BaseChatModel>;\n}\n\nexport function isBaseChatModel(\n model: LanguageModelLike\n): model is BaseChatModel {\n return (\n \"invoke\" in model &&\n typeof model.invoke === \"function\" &&\n \"_streamResponseChunks\" in model\n );\n}\n\nexport function isConfigurableModel(\n model: unknown\n): model is ConfigurableModelInterface {\n return (\n typeof model === \"object\" &&\n model != null &&\n \"_queuedMethodOperations\" in model &&\n \"_model\" in model &&\n typeof model._model === \"function\"\n );\n}\n"],"mappings":";AAQA,SAAgB,gBACdA,OACwB;AACxB,QACE,YAAY,SACZ,OAAO,MAAM,WAAW,cACxB,2BAA2B;AAE9B;AAED,SAAgB,oBACdC,OACqC;AACrC,QACE,OAAO,UAAU,YACjB,SAAS,QACT,6BAA6B,SAC7B,YAAY,SACZ,OAAO,MAAM,WAAW;AAE3B"}
|