site_name: "" site_description: Build language agents as graphs site_url: https://langchain-ai.github.io/langgraph/ repo_url: https://github.com/langchain-ai/langgraph theme: name: material custom_dir: overrides logo_dark_mode: static/wordmark_light.svg logo_light_mode: static/wordmark_dark.svg favicon: static/favicon.png icon: repo: fontawesome/brands/git-alt features: - announce.dismiss - content.code.annotate - content.code.copy - content.code.select - content.tabs.link - content.tooltips - header.autohide - navigation.expand - navigation.footer - navigation.indexes - navigation.instant - navigation.instant.prefetch - navigation.instant.progress - navigation.prune - navigation.tabs - navigation.top - navigation.tracking - search.highlight - search.share - search.suggest - toc.follow palette: - scheme: default primary: white accent: gray toggle: icon: material/brightness-7 name: Switch to dark mode - scheme: slate primary: grey accent: white toggle: icon: material/brightness-4 name: Switch to light mode font: text: "Public Sans" code: "Roboto Mono" plugins: - search: separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])' - autorefs - mkdocstrings: handlers: python: import: - https://docs.python.org/3/objects.inv - https://api.python.langchain.com/en/latest/objects.inv options: members_order: source allow_inspection: true heading_level: 2 show_bases: true show_source: true summary: true inherited_members: true selection: docstring_style: google docstring_section_style: list show_root_toc_entry: false show_signature_annotations: true show_symbol_type_heading: true show_symbol_type_toc: true signature_crossrefs: true options: filters: - "!^_" - mkdocs-jupyter: ignore_h1_titles: true execute: false include_source: True include_requirejs: true - exclude: glob: - tutorials/llm-compiler/math_tools.py - tutorials/llm-compiler/output_parser.py nav: - "index.md" - Tutorials: - "tutorials/index.md" - Quick Start: tutorials/introduction.ipynb - Chatbots: - Customer Support: tutorials/customer-support/customer-support.ipynb - Prompt Generation from User Requirements: tutorials/chatbots/information-gather-prompting.ipynb - Code Assistant: tutorials/code_assistant/langgraph_code_assistant.ipynb - RAG: - Adaptive RAG: tutorials/rag/langgraph_adaptive_rag.ipynb - Adaptive RAG using local LLMs: tutorials/rag/langgraph_adaptive_rag_local.ipynb - Agentic RAG: tutorials/rag/langgraph_agentic_rag.ipynb - Corrective RAG (CRAG): tutorials/rag/langgraph_crag.ipynb - Corrective RAG (CRAG) using local LLMs: tutorials/rag/langgraph_crag_local.ipynb - Self-RAG: tutorials/rag/langgraph_self_rag.ipynb - Self-RAG using local LLMs: tutorials/rag/langgraph_self_rag_local.ipynb - SQL Agent: tutorials/sql-agent.ipynb - Agent Architectures: - Multi-Agent Systems: - Collaboration: tutorials/multi_agent/multi-agent-collaboration.ipynb - Supervision: tutorials/multi_agent/agent_supervisor.ipynb - Hierarchical Teams: tutorials/multi_agent/hierarchical_agent_teams.ipynb - Planning Agents: - Plan-and-Execute: tutorials/plan-and-execute/plan-and-execute.ipynb - Reasoning without Observation: tutorials/rewoo/rewoo.ipynb - LLMCompiler: tutorials/llm-compiler/LLMCompiler.ipynb - Reflection & Critique: - Basic Reflection: tutorials/reflection/reflection.ipynb - Reflexion: tutorials/reflexion/reflexion.ipynb - Language Agent Tree Search: tutorials/lats/lats.ipynb - Self-Discover Agent: tutorials/self-discover/self-discover.ipynb - Memory: - Long-term memory: tutorials/memory/long_term_memory_agent.ipynb - Evaluation & Analysis: - Chatbot Evaluation via Simulation: - Agent-based: tutorials/chatbot-simulation-evaluation/agent-simulation-evaluation.ipynb - In LangSmith: tutorials/chatbot-simulation-evaluation/langsmith-agent-simulation-evaluation.ipynb - Experimental: - Web Research (STORM): tutorials/storm/storm.ipynb - TNT-LLM: tutorials/tnt-llm/tnt-llm.ipynb - Web Navigation: tutorials/web-navigation/web_voyager.ipynb - Competitive Programming: tutorials/usaco/usaco.ipynb - Extract structured output: tutorials/extraction/retries.ipynb - "How-to Guides": - "how-tos/index.md" - Controllability: - Create branches for parallel execution: how-tos/branching.ipynb - Create map-reduce branches for parallel execution: how-tos/map-reduce.ipynb - Control graph recursion limit: how-tos/recursion-limit.ipynb - Persistence: - Add persistence ("memory"): how-tos/persistence.ipynb - Manage conversation history: how-tos/memory/manage-conversation-history.ipynb - Delete messages: how-tos/memory/delete-messages.ipynb - Add summary of the conversation history: how-tos/memory/add-summary-conversation-history.ipynb - Share state between threads: how-tos/memory/shared-state.ipynb - Use Postgres checkpointer for persistence: how-tos/persistence_postgres.ipynb - Create custom checkpointer using MongoDB: how-tos/persistence_mongodb.ipynb - Create custom checkpointer using Redis: how-tos/persistence_redis.ipynb - Human-in-the-loop: - Add breakpoints: how-tos/human_in_the_loop/breakpoints.ipynb - Add dynamic breakpoints: how-tos/human_in_the_loop/dynamic_breakpoints.ipynb - Wait for user input: how-tos/human_in_the_loop/wait-user-input.ipynb - View and update past graph state: how-tos/human_in_the_loop/time-travel.ipynb - Edit graph state: how-tos/human_in_the_loop/edit-graph-state.ipynb - Review tool calls: how-tos/human_in_the_loop/review-tool-calls.ipynb - Streaming: - Stream full state: how-tos/stream-values.ipynb - Stream state updates: how-tos/stream-updates.ipynb - Stream LLM tokens: how-tos/streaming-tokens.ipynb - Stream LLM tokens without LangChain models: how-tos/streaming-tokens-without-langchain.ipynb - Stream custom data: how-tos/streaming-content.ipynb - Configure multiple streaming modes: how-tos/stream-multiple.ipynb - Stream events from within tools: how-tos/streaming-events-from-within-tools.ipynb - Stream events from within tools without LangChain models: how-tos/streaming-events-from-within-tools-without-langchain.ipynb - Stream events from the final node: how-tos/streaming-from-final-node.ipynb - Stream from subgraphs: how-tos/streaming-subgraphs.ipynb - Disable streaming for models that don't support it: how-tos/disable-streaming.ipynb - Tool calling: - Call tools using ToolNode: how-tos/tool-calling.ipynb - Handle tool calling errors: how-tos/tool-calling-errors.ipynb - Pass graph state to tools: how-tos/pass-run-time-values-to-tools.ipynb - Pass config to tools: how-tos/pass-config-to-tools.ipynb - Handle many tools: how-tos/many-tools.ipynb - Subgraphs: - Create subgraphs: how-tos/subgraph.ipynb - Manage state in subgraphs: how-tos/subgraphs-manage-state.ipynb - Transform inputs and outputs of a subgraph: how-tos/subgraph-transform-state.ipynb - State Management: - Use Pydantic model as state: how-tos/state-model.ipynb - Have a separate input and output schema: how-tos/input_output_schema.ipynb - Pass private state between nodes inside the graph: how-tos/pass_private_state.ipynb - Other: - Run graph asynchronously: how-tos/async.ipynb - Visualize your graph: how-tos/visualization.ipynb - Add runtime configuration: how-tos/configuration.ipynb - Add node retries: how-tos/node-retries.ipynb - Return structured output from a ReAct agent: how-tos/react-agent-structured-output.ipynb - Pass custom LangSmith run ID for graph runs: how-tos/run-id-langsmith.ipynb - Return state before hitting recursion limit: how-tos/return-when-recursion-limit-hits.ipynb - Prebuilt ReAct Agent: - Create a ReAct agent: how-tos/create-react-agent.ipynb - Add memory to a ReAct agent: how-tos/create-react-agent-memory.ipynb - Add a system prompt to a ReAct agent: how-tos/create-react-agent-system-prompt.ipynb - Add Human-in-the-loop to a ReAct agent: how-tos/create-react-agent-hitl.ipynb - Create prebuilt ReAct agent from scratch: how-tos/react-agent-from-scratch.ipynb - "Conceptual Guides": - Why LangGraph?: concepts/high_level.md - LangGraph Glossary: concepts/low_level.md - Common Agentic Patterns: concepts/agentic_concepts.md - Human-in-the-Loop: concepts/human_in_the_loop.md - Memory: concepts/memory.md - Multi-Agent Systems: concepts/multi_agent.md - Persistence: concepts/persistence.md - Streaming: concepts/streaming.md - FAQ: concepts/faq.md - Reference: - Graphs: reference/graphs.md - Checkpointing: reference/checkpoints.md - Prebuilt Components: reference/prebuilt.md - Channels: reference/channels.md - Errors: reference/errors.md - Types: reference/types.md - Constants: reference/constants.md - "Cloud (beta)": - "cloud/index.md" - Tutorials: - Quick Start: "cloud/quick_start.md" - How-to Guides: - "cloud/how-tos/index.md" - Setup: - Setup App: "cloud/deployment/setup.md" - Setup App (pyproject.toml): "cloud/deployment/setup_pyproject.md" - Setup App (JavaScript): "cloud/deployment/setup_javascript.md" - Rebuild Graph at Runtime: "cloud/deployment/graph_rebuild.md" - Customize Dockerfile: "cloud/deployment/custom_docker.md" - Test App Locally: "cloud/deployment/test_locally.md" - Deployment: - Deploy to Cloud: "cloud/deployment/cloud.md" - Streaming: - Stream Values: "cloud/how-tos/stream_values.md" - Stream Updates: "cloud/how-tos/stream_updates.md" - Stream Messages: "cloud/how-tos/stream_messages.md" - Stream Events: "cloud/how-tos/stream_events.md" - Stream Debug: "cloud/how-tos/stream_debug.md" - Multiple Modes: "cloud/how-tos/stream_multiple.md" - Double Texting: - Interrupt: "cloud/how-tos/interrupt_concurrent.md" - Rollback: "cloud/how-tos/rollback_concurrent.md" - Reject: "cloud/how-tos/reject_concurrent.md" - Enqueue: "cloud/how-tos/enqueue_concurrent.md" - Human-in-the-Loop: - Add Breakpoint: "cloud/how-tos/human_in_the_loop_breakpoint.md" - Wait for User Input: "cloud/how-tos/human_in_the_loop_user_input.md" - Edit Graph State: "cloud/how-tos/human_in_the_loop_edit_state.md" - Replay and Branch from Prior States: "cloud/how-tos/human_in_the_loop_time_travel.md" - Review Tool Calls: "cloud/how-tos/human_in_the_loop_review_tool_calls.md" - LangGraph Studio: - Test Cloud Deployment: "cloud/how-tos/test_deployment.md" - Test Local Deployment: "cloud/how-tos/test_local_deployment.md" - Invoke graph in LangGraph Studio: "cloud/how-tos/invoke_studio.md" - Interact with threads in LangGraph Studio: "cloud/how-tos/threads_studio.md" - Different Types of Runs: - Run an Agent in the Background: "cloud/how-tos/background_run.md" - Run Multiple Agents in Same Thread: "cloud/how-tos/same-thread.md" - Create Cron Jobs: "cloud/how-tos/cron_jobs.md" - Create Stateless Runs: "cloud/how-tos/stateless_runs.md" - Other: - Configure Agents: "cloud/how-tos/configuration_cloud.md" - Versioning Assistants: "cloud/how-tos/assistant_versioning.md" - Convert LangGraph calls to LangGraph Cloud calls: "cloud/how-tos/langgraph_to_langgraph_cloud.ipynb" - Integrate Webhooks: 'cloud/how-tos/webhooks.md' - Copy Threads: 'cloud/how-tos/copy_threads.md' - Check Status of Threads: "cloud/how-tos/check_thread_status.md" - Conceptual Guides: - API Concepts: "cloud/concepts/api.md" - Cloud Concepts: "cloud/concepts/cloud.md" - Reference: - API: "cloud/reference/api/api_ref.md" - SDK: - Python: "cloud/reference/sdk/python_sdk_ref.md" - JS/TS: "cloud/reference/sdk/js_ts_sdk_ref.md" - CLI: "cloud/reference/cli.md" - Environment Variables: "cloud/reference/env_var.md" - FAQ: - Studio: "cloud/faq/studio.md" markdown_extensions: - abbr - admonition - pymdownx.details - attr_list - def_list - footnotes - md_in_html - pymdownx.superfences - pymdownx.tabbed: alternate_style: true - toc: permalink: true - pymdownx.arithmatex: generic: true - pymdownx.betterem: smart_enable: all - pymdownx.caret - pymdownx.details - pymdownx.emoji: emoji_generator: !!python/name:material.extensions.emoji.to_svg emoji_index: !!python/name:material.extensions.emoji.twemoji - pymdownx.highlight: anchor_linenums: true line_spans: __span use_pygments: true pygments_lang_class: true - pymdownx.inlinehilite - pymdownx.keys - pymdownx.magiclink: normalize_issue_symbols: true repo_url_shorthand: true user: langchain-ai repo: langgraph - pymdownx.mark - pymdownx.smartsymbols - pymdownx.snippets: auto_append: - includes/mkdocs.md - pymdownx.superfences: custom_fences: - name: mermaid class: mermaid format: !!python/name:pymdownx.superfences.fence_code_format - pymdownx.tabbed: alternate_style: true combine_header_slug: true - pymdownx.tasklist: custom_checkbox: true - markdown_include.include: base_path: ./ - github-callouts extra_css: - css/mkdocstrings.css extra: social: - icon: fontawesome/brands/js link: https://langchain-ai.github.io/langgraphjs/ - icon: fontawesome/brands/github link: https://github.com/langchain-ai/langgraph - icon: fontawesome/brands/twitter link: https://twitter.com/LangChainAI analytics: - provider: google - property: G-G8X6ELZYE0 - feedback: title: Was this page helpful? ratings: - icon: material/emoticon-happy-outline name: This page was helpful data: 1 note: >- Thanks for your feedback! - icon: material/emoticon-sad-outline name: This page could be improved data: 0 note: >- Thanks for your feedback! Please help us improve this page by adding to the discussion below. validation: omitted_files: warn absolute_links: warn unrecognized_links: warn anchors: warn