text
stringlengths
35
16k
human: Can you explain Comments? bot: Back to top [ Previous How to add a custom system prompt to the prebuilt ReAct agent ](../create-react-agent-system-prompt/) [ Next How to return structured output from the prebuilt ReAct agent ](../create-react-agent-structured-output/) Copyright (C) 2025 LangChain, Inc | Consen...
human: What is How to wait for user input (Functional API)? bot: Prerequisites This guide assumes familiarity with the following: * Implementing [human-in-the-loop](../../concepts/human_in_the_loop) workflows with [interrupt](../../concepts/human_in_the_loop/#interrupt) * [How to create a ReAct agent using the Functi...
human: Tell me about How to handle large numbers of tools. bot: Prerequisites This guide assumes familiarity with the following: * * * * * The subset of available tools to call is generally at the discretion of the model (although many providers also enable the user to ). As the number of available tools grows, you m...
human: How does Setup work? bot: First, let's install the required packages and set our API keys %%capture --no-stderr %pip install -U langgraph langchain_anthropic import getpass import os def _set_env(var: str): if not os.environ.get(var): os.environ[var] = getpass.getpass(f"{var}: ") _set_env("ANTHROPIC_API_KEY") ...
human: What are the key aspects of Next Steps? bot: For implementation details: * Check out the introductory tutorial on [setting up authentication](../../tutorials/auth/getting_started/) * See the how-to guide on implementing a [custom auth handlers](../../how-tos/auth/custom_auth/) Was this page helpful? Thanks for...
human: Tell me about With a connection. bot: This creates a single, dedicated connection to the database: \- Advantages: Simple to use, suitable for longer transactions \- Best for: Applications with fewer, longer-lived database operations from psycopg import Connection with Connection.connect(DB_URI, **connection_kw...
human: How does Build the agent work? bot: We can now build the agent. We will build a relatively simple ReAct-style agent that does tool calling. We will use Anthropic's models and fake tools (just for demo purposes). # Set up the tool from langchain_openai import ChatOpenAI from langchain_core.tools import tool fro...
human: What are the key aspects of Dependencies? bot: A LangGraph application may depend on other Python packages or JavaScript libraries (depending on the programming language in which the application is written). You will generally need to specify the following information for dependencies to be set up correctly: 1...
human: What is Patterns? bot: Below are a few simple patterns that show examples of **how to** use the **Functional API**. When defining an `entrypoint`, input is restricted to the first argument of the function. To pass multiple inputs, you can use a dictionary. @entrypoint(checkpointer=checkpointer) def my_workflow...
human: What is Approve or Reject? bot: ![image](../img/human_in_the_loop/approve-or-reject.png) Depending on the human's approval or rejection, the graph can proceed with the action or take an alternative path. Pause the graph before a critical step, such as an API call, to review and approve the action. If the actio...
human: What is `interrupt`? bot: The [`interrupt` function](../../reference/types/#langgraph.types.interrupt) in LangGraph enables human-in-the-loop workflows by pausing the graph at a specific node, presenting information to a human, and resuming the graph with their input. This function is useful for tasks like app...
human: How does Executing work? bot: Using the `@entrypoint` yields a [`Pregel`](../../reference/pregel/#langgraph.pregel.Pregel.stream) object that can be executed using the `invoke`, `ainvoke`, `stream`, and `astream` methods. InvokeAsync InvokeStreamAsync Stream config = { "configurable": { "thread_id": "some_thre...
human: Can you explain LangGraph Platform? bot: Streaming is critical for making LLM applications feel responsive to end users. When creating a streaming run, the streaming mode determines what data is streamed back to the API client. LangGraph Platform supports five streaming modes: * `values`: Stream the full state...
human: What are the key aspects of How to create a custom checkpointer using Redis? bot: Prerequisites This guide assumes familiarity with the following: * * When creating LangGraph agents, you can also set them up so that they persist their state. This allows you to do things like interact with an agent multiple tim...
human: Can you explain Replay? bot: It's also possible to play-back a prior graph execution. If we `invoke` a graph with a `thread_id` and a `checkpoint_id`, then we will _re-play_ the previously executed steps _before_ a checkpoint that corresponds to the `checkpoint_id`, and only execute the steps _after_ the check...
human: Can you explain Rebuilds from source code changes? bot: If you modified the source code only (no configuration or dependency changes!) then the image does not require a full rebuild, and LangGraph Studio will only update the relevant parts. The UI status in the bottom left will switch from `Online` to `Stoppin...
human: What is Setup? bot: First, let's install the required packages and set our API keys: %%capture --no-stderr %pip install -U langgraph langchain-openai import getpass import os def _set_env(var: str): if not os.environ.get(var): os.environ[var] = getpass.getpass(f"{var}: ") _set_env("OPENAI_API_KEY") Set up for ...
human: Can you explain Requirements? bot: * You use `langgraph-cli` and/or [LangGraph Studio](../langgraph_studio/) app to test graph locally. * You use `langgraph build` command to build image.
human: Can you explain Installation? bot: You can install the packages using the appropriate package manager for your language. PythonJS pip install langgraph-sdk yarn add @langchain/langgraph-sdk
human: how are you bot: I am fine
human: How does Using multiple interrupts work? bot: Using multiple interrupts within a **single** node can be helpful for patterns like validating human input. However, using multiple interrupts in the same node can lead to unexpected behavior if not handled carefully. When a node contains multiple interrupt calls, ...
human: Tell me about How-to Guides. bot: Here you’ll find answers to “How do I...?” types of questions. These guides are **goal-oriented** and concrete; they're meant to help you complete a specific task. For conceptual explanations see the [Conceptual guide](../concepts/). For end-to-end walk-throughs see [Tutorials...
human: Can you explain With a connection? bot: from psycopg import AsyncConnection async with await AsyncConnection.connect(DB_URI, **connection_kwargs) as conn: checkpointer = AsyncPostgresSaver(conn) graph = create_react_agent(model, tools=tools, checkpointer=checkpointer) config = {"configurable": {"thread_id": "5...
human: What is Comments? bot: Back to top [ Previous How to pass custom run ID or set tags and metadata for graph runs in LangSmith ](../run-id-langsmith/) [ Next How to integrate LangGraph (functional API) with AutoGen, CrewAI, and other frameworks ](../autogen-integration-functional/) Copyright (C) 2025 LangChain, ...
human: What are the key aspects of Comments? bot: Back to top [ Previous How to manage conversation history ](../manage-conversation-history/) [ Next How to add summary of the conversation history ](../add-summary-conversation-history/) Copyright (C) 2025 LangChain, Inc | Consent Preferences Made with
human: How does How to add multi-turn conversation in a multi-agent application (functional API) work? bot: Prerequisites This guide assumes familiarity with the following: * [Multi-agent systems](../../concepts/multi_agent) * [Human-in-the-loop](../../concepts/human_in_the_loop) * [Functional API](../../concepts/fun...
human: What are the key aspects of Cookie consent? bot: We use cookies to recognize your repeated visits and preferences, as well as to measure the effectiveness of our documentation and whether users find what they're searching for. **Clicking "Accept" makes our documentation better. Thank you!** * Google Analytics ...
human: What is Using in LangGraph? bot: With this all in place, we use the `in_memory_store` in LangGraph. The `in_memory_store` works hand-in-hand with the checkpointer: the checkpointer saves state to threads, as discussed above, and the `in_memory_store` allows us to store arbitrary information for access _across_...
human: Tell me about Cloud SaaS. bot: The [Cloud SaaS](../langgraph_cloud/) deployment option is a fully managed model for deployment where we manage the [control plane](../langgraph_control_plane/) and [data plane](../langgraph_data_plane/) in our cloud. This option provides a simple way to deploy and manage your La...
human: What are the key aspects of Comments? bot: Back to top [ Previous How to add runtime configuration to your graph ](../configuration/) [ Next How to return state before hitting recursion limit ](../return-when-recursion-limit-hits/) Copyright (C) 2025 LangChain, Inc | Consent Preferences Made with