import { ... } from "@langchain/langgraph/prebuilt";A conditional edge function that determines whether to route to a tools node or end the graph.
This function is designed to be used as a conditional edge in a LangGraph state graph to implement the common pattern of checking if an AI message contains tool calls that need to be executed.
Attach formatted agent names to the messages passed to and from a language model.
This is useful for making a message history with multiple agents more coherent.
A node that runs the tools requested in the last AIMessage. It can be used either in StateGraph with a "messages" key or in MessageGraph. If multiple tool calls are requested, they will be run in parallel. The output will be a list of ToolMessages, one for each tool call.
Represents a request for human action within the graph execution. Contains the action type and any associated arguments needed for the action.
Represents an interrupt triggered by the graph that requires human intervention.
This is passed to the interrupt function when execution is paused for human input.
Configuration interface that defines what actions are allowed for a human interrupt. This controls the available interaction options when the graph is paused for human input.
Interface for invoking a tool