├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.yml │ ├── config.yml │ ├── documentation.yml │ └── privileged.yml ├── dependabot.yml ├── scripts │ ├── check_sdk_methods.py │ └── run_langgraph_cli_test.py └── workflows │ ├── _integration_test.yml │ ├── _lint.yml │ ├── _test.yml │ ├── _test_langgraph.yml │ ├── _test_release.yml │ ├── baseline.yml │ ├── bench.yml │ ├── ci.yml │ ├── codespell.yml │ ├── deploy_docs.yml │ ├── extract_ignored_words_list.py │ ├── link_check.yml │ ├── release.yml │ ├── release_js.yml │ └── run_notebooks.yml ├── .gitignore ├── .markdown-link-check.config.json ├── CONTRIBUTING.md ├── LICENSE ├── Makefile ├── README.md ├── docs ├── .gitignore ├── Makefile ├── README.md ├── _scripts │ ├── __init__.py │ ├── _patch.py │ ├── add_translation.py │ ├── download_tiktoken.py │ ├── execute_notebooks.sh │ ├── generate_api_reference_links.py │ ├── generate_llms_text.py │ ├── notebook_convert.py │ ├── notebook_convert_templates │ │ └── mdoutput │ │ │ ├── conf.json │ │ │ └── index.md.j2 │ ├── notebook_hooks.py │ ├── prepare_notebooks_for_ci.py │ └── third_party_page │ │ ├── __init__.py │ │ ├── create_third_party_page.py │ │ ├── get_download_stats.py │ │ └── packages.yml ├── cassettes │ ├── agent-simulation-evaluation_32848c2e-be82-46f3-81db-b23fea45461c.msgpack.zlib │ ├── agent-simulation-evaluation_6f80669e-aa78-4666-b67c-a539366d5aab.msgpack.zlib │ ├── agent-simulation-evaluation_f58959bf-2ab5-4330-9ac2-c00f45237e24.msgpack.zlib │ ├── agent_supervisor_0fdc7345-2967-484b-881a-114dfac3f534.msgpack.zlib │ ├── agent_supervisor_56ba78e9-d9c1-457c-a073-d606d5d3e013.msgpack.zlib │ ├── agent_supervisor_71474c5b-6a9b-460e-bf30-77831976aaf9.msgpack.zlib │ ├── agent_supervisor_882f9e00-5fdf-4278-ab26-a59fc949fa91.msgpack.zlib │ ├── agent_supervisor_89b77171-58d0-4b36-8cb3-b69d69e4bdf9.msgpack.zlib │ ├── agent_supervisor_f803943c-6dd2-4b42-93ba-0210ec276132.msgpack.zlib │ ├── async_4b369a6f.msgpack.zlib │ ├── async_8edb04b9-40b6-46f1-a7a8-4b2d8aba7752.msgpack.zlib │ ├── async_cfd140f0-a5a6-4697-8115-322242f197b5.msgpack.zlib │ ├── async_f544977e-31f7-41f0-88c4-ec9c27b8cecb.msgpack.zlib │ ├── branching_1d0e6c56.msgpack.zlib │ ├── branching_66f52a20.msgpack.zlib │ ├── branching_83320227-8ab3-44c0-b6cf-064a7a425b9f.msgpack.zlib │ ├── branching_932c497e.msgpack.zlib │ ├── breakpoints_51923913-20f7-4ee1-b9ba-d01f5fb2869b.msgpack.zlib │ ├── breakpoints_6098e5cb.msgpack.zlib │ ├── breakpoints_9b53f191-1e86-4881-a667-d46a3d66958b.msgpack.zlib │ ├── breakpoints_cfd140f0-a5a6-4697-8115-322242f197b5.msgpack.zlib │ ├── configuration_070f11a6-2441-4db5-9df6-e318f110e281.msgpack.zlib │ ├── configuration_718685f7-4cdd-4181-9fc8-e7762d584727.msgpack.zlib │ ├── configuration_e043a719-f197-46ef-9d45-84740a39aeb0.msgpack.zlib │ ├── configuration_ef50f048-fc43-40c0-b713-346408fcf052.msgpack.zlib │ ├── configuration_f2f7c74b-9fb0-41c6-9728-dcf9d8a3c397.msgpack.zlib │ ├── create-react-agent-manage-message-history_26c53429-90ba-4d0b-abb9-423d9120ad26.msgpack.zlib │ ├── create-react-agent-manage-message-history_831be36a-78a1-4885-9a03-8d085dfd7e37.msgpack.zlib │ ├── create-react-agent-manage-message-history_8eccaaca-5d9c-4faf-b997-d4b8e84b59ac.msgpack.zlib │ ├── create-react-agent-manage-message-history_9ffff6c3-a4f5-47c9-b51d-97caaee85cd6.msgpack.zlib │ ├── cross-thread-persistence-functional_c871a073-a466-46ad-aafe-2b870831057e.msgpack.zlib │ ├── cross-thread-persistence-functional_d362350b-d730-48bd-9652-983812fd7811.msgpack.zlib │ ├── cross-thread-persistence-functional_d862be40-1f8a-4057-81c4-b7bf073dc4c1.msgpack.zlib │ ├── cross-thread-persistence_c871a073-a466-46ad-aafe-2b870831057e.msgpack.zlib │ ├── cross-thread-persistence_d362350b-d730-48bd-9652-983812fd7811.msgpack.zlib │ ├── cross-thread-persistence_d862be40-1f8a-4057-81c4-b7bf073dc4c1.msgpack.zlib │ ├── customer-support_72fceb01-b0ab-4bef-a22f-a2fce6ee33ef.msgpack.zlib │ ├── customer-support_783a548d-029a-47b7-9ac0-9c5203ec92c7.msgpack.zlib │ ├── customer-support_96469e95-5070-4169-bedd-45db94b43d97.msgpack.zlib │ ├── customer-support_b7443751.msgpack.zlib │ ├── disable-streaming_2.msgpack.zlib │ ├── disable-streaming_4.msgpack.zlib │ ├── disable-streaming_8.msgpack.zlib │ ├── dynamic_breakpoints_9a14c8b2-5c25-4201-93ea-e5358ee99bcb.msgpack.zlib │ ├── edit-graph-state_51923913-20f7-4ee1-b9ba-d01f5fb2869b.msgpack.zlib │ ├── edit-graph-state_85e452f8-f33a-4ead-bb4d-7386cdba8edc.msgpack.zlib │ ├── edit-graph-state_cfd140f0-a5a6-4697-8115-322242f197b5.msgpack.zlib │ ├── graph-api_04924627-9326-438b-aa52-91cea76f4477.msgpack.zlib │ ├── graph-api_a6033c2a-3b56-46f5-9c3f-79310e31e545.msgpack.zlib │ ├── hierarchical_agent_teams_6b8badbf-d728-44bd-a2a7-5b4e587c92fe.msgpack.zlib │ ├── hierarchical_agent_teams_912b0604-a178-4246-a36f-2dedae606680.msgpack.zlib │ ├── hierarchical_agent_teams_9860fd46-c24d-40a5-a6ba-e8fddcd43369.msgpack.zlib │ ├── how-tos_create-react-agent_1_python.msgpack.zlib │ ├── information-gather-prompting_1b1613e0.msgpack.zlib │ ├── information-gather-prompting_25793988-45a2-4e65-b33c-64e72aadb10e.msgpack.zlib │ ├── introduction_051dc374-67cc-4371-9dd1-221e07593148.msgpack.zlib │ ├── introduction_10701e49-d4b4-46db-bb30-f895fdf4411d.msgpack.zlib │ ├── introduction_4527cf9a-b191-4bde-858a-e33a74a48c55.msgpack.zlib │ ├── introduction_69071b02-c011-4b7f-90b1-8e89e032322d.msgpack.zlib │ ├── introduction_6a385b06-8d34-4a2d-aded-1cf4bb0ca590.msgpack.zlib │ ├── introduction_7df33d9e-cc76-4a0f-8307-01e619483b3e.msgpack.zlib │ ├── introduction_9f318020-ab7e-415b-a5e2-eddec6d9f3a6.msgpack.zlib │ ├── introduction_a7cc7306-7a4e-466f-8d41-b1a3d07be8bc.msgpack.zlib │ ├── introduction_acbec099-e5d2-497f-929e-c548d7bcbf77.msgpack.zlib │ ├── introduction_dba1b168-f8e0-496d-9bd6-37198fb4776e.msgpack.zlib │ ├── introduction_df6d81bb-e674-44ef-a46e-17b1a8d2381a.msgpack.zlib │ ├── introduction_f5447778-53d7-47f3-801b-f47bcf2185a0.msgpack.zlib │ ├── langgraph_adaptive_rag_2272333e-50b2-42ab-b472-e1055a3b94a8.msgpack.zlib │ ├── langgraph_adaptive_rag_29acc541-d726-4b75-84d1-a215845fe88a.msgpack.zlib │ ├── langgraph_adaptive_rag_4dec9d98-f3dc-4b7f-abc0-9d01c754f2be.msgpack.zlib │ ├── langgraph_adaptive_rag_69a985dd-03c6-45af-a67b-b15746a2cb5f.msgpack.zlib │ ├── langgraph_adaptive_rag_856801cb-f42a-44e7-956f-47845e3664ca.msgpack.zlib │ ├── langgraph_adaptive_rag_9d75f1d7-a47a-4577-bb0d-84b504b0867e.msgpack.zlib │ ├── langgraph_adaptive_rag_ded99680-437a-4c9d-b860-619c88949d84.msgpack.zlib │ ├── langgraph_adaptive_rag_f0c08d14-77a0-4eed-b882-2d636abb22a3.msgpack.zlib │ ├── langgraph_agentic_rag_278d1d83-dda6-4de4-bf8b-be9965c227fa.msgpack.zlib │ ├── langgraph_agentic_rag_7649f05a-cb67-490d-b24a-74d41895139a.msgpack.zlib │ ├── langgraph_code_assistant_2dacccf0-d73f-4017-aaf0-9806ffe5bd2c.msgpack.zlib │ ├── langgraph_code_assistant_3ba3df70-f6b4-4ea5-a210-e10944960bc6.msgpack.zlib │ ├── langgraph_code_assistant_71d90f9e-9dad-410c-a709-093d275029ae.msgpack.zlib │ ├── langgraph_code_assistant_9bcaafe4-ddcf-4fab-8620-2d9b6c508f98.msgpack.zlib │ ├── langgraph_code_assistant_9f14750f-dddc-485b-ba29-5392cdf4ba43.msgpack.zlib │ ├── langgraph_code_assistant_c2eb35d1-4990-47dc-a5c4-208bae588a82.msgpack.zlib │ ├── langgraph_code_assistant_ef7cf662-7a6f-4dee-965c-6309d4045feb.msgpack.zlib │ ├── langgraph_self_rag_1fafad21-60cc-483e-92a3-6a7edb1838e3.msgpack.zlib │ ├── langgraph_self_rag_4138bc51-8c84-4b8a-8d24-f7f470721f6f.msgpack.zlib │ ├── langgraph_self_rag_bd62276f-bf26-40d0-8cff-e07b10e00321.msgpack.zlib │ ├── langgraph_self_rag_c6f4c70e-1660-4149-82c0-837f19fc9fb5.msgpack.zlib │ ├── langgraph_self_rag_dcd77cc1-4587-40ec-b633-5364eab9e1ec.msgpack.zlib │ ├── langgraph_self_rag_e78931ec-940c-46ad-a0b2-f43f953f1fd7.msgpack.zlib │ ├── langgraph_self_rag_fb69dbb9-91ee-4868-8c3c-93af3cd885be.msgpack.zlib │ ├── map-reduce_37ed1f71-63db-416f-b715-4617b33d4b7f.msgpack.zlib │ ├── map-reduce_fd90cace.msgpack.zlib │ ├── multi-agent-collaboration_9f478b05-3f09-447f-a9f4-1b2eae73f5ef.msgpack.zlib │ ├── multi-agent-multi-turn-convo-functional_2b6fde57-86e3-440e-a7bf-f1e9b5ed9ff2.msgpack.zlib │ ├── multi-agent-network-functional_29b47c57-ad05-4f10-83bf-c3ff6ff8eb93.msgpack.zlib │ ├── persistence-functional_08ae8246-11d5-40e1-8567-361e5bef8917.msgpack.zlib │ ├── persistence-functional_273d56a8-f40f-4a51-a27f-7c6bb2bda0ba.msgpack.zlib │ ├── persistence-functional_cfd140f0-a5a6-4697-8115-322242f197b5.msgpack.zlib │ ├── persistence_07584f6a-7b8e-4f18-a135-e0435797e274.msgpack.zlib │ ├── persistence_62ce2760-f23a-4ab1-b73c-d2680e20b611.msgpack.zlib │ ├── plan-and-execute_67ce37b7-e089-479b-bcb8-c3f5d9874613.msgpack.zlib │ ├── plan-and-execute_72d233ca-1dbf-4b43-b680-b3bf39e3691f.msgpack.zlib │ ├── plan-and-execute_746e697a-dec4-4342-a814-9b3456828169.msgpack.zlib │ ├── plan-and-execute_b8ac1f67-e87a-427c-b4f7-44351295b788.msgpack.zlib │ ├── react-agent-from-scratch-functional_11.msgpack.zlib │ ├── react-agent-from-scratch-functional_18.msgpack.zlib │ ├── react-agent-from-scratch-functional_20.msgpack.zlib │ ├── react-agent-from-scratch_11.msgpack.zlib │ ├── react-agent-from-scratch_13.msgpack.zlib │ ├── react-agent-structured-output_15.msgpack.zlib │ ├── react-agent-structured-output_9.msgpack.zlib │ ├── recursion-limit_5.msgpack.zlib │ ├── reflection_06263a07-8a15-4ec3-b692-1c6cef3b1c1f.msgpack.zlib │ ├── reflection_16c5eb2a-8bce-48ab-b87d-9dacb9b64ac6.msgpack.zlib │ ├── reflection_9bbe25dc-fd1e-4ed5-a3c8-fed830b46d12.msgpack.zlib │ ├── reflection_dfbf99a8-3aa0-4e09-936e-8452c35fa84d.msgpack.zlib │ ├── reflexion_2634a3ea-7423-4579-9f4e-390e439c3209.msgpack.zlib │ ├── reflexion_5922e1fe-7533-4f41-8b1d-d812707c1968.msgpack.zlib │ ├── reflexion_6fd51f17-c0b0-44b6-90e2-55a66cb8f5a7.msgpack.zlib │ ├── reflexion_7541f82c.msgpack.zlib │ ├── retries_04e93401-50e2-42d0-8373-326006badebb.msgpack.zlib │ ├── retries_5d072c9c-9404-4338-88c6-b3e136969aca.msgpack.zlib │ ├── retries_746b409c-693d-49af-8c2b-bea0a4b0028d.msgpack.zlib │ ├── retries_f4752239-2aa3-4367-b777-8478c16b9471.msgpack.zlib │ ├── return-when-recursion-limit-hits_6.msgpack.zlib │ ├── review-tool-calls-functional_16.msgpack.zlib │ ├── review-tool-calls-functional_17.msgpack.zlib │ ├── review-tool-calls-functional_20.msgpack.zlib │ ├── review-tool-calls-functional_21.msgpack.zlib │ ├── review-tool-calls-functional_25.msgpack.zlib │ ├── review-tool-calls-functional_26.msgpack.zlib │ ├── review-tool-calls-functional_28.msgpack.zlib │ ├── review-tool-calls_1b3aa6fc-c7fb-4819-8d7f-ba6057cc4edf.msgpack.zlib │ ├── review-tool-calls_2561a38f-edb5-4b44-b2d7-6a7b70d2e6b7.msgpack.zlib │ ├── review-tool-calls_3f05f8b6-6128-4de5-8884-862fc93f1227.msgpack.zlib │ ├── review-tool-calls_a30d40ad-611d-4ec3-84be-869ea05acb89.msgpack.zlib │ ├── review-tool-calls_b2f73998-baae-4c00-8a90-f4153e924941.msgpack.zlib │ ├── review-tool-calls_d57d5131-7912-4216-aa87-b7272507fa51.msgpack.zlib │ ├── review-tool-calls_ec77831c-e6b8-4903-9146-e098a4b2fda1.msgpack.zlib │ ├── review-tool-calls_f9a0d5d4-52ff-49e0-a6f4-41f9a0e844d8.msgpack.zlib │ ├── rewoo_56ecb45b-ea76-4303-a4f3-51406fe8312a.msgpack.zlib │ ├── rewoo_badaca52-5d55-433f-8770-1bd50c10bf7f.msgpack.zlib │ ├── run-id-langsmith_6.msgpack.zlib │ ├── run-id-langsmith_7.msgpack.zlib │ ├── self-discover_6cbfbe81-f751-42da-843a-f9003ace663d.msgpack.zlib │ ├── self-discover_a18d8f24-5d9a-45c5-9739-6f3c4ed6c9c9.msgpack.zlib │ ├── semantic-search_10.msgpack.zlib │ ├── semantic-search_13.msgpack.zlib │ ├── semantic-search_15.msgpack.zlib │ ├── semantic-search_17.msgpack.zlib │ ├── semantic-search_19.msgpack.zlib │ ├── semantic-search_6.msgpack.zlib │ ├── semantic-search_8.msgpack.zlib │ ├── shared-state_c871a073-a466-46ad-aafe-2b870831057e.msgpack.zlib │ ├── shared-state_d362350b-d730-48bd-9652-983812fd7811.msgpack.zlib │ ├── shared-state_d862be40-1f8a-4057-81c4-b7bf073dc4c1.msgpack.zlib │ ├── sql-agent_6c800a77-2359-4011-ab0c-dad22ed333b1.msgpack.zlib │ ├── sql-agent_9317c234-6251-4723-a335-7fee6d11ac2b.msgpack.zlib │ ├── sql-agent_b58ba6b7-5f80-4970-bc29-961de0e24fbd.msgpack.zlib │ ├── state-model_8edb04b9-40b6-46f1-a7a8-4b2d8aba7752.msgpack.zlib │ ├── state-model_e09aaa63.msgpack.zlib │ ├── streaming-events-from-within-tools_2c30c7b4-62df-4855-8219-d5e1a1a09be9.msgpack.zlib │ ├── streaming-events-from-within-tools_4c9cdad3-3e9a-444f-9d9d-eae20b8d3486.msgpack.zlib │ ├── streaming-events-from-within-tools_8ae5051c-53b9-4c53-87b2-d7263cda3b7b.msgpack.zlib │ ├── streaming-events-from-within-tools_c3acdec9-0a24-4348-921e-435c8ea6f9fe.msgpack.zlib │ ├── streaming-events-from-within-tools_ec461f66.msgpack.zlib │ ├── streaming-tokens_96050fba.msgpack.zlib │ ├── streaming-tokens_c9e0df34-6020-445e-8ecd-ca4239e9b22b.msgpack.zlib │ ├── streaming-tokens_e977406d-7be6-4c9f-9185-5e5551f848f3.msgpack.zlib │ ├── streaming-tokens_fdeee9d9-2625-403a-9253-418a0feeed77.msgpack.zlib │ ├── streaming_c251f809-8922-46ea-bd5b-18264fcc523a.msgpack.zlib │ ├── subgraph_13.msgpack.zlib │ ├── subgraph_9.msgpack.zlib │ ├── time-travel_3199a8d0-17c0-4979-ac08-52d7007b7689.msgpack.zlib │ ├── time-travel_f0bab935-6d9b-4cfd-afe8-bfcf4638847e.msgpack.zlib │ ├── wait-user-input-functional_25.msgpack.zlib │ ├── wait-user-input-functional_29.msgpack.zlib │ ├── wait-user-input_a9f599b5-1a55-406b-a76b-f52b3ca06975.msgpack.zlib │ └── wait-user-input_cfd140f0-a5a6-4697-8115-322242f197b5.msgpack.zlib ├── codespell_notebooks.sh ├── docs │ ├── adopters.md │ ├── agents │ │ ├── agents.md │ │ ├── assets │ │ │ ├── agent.png │ │ │ ├── base-chat-ui.mp4 │ │ │ ├── fast_parrot.png │ │ │ ├── interrupt-chat-ui.mp4 │ │ │ ├── mcp.png │ │ │ ├── memory.png │ │ │ ├── react_agent_graphs │ │ │ │ ├── 0000.svg │ │ │ │ ├── 0001.svg │ │ │ │ ├── 0010.svg │ │ │ │ ├── 0011.svg │ │ │ │ ├── 0100.svg │ │ │ │ ├── 0101.svg │ │ │ │ ├── 0110.svg │ │ │ │ ├── 0111.svg │ │ │ │ ├── 1000.svg │ │ │ │ ├── 1001.svg │ │ │ │ ├── 1010.svg │ │ │ │ ├── 1011.svg │ │ │ │ ├── 1100.svg │ │ │ │ ├── 1101.svg │ │ │ │ ├── 1110.svg │ │ │ │ └── 1111.svg │ │ │ ├── summary.png │ │ │ ├── supervisor.png │ │ │ └── swarm.png │ │ ├── context.md │ │ ├── deployment.md │ │ ├── evals.md │ │ ├── human-in-the-loop.md │ │ ├── mcp.md │ │ ├── memory.md │ │ ├── models.md │ │ ├── multi-agent.md │ │ ├── overview.md │ │ ├── prebuilt.md │ │ ├── run_agents.md │ │ ├── streaming.md │ │ ├── tools.md │ │ └── ui.md │ ├── assets │ │ └── react-agent-graphs.json │ ├── cloud │ │ ├── concepts │ │ │ ├── cron_jobs.md │ │ │ ├── runs.md │ │ │ ├── streaming.md │ │ │ ├── threads.md │ │ │ └── webhooks.md │ │ ├── deployment │ │ │ ├── cloud.md │ │ │ ├── custom_docker.md │ │ │ ├── graph_rebuild.md │ │ │ ├── img │ │ │ │ ├── langgraph_studio.png │ │ │ │ └── quick_start_studio.png │ │ │ ├── self_hosted_control_plane.md │ │ │ ├── self_hosted_data_plane.md │ │ │ ├── semantic_search.md │ │ │ ├── setup.md │ │ │ ├── setup_javascript.md │ │ │ ├── setup_pyproject.md │ │ │ └── standalone_container.md │ │ ├── how-tos │ │ │ ├── add-human-in-the-loop.md │ │ │ ├── background_run.md │ │ │ ├── clone_traces_studio.md │ │ │ ├── configurable_headers.md │ │ │ ├── configuration_cloud.md │ │ │ ├── cron_jobs.md │ │ │ ├── datasets_studio.md │ │ │ ├── enqueue_concurrent.md │ │ │ ├── generative_ui_react.md │ │ │ ├── human_in_the_loop_breakpoint.md │ │ │ ├── human_in_the_loop_review_tool_calls.md │ │ │ ├── human_in_the_loop_time_travel.md │ │ │ ├── img │ │ │ │ ├── click_create_assistant.png │ │ │ │ ├── create_assistant.png │ │ │ │ ├── create_assistant_view.png │ │ │ │ ├── create_new_version.png │ │ │ │ ├── edit_created_assistant.png │ │ │ │ ├── generative_ui_sample.jpg │ │ │ │ ├── run_in_studio.png │ │ │ │ ├── see_new_version.png │ │ │ │ ├── see_version_history.png │ │ │ │ ├── select_different_version.png │ │ │ │ ├── studio_datasets.jpg │ │ │ │ ├── studio_forks.mp4 │ │ │ │ ├── studio_forks_poster.png │ │ │ │ ├── studio_graph_with_configuration.png │ │ │ │ ├── studio_input.mp4 │ │ │ │ ├── studio_input_poster.png │ │ │ │ ├── studio_node_configuration.png │ │ │ │ ├── studio_playground.png │ │ │ │ ├── studio_screenshot.png │ │ │ │ ├── studio_threads.mp4 │ │ │ │ ├── studio_threads_poster.png │ │ │ │ ├── studio_usage.mp4 │ │ │ │ └── studio_usage_poster.png │ │ │ ├── interrupt_concurrent.md │ │ │ ├── invoke_studio.md │ │ │ ├── iterate_graph_studio.md │ │ │ ├── reject_concurrent.md │ │ │ ├── rollback_concurrent.md │ │ │ ├── same-thread.md │ │ │ ├── stateless_runs.md │ │ │ ├── streaming.md │ │ │ ├── studio │ │ │ │ ├── manage_assistants.md │ │ │ │ └── quick_start.md │ │ │ ├── threads_studio.md │ │ │ ├── use_stream_react.md │ │ │ ├── use_threads.md │ │ │ └── webhooks.md │ │ ├── quick_start.md │ │ ├── reference │ │ │ ├── api │ │ │ │ ├── api_ref.html │ │ │ │ ├── api_ref.md │ │ │ │ ├── api_ref_control_plane.html │ │ │ │ ├── openapi.json │ │ │ │ └── openapi_control_plane.json │ │ │ ├── cli.md │ │ │ ├── env_var.md │ │ │ └── sdk │ │ │ │ └── python_sdk_ref.md │ │ └── sdk │ │ │ └── img │ │ │ ├── graph_diagram.png │ │ │ └── thread_diagram.png │ ├── concepts │ │ ├── .meta.yml │ │ ├── agentic_concepts.md │ │ ├── application_structure.md │ │ ├── assistants.md │ │ ├── auth.md │ │ ├── breakpoints.md │ │ ├── deployment_options.md │ │ ├── double_texting.md │ │ ├── durable_execution.md │ │ ├── faq.md │ │ ├── functional_api.md │ │ ├── human_in_the_loop.md │ │ ├── img │ │ │ ├── agent_types.png │ │ │ ├── agent_workflow.png │ │ │ ├── assistants.png │ │ │ ├── breakpoints.png │ │ │ ├── byoc_architecture.png │ │ │ ├── challenge.png │ │ │ ├── double_texting.png │ │ │ ├── human_in_the_loop │ │ │ │ ├── approval.png │ │ │ │ ├── approve-or-reject.png │ │ │ │ ├── edit-graph-state-simple.png │ │ │ │ ├── edit_graph_state.png │ │ │ │ ├── forking.png │ │ │ │ ├── multi-turn-conversation.png │ │ │ │ ├── replay.png │ │ │ │ ├── tool-call-review.png │ │ │ │ └── wait_for_input.png │ │ │ ├── langgraph.png │ │ │ ├── langgraph_cloud_architecture.excalidraw │ │ │ ├── langgraph_cloud_architecture.png │ │ │ ├── langgraph_platform_deployment_architecture.png │ │ │ ├── lg_platform.png │ │ │ ├── lg_studio.png │ │ │ ├── memory │ │ │ │ ├── filter.png │ │ │ │ ├── hot_path_vs_background.png │ │ │ │ ├── short-vs-long.png │ │ │ │ ├── summary.png │ │ │ │ ├── update-instructions.png │ │ │ │ ├── update-list.png │ │ │ │ └── update-profile.png │ │ │ ├── multi_agent │ │ │ │ ├── architectures.png │ │ │ │ ├── request.png │ │ │ │ └── response.png │ │ │ ├── persistence │ │ │ │ ├── checkpoints.jpg │ │ │ │ ├── checkpoints_full_story.jpg │ │ │ │ ├── get_state.jpg │ │ │ │ ├── re_play.png │ │ │ │ └── shared_state.png │ │ │ ├── self_hosted_control_plane_architecture.png │ │ │ ├── self_hosted_data_plane_architecture.png │ │ │ ├── subgraph.png │ │ │ └── tool_call.png │ │ ├── langgraph_cli.md │ │ ├── langgraph_cloud.md │ │ ├── langgraph_components.md │ │ ├── langgraph_control_plane.md │ │ ├── langgraph_data_plane.md │ │ ├── langgraph_platform.md │ │ ├── langgraph_self_hosted_control_plane.md │ │ ├── langgraph_self_hosted_data_plane.md │ │ ├── langgraph_server.md │ │ ├── langgraph_standalone_container.md │ │ ├── langgraph_studio.md │ │ ├── low_level.md │ │ ├── memory.md │ │ ├── multi_agent.md │ │ ├── persistence.md │ │ ├── plans.md │ │ ├── pregel.md │ │ ├── scalability_and_resilience.md │ │ ├── sdk.md │ │ ├── server-mcp.md │ │ ├── streaming.md │ │ ├── subgraphs.md │ │ ├── template_applications.md │ │ ├── time-travel.md │ │ ├── tools.md │ │ └── why-langgraph.md │ ├── how-tos │ │ ├── .meta.yml │ │ ├── auth │ │ │ ├── custom_auth.md │ │ │ └── openapi_security.md │ │ ├── autogen-integration-functional.ipynb │ │ ├── autogen-integration.ipynb │ │ ├── autogen-langgraph-platform.ipynb │ │ ├── create-react-agent-manage-message-history.ipynb │ │ ├── cross-thread-persistence-functional.ipynb │ │ ├── disable-streaming.ipynb │ │ ├── graph-api.ipynb │ │ ├── http │ │ │ ├── custom_lifespan.md │ │ │ ├── custom_middleware.md │ │ │ └── custom_routes.md │ │ ├── human_in_the_loop │ │ │ ├── add-human-in-the-loop.md │ │ │ ├── breakpoints.ipynb │ │ │ ├── review-tool-calls.ipynb │ │ │ ├── time-travel.ipynb │ │ │ └── wait-user-input.ipynb │ │ ├── many-tools.ipynb │ │ ├── memory.ipynb │ │ ├── memory │ │ │ └── semantic-search.ipynb │ │ ├── multi-agent-multi-turn-convo-functional.ipynb │ │ ├── multi-agent-network-functional.ipynb │ │ ├── multi_agent.ipynb │ │ ├── persistence-functional.ipynb │ │ ├── persistence.ipynb │ │ ├── react-agent-from-scratch-functional.ipynb │ │ ├── react-agent-from-scratch.ipynb │ │ ├── react-agent-structured-output.ipynb │ │ ├── react_diagrams.png │ │ ├── review-tool-calls-functional.ipynb │ │ ├── run-id-langsmith.ipynb │ │ ├── streaming.md │ │ ├── subgraph.ipynb │ │ ├── tool-calling.ipynb │ │ ├── ttl │ │ │ └── configure_ttl.md │ │ ├── use-functional-api.md │ │ ├── use-remote-graph.md │ │ └── wait-user-input-functional.ipynb │ ├── index.md │ ├── llms-txt-overview.md │ ├── llms.txt │ ├── reference │ │ ├── .meta.yml │ │ ├── agents.md │ │ ├── cache.md │ │ ├── channels.md │ │ ├── checkpoints.md │ │ ├── config.md │ │ ├── constants.md │ │ ├── errors.md │ │ ├── func.md │ │ ├── graphs.md │ │ ├── index.md │ │ ├── mcp.md │ │ ├── pregel.md │ │ ├── remote_graph.md │ │ ├── store.md │ │ ├── supervisor.md │ │ ├── swarm.md │ │ └── types.md │ ├── static │ │ ├── favicon.png │ │ ├── values_vs_updates.png │ │ ├── wordmark_dark.svg │ │ └── wordmark_light.svg │ ├── stylesheets │ │ ├── agent_graph_widget.css │ │ ├── logos.css │ │ ├── navigation_title_ovverides.css │ │ ├── sticky_navigation.css │ │ └── version_admonitions.css │ ├── troubleshooting │ │ ├── errors │ │ │ ├── GRAPH_RECURSION_LIMIT.md │ │ │ ├── INVALID_CHAT_HISTORY.md │ │ │ ├── INVALID_CONCURRENT_GRAPH_UPDATE.md │ │ │ ├── INVALID_GRAPH_NODE_RETURN_VALUE.md │ │ │ ├── INVALID_LICENSE.md │ │ │ ├── MULTIPLE_SUBGRAPHS.md │ │ │ └── index.md │ │ ├── img │ │ │ └── brave-shields.png │ │ └── studio.md │ └── tutorials │ │ ├── .meta.yml │ │ ├── auth │ │ ├── add_auth_server.md │ │ ├── getting_started.md │ │ ├── img │ │ │ ├── authentication.png │ │ │ ├── authorization.png │ │ │ └── no_auth.png │ │ └── resource_auth.md │ │ ├── chatbot-simulation-evaluation │ │ ├── agent-simulation-evaluation.ipynb │ │ ├── langsmith-agent-simulation-evaluation.ipynb │ │ └── simulation_utils.py │ │ ├── chatbots │ │ └── information-gather-prompting.ipynb │ │ ├── code_assistant │ │ └── langgraph_code_assistant.ipynb │ │ ├── customer-support │ │ ├── customer-support.ipynb │ │ └── img │ │ │ ├── customer-support-bot-4.png │ │ │ ├── part-1-diagram.png │ │ │ ├── part-2-diagram.png │ │ │ ├── part-3-diagram.png │ │ │ └── part-4-diagram.png │ │ ├── deployment.md │ │ ├── extraction │ │ └── retries.ipynb │ │ ├── get-started │ │ ├── 1-build-basic-chatbot.md │ │ ├── 2-add-tools.md │ │ ├── 3-add-memory.md │ │ ├── 4-human-in-the-loop.md │ │ ├── 5-customize-state.md │ │ ├── 6-time-travel.md │ │ ├── basic-chatbot.png │ │ └── chatbot-with-tools.png │ │ ├── langgraph-platform │ │ └── local-server.md │ │ ├── lats │ │ └── lats.ipynb │ │ ├── llm-compiler │ │ ├── LLMCompiler.ipynb │ │ ├── math_tools.py │ │ └── output_parser.py │ │ ├── multi_agent │ │ ├── agent_supervisor.ipynb │ │ ├── hierarchical_agent_teams.ipynb │ │ └── multi-agent-collaboration.ipynb │ │ ├── overview.md │ │ ├── plan-and-execute │ │ └── plan-and-execute.ipynb │ │ ├── rag │ │ ├── langgraph_adaptive_rag.ipynb │ │ ├── langgraph_adaptive_rag_local.ipynb │ │ ├── langgraph_agentic_rag.ipynb │ │ ├── langgraph_crag.ipynb │ │ ├── langgraph_crag_local.ipynb │ │ ├── langgraph_self_rag.ipynb │ │ └── langgraph_self_rag_local.ipynb │ │ ├── reflection │ │ └── reflection.ipynb │ │ ├── reflexion │ │ └── reflexion.ipynb │ │ ├── rewoo │ │ └── rewoo.ipynb │ │ ├── self-discover │ │ └── self-discover.ipynb │ │ ├── sql-agent.ipynb │ │ ├── tnt-llm │ │ ├── img │ │ │ └── tnt_llm.png │ │ └── tnt-llm.ipynb │ │ ├── tot │ │ ├── img │ │ │ └── tot.png │ │ └── tot.ipynb │ │ ├── usaco │ │ ├── img │ │ │ ├── benchmark.png │ │ │ ├── diagram-part-1.png │ │ │ ├── diagram-part-2.png │ │ │ ├── diagram.png │ │ │ └── usaco.png │ │ └── usaco.ipynb │ │ ├── web-navigation │ │ ├── img │ │ │ └── web-voyager.excalidraw.jpg │ │ ├── mark_page.js │ │ └── web_voyager.ipynb │ │ ├── workflows.md │ │ └── workflows │ │ └── img │ │ ├── agent.png │ │ ├── augmented_llm.png │ │ ├── evaluator_optimizer.png │ │ ├── parallelization.png │ │ ├── prompt_chain.png │ │ ├── routing.png │ │ └── worker.png ├── mkdocs.yml ├── overrides │ ├── main.html │ └── partials │ │ └── logo.html ├── package.json ├── pyproject.toml ├── snippets │ └── chat_model_tabs.md ├── stats.yml ├── templates │ └── python │ │ └── material │ │ └── function.html.jinja ├── test-compose.yml ├── tests │ ├── __init__.py │ └── unit_tests │ │ ├── __init__.py │ │ ├── test_api_reference.py │ │ ├── test_highlights.py │ │ └── test_notebook_conversion.py ├── tsconfig.json ├── uv.lock ├── vercel.json └── yarn.lock ├── examples ├── README.md ├── async.ipynb ├── branching.ipynb ├── chatbot-simulation-evaluation │ ├── agent-simulation-evaluation.ipynb │ ├── langsmith-agent-simulation-evaluation.ipynb │ └── simulation_utils.py ├── chatbots │ └── information-gather-prompting.ipynb ├── cloud_examples │ └── langgraph_to_langgraph_cloud.ipynb ├── code_assistant │ ├── langgraph_code_assistant.ipynb │ └── langgraph_code_assistant_mistral.ipynb ├── configuration.ipynb ├── create-react-agent-hitl.ipynb ├── create-react-agent-memory.ipynb ├── create-react-agent-system-prompt.ipynb ├── create-react-agent.ipynb ├── customer-support │ └── customer-support.ipynb ├── extraction │ └── retries.ipynb ├── human_in_the_loop │ ├── breakpoints.ipynb │ ├── dynamic_breakpoints.ipynb │ ├── edit-graph-state.ipynb │ ├── review-tool-calls.ipynb │ ├── time-travel.ipynb │ └── wait-user-input.ipynb ├── input_output_schema.ipynb ├── lats │ └── lats.ipynb ├── llm-compiler │ └── LLMCompiler.ipynb ├── map-reduce.ipynb ├── memory │ ├── add-summary-conversation-history.ipynb │ ├── delete-messages.ipynb │ └── manage-conversation-history.ipynb ├── multi_agent │ ├── agent_supervisor.ipynb │ ├── hierarchical_agent_teams.ipynb │ └── multi-agent-collaboration.ipynb ├── node-retries.ipynb ├── pass-config-to-tools.ipynb ├── pass-run-time-values-to-tools.ipynb ├── pass_private_state.ipynb ├── persistence.ipynb ├── persistence_mongodb.ipynb ├── persistence_postgres.ipynb ├── persistence_redis.ipynb ├── plan-and-execute │ └── plan-and-execute.ipynb ├── rag │ ├── langgraph_adaptive_rag.ipynb │ ├── langgraph_adaptive_rag_cohere.ipynb │ ├── langgraph_adaptive_rag_local.ipynb │ ├── langgraph_agentic_rag.ipynb │ ├── langgraph_crag.ipynb │ ├── langgraph_crag_local.ipynb │ ├── langgraph_self_rag.ipynb │ ├── langgraph_self_rag_local.ipynb │ └── langgraph_self_rag_pinecone_movies.ipynb ├── react-agent-from-scratch.ipynb ├── react-agent-structured-output.ipynb ├── recursion-limit.ipynb ├── reflection │ └── reflection.ipynb ├── reflexion │ └── reflexion.ipynb ├── rewoo │ └── rewoo.ipynb ├── run-id-langsmith.ipynb ├── self-discover │ └── self-discover.ipynb ├── state-model.ipynb ├── storm │ └── storm.ipynb ├── stream-multiple.ipynb ├── stream-updates.ipynb ├── stream-values.ipynb ├── streaming-content.ipynb ├── streaming-events-from-within-tools-without-langchain.ipynb ├── streaming-events-from-within-tools.ipynb ├── streaming-from-final-node.ipynb ├── streaming-subgraphs.ipynb ├── streaming-tokens-without-langchain.ipynb ├── streaming-tokens.ipynb ├── subgraph-transform-state.ipynb ├── subgraph.ipynb ├── subgraphs-manage-state.ipynb ├── tool-calling-errors.ipynb ├── tool-calling.ipynb ├── tutorials │ ├── sql-agent.ipynb │ └── tnt-llm │ │ └── tnt-llm.ipynb ├── usaco │ └── usaco.ipynb ├── visualization.ipynb └── web-navigation │ └── web_voyager.ipynb ├── libs ├── checkpoint-postgres │ ├── Makefile │ ├── README.md │ ├── langgraph │ │ ├── checkpoint │ │ │ └── postgres │ │ │ │ ├── __init__.py │ │ │ │ ├── _ainternal.py │ │ │ │ ├── _internal.py │ │ │ │ ├── aio.py │ │ │ │ ├── base.py │ │ │ │ └── py.typed │ │ └── store │ │ │ └── postgres │ │ │ ├── __init__.py │ │ │ ├── aio.py │ │ │ ├── base.py │ │ │ └── py.typed │ ├── pyproject.toml │ ├── tests │ │ ├── __init__.py │ │ ├── checkpoint_utils.py │ │ ├── compose-postgres.yml │ │ ├── conftest.py │ │ ├── embed_test_utils.py │ │ ├── test_async.py │ │ ├── test_async_store.py │ │ ├── test_store.py │ │ └── test_sync.py │ └── uv.lock ├── checkpoint-sqlite │ ├── Makefile │ ├── README.md │ ├── langgraph │ │ ├── cache │ │ │ └── sqlite │ │ │ │ └── __init__.py │ │ ├── checkpoint │ │ │ └── sqlite │ │ │ │ ├── __init__.py │ │ │ │ ├── aio.py │ │ │ │ ├── py.typed │ │ │ │ └── utils.py │ │ └── store │ │ │ └── sqlite │ │ │ ├── __init__.py │ │ │ ├── aio.py │ │ │ └── base.py │ ├── pyproject.toml │ ├── tests │ │ ├── __init__.py │ │ ├── checkpoint_utils.py │ │ ├── test_aiosqlite.py │ │ ├── test_async_store.py │ │ ├── test_sqlite.py │ │ ├── test_store.py │ │ └── test_ttl.py │ └── uv.lock ├── checkpoint │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── langgraph │ │ ├── cache │ │ │ ├── base │ │ │ │ ├── __init__.py │ │ │ │ └── py.typed │ │ │ └── memory │ │ │ │ └── __init__.py │ │ ├── checkpoint │ │ │ ├── base │ │ │ │ ├── __init__.py │ │ │ │ ├── id.py │ │ │ │ └── py.typed │ │ │ ├── memory │ │ │ │ ├── __init__.py │ │ │ │ └── py.typed │ │ │ └── serde │ │ │ │ ├── __init__.py │ │ │ │ ├── base.py │ │ │ │ ├── encrypted.py │ │ │ │ ├── jsonplus.py │ │ │ │ ├── py.typed │ │ │ │ └── types.py │ │ └── store │ │ │ ├── base │ │ │ ├── __init__.py │ │ │ ├── batch.py │ │ │ ├── embed.py │ │ │ └── py.typed │ │ │ └── memory │ │ │ ├── __init__.py │ │ │ └── py.typed │ ├── pyproject.toml │ ├── tests │ │ ├── __init__.py │ │ ├── checkpoint_utils.py │ │ ├── embed_test_utils.py │ │ ├── test_jsonplus.py │ │ ├── test_memory.py │ │ └── test_store.py │ └── uv.lock ├── cli │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── examples │ │ ├── .env.example │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── graphs │ │ │ ├── agent.py │ │ │ ├── langgraph.json │ │ │ └── storm.py │ │ ├── graphs_reqs_a │ │ │ ├── __init__.py │ │ │ ├── graphs_submod │ │ │ │ ├── __init__.py │ │ │ │ ├── agent.py │ │ │ │ └── subprompt.txt │ │ │ ├── hello.py │ │ │ ├── langgraph.json │ │ │ ├── prompt.txt │ │ │ └── requirements.txt │ │ ├── graphs_reqs_b │ │ │ ├── graphs_submod │ │ │ │ ├── agent.py │ │ │ │ └── subprompt.txt │ │ │ ├── hello.py │ │ │ ├── langgraph.json │ │ │ ├── prompt.txt │ │ │ ├── requirements.txt │ │ │ └── utils │ │ │ │ ├── __init__.py │ │ │ │ └── greeter.py │ │ ├── langgraph.json │ │ ├── my_app.py │ │ ├── pipconf.txt │ │ ├── poetry.lock │ │ └── pyproject.toml │ ├── generate_schema.py │ ├── js-examples │ │ ├── .dockerignore │ │ ├── .editorconfig │ │ ├── .env.example │ │ ├── .eslintrc.cjs │ │ ├── .gitignore │ │ ├── LICENSE │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── langgraph.json │ │ ├── package.json │ │ ├── src │ │ │ └── agent │ │ │ │ ├── graph.ts │ │ │ │ └── state.ts │ │ ├── static │ │ │ └── studio.png │ │ ├── tests │ │ │ ├── agent.test.ts │ │ │ └── graph.int.test.ts │ │ ├── tsconfig.json │ │ └── yarn.lock │ ├── langgraph_cli │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── analytics.py │ │ ├── cli.py │ │ ├── config.py │ │ ├── constants.py │ │ ├── docker.py │ │ ├── exec.py │ │ ├── progress.py │ │ ├── py.typed │ │ ├── templates.py │ │ ├── util.py │ │ └── version.py │ ├── pyproject.toml │ ├── schemas │ │ ├── schema.json │ │ └── schema.v0.json │ ├── tests │ │ ├── __init__.py │ │ ├── integration_tests │ │ │ ├── __init__.py │ │ │ └── test_cli.py │ │ └── unit_tests │ │ │ ├── __init__.py │ │ │ ├── agent.py │ │ │ ├── cli │ │ │ ├── __init__.py │ │ │ ├── langgraph.json │ │ │ ├── pyproject.toml │ │ │ ├── test_cli.py │ │ │ └── test_templates.py │ │ │ ├── conftest.py │ │ │ ├── graphs │ │ │ └── agent.py │ │ │ ├── helpers.py │ │ │ ├── multiplatform │ │ │ ├── js.mts │ │ │ └── python.py │ │ │ ├── pipconfig.txt │ │ │ ├── test_config.json │ │ │ ├── test_config.py │ │ │ └── test_docker.py │ └── uv.lock ├── langgraph │ ├── .claude │ │ └── settings.local.json │ ├── .gitignore │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── bench │ │ ├── __init__.py │ │ ├── __main__.py │ │ ├── fanout_to_subgraph.py │ │ ├── pydantic_state.py │ │ ├── react_agent.py │ │ ├── sequential.py │ │ ├── wide_dict.py │ │ └── wide_state.py │ ├── langgraph │ │ ├── channels │ │ │ ├── __init__.py │ │ │ ├── any_value.py │ │ │ ├── base.py │ │ │ ├── binop.py │ │ │ ├── ephemeral_value.py │ │ │ ├── last_value.py │ │ │ ├── named_barrier_value.py │ │ │ ├── py.typed │ │ │ └── topic.py │ │ ├── config.py │ │ ├── constants.py │ │ ├── errors.py │ │ ├── func │ │ │ ├── __init__.py │ │ │ └── py.typed │ │ ├── graph │ │ │ ├── __init__.py │ │ │ ├── branch.py │ │ │ ├── message.py │ │ │ ├── py.typed │ │ │ ├── state.py │ │ │ └── ui.py │ │ ├── managed │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── is_last_step.py │ │ │ └── py.typed │ │ ├── pregel │ │ │ ├── __init__.py │ │ │ ├── algo.py │ │ │ ├── call.py │ │ │ ├── checkpoint.py │ │ │ ├── debug.py │ │ │ ├── draw.py │ │ │ ├── executor.py │ │ │ ├── io.py │ │ │ ├── log.py │ │ │ ├── loop.py │ │ │ ├── messages.py │ │ │ ├── protocol.py │ │ │ ├── py.typed │ │ │ ├── read.py │ │ │ ├── remote.py │ │ │ ├── retry.py │ │ │ ├── runner.py │ │ │ ├── types.py │ │ │ ├── utils.py │ │ │ ├── validate.py │ │ │ └── write.py │ │ ├── py.typed │ │ ├── types.py │ │ ├── typing.py │ │ ├── utils │ │ │ ├── __init__.py │ │ │ ├── cache.py │ │ │ ├── config.py │ │ │ ├── fields.py │ │ │ ├── future.py │ │ │ ├── py.typed │ │ │ ├── pydantic.py │ │ │ ├── queue.py │ │ │ └── runnable.py │ │ ├── version.py │ │ └── warnings.py │ ├── pyproject.toml │ ├── tests │ │ ├── __init__.py │ │ ├── __snapshots__ │ │ │ ├── test_large_cases.ambr │ │ │ ├── test_pregel.ambr │ │ │ └── test_pregel_async.ambr │ │ ├── agents.py │ │ ├── any_int.py │ │ ├── any_str.py │ │ ├── compose-postgres.yml │ │ ├── conftest.py │ │ ├── conftest_checkpointer.py │ │ ├── conftest_store.py │ │ ├── example_app │ │ │ ├── example_graph.py │ │ │ ├── langgraph.json │ │ │ └── requirements.txt │ │ ├── fake_chat.py │ │ ├── fake_tracer.py │ │ ├── memory_assert.py │ │ ├── messages.py │ │ ├── test_algo.py │ │ ├── test_channels.py │ │ ├── test_checkpoint_migration.py │ │ ├── test_config_async.py │ │ ├── test_deprecation.py │ │ ├── test_interruption.py │ │ ├── test_large_cases.py │ │ ├── test_large_cases_async.py │ │ ├── test_messages_state.py │ │ ├── test_pregel.py │ │ ├── test_pregel_async.py │ │ ├── test_pydantic.py │ │ ├── test_remote_graph.py │ │ ├── test_retry.py │ │ ├── test_runnable.py │ │ ├── test_state.py │ │ ├── test_tracing_interops.py │ │ ├── test_type_checking.py │ │ └── test_utils.py │ └── uv.lock ├── prebuilt │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── langgraph │ │ └── prebuilt │ │ │ ├── __init__.py │ │ │ ├── chat_agent_executor.py │ │ │ ├── interrupt.py │ │ │ ├── py.typed │ │ │ ├── tool_node.py │ │ │ └── tool_validator.py │ ├── pyproject.toml │ ├── tests │ │ ├── __init__.py │ │ ├── __snapshots__ │ │ │ └── test_react_agent_graph.ambr │ │ ├── any_str.py │ │ ├── compose-postgres.yml │ │ ├── conftest.py │ │ ├── conftest_checkpointer.py │ │ ├── conftest_store.py │ │ ├── memory_assert.py │ │ ├── messages.py │ │ ├── model.py │ │ ├── test_react_agent.py │ │ ├── test_react_agent_graph.py │ │ ├── test_tool_node.py │ │ └── test_validation_node.py │ └── uv.lock ├── sdk-js │ ├── .gitignore │ ├── .prettierrc │ ├── LICENSE │ ├── README.md │ ├── jest.config.js │ ├── langchain.config.js │ ├── package.json │ ├── src │ │ ├── auth │ │ │ ├── error.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ ├── client.ts │ │ ├── index.ts │ │ ├── react-ui │ │ │ ├── client.tsx │ │ │ ├── index.ts │ │ │ ├── server │ │ │ │ ├── index.ts │ │ │ │ └── server.ts │ │ │ └── types.ts │ │ ├── react │ │ │ ├── debug.tsx │ │ │ ├── index.ts │ │ │ └── stream.tsx │ │ ├── schema.ts │ │ ├── singletons │ │ │ └── fetch.ts │ │ ├── tests │ │ │ ├── fetch.test.ts │ │ │ ├── sse.test.ts │ │ │ └── stream.test.tsx │ │ ├── types.messages.ts │ │ ├── types.stream.ts │ │ ├── types.ts │ │ └── utils │ │ │ ├── async_caller.ts │ │ │ ├── env.ts │ │ │ ├── signals.ts │ │ │ ├── sse.ts │ │ │ └── stream.ts │ ├── tsconfig.cjs.json │ ├── tsconfig.json │ ├── typedoc.auth.json │ ├── typedoc.react.json │ ├── vitest.config.ts │ └── yarn.lock └── sdk-py │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── langgraph_sdk │ ├── __init__.py │ ├── auth │ │ ├── __init__.py │ │ ├── exceptions.py │ │ └── types.py │ ├── client.py │ ├── py.typed │ ├── schema.py │ └── sse.py │ ├── pyproject.toml │ └── uv.lock └── security.md /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | version: 2.1 3 | contact_links: 4 | - name: 🤔 Question or Problem 5 | about: Ask a question or ask about a problem in GitHub Discussions. 6 | url: https://github.com/langchain-ai/langgraph/discussions/categories/q-a 7 | - name: Feature Request 8 | url: https://github.com/langchain-ai/langgraph/discussions/categories/ideas 9 | about: Suggest a feature or an idea 10 | - name: Show and tell 11 | about: Show what you built with LangChain 12 | url: https://github.com/langchain-ai/langgraph/discussions/categories/show-and-tell 13 | - name: Slack 14 | url: https://www.langchain.com/join-community 15 | about: General community discussions 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation.yml: -------------------------------------------------------------------------------- 1 | name: Documentation 2 | description: Report an issue related to the LangGraph documentation. 3 | title: "DOC: " 4 | labels: [03 - Documentation] 5 | 6 | body: 7 | - type: textarea 8 | attributes: 9 | label: "Issue with current documentation:" 10 | description: > 11 | Please make sure to leave a reference to the document/code you're 12 | referring to. 13 | 14 | - type: textarea 15 | attributes: 16 | label: "Idea or request for content:" 17 | description: > 18 | Please describe as clearly as possible what topics you think are missing 19 | from the current documentation. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/privileged.yml: -------------------------------------------------------------------------------- 1 | name: 🔒 Privileged 2 | description: You are a LangChain maintainer, or was asked directly by a maintainer to create an issue here. If not, check the other options. 3 | body: 4 | - type: markdown 5 | attributes: 6 | value: | 7 | Thanks for your interest in LangChain! 🚀 8 | 9 | If you are not a LangChain maintainer or were not asked directly by a maintainer to create an issue, then please start the conversation in a [Question in GitHub Discussions](https://github.com/langchain-ai/langchain/discussions/categories/q-a) instead. 10 | 11 | You are a LangChain maintainer if you maintain any of the packages inside of the LangChain repository 12 | or are a regular contributor to LangChain with previous merged merged pull requests. 13 | - type: checkboxes 14 | id: privileged 15 | attributes: 16 | label: Privileged issue 17 | description: Confirm that you are allowed to create an issue here. 18 | options: 19 | - label: I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here. 20 | required: true 21 | - type: textarea 22 | id: content 23 | attributes: 24 | label: Issue Content 25 | description: Add the content of the issue here. 26 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Please see the documentation for all configuration options: 2 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 3 | # and 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" 9 | directory: "/" 10 | schedule: 11 | interval: "weekly" 12 | -------------------------------------------------------------------------------- /.github/workflows/baseline.yml: -------------------------------------------------------------------------------- 1 | name: baseline 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: [main] 7 | paths: 8 | - "libs/**" 9 | 10 | jobs: 11 | benchmark: 12 | runs-on: ubuntu-latest 13 | defaults: 14 | run: 15 | working-directory: libs/langgraph 16 | steps: 17 | - uses: actions/checkout@v4 18 | - run: SHA=$(git rev-parse HEAD) && echo "SHA=$SHA" >> $GITHUB_ENV 19 | - name: Set up Python 3.11 20 | uses: astral-sh/setup-uv@v6 21 | with: 22 | python-version: "3.11" 23 | enable-cache: true 24 | cache-suffix: "bench" 25 | - name: Install dependencies 26 | run: uv sync --group dev 27 | - name: Run benchmarks 28 | run: OUTPUT=out/benchmark-baseline.json make -s benchmark 29 | - name: Save outputs 30 | uses: actions/cache/save@v4 31 | with: 32 | key: ${{ runner.os }}-benchmark-baseline-${{ env.SHA }} 33 | path: | 34 | libs/langgraph/out/benchmark-baseline.json 35 | -------------------------------------------------------------------------------- /.github/workflows/extract_ignored_words_list.py: -------------------------------------------------------------------------------- 1 | import toml 2 | 3 | pyproject_toml = toml.load("pyproject.toml") 4 | 5 | # Extract the ignore words list (adjust the key as per your TOML structure) 6 | ignore_words_list = ( 7 | pyproject_toml.get("tool", {}).get("codespell", {}).get("ignore-words-list") 8 | ) 9 | 10 | print(f"::set-output name=ignore_words_list::{ignore_words_list}") # noqa: T201 11 | -------------------------------------------------------------------------------- /.github/workflows/release_js.yml: -------------------------------------------------------------------------------- 1 | name: JS Release 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | publish: 8 | # Disallow publishing from branches that aren't `main`. 9 | if: github.ref == 'refs/heads/main' 10 | runs-on: ubuntu-latest 11 | 12 | strategy: 13 | matrix: 14 | working-directory: 15 | - "libs/sdk-js" 16 | 17 | defaults: 18 | run: 19 | working-directory: ${{ matrix.working-directory }} 20 | 21 | steps: 22 | - uses: actions/checkout@v4 23 | # JS Build 24 | - name: Use Node.js 25 | uses: actions/setup-node@v4 26 | with: 27 | node-version: "20" 28 | cache: "yarn" 29 | cache-dependency-path: ${{ matrix.working-directory }}/yarn.lock 30 | 31 | - name: Install dependencies 32 | run: yarn install 33 | - name: Build 34 | run: yarn build 35 | - name: Publish package to NPM 36 | run: | 37 | echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc 38 | npm publish -------------------------------------------------------------------------------- /.markdown-link-check.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "aliveStatusCodes": [200, 206, 402], 3 | "ignorePatterns": ["*dcbadge.vercel.app*"] 4 | } 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 LangChain, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | site/ 2 | docs/cloud/reference/sdk/js_ts_sdk_ref.md 3 | 4 | .vercel 5 | -------------------------------------------------------------------------------- /docs/_scripts/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/_scripts/__init__.py -------------------------------------------------------------------------------- /docs/_scripts/download_tiktoken.py: -------------------------------------------------------------------------------- 1 | import tiktoken 2 | 3 | # This will trigger the download and caching of the necessary files 4 | for encoding in ("gpt2", "gpt-3.5"): 5 | tiktoken.encoding_for_model(encoding) -------------------------------------------------------------------------------- /docs/_scripts/execute_notebooks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Read the list of notebooks to skip from the JSON file 4 | SKIP_NOTEBOOKS=$(python -c "import json; print('\n'.join(json.load(open('notebooks_no_execution.json'))))") 5 | 6 | # Function to execute a single notebook 7 | execute_notebook() { 8 | file="$1" 9 | echo "Starting execution of $file" 10 | start_time=$(date +%s) 11 | if ! output=$(time uv run jupyter execute "$file" 2>&1); then 12 | end_time=$(date +%s) 13 | execution_time=$((end_time - start_time)) 14 | echo "Error in $file. Execution time: $execution_time seconds" 15 | echo "Error details: $output" 16 | exit 1 17 | fi 18 | end_time=$(date +%s) 19 | execution_time=$((end_time - start_time)) 20 | echo "Finished $file. Execution time: $execution_time seconds" 21 | } 22 | 23 | export -f execute_notebook 24 | 25 | # Check if custom notebook paths are provided 26 | if [ $# -gt 0 ]; then 27 | notebooks=$(echo "$@" | tr ' ' '\n' | grep -vFf <(echo "$SKIP_NOTEBOOKS")) 28 | else 29 | # Find all notebooks and filter out those in the skip list 30 | notebooks=$(find docs/tutorials docs/how-tos -name "*.ipynb" | grep -v ".ipynb_checkpoints" | grep -vFf <(echo "$SKIP_NOTEBOOKS")) 31 | fi 32 | 33 | # Execute notebooks sequentially 34 | for file in $notebooks; do 35 | execute_notebook "$file" 36 | done -------------------------------------------------------------------------------- /docs/_scripts/notebook_convert_templates/mdoutput/conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "mimetypes": { 3 | "text/markdown": true 4 | } 5 | } -------------------------------------------------------------------------------- /docs/_scripts/third_party_page/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/_scripts/third_party_page/__init__.py -------------------------------------------------------------------------------- /docs/cassettes/configuration_718685f7-4cdd-4181-9fc8-e7762d584727.msgpack.zlib: -------------------------------------------------------------------------------- 1 | eNqFVF1oHEUcTxOEEhWkqCBiuz1r8SFzt1/3sdGHhGsqbc0lJNfGRkOZzM7dbm9vdrM7G3MNLTaJIliUKehDBSnt5a6cZ5vQD5VqbGxAwaBPgvdgCwr1RSxCfClInLvcJSkJcZ9m/5+//+/3n5kojmLXM22yrWwSil2IKP/x2ETRxSM+9uhUIYupYev53p7+5EXfNSsvGJQ6XnsoBB0zCAk1XNsxURDZ2dCoFMpiz4Np7OWHbT1XeWM8kIVjx6idwcQLtAuSKKttQqARxC2vjwdc28L8FPA97Aa4F9kcCaFVk2EGTg5VE2wdW1UDsqCvYyAHpcDJooGhztF/kDdsj7LZDXiuQISwQwEmyNZNkmafpU+YTpug45QFKS7xRgTXBmalDMYOgJY5igsrWWwGOo5lIlj1h457NinXgQGac/BGd6mKH/CxCGWfdzZwhHpznD4iiEFFDcozY8Cj0CQWJwBYkEMqODX/zfUOB6IMrwPq0rDCSvLl9TG2x6a7Ierpf6gkdJHBpqGbjahX19tdn1Azi1kx3ruxXd251k4JSlJQm32osJcjiE2noOXh2VWSV1NKsigrQIwAUbrcYMnCJE0NdkGTL7nYc/hW4ckCr0h9byLPBcGL3xfri3Ch51BDzDtNO/L7uDjs66ThtwlyROjHjsDLq4KktCvRdn54pTtZjte7JDfVYjbpQuKluB5dDe2LyPBJBuul+KaqVwJrU7m8v2VmTQrql4BrVf1leVkUxcreLSNdnOWkVTvmJU3T/qcuZwZTdq06HxA1IEeSK1OG1cGKsFnmylWq4ymoYvWr7Nkicg1PI1rYMnpzPLI6WKqDBqbOvuLnY6KU6DqSGemWnf0Gob6PkwMwd5ykr48BZNm+Dih/TjCo7cMYZRUhCmNhRRfRcEROQTU6rGjRsBRVVE1TJQWlwhdHTchKUlAS0radtvCV+H4Qh8jAoL+2Nqy472iis/tAvPwa6LOHbc5fEnKeiU1woR+7fBtZqdaa328XF3h6X+dRdi2GNAWGUwhpMSWGYhLoGuibaSzQ6oLkq49D7dk6zdfU5aaF+V3vbW+qfS2vvj/fOtHxZNc30zc/Cbw9uCi/OLi0rW/qsQeieQLNRVPvLu882Pnpo3/sDL7ZMfTtb7sPzyVGK/c+ei72690HA/5fiaEjd69Pnp579lzbjpGn5s8/fqo5kX/aL4tjU2dfbmu9P3zgB/rhrfPbywut48+cev7gv/mf4Mie+7ebf/+5Q1VzhxLNtye+WAzfOGPvXjqz8Mi8u3RH+LHnz7fOfXzpy3demr21NzP5xD+7st/93dLUtLzc0nS2c+aXexz3f2MeVKE= -------------------------------------------------------------------------------- /docs/cassettes/langgraph_agentic_rag_278d1d83-dda6-4de4-bf8b-be9965c227fa.msgpack.zlib: -------------------------------------------------------------------------------- 1 | eNqFVM1u20YQbnvsrW9AED0VorSkaClS4YPhGkl/jBSIGuS2WJIjcpvl7mZ3aVsOfKibF+AbJLEgBUbSBAnQS2ugxx76Au6hz9IhbTmI7KIAL9yZ+eb7Zr7d4+UeGMuV/Pgllw4MSx3+2Pp4aeBRBdY9WZTgCpWd3N6ZnFSGn39eOKftuNdjmndtyV3RFUzmacG47Kaq7HE5VfNEZbM/lgWwDOGfnP5gwQRbOUhXv2uy27pAz3qkG3VD8norTUG7YEemKuMyr1/lh1x3vAymgjlYXITrN0xrwVPWUOz9aJU83VZSQku5Pn0IoAMm+B68MGA1qoCfF9YxV9njOeLCX38uS7CW5fD87rcrbv989Nm51+BbGyCaM0oEW0Ko/WDbQIaEORO2njtTwa9rabvsoNFUnwwIedkcYnYwmWm4TnT+FcqozyYVdLww9r5h0otItOGFwzEZjPuxd3t38vpB0DQQwc6B5qigfkbePgiwkGUqDya4Ggi+zupzL86GJIFpmkYbybTfj2KShDEM4mx0Kx5G/WTxvWF5yeoXUgUpSwtYrhDPJkXV8UjYEghHQ+IRMm6/hsBvN47hruE5l/XT5ZZwwb29tD7vFv1NfxzHff9Lr2Sb0cYoIoR0in4QjW4I/LIazXcgc1fguIbR7ze22m2dhsK/OFuLowBlIbhzsTNMeLXdCFvF67e6SnDgHWx7EOCCNwfk5hbvEeb3mZnViwt5J/c5q0/DbujlSuUCWv/+hO4x6Ma/P3n62L+8Jv7YJ91b3RHxOz6X6C6ZAkWT5tYfP/YToRJqncL5AwXJEgGZP26801mPYVNAsHt9BMpwxxYchQNWagGWlpVwXDPj1kH+PwPvGN5iB5RxihfYzNYTlMlpaqD1Js24vQxO0eYY1WxW4q7WizSqV5IJitX2epXt/5dqC8ykxbXTQu1T5wSt+OrINf6mjoOhWWUu2bFZO1ahZN7ca6yP0WhNuXGXB2F81PH3lXlodQNgU6WhYUm53OMO7BXHQ+syiu+TxovQbPJDTgiSMIdMcd/46mGinPK8aV5Z+GDamVb4Ul4pSZkAWmn6yPJD5I9uysEgLdISXUWlK3DkmaWC48uH4cEqmKl9SSWU2s3eV8cYbeBW2S3W1QFNZq2wiIyG4UZEjo4+/Rds6Sw0 -------------------------------------------------------------------------------- /docs/cassettes/plan-and-execute_72d233ca-1dbf-4b43-b680-b3bf39e3691f.msgpack.zlib: -------------------------------------------------------------------------------- 1 | eNqFVMFu20YQbXvMrX9AED0ForSkZNlU4YPhGknbGCkQNchtsSJH5DbL3c3u0jYd+BA3P8A/SGJBCoykKVKgl9ZAjz30B9xDv6VD2nIQ2UUBXrgz8+bNm7d7vNgDY7mSn77h0oFhicMfWx8vDDwpwbrn8wJcrtKTOzvjk9Lw8y9y57Qd9XpM864tuMu7gsksyRmX3UQVPS6najZRafXHIgeWIvzz0+8tmGArA+nqX5rsti7QVY90o25I3m0lCWgX7MhEpVxm9dvskOuOl8JUMAfzi3D9M9Na8IQ1FHs/WCVPt5WU0FKuTx8D6IAJvgevDViNU8CPc+uYK+3xDHHhrz8XBVjLMnh1/9slt38++Xz+nWFZwerXUgUJS3J49yhoOopg50BzxKpfktlXyKM+G5fQ8cKB9w2TXkSiNS8cjsL1EQm9O7vjn5CNwxGDeyAzl9cnw/Vo9pCZqp7fNzzj8tcG1dqgyTNKBLvsoBEFEwn5fSW2JYTaD3Zb7ZHA7cWWcMGDvaQ+7+b9TX80GPT9L72CbUZrcUQI6eT9IIpvCJw85Kw+DbuhlymVCThbaYQzKgvB3Qs5sNO5dyOVbQMpDseZsPXMmRLebjdaLbPq97qc4HI62PogQI03h2Sx1O9snJcdD1VqdAvjdeIRMmq/RrebR/9A6P2jANVnqcqCMRoUgq/T+tyLh0MWT0kMG2y4MVybQszi/nAST6JoABvp9M1yG+NKw3Xr/HZj04s91S9a/z5D9xh049+fvXjqX14Tf+ST7kY3Jn7H5xLdJROgaNLM+qOn/kSoCbVOoZ+AgmQTAak/asTqrMawDSDYgz4CpTidBUfhgBVagKVFKRzXzLhVkP/PwDuGt9gBZZziBTbVaoIyGU0MtErQlNvL4BT3ilHNqgJFWy3SOL2STFCstterbP+/prbATJJfO83VPnVO0JIvj1yzWeo4GJqW5pIdq1pZhZJZc6+xfoBOb8qNuzwIB0cdf1+Zx1Y3ADZRGhqWlMs97sBecTy0LqX4Pmk0ZLPJjzkhyIQ5ZIr7xlcPE+WUZ03z0sJHaqda4Ut5NUnCBNBS0yeWHyJ/9E8GBmmRlugyKl2OkqeWCo4vH4aHy2Cq9iWVUGhXfageYLSBW2a3WFcHdFK1g0UkXg/XInJ0dOtfnOosXQ== -------------------------------------------------------------------------------- /docs/codespell_notebooks.sh: -------------------------------------------------------------------------------- 1 | ERROR_FOUND=0 2 | for file in $(find $1 -name "*.ipynb" | grep -v ".ipynb_checkpoints"); do 3 | # Adding regexp to ignore base64 strings 4 | OUTPUT=$(cat "$file" | jupytext --from ipynb --to py:percent | codespell --ignore-regex='[A-Za-z0-9+/=]{25,}' -) 5 | if [ -n "$OUTPUT" ]; then 6 | echo "Errors found in $file" 7 | echo "$OUTPUT" 8 | ERROR_FOUND=1 9 | fi 10 | done 11 | 12 | for file in $(find $1 -name "*.md"); do 13 | # Adding regexp to ignore base64 strings 14 | OUTPUT=$(cat "$file" | codespell --ignore-regex='[A-Za-z0-9+/=]{25,}' -) 15 | if [ -n "$OUTPUT" ]; then 16 | echo "Errors found in $file" 17 | echo "$OUTPUT" 18 | ERROR_FOUND=1 19 | fi 20 | done 21 | 22 | if [ "$ERROR_FOUND" -ne 0 ]; then 23 | exit 1 24 | fi 25 | -------------------------------------------------------------------------------- /docs/docs/agents/assets/agent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/agents/assets/agent.png -------------------------------------------------------------------------------- /docs/docs/agents/assets/base-chat-ui.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/agents/assets/base-chat-ui.mp4 -------------------------------------------------------------------------------- /docs/docs/agents/assets/fast_parrot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/agents/assets/fast_parrot.png -------------------------------------------------------------------------------- /docs/docs/agents/assets/interrupt-chat-ui.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/agents/assets/interrupt-chat-ui.mp4 -------------------------------------------------------------------------------- /docs/docs/agents/assets/mcp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/agents/assets/mcp.png -------------------------------------------------------------------------------- /docs/docs/agents/assets/memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/agents/assets/memory.png -------------------------------------------------------------------------------- /docs/docs/agents/assets/summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/agents/assets/summary.png -------------------------------------------------------------------------------- /docs/docs/agents/assets/supervisor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/agents/assets/supervisor.png -------------------------------------------------------------------------------- /docs/docs/agents/assets/swarm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/agents/assets/swarm.png -------------------------------------------------------------------------------- /docs/docs/cloud/concepts/cron_jobs.md: -------------------------------------------------------------------------------- 1 | ## Cron jobs 2 | 3 | There are many situations in which it is useful to run an assistant on a schedule. 4 | 5 | For example, say that you're building an assistant that runs daily and sends an email summary 6 | of the day's news. You could use a cron job to run the assistant every day at 8:00 PM. 7 | 8 | LangGraph Platform supports cron jobs, which run on a user-defined schedule. The user specifies a schedule, an assistant, and some input. After that, on the specified schedule, the server will: 9 | 10 | - Create a new thread with the specified assistant 11 | - Send the specified input to that thread 12 | 13 | Note that this sends the same input to the thread every time. See the [how-to guide](../../cloud/how-tos/cron_jobs.md) for creating cron jobs. 14 | 15 | The LangGraph Platform API provides several endpoints for creating and managing cron jobs. See the [API reference](../../cloud/reference/api/api_ref.html#tag/runscreate/POST/threads/{thread_id}/runs/crons) for more details. -------------------------------------------------------------------------------- /docs/docs/cloud/concepts/runs.md: -------------------------------------------------------------------------------- 1 | # Runs 2 | 3 | A run is an invocation of an [assistant](../../concepts/assistants.md). Each run may have its own input, configuration, and metadata, which may affect execution and output of the underlying graph. A run can optionally be executed on a [thread](./threads.md). 4 | 5 | The LangGraph Platform API provides several endpoints for creating and managing runs. See the [API reference](../../cloud/reference/api/api_ref.html#tag/thread-runs/) for more details. -------------------------------------------------------------------------------- /docs/docs/cloud/concepts/threads.md: -------------------------------------------------------------------------------- 1 | # Threads 2 | 3 | A thread contains the accumulated state of a sequence of [runs](./runs.md). When a run is executed, the [state](../../concepts/low_level.md#state) of the underlying graph of the assistant will be persisted to the thread. 4 | 5 | A thread's current and historical state can be retrieved. To persist state, a thread must be created prior to executing a run. 6 | 7 | The state of a thread at a particular point in time is called a [checkpoint](../../concepts/persistence.md#checkpoints). Checkpoints are persisted and can be used to restore the state of a thread at a later time. 8 | 9 | ## Learn more 10 | 11 | * For more on threads and checkpoints, see this section of the [LangGraph conceptual guide](../../concepts/persistence.md). 12 | * The LangGraph Platform API provides several endpoints for creating and managing threads and thread state. See the [API reference](../../cloud/reference/api/api_ref.html#tag/threads) for more details. 13 | -------------------------------------------------------------------------------- /docs/docs/cloud/concepts/webhooks.md: -------------------------------------------------------------------------------- 1 | # Webhooks 2 | 3 | Webhooks enable event-driven communication from your LangGraph Platform application to external services. For example, you may want to issue an update to a separate service once an API call to LangGraph Platform has finished running. 4 | 5 | Many LangGraph Platform endpoints accept a `webhook` parameter. If this parameter is specified by an endpoint that can accept POST requests, LangGraph Platform will send a request at the completion of a run. 6 | 7 | See the corresponding [how-to guide](../../cloud/how-tos/webhooks.md) for more detail. -------------------------------------------------------------------------------- /docs/docs/cloud/deployment/custom_docker.md: -------------------------------------------------------------------------------- 1 | # How to customize Dockerfile 2 | 3 | Users can add an array of additional lines to add to the Dockerfile following the import from the parent LangGraph image. In order to do this, you simply need to modify your `langgraph.json` file by passing in the commands you want run to the `dockerfile_lines` key. For example, if we wanted to use `Pillow` in our graph you would need to add the following dependencies: 4 | 5 | ``` 6 | { 7 | "dependencies": ["."], 8 | "graphs": { 9 | "openai_agent": "./openai_agent.py:agent", 10 | }, 11 | "env": "./.env", 12 | "dockerfile_lines": [ 13 | "RUN apt-get update && apt-get install -y libjpeg-dev zlib1g-dev libpng-dev", 14 | "RUN pip install Pillow" 15 | ] 16 | } 17 | ``` 18 | 19 | This would install the system packages required to use Pillow if we were working with `jpeg` or `png` image formats. -------------------------------------------------------------------------------- /docs/docs/cloud/deployment/img/langgraph_studio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/deployment/img/langgraph_studio.png -------------------------------------------------------------------------------- /docs/docs/cloud/deployment/img/quick_start_studio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/deployment/img/quick_start_studio.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/datasets_studio.md: -------------------------------------------------------------------------------- 1 | # Add node to dataset 2 | 3 | This guide shows how to add examples to [LangSmith datasets](https://docs.smith.langchain.com/evaluation/how_to_guides#dataset-management) from nodes in the thread log. This is useful to evaluate individual steps of the agent. 4 | 5 | 1. Select a thread. 6 | 2. Click on the `Add to Dataset` button. 7 | 3. Select nodes whose input/output you want to add to a dataset. 8 | 4. For each selected node, select the target dataset to create the example in. By default a dataset for the specific assistant and node will be selected. If this dataset does not yet exist, it will be created. 9 | 5. Edit the example's input/output as needed before adding it to the dataset. 10 | 6. Select "Add to dataset" at the bottom of the page to add all selected nodes to their respective datasets. 11 | 12 | See [Evaluating intermediate steps](https://docs.smith.langchain.com/evaluation/how_to_guides/langgraph#evaluating-intermediate-steps) for more details on how to evaluate intermediate steps. 13 | -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/click_create_assistant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/click_create_assistant.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/create_assistant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/create_assistant.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/create_assistant_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/create_assistant_view.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/create_new_version.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/create_new_version.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/edit_created_assistant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/edit_created_assistant.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/generative_ui_sample.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/generative_ui_sample.jpg -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/run_in_studio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/run_in_studio.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/see_new_version.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/see_new_version.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/see_version_history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/see_version_history.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/select_different_version.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/select_different_version.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_datasets.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_datasets.jpg -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_forks.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_forks.mp4 -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_forks_poster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_forks_poster.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_graph_with_configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_graph_with_configuration.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_input.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_input.mp4 -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_input_poster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_input_poster.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_node_configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_node_configuration.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_playground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_playground.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_screenshot.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_threads.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_threads.mp4 -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_threads_poster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_threads_poster.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_usage.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_usage.mp4 -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/img/studio_usage_poster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/how-tos/img/studio_usage_poster.png -------------------------------------------------------------------------------- /docs/docs/cloud/how-tos/studio/manage_assistants.md: -------------------------------------------------------------------------------- 1 | # Manage assistants 2 | 3 | !!! info "Prerequisites" 4 | 5 | - [Assistants Overview](../../concepts/assistants.md) 6 | 7 | LangGraph Studio lets you view, edit, and update your assistants, and allows you to run your graph using these assistant configurations. 8 | 9 | ## Graph mode 10 | 11 | To view your assistants, click the "Manage Assistants" button in the bottom left corner. 12 | 13 | This opens a modal for you to view all the assistants for the selected graph. Specify the assistant and its version you would like to mark as "Active", and this assistant will be used when submitting runs. 14 | 15 | By default, the "Default configuration" option will be active. This option reflects the default configuration defined in your graph. Edits made to this configuration will be used to update the run-time configuration, but will not update or create a new assistant unless you click "Create new assistant". 16 | 17 | ## Chat mode 18 | 19 | Chat mode enables you to switch through the different assistants in your graph via the dropdown selector at the top of the page. To create, edit, or delete assistants, use Graph mode. -------------------------------------------------------------------------------- /docs/docs/cloud/reference/api/api_ref.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LangGraph Platform API Reference 5 | 6 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/docs/cloud/reference/api/api_ref.md: -------------------------------------------------------------------------------- 1 | # API Reference 2 | 3 | The LangGraph Platform API reference is available with each deployment at the `/docs` URL path (e.g. `http://localhost:8124/docs`). 4 | 5 | Click here to view the API reference. 6 | 7 | ## Authentication 8 | 9 | For deployments to LangGraph Platform, authentication is required. Pass the `X-Api-Key` header with each request to the LangGraph Platform API. The value of the header should be set to a valid LangSmith API key for the organization where the API is deployed. 10 | 11 | Example `curl` command: 12 | ```shell 13 | curl --request POST \ 14 | --url http://localhost:8124/assistants/search \ 15 | --header 'Content-Type: application/json' \ 16 | --header 'X-Api-Key: LANGSMITH_API_KEY' \ 17 | --data '{ 18 | "metadata": {}, 19 | "limit": 10, 20 | "offset": 0 21 | }' 22 | ``` 23 | -------------------------------------------------------------------------------- /docs/docs/cloud/reference/api/api_ref_control_plane.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | LangGraph Platform API Reference 5 | 6 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /docs/docs/cloud/reference/sdk/python_sdk_ref.md: -------------------------------------------------------------------------------- 1 | # Python SDK Reference 2 | 3 | ::: langgraph_sdk.client 4 | handler: python 5 | 6 | 7 | ::: langgraph_sdk.schema 8 | handler: python 9 | 10 | ::: langgraph_sdk.auth 11 | handler: python 12 | 13 | ::: langgraph_sdk.auth.types 14 | handler: python 15 | 16 | ::: langgraph_sdk.auth.exceptions 17 | handler: python -------------------------------------------------------------------------------- /docs/docs/cloud/sdk/img/graph_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/sdk/img/graph_diagram.png -------------------------------------------------------------------------------- /docs/docs/cloud/sdk/img/thread_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/cloud/sdk/img/thread_diagram.png -------------------------------------------------------------------------------- /docs/docs/concepts/.meta.yml: -------------------------------------------------------------------------------- 1 | tags: 2 | - concepts 3 | - conceptual guide 4 | - explanation -------------------------------------------------------------------------------- /docs/docs/concepts/breakpoints.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 2 4 | --- 5 | 6 | # Breakpoints 7 | 8 | Breakpoints pause graph execution at defined points and let you step through each stage. They use LangGraph's [**persistence layer**](./persistence.md), which saves the graph state after each step. 9 | 10 | With breakpoints, you can inspect the graph's state and node inputs at any point. Execution pauses **indefinitely** until you resume, as the checkpointer preserves the state. 11 | 12 |
13 | ![image](img/breakpoints.png){: style="max-height:400px"} 14 |
An example graph consisting of 3 sequential steps with a breakpoint before step_3.
15 | -------------------------------------------------------------------------------- /docs/docs/concepts/img/agent_types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/agent_types.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/agent_workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/agent_workflow.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/assistants.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/assistants.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/breakpoints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/breakpoints.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/byoc_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/byoc_architecture.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/challenge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/challenge.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/double_texting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/double_texting.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/human_in_the_loop/approval.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/human_in_the_loop/approval.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/human_in_the_loop/approve-or-reject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/human_in_the_loop/approve-or-reject.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/human_in_the_loop/edit-graph-state-simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/human_in_the_loop/edit-graph-state-simple.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/human_in_the_loop/edit_graph_state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/human_in_the_loop/edit_graph_state.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/human_in_the_loop/forking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/human_in_the_loop/forking.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/human_in_the_loop/multi-turn-conversation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/human_in_the_loop/multi-turn-conversation.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/human_in_the_loop/replay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/human_in_the_loop/replay.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/human_in_the_loop/tool-call-review.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/human_in_the_loop/tool-call-review.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/human_in_the_loop/wait_for_input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/human_in_the_loop/wait_for_input.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/langgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/langgraph.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/langgraph_cloud_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/langgraph_cloud_architecture.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/langgraph_platform_deployment_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/langgraph_platform_deployment_architecture.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/lg_platform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/lg_platform.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/lg_studio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/lg_studio.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/memory/filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/memory/filter.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/memory/hot_path_vs_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/memory/hot_path_vs_background.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/memory/short-vs-long.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/memory/short-vs-long.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/memory/summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/memory/summary.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/memory/update-instructions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/memory/update-instructions.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/memory/update-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/memory/update-list.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/memory/update-profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/memory/update-profile.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/multi_agent/architectures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/multi_agent/architectures.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/multi_agent/request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/multi_agent/request.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/multi_agent/response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/multi_agent/response.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/persistence/checkpoints.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/persistence/checkpoints.jpg -------------------------------------------------------------------------------- /docs/docs/concepts/img/persistence/checkpoints_full_story.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/persistence/checkpoints_full_story.jpg -------------------------------------------------------------------------------- /docs/docs/concepts/img/persistence/get_state.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/persistence/get_state.jpg -------------------------------------------------------------------------------- /docs/docs/concepts/img/persistence/re_play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/persistence/re_play.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/persistence/shared_state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/persistence/shared_state.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/self_hosted_control_plane_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/self_hosted_control_plane_architecture.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/self_hosted_data_plane_architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/self_hosted_data_plane_architecture.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/subgraph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/subgraph.png -------------------------------------------------------------------------------- /docs/docs/concepts/img/tool_call.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/concepts/img/tool_call.png -------------------------------------------------------------------------------- /docs/docs/concepts/langgraph_cloud.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 2 4 | --- 5 | 6 | # Cloud SaaS 7 | 8 | To deploy a [LangGraph Server](../concepts/langgraph_server.md), follow the how-to guide for [how to deploy to Cloud SaaS](../cloud/deployment/cloud.md). 9 | 10 | ## Overview 11 | 12 | The Cloud SaaS deployment option is a fully managed model for deployment where we manage the [control plane](./langgraph_control_plane.md) and [data plane](./langgraph_data_plane.md) in our cloud. 13 | 14 | | | [Control plane](../concepts/langgraph_control_plane.md) | [Data plane](../concepts/langgraph_data_plane.md) | 15 | |-------------------|-------------------|------------| 16 | | **What is it?** | | | 17 | | **Where is it hosted?** | LangChain's cloud | LangChain's cloud | 18 | | **Who provisions and manages it?** | LangChain | LangChain | 19 | 20 | ## Architecture 21 | 22 | ![Cloud SaaS](./img/self_hosted_control_plane_architecture.png) 23 | -------------------------------------------------------------------------------- /docs/docs/concepts/time-travel.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 2 4 | --- 5 | 6 | # Time Travel ⏱️ 7 | 8 | When working with non-deterministic systems that make model-based decisions (e.g., agents powered by LLMs), it can be useful to examine their decision-making process in detail: 9 | 10 | 1. 🤔 **Understand Reasoning**: Analyze the steps that led to a successful result. 11 | 2. 🐞 **Debug Mistakes**: Identify where and why errors occurred. 12 | 3. 🔍 **Explore Alternatives**: Test different paths to uncover better solutions. 13 | 14 | 15 | LangGraph provides **time travel** functionality to support these use cases. Specifically, you can **resume execution from a prior checkpoint** — either replaying the same state or modifying it to explore alternatives. In all cases, resuming past execution produces a **new fork** in the history. 16 | -------------------------------------------------------------------------------- /docs/docs/how-tos/.meta.yml: -------------------------------------------------------------------------------- 1 | tags: 2 | - how-tos 3 | - how-to 4 | - howto 5 | - how to -------------------------------------------------------------------------------- /docs/docs/how-tos/react_diagrams.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/how-tos/react_diagrams.png -------------------------------------------------------------------------------- /docs/docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | hide_comments: true 3 | title: LangGraph 4 | --- 5 | 6 | 16 | 17 |

18 | LangGraph Logo 19 | LangGraph Logo 20 |

21 | 22 | 30 | 31 | {!../README.md!} -------------------------------------------------------------------------------- /docs/docs/reference/.meta.yml: -------------------------------------------------------------------------------- 1 | tags: 2 | - reference 3 | - api 4 | - api-reference 5 | -------------------------------------------------------------------------------- /docs/docs/reference/agents.md: -------------------------------------------------------------------------------- 1 | # Agents 2 | 3 | ::: langgraph.prebuilt.chat_agent_executor 4 | options: 5 | members: 6 | - AgentState 7 | - create_react_agent 8 | 9 | ::: langgraph.prebuilt.tool_node.ToolNode 10 | options: 11 | show_if_no_docstring: true 12 | show_root_heading: true 13 | show_root_full_path: false 14 | inherited_members: false 15 | members: 16 | - inject_tool_args 17 | 18 | ::: langgraph.prebuilt.tool_node 19 | options: 20 | members: 21 | - InjectedState 22 | - InjectedStore 23 | - tools_condition 24 | 25 | ::: langgraph.prebuilt.tool_validator.ValidationNode 26 | options: 27 | show_if_no_docstring: true 28 | show_root_heading: true 29 | show_root_full_path: false 30 | inherited_members: false 31 | members: false 32 | 33 | ::: langgraph.prebuilt.interrupt 34 | options: 35 | members: 36 | - HumanInterruptConfig 37 | - ActionRequest 38 | - HumanInterrupt 39 | - HumanResponse -------------------------------------------------------------------------------- /docs/docs/reference/cache.md: -------------------------------------------------------------------------------- 1 | ## Caching 2 | 3 | ::: langgraph.cache.base 4 | ::: langgraph.cache.memory 5 | ::: langgraph.cache.sqlite -------------------------------------------------------------------------------- /docs/docs/reference/channels.md: -------------------------------------------------------------------------------- 1 | # Channels 2 | 3 | ::: langgraph.channels.base 4 | options: 5 | members: 6 | - BaseChannel 7 | 8 | ::: langgraph.channels 9 | options: 10 | members: 11 | - Topic 12 | - LastValue 13 | - EphemeralValue 14 | - BinaryOperatorAggregate 15 | - AnyValue 16 | -------------------------------------------------------------------------------- /docs/docs/reference/checkpoints.md: -------------------------------------------------------------------------------- 1 | # Checkpointers 2 | 3 | ::: langgraph.checkpoint.base 4 | options: 5 | members: 6 | - CheckpointMetadata 7 | - Checkpoint 8 | - BaseCheckpointSaver 9 | - create_checkpoint 10 | 11 | ::: langgraph.checkpoint.serde.base 12 | options: 13 | members: 14 | - SerializerProtocol 15 | 16 | ::: langgraph.checkpoint.serde.jsonplus 17 | options: 18 | members: 19 | - JsonPlusSerializer 20 | 21 | ::: langgraph.checkpoint.memory 22 | 23 | ::: langgraph.checkpoint.sqlite 24 | 25 | ::: langgraph.checkpoint.sqlite.aio 26 | 27 | ::: langgraph.checkpoint.postgres 28 | options: 29 | members: 30 | - PostgresSaver 31 | 32 | ::: langgraph.checkpoint.postgres.aio 33 | options: 34 | members: 35 | - AsyncPostgresSaver -------------------------------------------------------------------------------- /docs/docs/reference/config.md: -------------------------------------------------------------------------------- 1 | ::: langgraph.config 2 | options: 3 | members: 4 | - get_store 5 | - get_stream_writer -------------------------------------------------------------------------------- /docs/docs/reference/constants.md: -------------------------------------------------------------------------------- 1 | ::: langgraph.constants 2 | options: 3 | members: 4 | - TAG_HIDDEN 5 | - START 6 | - END -------------------------------------------------------------------------------- /docs/docs/reference/errors.md: -------------------------------------------------------------------------------- 1 | # Errors 2 | 3 | ::: langgraph.errors -------------------------------------------------------------------------------- /docs/docs/reference/func.md: -------------------------------------------------------------------------------- 1 | ::: langgraph.func 2 | options: 3 | members: 4 | - task 5 | - entrypoint -------------------------------------------------------------------------------- /docs/docs/reference/graphs.md: -------------------------------------------------------------------------------- 1 | # Graph Definitions 2 | 3 | ::: langgraph.graph.state.StateGraph 4 | options: 5 | show_if_no_docstring: true 6 | show_root_heading: true 7 | show_root_full_path: false 8 | members: 9 | - add_node 10 | - add_edge 11 | - add_conditional_edges 12 | - add_sequence 13 | - compile 14 | 15 | ::: langgraph.graph.state.CompiledStateGraph 16 | options: 17 | show_if_no_docstring: true 18 | show_root_heading: true 19 | show_root_full_path: false 20 | members: 21 | - stream 22 | - astream 23 | - invoke 24 | - ainvoke 25 | - get_state 26 | - aget_state 27 | - get_state_history 28 | - aget_state_history 29 | - update_state 30 | - aupdate_state 31 | - bulk_update_state 32 | - abulk_update_state 33 | - get_graph 34 | - aget_graph 35 | - get_subgraphs 36 | - aget_subgraphs 37 | - with_config 38 | 39 | ::: langgraph.graph.message 40 | options: 41 | members: 42 | - add_messages -------------------------------------------------------------------------------- /docs/docs/reference/mcp.md: -------------------------------------------------------------------------------- 1 | # LangChain Model Context Protocol (MCP) Adapters 2 | 3 | ::: langchain_mcp_adapters.client 4 | options: 5 | members: 6 | - MultiServerMCPClient 7 | 8 | ::: langchain_mcp_adapters.tools 9 | options: 10 | members: 11 | - load_mcp_tools 12 | 13 | ::: langchain_mcp_adapters.prompts 14 | options: 15 | members: 16 | - load_mcp_prompt 17 | 18 | ::: langchain_mcp_adapters.resources 19 | options: 20 | members: 21 | - load_mcp_resources -------------------------------------------------------------------------------- /docs/docs/reference/pregel.md: -------------------------------------------------------------------------------- 1 | # Pregel 2 | 3 | ::: langgraph.pregel.NodeBuilder 4 | options: 5 | show_if_no_docstring: true 6 | show_root_heading: true 7 | show_root_full_path: false 8 | members: 9 | - subscribe_only 10 | - subscribe_to 11 | - read_from 12 | - do 13 | - write_to 14 | - meta 15 | - retry 16 | - cache 17 | - build 18 | 19 | ::: langgraph.pregel.Pregel 20 | options: 21 | show_if_no_docstring: true 22 | show_root_heading: true 23 | show_root_full_path: false 24 | members: 25 | - stream 26 | - astream 27 | - invoke 28 | - ainvoke 29 | - get_state 30 | - aget_state 31 | - get_state_history 32 | - aget_state_history 33 | - update_state 34 | - aupdate_state 35 | - bulk_update_state 36 | - abulk_update_state 37 | - get_graph 38 | - aget_graph 39 | - get_subgraphs 40 | - aget_subgraphs 41 | - with_config -------------------------------------------------------------------------------- /docs/docs/reference/remote_graph.md: -------------------------------------------------------------------------------- 1 | # RemoteGraph 2 | 3 | ::: langgraph.pregel.remote 4 | options: 5 | members: 6 | - RemoteGraph 7 | -------------------------------------------------------------------------------- /docs/docs/reference/store.md: -------------------------------------------------------------------------------- 1 | # Storage 2 | 3 | ::: langgraph.store.base 4 | 5 | 6 | ::: langgraph.store.postgres -------------------------------------------------------------------------------- /docs/docs/reference/supervisor.md: -------------------------------------------------------------------------------- 1 | # LangGraph Supervisor 2 | 3 | ::: langgraph_supervisor.supervisor 4 | options: 5 | members: 6 | - create_supervisor 7 | 8 | ::: langgraph_supervisor.handoff 9 | options: 10 | members: 11 | - create_handoff_tool 12 | - create_forward_message_tool -------------------------------------------------------------------------------- /docs/docs/reference/swarm.md: -------------------------------------------------------------------------------- 1 | # LangGraph Swarm 2 | 3 | ::: langgraph_swarm.swarm 4 | options: 5 | members: 6 | - SwarmState 7 | - create_swarm 8 | - add_active_agent_router 9 | 10 | ::: langgraph_swarm.handoff 11 | options: 12 | members: 13 | - create_handoff_tool -------------------------------------------------------------------------------- /docs/docs/reference/types.md: -------------------------------------------------------------------------------- 1 | # Types 2 | 3 | ::: langgraph.types 4 | options: 5 | members: 6 | - All 7 | - StreamMode 8 | - StreamWriter 9 | - RetryPolicy 10 | - CachePolicy 11 | - Interrupt 12 | - PregelTask 13 | - StateSnapshot 14 | - Send 15 | - Command 16 | - interrupt 17 | -------------------------------------------------------------------------------- /docs/docs/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/static/favicon.png -------------------------------------------------------------------------------- /docs/docs/static/values_vs_updates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/static/values_vs_updates.png -------------------------------------------------------------------------------- /docs/docs/stylesheets/logos.css: -------------------------------------------------------------------------------- 1 | .safari { 2 | color: #0070C9; 3 | } -------------------------------------------------------------------------------- /docs/docs/stylesheets/navigation_title_ovverides.css: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is used to override the navigation title for the LangGraph documentation. 3 | * It is used to change the title of the first and second items in the navigation menu. 4 | * The first item is the Guides page, and the second item is the Reference page. 5 | */ 6 | 7 | .md-nav--primary > .md-nav__list > .md-nav__item:nth-child(1) > .md-nav__link .md-ellipsis { 8 | visibility: hidden !important; 9 | position: relative; 10 | } 11 | 12 | .md-nav--primary > .md-nav__list > .md-nav__item:nth-child(1) > .md-nav__link .md-ellipsis::after { 13 | content: "Home"; 14 | visibility: visible; 15 | position: absolute; 16 | left: 0; 17 | } 18 | 19 | .md-nav--primary > .md-nav__list > .md-nav__item:nth-child(2) > .md-nav__link .md-ellipsis { 20 | visibility: hidden !important; 21 | position: relative; 22 | } 23 | 24 | .md-nav--primary > .md-nav__list > .md-nav__item:nth-child(2) > .md-nav__link .md-ellipsis::after { 25 | content: "Home"; 26 | visibility: visible; 27 | position: absolute; 28 | left: 0; 29 | } -------------------------------------------------------------------------------- /docs/docs/stylesheets/sticky_navigation.css: -------------------------------------------------------------------------------- 1 | @media screen and (min-width: 76.25em) { 2 | .md-nav__toggle ~ .md-nav > .md-nav__list { 3 | overflow: clip; 4 | } 5 | 6 | .md-nav__link { 7 | margin: 0; 8 | padding: 0.325em 0; 9 | } 10 | 11 | .md-nav__link:has(+ .md-nav[aria-expanded="true"]) { 12 | position: sticky; 13 | top: 2em; 14 | 15 | z-index: 1; 16 | background-color: var(--md-default-bg-color); 17 | } 18 | 19 | .md-nav__link.md-nav__container { 20 | z-index: 2 !important; 21 | box-shadow: none !important; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /docs/docs/troubleshooting/errors/GRAPH_RECURSION_LIMIT.md: -------------------------------------------------------------------------------- 1 | # GRAPH_RECURSION_LIMIT 2 | 3 | Your LangGraph [`StateGraph`](https://langchain-ai.github.io/langgraph/reference/graphs/#langgraph.graph.state.StateGraph) reached the maximum number of steps before hitting a stop condition. 4 | This is often due to an infinite loop caused by code like the example below: 5 | 6 | ```python 7 | class State(TypedDict): 8 | some_key: str 9 | 10 | builder = StateGraph(State) 11 | builder.add_node("a", ...) 12 | builder.add_node("b", ...) 13 | builder.add_edge("a", "b") 14 | builder.add_edge("b", "a") 15 | ... 16 | 17 | graph = builder.compile() 18 | ``` 19 | 20 | However, complex graphs may hit the default limit naturally. 21 | 22 | ## Troubleshooting 23 | 24 | - If you are not expecting your graph to go through many iterations, you likely have a cycle. Check your logic for infinite loops. 25 | - If you have a complex graph, you can pass in a higher `recursion_limit` value into your `config` object when invoking your graph like this: 26 | 27 | ```python 28 | graph.invoke({...}, {"recursion_limit": 100}) 29 | ``` -------------------------------------------------------------------------------- /docs/docs/troubleshooting/errors/INVALID_GRAPH_NODE_RETURN_VALUE.md: -------------------------------------------------------------------------------- 1 | # INVALID_GRAPH_NODE_RETURN_VALUE 2 | 3 | A LangGraph [`StateGraph`](https://langchain-ai.github.io/langgraph/reference/graphs/#langgraph.graph.state.StateGraph) 4 | received a non-dict return type from a node. Here's an example: 5 | 6 | ```python 7 | class State(TypedDict): 8 | some_key: str 9 | 10 | def bad_node(state: State): 11 | # Should return a dict with a value for "some_key", not a list 12 | return ["whoops"] 13 | 14 | builder = StateGraph(State) 15 | builder.add_node(bad_node) 16 | ... 17 | 18 | graph = builder.compile() 19 | ``` 20 | 21 | Invoking the above graph will result in an error like this: 22 | 23 | ```python 24 | graph.invoke({ "some_key": "someval" }); 25 | ``` 26 | 27 | ``` 28 | InvalidUpdateError: Expected dict, got ['whoops'] 29 | For troubleshooting, visit: https://python.langchain.com/docs/troubleshooting/errors/INVALID_GRAPH_NODE_RETURN_VALUE 30 | ``` 31 | 32 | Nodes in your graph must return a dict containing one or more keys defined in your state. 33 | 34 | ## Troubleshooting 35 | 36 | The following may help resolve this error: 37 | 38 | - If you have complex logic in your node, make sure all code paths return an appropriate dict for your defined state. -------------------------------------------------------------------------------- /docs/docs/troubleshooting/errors/MULTIPLE_SUBGRAPHS.md: -------------------------------------------------------------------------------- 1 | # MULTIPLE_SUBGRAPHS 2 | 3 | You are calling subgraphs multiple times within a single LangGraph node with checkpointing enabled for each subgraph. 4 | 5 | This is currently not allowed due to internal restrictions on how checkpoint namespacing for subgraphs works. 6 | 7 | ## Troubleshooting 8 | 9 | The following may help resolve this error: 10 | 11 | - If you don't need to interrupt/resume from a subgraph, pass `checkpointer=False` when compiling it like this: `.compile(checkpointer=False)` 12 | - Don't imperatively call graphs multiple times in the same node, and instead use the [`Send`](https://langchain-ai.github.io/langgraph/concepts/low_level/#send) API. 13 | -------------------------------------------------------------------------------- /docs/docs/troubleshooting/errors/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | search: 3 | boost: 0.5 4 | --- 5 | # Error reference 6 | 7 | This page contains guides around resolving common errors you may find while building with LangGraph. 8 | Errors referenced below will have an `lc_error_code` property corresponding to one of the below codes when they are thrown in code. 9 | 10 | - [GRAPH_RECURSION_LIMIT](./GRAPH_RECURSION_LIMIT.md) 11 | - [INVALID_CONCURRENT_GRAPH_UPDATE](./INVALID_CONCURRENT_GRAPH_UPDATE.md) 12 | - [INVALID_GRAPH_NODE_RETURN_VALUE](./INVALID_GRAPH_NODE_RETURN_VALUE.md) 13 | - [MULTIPLE_SUBGRAPHS](./MULTIPLE_SUBGRAPHS.md) 14 | - [INVALID_CHAT_HISTORY](./INVALID_CHAT_HISTORY.md) 15 | 16 | ## LangGraph Platform 17 | 18 | These guides provide troubleshooting information for errors that are specific to the LangGraph Platform. 19 | 20 | - [INVALID_LICENSE](./INVALID_LICENSE.md) 21 | - [Studio Errors](../studio.md) 22 | -------------------------------------------------------------------------------- /docs/docs/troubleshooting/img/brave-shields.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/troubleshooting/img/brave-shields.png -------------------------------------------------------------------------------- /docs/docs/tutorials/.meta.yml: -------------------------------------------------------------------------------- 1 | tags: 2 | - tutorials -------------------------------------------------------------------------------- /docs/docs/tutorials/auth/img/authentication.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/auth/img/authentication.png -------------------------------------------------------------------------------- /docs/docs/tutorials/auth/img/authorization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/auth/img/authorization.png -------------------------------------------------------------------------------- /docs/docs/tutorials/auth/img/no_auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/auth/img/no_auth.png -------------------------------------------------------------------------------- /docs/docs/tutorials/customer-support/img/customer-support-bot-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/customer-support/img/customer-support-bot-4.png -------------------------------------------------------------------------------- /docs/docs/tutorials/customer-support/img/part-1-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/customer-support/img/part-1-diagram.png -------------------------------------------------------------------------------- /docs/docs/tutorials/customer-support/img/part-2-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/customer-support/img/part-2-diagram.png -------------------------------------------------------------------------------- /docs/docs/tutorials/customer-support/img/part-3-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/customer-support/img/part-3-diagram.png -------------------------------------------------------------------------------- /docs/docs/tutorials/customer-support/img/part-4-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/customer-support/img/part-4-diagram.png -------------------------------------------------------------------------------- /docs/docs/tutorials/get-started/basic-chatbot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/get-started/basic-chatbot.png -------------------------------------------------------------------------------- /docs/docs/tutorials/get-started/chatbot-with-tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/get-started/chatbot-with-tools.png -------------------------------------------------------------------------------- /docs/docs/tutorials/overview.md: -------------------------------------------------------------------------------- 1 | # Examples 2 | 3 | The pages in this section provide end-to-end examples for the following topics: 4 | 5 | ## General 6 | 7 | - [Agentic RAG](./rag/langgraph_adaptive_rag.ipynb) 8 | - [Agent Supervisor](./multi_agent/agent_supervisor.ipynb) 9 | - [SQL agent](./sql-agent.ipynb) 10 | - [Graph runs in LangSmith](../how-tos/run-id-langsmith.ipynb) 11 | 12 | ## LangGraph Platform 13 | 14 | - [Set up custom authentication](./auth/getting_started.md) 15 | - [Make conversations private](./auth/resource_auth.md) 16 | - [Connect an authentication provider](./auth/add_auth_server.md) 17 | - [Rebuild graph at runtime](../cloud/deployment/graph_rebuild.md) 18 | - [Use RemoteGraph](../how-tos/use-remote-graph.md) 19 | - [Deploy CrewAI, AutoGen, and other frameworks](../how-tos/autogen-langgraph-platform.ipynb) 20 | - [Integrate LangGraph into a React app](../cloud/how-tos/use_stream_react.md) 21 | - [Implement Generative User Interfaces with LangGraph](../cloud/how-tos/generative_ui_react.md) -------------------------------------------------------------------------------- /docs/docs/tutorials/tnt-llm/img/tnt_llm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/tnt-llm/img/tnt_llm.png -------------------------------------------------------------------------------- /docs/docs/tutorials/tot/img/tot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/tot/img/tot.png -------------------------------------------------------------------------------- /docs/docs/tutorials/usaco/img/benchmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/usaco/img/benchmark.png -------------------------------------------------------------------------------- /docs/docs/tutorials/usaco/img/diagram-part-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/usaco/img/diagram-part-1.png -------------------------------------------------------------------------------- /docs/docs/tutorials/usaco/img/diagram-part-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/usaco/img/diagram-part-2.png -------------------------------------------------------------------------------- /docs/docs/tutorials/usaco/img/diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/usaco/img/diagram.png -------------------------------------------------------------------------------- /docs/docs/tutorials/usaco/img/usaco.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/usaco/img/usaco.png -------------------------------------------------------------------------------- /docs/docs/tutorials/web-navigation/img/web-voyager.excalidraw.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/web-navigation/img/web-voyager.excalidraw.jpg -------------------------------------------------------------------------------- /docs/docs/tutorials/workflows/img/agent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/workflows/img/agent.png -------------------------------------------------------------------------------- /docs/docs/tutorials/workflows/img/augmented_llm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/workflows/img/augmented_llm.png -------------------------------------------------------------------------------- /docs/docs/tutorials/workflows/img/evaluator_optimizer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/workflows/img/evaluator_optimizer.png -------------------------------------------------------------------------------- /docs/docs/tutorials/workflows/img/parallelization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/workflows/img/parallelization.png -------------------------------------------------------------------------------- /docs/docs/tutorials/workflows/img/prompt_chain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/workflows/img/prompt_chain.png -------------------------------------------------------------------------------- /docs/docs/tutorials/workflows/img/routing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/workflows/img/routing.png -------------------------------------------------------------------------------- /docs/docs/tutorials/workflows/img/worker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/docs/tutorials/workflows/img/worker.png -------------------------------------------------------------------------------- /docs/overrides/partials/logo.html: -------------------------------------------------------------------------------- 1 | {% if config.theme.logo_light_mode %} 2 | logo 3 | logo 4 | {% endif %} -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "version": "1.0.0", 4 | "license": "MIT", 5 | "scripts": { 6 | "build": "echo 'export OPENAI_API_KEY=\"sk-proj-1234567890\"' >> ~/.bashrc && echo 'export ANTHROPIC_API_KEY=\"sk-ant-api03-1234567890\"' >> ~/.bashrc && echo 'export PATH=$PATH:/vercel/.local/bin:$PATH' >> ~/.bashrc && source ~/.bashrc && make vercel-build-docs" 7 | }, 8 | "dependencies": { 9 | "@langchain/core": "^0.3.38", 10 | "@langchain/openai": "^0.4.2", 11 | "msgpack-lite": "^0.1.26", 12 | "nock": "^14.0.1" 13 | }, 14 | "devDependencies": { 15 | "@tsconfig/recommended": "^1.0.8", 16 | "@types/msgpack-lite": "^0.1.11", 17 | "@types/nock": "^11.1.0", 18 | "@types/node": "^22.13.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /docs/test-compose.yml: -------------------------------------------------------------------------------- 1 | name: notebook-tests 2 | services: 3 | mongo: 4 | image: mongo:latest 5 | ports: 6 | - "27017:27017" 7 | redis: 8 | image: redis:latest 9 | ports: 10 | - "6379:6379" 11 | postgres: 12 | image: postgres:16 13 | ports: 14 | - "5442:5432" 15 | environment: 16 | POSTGRES_DB: postgres 17 | POSTGRES_USER: postgres 18 | POSTGRES_PASSWORD: postgres 19 | healthcheck: 20 | test: pg_isready -U postgres 21 | start_period: 10s 22 | timeout: 1s 23 | retries: 5 24 | interval: 60s 25 | start_interval: 1s 26 | -------------------------------------------------------------------------------- /docs/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/tests/__init__.py -------------------------------------------------------------------------------- /docs/tests/unit_tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/docs/tests/unit_tests/__init__.py -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/recommended", 3 | "compilerOptions": { 4 | "rootDir": "", 5 | "noEmit": true, 6 | "target": "ES2021", 7 | "lib": ["ES2021", "ES2022.Object", "DOM"], 8 | "module": "NodeNext", 9 | "moduleResolution": "nodenext", 10 | "esModuleInterop": true, 11 | "declaration": true, 12 | "noImplicitReturns": true, 13 | "noFallthroughCasesInSwitch": true, 14 | "noUnusedLocals": true, 15 | "noUnusedParameters": true, 16 | "useDefineForClassFields": true, 17 | "strictPropertyInitialization": false, 18 | "allowJs": true, 19 | "strict": true 20 | }, 21 | "include": ["**/*.ts"], 22 | "exclude": ["node_modules"] 23 | } 24 | -------------------------------------------------------------------------------- /docs/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "buildCommand": "yarn build", 3 | "outputDirectory": "site" 4 | } 5 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | # LangGraph examples 2 | 3 | This directory should NOT be used for documentation. All new documentation must be added to `docs/docs/` directory. -------------------------------------------------------------------------------- /examples/async.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "23544406", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/async.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.12.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/branching.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "14f7ca50", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/branching.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.8" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/chatbot-simulation-evaluation/agent-simulation-evaluation.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "10251c1c", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/chatbot-simulation-evaluation/agent-simulation-evaluation.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.1" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/chatbot-simulation-evaluation/langsmith-agent-simulation-evaluation.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "a4351a24", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/chatbot-simulation-evaluation/langsmith-agent-simulation-evaluation.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/chatbots/information-gather-prompting.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "a9014f94", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/chatbots/information-gather-prompting.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/cloud_examples/langgraph_to_langgraph_cloud.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "2b789e16", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/cloud/how-tos/langgraph_to_langgraph_cloud.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.1" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/code_assistant/langgraph_code_assistant.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "1f2f13ca", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/code_assistant/langgraph_code_assistant.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.12.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/configuration.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "e9a58c69", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/configuration.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/create-react-agent-hitl.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "a1e6efeb", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/create-react-agent-hitl.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/create-react-agent-memory.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "1ef41a89", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/create-react-agent-memory.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.1" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/create-react-agent-system-prompt.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "9e2f7902", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/create-react-agent-system-prompt.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.1" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/create-react-agent.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "eb07372e", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/create-react-agent.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.1" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/customer-support/customer-support.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "a8232bc9", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/customer-support/customer-support.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.12.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/extraction/retries.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "8dbdba5b", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/extraction/retries.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.12.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/human_in_the_loop/breakpoints.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "ac22b8de", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/human_in_the_loop/breakpoints.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/human_in_the_loop/dynamic_breakpoints.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "b3cec425", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/human_in_the_loop/dynamic_breakpoints.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/human_in_the_loop/edit-graph-state.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "4876215f", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/human_in_the_loop/edit-graph-state.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.8" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/human_in_the_loop/review-tool-calls.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "b162f1bd", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/human_in_the_loop/review-tool-calls.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/human_in_the_loop/time-travel.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "84c5f6f1", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/human_in_the_loop/time-travel.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/human_in_the_loop/wait-user-input.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "3ecab357", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/human_in_the_loop/wait-user-input.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/input_output_schema.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "fc0793cb", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/input_output_schema.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.1" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/lats/lats.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "09038b53", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/lats/lats.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.12.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/llm-compiler/LLMCompiler.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "85205e97", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/llm-compiler/LLMCompiler.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/map-reduce.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "42abb708", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/map-reduce.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/memory/add-summary-conversation-history.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "298784f6", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/memory/add-summary-conversation-history.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.1" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/memory/delete-messages.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "3f4370fd", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/memory/delete-messages.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/memory/manage-conversation-history.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "6ec7cb13", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/memory/manage-conversation-history.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/multi_agent/agent_supervisor.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "5eb637a4", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/multi_agent/agent_supervisor.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/multi_agent/hierarchical_agent_teams.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "5cc8a2ad", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/multi_agent/hierarchical_agent_teams.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/multi_agent/multi-agent-collaboration.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "d2b507b9", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/multi_agent/multi-agent-collaboration.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/node-retries.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "017a01f4", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/node-retries.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "env", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 2 33 | } 34 | -------------------------------------------------------------------------------- /examples/pass-config-to-tools.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "05f6ad0a", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/pass-config-to-tools.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 4 33 | } 34 | -------------------------------------------------------------------------------- /examples/pass-run-time-values-to-tools.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "8f38bec5", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/pass-run-time-values-to-tools.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/pass_private_state.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "4da17088", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/pass_private_state.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.1" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/persistence.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "d16e8b9c", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/persistence.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.12.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/persistence_mongodb.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "78217098", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/persistence_mongodb.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/persistence_postgres.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "18526f23", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/persistence_postgres.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/persistence_redis.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "eee6ecdd", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/persistence_redis.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/plan-and-execute/plan-and-execute.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "9138f92e", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/plan-and-execute/plan-and-execute.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/react-agent-from-scratch.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "294995c4", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/react-agent-from-scratch.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 2 33 | } 34 | -------------------------------------------------------------------------------- /examples/react-agent-structured-output.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "40f0d107", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/react-agent-structured-output.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 4 33 | } 34 | -------------------------------------------------------------------------------- /examples/recursion-limit.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "fa3f7c50", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/recursion-limit.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 2 33 | } 34 | -------------------------------------------------------------------------------- /examples/reflection/reflection.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "658773a2", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/reflection/reflection.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/reflexion/reflexion.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "caf07859", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/reflexion/reflexion.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.12.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/rewoo/rewoo.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "961f43ec", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/rewoo/rewoo.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/run-id-langsmith.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "bbd6e9b8", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/run-id-langsmith.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 4 33 | } 34 | -------------------------------------------------------------------------------- /examples/self-discover/self-discover.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f6db1873", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/self-discover/self-discover.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.12.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/state-model.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "4149ffcc", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/state-model.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/storm/storm.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "3e05d7f9", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/storm/storm.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.12.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 4 33 | } 34 | -------------------------------------------------------------------------------- /examples/stream-multiple.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "e663f597", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/stream-multiple.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/stream-updates.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "e6829c80", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/stream-updates.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/stream-values.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "5ec11895", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/stream-values.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/streaming-content.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "6619387c", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/streaming-content.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/streaming-events-from-within-tools-without-langchain.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "57b7e303", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/streaming-events-from-within-tools-without-langchain.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/streaming-events-from-within-tools.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "8e71a0c8", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/streaming-events-from-within-tools.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/streaming-from-final-node.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "756e4554", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/streaming-from-final-node.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/streaming-subgraphs.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "47164a72", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/streaming-subgraphs.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 2 33 | } 34 | -------------------------------------------------------------------------------- /examples/streaming-tokens-without-langchain.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "218dfbcb", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/streaming-tokens-without-langchain.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/streaming-tokens.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "99eb887e", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/streaming-tokens.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/subgraph-transform-state.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "0de7689f", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/subgraph-transform-state.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 4 33 | } 34 | -------------------------------------------------------------------------------- /examples/subgraph.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "f49876e1", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/subgraph.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 4 33 | } 34 | -------------------------------------------------------------------------------- /examples/subgraphs-manage-state.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "5106959e", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/subgraphs-manage-state.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 4 33 | } 34 | -------------------------------------------------------------------------------- /examples/tool-calling-errors.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "dc21501d", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/tool-calling-errors.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 4 33 | } 34 | -------------------------------------------------------------------------------- /examples/tool-calling.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "7fd8bd65", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/tool-calling.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 4 33 | } 34 | -------------------------------------------------------------------------------- /examples/tutorials/sql-agent.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "83c2223f", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/sql-agent.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/tutorials/tnt-llm/tnt-llm.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "11140167", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/tnt-llm/tnt-llm.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/usaco/usaco.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "9dffdb54", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/usaco/usaco.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/visualization.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "9c9cb15a", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/how-tos/visualization.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.9" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /examples/web-navigation/web_voyager.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "007ea2e9", 6 | "metadata": {}, 7 | "source": [ 8 | "This file has been moved to https://github.com/langchain-ai/langgraph/blob/main/docs/docs/tutorials/web-navigation/web_voyager.ipynb" 9 | ] 10 | } 11 | ], 12 | "metadata": { 13 | "kernelspec": { 14 | "display_name": "Python 3 (ipykernel)", 15 | "language": "python", 16 | "name": "python3" 17 | }, 18 | "language_info": { 19 | "codemirror_mode": { 20 | "name": "ipython", 21 | "version": 3 22 | }, 23 | "file_extension": ".py", 24 | "mimetype": "text/x-python", 25 | "name": "python", 26 | "nbconvert_exporter": "python", 27 | "pygments_lexer": "ipython3", 28 | "version": "3.11.2" 29 | } 30 | }, 31 | "nbformat": 4, 32 | "nbformat_minor": 5 33 | } 34 | -------------------------------------------------------------------------------- /libs/checkpoint-postgres/langgraph/checkpoint/postgres/_ainternal.py: -------------------------------------------------------------------------------- 1 | """Shared async utility functions for the Postgres checkpoint & storage classes.""" 2 | 3 | from collections.abc import AsyncIterator 4 | from contextlib import asynccontextmanager 5 | from typing import Union 6 | 7 | from psycopg import AsyncConnection 8 | from psycopg.rows import DictRow 9 | from psycopg_pool import AsyncConnectionPool 10 | 11 | Conn = Union[AsyncConnection[DictRow], AsyncConnectionPool[AsyncConnection[DictRow]]] 12 | 13 | 14 | @asynccontextmanager 15 | async def get_connection( 16 | conn: Conn, 17 | ) -> AsyncIterator[AsyncConnection[DictRow]]: 18 | if isinstance(conn, AsyncConnection): 19 | yield conn 20 | elif isinstance(conn, AsyncConnectionPool): 21 | async with conn.connection() as conn: 22 | yield conn 23 | else: 24 | raise TypeError(f"Invalid connection type: {type(conn)}") 25 | -------------------------------------------------------------------------------- /libs/checkpoint-postgres/langgraph/checkpoint/postgres/_internal.py: -------------------------------------------------------------------------------- 1 | """Shared utility functions for the Postgres checkpoint & storage classes.""" 2 | 3 | from collections.abc import Iterator 4 | from contextlib import contextmanager 5 | from typing import Union 6 | 7 | from psycopg import Connection 8 | from psycopg.rows import DictRow 9 | from psycopg_pool import ConnectionPool 10 | 11 | Conn = Union[Connection[DictRow], ConnectionPool[Connection[DictRow]]] 12 | 13 | 14 | @contextmanager 15 | def get_connection(conn: Conn) -> Iterator[Connection[DictRow]]: 16 | if isinstance(conn, Connection): 17 | yield conn 18 | elif isinstance(conn, ConnectionPool): 19 | with conn.connection() as conn: 20 | yield conn 21 | else: 22 | raise TypeError(f"Invalid connection type: {type(conn)}") 23 | -------------------------------------------------------------------------------- /libs/checkpoint-postgres/langgraph/checkpoint/postgres/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint-postgres/langgraph/checkpoint/postgres/py.typed -------------------------------------------------------------------------------- /libs/checkpoint-postgres/langgraph/store/postgres/__init__.py: -------------------------------------------------------------------------------- 1 | from langgraph.store.postgres.aio import AsyncPostgresStore 2 | from langgraph.store.postgres.base import PostgresStore 3 | 4 | __all__ = ["AsyncPostgresStore", "PostgresStore"] 5 | -------------------------------------------------------------------------------- /libs/checkpoint-postgres/langgraph/store/postgres/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint-postgres/langgraph/store/postgres/py.typed -------------------------------------------------------------------------------- /libs/checkpoint-postgres/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint-postgres/tests/__init__.py -------------------------------------------------------------------------------- /libs/checkpoint-postgres/tests/compose-postgres.yml: -------------------------------------------------------------------------------- 1 | services: 2 | postgres-test: 3 | image: pgvector/pgvector:pg${POSTGRES_VERSION:-16} 4 | ports: 5 | - "5441:5432" 6 | environment: 7 | POSTGRES_DB: postgres 8 | POSTGRES_USER: postgres 9 | POSTGRES_PASSWORD: postgres 10 | command: ["postgres", "-c", "shared_preload_libraries=vector"] 11 | healthcheck: 12 | test: pg_isready -U postgres 13 | start_period: 10s 14 | timeout: 1s 15 | retries: 5 16 | interval: 60s 17 | start_interval: 1s 18 | -------------------------------------------------------------------------------- /libs/checkpoint-sqlite/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: test test_watch lint format 2 | 3 | ###################### 4 | # TESTING AND COVERAGE 5 | ###################### 6 | 7 | TEST ?= . 8 | 9 | test: 10 | uv run pytest $(TEST) 11 | 12 | test_watch: 13 | uv run ptw $(TEST) 14 | 15 | ###################### 16 | # LINTING AND FORMATTING 17 | ###################### 18 | 19 | # Define a variable for Python and notebook files. 20 | PYTHON_FILES=. 21 | MYPY_CACHE=.mypy_cache 22 | lint format: PYTHON_FILES=. 23 | lint_diff format_diff: PYTHON_FILES=$(shell git diff --name-only --relative --diff-filter=d main . | grep -E '\.py$$|\.ipynb$$') 24 | lint_package: PYTHON_FILES=langgraph 25 | lint_tests: PYTHON_FILES=tests 26 | lint_tests: MYPY_CACHE=.mypy_cache_test 27 | 28 | lint lint_diff lint_package lint_tests: 29 | uv run ruff check . 30 | [ "$(PYTHON_FILES)" = "" ] || uv run ruff format $(PYTHON_FILES) --diff 31 | [ "$(PYTHON_FILES)" = "" ] || uv run ruff check --select I $(PYTHON_FILES) 32 | [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) 33 | [ "$(PYTHON_FILES)" = "" ] || uv run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE) 34 | 35 | format format_diff: 36 | uv run ruff format $(PYTHON_FILES) 37 | uv run ruff check --select I --fix $(PYTHON_FILES) 38 | -------------------------------------------------------------------------------- /libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint-sqlite/langgraph/checkpoint/sqlite/py.typed -------------------------------------------------------------------------------- /libs/checkpoint-sqlite/langgraph/store/sqlite/__init__.py: -------------------------------------------------------------------------------- 1 | from langgraph.store.sqlite.aio import AsyncSqliteStore 2 | from langgraph.store.sqlite.base import SqliteStore 3 | 4 | __all__ = ["AsyncSqliteStore", "SqliteStore"] 5 | -------------------------------------------------------------------------------- /libs/checkpoint-sqlite/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint-sqlite/tests/__init__.py -------------------------------------------------------------------------------- /libs/checkpoint/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 LangChain, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /libs/checkpoint/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: test test_watch lint format 2 | 3 | ###################### 4 | # TESTING AND COVERAGE 5 | ###################### 6 | 7 | TEST ?= . 8 | 9 | test: 10 | uv run pytest $(TEST) 11 | 12 | test_watch: 13 | uv run ptw $(TEST) 14 | 15 | ###################### 16 | # LINTING AND FORMATTING 17 | ###################### 18 | 19 | # Define a variable for Python and notebook files. 20 | PYTHON_FILES=. 21 | MYPY_CACHE=.mypy_cache 22 | lint format: PYTHON_FILES=. 23 | lint_diff format_diff: PYTHON_FILES=$(shell git diff --name-only --relative --diff-filter=d main . | grep -E '\.py$$|\.ipynb$$') 24 | lint_package: PYTHON_FILES=langgraph 25 | lint_tests: PYTHON_FILES=tests 26 | lint_tests: MYPY_CACHE=.mypy_cache_test 27 | 28 | lint lint_diff lint_package lint_tests: 29 | uv run ruff check . 30 | [ "$(PYTHON_FILES)" = "" ] || uv run ruff format $(PYTHON_FILES) --diff 31 | [ "$(PYTHON_FILES)" = "" ] || uv run ruff check --select I $(PYTHON_FILES) 32 | [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) 33 | [ "$(PYTHON_FILES)" = "" ] || uv run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE) 34 | 35 | format format_diff: 36 | uv run ruff format $(PYTHON_FILES) 37 | uv run ruff check --select I --fix $(PYTHON_FILES) 38 | -------------------------------------------------------------------------------- /libs/checkpoint/langgraph/cache/base/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint/langgraph/cache/base/py.typed -------------------------------------------------------------------------------- /libs/checkpoint/langgraph/checkpoint/base/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint/langgraph/checkpoint/base/py.typed -------------------------------------------------------------------------------- /libs/checkpoint/langgraph/checkpoint/memory/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint/langgraph/checkpoint/memory/py.typed -------------------------------------------------------------------------------- /libs/checkpoint/langgraph/checkpoint/serde/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint/langgraph/checkpoint/serde/__init__.py -------------------------------------------------------------------------------- /libs/checkpoint/langgraph/checkpoint/serde/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint/langgraph/checkpoint/serde/py.typed -------------------------------------------------------------------------------- /libs/checkpoint/langgraph/checkpoint/serde/types.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Protocol, TypeVar, runtime_checkable 2 | 3 | ERROR = "__error__" 4 | SCHEDULED = "__scheduled__" 5 | INTERRUPT = "__interrupt__" 6 | RESUME = "__resume__" 7 | TASKS = "__pregel_tasks" 8 | 9 | Value = TypeVar("Value", covariant=True) 10 | Update = TypeVar("Update", contravariant=True) 11 | C = TypeVar("C") 12 | 13 | 14 | @runtime_checkable 15 | class SendProtocol(Protocol): 16 | # Mirrors langgraph.constants.Send 17 | node: str 18 | arg: Any 19 | 20 | def __hash__(self) -> int: ... 21 | 22 | def __repr__(self) -> str: ... 23 | 24 | def __eq__(self, value: object) -> bool: ... 25 | -------------------------------------------------------------------------------- /libs/checkpoint/langgraph/store/base/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint/langgraph/store/base/py.typed -------------------------------------------------------------------------------- /libs/checkpoint/langgraph/store/memory/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint/langgraph/store/memory/py.typed -------------------------------------------------------------------------------- /libs/checkpoint/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/checkpoint/tests/__init__.py -------------------------------------------------------------------------------- /libs/cli/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 LangChain, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /libs/cli/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: test lint format test-integration update-schema 2 | 3 | ###################### 4 | # TESTING AND COVERAGE 5 | ###################### 6 | 7 | test: 8 | uv run pytest tests/unit_tests 9 | test-integration: 10 | uv run pytest tests/integration_tests 11 | 12 | ###################### 13 | # LINTING AND FORMATTING 14 | ###################### 15 | 16 | # Define a variable for Python and notebook files. 17 | PYTHON_FILES=. 18 | MYPY_CACHE=.mypy_cache 19 | lint format: PYTHON_FILES=. 20 | lint_diff format_diff: PYTHON_FILES=$(shell git diff --name-only --relative --diff-filter=d main . | grep -E '\.py$$|\.ipynb$$') 21 | lint_package: PYTHON_FILES=langgraph_cli 22 | lint_tests: PYTHON_FILES=tests 23 | lint_tests: MYPY_CACHE=.mypy_cache_test 24 | 25 | lint lint_diff lint_package lint_tests: 26 | uv run ruff check . 27 | [ "$(PYTHON_FILES)" = "" ] || uv run ruff format $(PYTHON_FILES) --diff 28 | [ "$(PYTHON_FILES)" = "" ] || uv run ruff check --select I $(PYTHON_FILES) 29 | [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) || uv run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE) 30 | 31 | format format_diff: 32 | uv run ruff format $(PYTHON_FILES) 33 | uv run ruff check --select I --fix $(PYTHON_FILES) 34 | 35 | update-schema: 36 | uv run python generate_schema.py 37 | -------------------------------------------------------------------------------- /libs/cli/examples/.env.example: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY=placeholder 2 | ANTHROPIC_API_KEY=placeholder 3 | TAVILY_API_KEY=placeholder 4 | LANGCHAIN_TRACING_V2=false 5 | LANGCHAIN_ENDPOINT=placeholder 6 | LANGCHAIN_API_KEY=placeholder 7 | LANGCHAIN_PROJECT=placeholder 8 | LANGGRAPH_AUTH_TYPE=noop 9 | LANGSMITH_AUTH_ENDPOINT=placeholder 10 | LANGSMITH_TENANT_ID=placeholder -------------------------------------------------------------------------------- /libs/cli/examples/.gitignore: -------------------------------------------------------------------------------- 1 | .langgraph-data 2 | -------------------------------------------------------------------------------- /libs/cli/examples/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: run_w_override 2 | 3 | run: 4 | uv run langgraph up --watch --no-pull 5 | 6 | run_faux: 7 | cd graphs && uv run langgraph up --no-pull 8 | 9 | run_graphs_reqs_a: 10 | cd graphs_reqs_a && uv run langgraph up --no-pull 11 | 12 | run_graphs_reqs_b: 13 | cd graphs_reqs_b && uv run langgraph up --no-pull 14 | -------------------------------------------------------------------------------- /libs/cli/examples/graphs/langgraph.json: -------------------------------------------------------------------------------- 1 | { 2 | "python_version": "3.12", 3 | "dependencies": [ 4 | "langchain_community", 5 | "langchain_anthropic", 6 | "langchain_openai", 7 | "wikipedia", 8 | "scikit-learn", 9 | "." 10 | ], 11 | "graphs": { 12 | "agent": "./agent.py:graph", 13 | "storm": "./storm.py:graph" 14 | }, 15 | "env": "../.env" 16 | } 17 | -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_a/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/examples/graphs_reqs_a/__init__.py -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_a/graphs_submod/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/examples/graphs_reqs_a/graphs_submod/__init__.py -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_a/graphs_submod/subprompt.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/examples/graphs_reqs_a/graphs_submod/subprompt.txt -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_a/hello.py: -------------------------------------------------------------------------------- 1 | from graphs_reqs_a.graphs_submod.agent import graph # noqa 2 | -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_a/langgraph.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": [ 3 | "." 4 | ], 5 | "env": "../.env", 6 | "graphs": { 7 | "graph": "./hello.py:graph" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_a/prompt.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/examples/graphs_reqs_a/prompt.txt -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_a/requirements.txt: -------------------------------------------------------------------------------- 1 | requests 2 | langchain_anthropic 3 | langchain_openai 4 | langchain_community 5 | -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_b/graphs_submod/subprompt.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/examples/graphs_reqs_b/graphs_submod/subprompt.txt -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_b/hello.py: -------------------------------------------------------------------------------- 1 | from graphs_submod.agent import graph # noqa 2 | from utils.greeter import greet 3 | 4 | greet() 5 | -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_b/langgraph.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": [ 3 | "." 4 | ], 5 | "env": "../.env", 6 | "graphs": { 7 | "graph": "./hello.py:graph" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_b/prompt.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/examples/graphs_reqs_b/prompt.txt -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_b/requirements.txt: -------------------------------------------------------------------------------- 1 | requests 2 | langchain_anthropic 3 | langchain_openai 4 | langchain_community 5 | -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_b/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/examples/graphs_reqs_b/utils/__init__.py -------------------------------------------------------------------------------- /libs/cli/examples/graphs_reqs_b/utils/greeter.py: -------------------------------------------------------------------------------- 1 | def greet(): 2 | print("Hello, world!") 3 | -------------------------------------------------------------------------------- /libs/cli/examples/langgraph.json: -------------------------------------------------------------------------------- 1 | { 2 | "pip_config_file": "./pipconf.txt", 3 | "dependencies": [ 4 | "langchain_community", 5 | "langchain_anthropic", 6 | "langchain_openai", 7 | "wikipedia", 8 | "scikit-learn", 9 | "./graphs" 10 | ], 11 | "graphs": { 12 | "agent": "./graphs/agent.py:graph", 13 | "storm": "./graphs/storm.py:graph" 14 | }, 15 | "env": ".env" 16 | } 17 | -------------------------------------------------------------------------------- /libs/cli/examples/pipconf.txt: -------------------------------------------------------------------------------- 1 | [global] 2 | timeout = 60 3 | -------------------------------------------------------------------------------- /libs/cli/examples/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["hatchling"] 3 | build-backend = "hatchling.build" 4 | 5 | [project] 6 | name = "langgraph-examples" 7 | version = "0.1.0" 8 | description = "" 9 | readme = "README.md" 10 | requires-python = ">=3.9" 11 | dependencies = [ 12 | "langgraph-cli", 13 | "langgraph-sdk", 14 | ] 15 | 16 | [tool.uv.sources] 17 | langgraph-cli = { path = "../cli", editable = true } 18 | langgraph-sdk = { path = "../sdk_py", editable = true } 19 | 20 | [tool.hatch.build] 21 | packages = [] 22 | -------------------------------------------------------------------------------- /libs/cli/js-examples/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist -------------------------------------------------------------------------------- /libs/cli/js-examples/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | 7 | [*.{js,json,yml}] 8 | charset = utf-8 9 | indent_style = space 10 | indent_size = 2 11 | -------------------------------------------------------------------------------- /libs/cli/js-examples/.env.example: -------------------------------------------------------------------------------- 1 | # Copy this over: 2 | # cp .env.example .env 3 | # Then modify to suit your needs -------------------------------------------------------------------------------- /libs/cli/js-examples/.gitignore: -------------------------------------------------------------------------------- 1 | index.cjs 2 | index.js 3 | index.d.ts 4 | node_modules 5 | dist 6 | .yarn/* 7 | !.yarn/patches 8 | !.yarn/plugins 9 | !.yarn/releases 10 | !.yarn/sdks 11 | !.yarn/versions 12 | 13 | .turbo 14 | **/.turbo 15 | **/.eslintcache 16 | 17 | .env 18 | .ipynb_checkpoints 19 | 20 | -------------------------------------------------------------------------------- /libs/cli/js-examples/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 LangChain 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /libs/cli/js-examples/jest.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | preset: "ts-jest/presets/default-esm", 3 | moduleNameMapper: { 4 | "^(\\.{1,2}/.*)\\.js$": "$1", 5 | }, 6 | transform: { 7 | "^.+\\.tsx?$": [ 8 | "ts-jest", 9 | { 10 | useESM: true, 11 | }, 12 | ], 13 | }, 14 | extensionsToTreatAsEsm: [".ts"], 15 | setupFiles: ["dotenv/config"], 16 | passWithNoTests: true, 17 | testTimeout: 20_000, 18 | }; 19 | -------------------------------------------------------------------------------- /libs/cli/js-examples/langgraph.json: -------------------------------------------------------------------------------- 1 | { 2 | "node_version": "20", 3 | "graphs": { 4 | "agent": "./src/agent/graph.ts:graph" 5 | }, 6 | "env": ".env", 7 | "dependencies": ["."] 8 | } 9 | -------------------------------------------------------------------------------- /libs/cli/js-examples/static/studio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/js-examples/static/studio.png -------------------------------------------------------------------------------- /libs/cli/js-examples/tests/agent.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect } from "@jest/globals"; 2 | import { route } from "../src/agent/graph.js"; 3 | describe("Routers", () => { 4 | it("Test route", async () => { 5 | const res = route({ messages: [] }); 6 | expect(res).toEqual("callModel"); 7 | }, 100_000); 8 | }); 9 | -------------------------------------------------------------------------------- /libs/cli/js-examples/tests/graph.int.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect } from "@jest/globals"; 2 | import { graph } from "../src/agent/graph.js"; 3 | 4 | describe("Graph", () => { 5 | it("should process input through the graph", async () => { 6 | const input = "What is the capital of France?"; 7 | const result = await graph.invoke({ input }); 8 | 9 | expect(result).toBeDefined(); 10 | expect(typeof result).toBe("object"); 11 | expect(result.messages).toBeDefined(); 12 | expect(Array.isArray(result.messages)).toBe(true); 13 | expect(result.messages.length).toBeGreaterThan(0); 14 | 15 | const lastMessage = result.messages[result.messages.length - 1]; 16 | expect(lastMessage.content.toString().toLowerCase()).toContain("hi"); 17 | }, 30000); // Increased timeout to 30 seconds 18 | }); 19 | -------------------------------------------------------------------------------- /libs/cli/js-examples/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/recommended", 3 | "compilerOptions": { 4 | "target": "ES2021", 5 | "lib": ["ES2021", "ES2022.Object", "DOM"], 6 | "module": "NodeNext", 7 | "moduleResolution": "nodenext", 8 | "esModuleInterop": true, 9 | "noImplicitReturns": true, 10 | "declaration": true, 11 | "noFallthroughCasesInSwitch": true, 12 | "noUnusedLocals": true, 13 | "noUnusedParameters": true, 14 | "useDefineForClassFields": true, 15 | "strictPropertyInitialization": false, 16 | "allowJs": true, 17 | "strict": true, 18 | "strictFunctionTypes": false, 19 | "outDir": "dist", 20 | "types": ["jest", "node"], 21 | "resolveJsonModule": true 22 | }, 23 | "include": ["**/*.ts", "**/*.js"], 24 | "exclude": ["node_modules", "dist"] 25 | } 26 | -------------------------------------------------------------------------------- /libs/cli/langgraph_cli/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/langgraph_cli/__init__.py -------------------------------------------------------------------------------- /libs/cli/langgraph_cli/__main__.py: -------------------------------------------------------------------------------- 1 | from .cli import cli 2 | 3 | if __name__ == "__main__": 4 | cli() 5 | -------------------------------------------------------------------------------- /libs/cli/langgraph_cli/constants.py: -------------------------------------------------------------------------------- 1 | DEFAULT_CONFIG = "langgraph.json" 2 | DEFAULT_PORT = 8123 3 | 4 | # analytics 5 | SUPABASE_PUBLIC_API_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imt6cmxwcG9qaW5wY3l5YWlweG5iIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTkyNTc1NzksImV4cCI6MjAzNDgzMzU3OX0.kkVOlLz3BxemA5nP-vat3K4qRtrDuO4SwZSR_htcX9c" 6 | SUPABASE_URL = "https://kzrlppojinpcyyaipxnb.supabase.co" 7 | -------------------------------------------------------------------------------- /libs/cli/langgraph_cli/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/langgraph_cli/py.typed -------------------------------------------------------------------------------- /libs/cli/langgraph_cli/util.py: -------------------------------------------------------------------------------- 1 | import click 2 | 3 | 4 | def clean_empty_lines(input_str: str): 5 | return "\n".join(filter(None, input_str.splitlines())) 6 | 7 | 8 | def warn_non_wolfi_distro(config_json: dict) -> None: 9 | """Show warning if image_distro is not set to 'wolfi'.""" 10 | image_distro = config_json.get("image_distro", "debian") # Default is debian 11 | if image_distro != "wolfi": 12 | click.secho( 13 | "⚠️ Security Recommendation: Consider switching to Wolfi Linux for enhanced security.", 14 | fg="yellow", 15 | bold=True, 16 | ) 17 | click.secho( 18 | " Wolfi is a security-oriented, minimal Linux distribution designed for containers.", 19 | fg="yellow", 20 | ) 21 | click.secho( 22 | ' To switch, add \'"image_distro": "wolfi"\' to your langgraph.json config file.', 23 | fg="yellow", 24 | ) 25 | click.secho("") # Empty line for better readability 26 | -------------------------------------------------------------------------------- /libs/cli/langgraph_cli/version.py: -------------------------------------------------------------------------------- 1 | """Main entrypoint into package.""" 2 | 3 | from importlib import metadata 4 | 5 | try: 6 | __version__ = metadata.version(__package__) 7 | except metadata.PackageNotFoundError: 8 | # Case where package metadata is not available. 9 | __version__ = "" 10 | del metadata # optional, avoids polluting the results of dir(__package__) 11 | -------------------------------------------------------------------------------- /libs/cli/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/tests/__init__.py -------------------------------------------------------------------------------- /libs/cli/tests/integration_tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/tests/integration_tests/__init__.py -------------------------------------------------------------------------------- /libs/cli/tests/integration_tests/test_cli.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import requests 3 | 4 | from langgraph_cli.templates import TEMPLATE_ID_TO_CONFIG 5 | 6 | 7 | @pytest.mark.parametrize("template_key", TEMPLATE_ID_TO_CONFIG.keys()) 8 | def test_template_urls_work(template_key: str) -> None: 9 | """Integration test to verify that all template URLs are reachable.""" 10 | _, _, template_url = TEMPLATE_ID_TO_CONFIG[template_key] 11 | response = requests.head(template_url) 12 | # Returns 302 on a successful HEAD request 13 | assert response.status_code == 302, f"URL {template_url} is not reachable." 14 | -------------------------------------------------------------------------------- /libs/cli/tests/unit_tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/tests/unit_tests/__init__.py -------------------------------------------------------------------------------- /libs/cli/tests/unit_tests/cli/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/tests/unit_tests/cli/__init__.py -------------------------------------------------------------------------------- /libs/cli/tests/unit_tests/cli/langgraph.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/tests/unit_tests/cli/langgraph.json -------------------------------------------------------------------------------- /libs/cli/tests/unit_tests/cli/pyproject.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/tests/unit_tests/cli/pyproject.toml -------------------------------------------------------------------------------- /libs/cli/tests/unit_tests/conftest.py: -------------------------------------------------------------------------------- 1 | import os 2 | from unittest.mock import patch 3 | 4 | import pytest 5 | 6 | 7 | @pytest.fixture(autouse=True) 8 | def disable_analytics_env() -> None: 9 | """Disable analytics for unit tests LANGGRAPH_CLI_NO_ANALYTICS.""" 10 | # First check if the environment variable is already set, if so, log a warning prior 11 | # to overriding it. 12 | if "LANGGRAPH_CLI_NO_ANALYTICS" in os.environ: 13 | print("⚠️ LANGGRAPH_CLI_NO_ANALYTICS is set. Overriding it for the test.") 14 | 15 | with patch.dict(os.environ, {"LANGGRAPH_CLI_NO_ANALYTICS": "0"}): 16 | yield 17 | -------------------------------------------------------------------------------- /libs/cli/tests/unit_tests/graphs/agent.py: -------------------------------------------------------------------------------- 1 | from langgraph.func import entrypoint 2 | 3 | 4 | @entrypoint() 5 | def graph(state): 6 | return None 7 | -------------------------------------------------------------------------------- /libs/cli/tests/unit_tests/helpers.py: -------------------------------------------------------------------------------- 1 | def clean_empty_lines(input_str: str): 2 | return "\n".join(filter(None, input_str.splitlines())) 3 | -------------------------------------------------------------------------------- /libs/cli/tests/unit_tests/multiplatform/js.mts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/tests/unit_tests/multiplatform/js.mts -------------------------------------------------------------------------------- /libs/cli/tests/unit_tests/multiplatform/python.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/tests/unit_tests/multiplatform/python.py -------------------------------------------------------------------------------- /libs/cli/tests/unit_tests/pipconfig.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/cli/tests/unit_tests/pipconfig.txt -------------------------------------------------------------------------------- /libs/cli/tests/unit_tests/test_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "python_version": "3.12", 3 | "pip_config_file": "pipconfig.txt", 4 | "dockerfile_lines": [ 5 | "ARG meow=woof" 6 | ], 7 | "dependencies": [ 8 | "langchain_openai", 9 | "starlette", 10 | "." 11 | ], 12 | "graphs": { 13 | "agent": "graphs/agent.py:graph" 14 | }, 15 | "env": ".env", 16 | "http": { 17 | "app": "../../examples/my_app.py:app" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /libs/langgraph/.claude/settings.local.json: -------------------------------------------------------------------------------- 1 | { 2 | "permissions": { 3 | "allow": [ 4 | "Bash(rg:*)", 5 | "Bash(python:*)", 6 | "Bash(grep:*)", 7 | "Bash(sed:*)", 8 | "Bash(awk:*)" 9 | ], 10 | "deny": [] 11 | } 12 | } -------------------------------------------------------------------------------- /libs/langgraph/.gitignore: -------------------------------------------------------------------------------- 1 | .langgraph_api/ 2 | .devserver.pid 3 | -------------------------------------------------------------------------------- /libs/langgraph/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 LangChain, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /libs/langgraph/bench/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/langgraph/bench/__init__.py -------------------------------------------------------------------------------- /libs/langgraph/langgraph/channels/__init__.py: -------------------------------------------------------------------------------- 1 | from langgraph.channels.any_value import AnyValue 2 | from langgraph.channels.binop import BinaryOperatorAggregate 3 | from langgraph.channels.ephemeral_value import EphemeralValue 4 | from langgraph.channels.last_value import LastValue, LastValueAfterFinish 5 | from langgraph.channels.topic import Topic 6 | 7 | __all__ = [ 8 | "LastValue", 9 | "LastValueAfterFinish", 10 | "Topic", 11 | "BinaryOperatorAggregate", 12 | "EphemeralValue", 13 | "AnyValue", 14 | ] 15 | -------------------------------------------------------------------------------- /libs/langgraph/langgraph/channels/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/langgraph/langgraph/channels/py.typed -------------------------------------------------------------------------------- /libs/langgraph/langgraph/func/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/langgraph/langgraph/func/py.typed -------------------------------------------------------------------------------- /libs/langgraph/langgraph/graph/__init__.py: -------------------------------------------------------------------------------- 1 | from langgraph.constants import END, START 2 | from langgraph.graph.message import MessagesState, add_messages 3 | from langgraph.graph.state import StateGraph 4 | 5 | __all__ = [ 6 | "END", 7 | "START", 8 | "StateGraph", 9 | "add_messages", 10 | "MessagesState", 11 | ] 12 | -------------------------------------------------------------------------------- /libs/langgraph/langgraph/graph/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/langgraph/langgraph/graph/py.typed -------------------------------------------------------------------------------- /libs/langgraph/langgraph/managed/__init__.py: -------------------------------------------------------------------------------- 1 | from langgraph.managed.is_last_step import IsLastStep, RemainingSteps 2 | 3 | __all__ = ["IsLastStep", "RemainingSteps"] 4 | -------------------------------------------------------------------------------- /libs/langgraph/langgraph/managed/base.py: -------------------------------------------------------------------------------- 1 | from abc import ABC, abstractmethod 2 | from inspect import isclass 3 | from typing import ( 4 | Any, 5 | Generic, 6 | TypeVar, 7 | ) 8 | 9 | from typing_extensions import TypeGuard 10 | 11 | from langgraph.types import PregelScratchpad 12 | 13 | V = TypeVar("V") 14 | U = TypeVar("U") 15 | 16 | 17 | class ManagedValue(ABC, Generic[V]): 18 | @staticmethod 19 | @abstractmethod 20 | def get(scratchpad: PregelScratchpad) -> V: ... 21 | 22 | 23 | ManagedValueSpec = type[ManagedValue] 24 | 25 | 26 | def is_managed_value(value: Any) -> TypeGuard[ManagedValueSpec]: 27 | return isclass(value) and issubclass(value, ManagedValue) 28 | 29 | 30 | ManagedValueMapping = dict[str, ManagedValueSpec] 31 | -------------------------------------------------------------------------------- /libs/langgraph/langgraph/managed/is_last_step.py: -------------------------------------------------------------------------------- 1 | from typing import Annotated 2 | 3 | from langgraph.managed.base import ManagedValue 4 | from langgraph.types import PregelScratchpad 5 | 6 | 7 | class IsLastStepManager(ManagedValue[bool]): 8 | @staticmethod 9 | def get(scratchpad: PregelScratchpad) -> bool: 10 | return scratchpad.step == scratchpad.stop - 1 11 | 12 | 13 | IsLastStep = Annotated[bool, IsLastStepManager] 14 | 15 | 16 | class RemainingStepsManager(ManagedValue[int]): 17 | @staticmethod 18 | def get(scratchpad: PregelScratchpad) -> int: 19 | return scratchpad.stop - scratchpad.step 20 | 21 | 22 | RemainingSteps = Annotated[int, RemainingStepsManager] 23 | -------------------------------------------------------------------------------- /libs/langgraph/langgraph/managed/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/langgraph/langgraph/managed/py.typed -------------------------------------------------------------------------------- /libs/langgraph/langgraph/pregel/log.py: -------------------------------------------------------------------------------- 1 | import logging 2 | 3 | logger = logging.getLogger("langgraph") 4 | -------------------------------------------------------------------------------- /libs/langgraph/langgraph/pregel/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/langgraph/langgraph/pregel/py.typed -------------------------------------------------------------------------------- /libs/langgraph/langgraph/pregel/types.py: -------------------------------------------------------------------------------- 1 | """Re-export types moved to langgraph.types""" 2 | 3 | from langgraph.types import ( 4 | All, 5 | CachePolicy, 6 | PregelExecutableTask, 7 | PregelTask, 8 | RetryPolicy, 9 | StateSnapshot, 10 | StateUpdate, 11 | StreamMode, 12 | StreamWriter, 13 | default_retry_on, 14 | ) 15 | 16 | __all__ = [ 17 | "All", 18 | "StateUpdate", 19 | "CachePolicy", 20 | "PregelExecutableTask", 21 | "PregelTask", 22 | "RetryPolicy", 23 | "StateSnapshot", 24 | "StreamMode", 25 | "StreamWriter", 26 | "default_retry_on", 27 | ] 28 | -------------------------------------------------------------------------------- /libs/langgraph/langgraph/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/langgraph/langgraph/py.typed -------------------------------------------------------------------------------- /libs/langgraph/langgraph/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/langgraph/langgraph/utils/__init__.py -------------------------------------------------------------------------------- /libs/langgraph/langgraph/utils/cache.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from collections.abc import Hashable, Mapping, Sequence 4 | from typing import Any 5 | 6 | 7 | def _freeze(obj: Any, depth: int = 10) -> Hashable: 8 | if isinstance(obj, Hashable) or depth <= 0: 9 | # already hashable, no need to freeze 10 | return obj 11 | elif isinstance(obj, Mapping): 12 | # sort keys so {"a":1,"b":2} == {"b":2,"a":1} 13 | return tuple(sorted((k, _freeze(v, depth - 1)) for k, v in obj.items())) 14 | elif isinstance(obj, Sequence): 15 | return tuple(_freeze(x, depth - 1) for x in obj) 16 | # numpy / pandas etc. can provide their own .tobytes() 17 | elif hasattr(obj, "tobytes"): 18 | return ( 19 | type(obj).__name__, 20 | obj.tobytes(), 21 | obj.shape if hasattr(obj, "shape") else None, 22 | ) 23 | return obj # strings, ints, dataclasses with frozen=True, etc. 24 | 25 | 26 | def default_cache_key(*args: Any, **kwargs: Any) -> str | bytes: 27 | """Default cache key function that uses the arguments and keyword arguments to generate a hashable key.""" 28 | import pickle 29 | 30 | # protocol 5 strikes a good balance between speed and size 31 | return pickle.dumps((_freeze(args), _freeze(kwargs)), protocol=5, fix_imports=False) 32 | -------------------------------------------------------------------------------- /libs/langgraph/langgraph/utils/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/langgraph/langgraph/utils/py.typed -------------------------------------------------------------------------------- /libs/langgraph/langgraph/version.py: -------------------------------------------------------------------------------- 1 | """Exports package version.""" 2 | 3 | from importlib import metadata 4 | 5 | try: 6 | __version__ = metadata.version(__package__) 7 | except metadata.PackageNotFoundError: 8 | # Case where package metadata is not available. 9 | __version__ = "" 10 | del metadata # optional, avoids polluting the results of dir(__package__) 11 | -------------------------------------------------------------------------------- /libs/langgraph/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/langgraph/tests/__init__.py -------------------------------------------------------------------------------- /libs/langgraph/tests/agents.py: -------------------------------------------------------------------------------- 1 | from typing import Literal, Union 2 | 3 | from pydantic import BaseModel 4 | 5 | 6 | # define these objects to avoid importing langchain_core.agents 7 | # and therefore avoid relying on core Pydantic version 8 | class AgentAction(BaseModel): 9 | """ 10 | Represents a request to execute an action by an agent. 11 | 12 | The action consists of the name of the tool to execute and the input to pass 13 | to the tool. The log is used to pass along extra information about the action. 14 | """ 15 | 16 | tool: str 17 | tool_input: Union[str, dict] 18 | log: str 19 | type: Literal["AgentAction"] = "AgentAction" 20 | 21 | 22 | class AgentFinish(BaseModel): 23 | """Final return value of an ActionAgent. 24 | 25 | Agents return an AgentFinish when they have reached a stopping condition. 26 | """ 27 | 28 | return_values: dict 29 | log: str 30 | type: Literal["AgentFinish"] = "AgentFinish" 31 | -------------------------------------------------------------------------------- /libs/langgraph/tests/any_int.py: -------------------------------------------------------------------------------- 1 | class AnyInt(int): 2 | def __init__(self) -> None: 3 | super().__init__() 4 | 5 | def __eq__(self, other: object) -> bool: 6 | return isinstance(other, int) 7 | -------------------------------------------------------------------------------- /libs/langgraph/tests/compose-postgres.yml: -------------------------------------------------------------------------------- 1 | name: langgraph-tests 2 | services: 3 | postgres-test: 4 | image: postgres:16 5 | ports: 6 | - "5442:5432" 7 | environment: 8 | POSTGRES_DB: postgres 9 | POSTGRES_USER: postgres 10 | POSTGRES_PASSWORD: postgres 11 | healthcheck: 12 | test: pg_isready -U postgres 13 | start_period: 10s 14 | timeout: 1s 15 | retries: 5 16 | interval: 60s 17 | start_interval: 1s 18 | -------------------------------------------------------------------------------- /libs/langgraph/tests/example_app/langgraph.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/langchain-ai/langgraph/refs/heads/main/libs/cli/schemas/schema.json", 3 | "graphs": { 4 | "app": "tests/example_app/example_graph.py:app" 5 | }, 6 | "dependencies": ["tests/example_app"] 7 | } 8 | -------------------------------------------------------------------------------- /libs/langgraph/tests/example_app/requirements.txt: -------------------------------------------------------------------------------- 1 | langchain-core 2 | -e . -------------------------------------------------------------------------------- /libs/langgraph/tests/test_config_async.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | from langchain_core.callbacks import AsyncCallbackManager 3 | 4 | from langgraph.utils.config import get_async_callback_manager_for_config 5 | 6 | pytestmark = pytest.mark.anyio 7 | 8 | 9 | def test_new_async_manager_includes_tags() -> None: 10 | config = {"callbacks": None} 11 | manager = get_async_callback_manager_for_config(config, tags=["x", "y"]) 12 | assert isinstance(manager, AsyncCallbackManager) 13 | assert manager.inheritable_tags == ["x", "y"] 14 | 15 | 16 | def test_new_async_manager_merges_tags_with_config() -> None: 17 | config = {"callbacks": None, "tags": ["a"]} 18 | manager = get_async_callback_manager_for_config(config, tags=["b"]) 19 | assert manager.inheritable_tags == ["a", "b"] 20 | -------------------------------------------------------------------------------- /libs/prebuilt/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 LangChain, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /libs/prebuilt/langgraph/prebuilt/__init__.py: -------------------------------------------------------------------------------- 1 | """langgraph.prebuilt exposes a higher-level API for creating and executing agents and tools.""" 2 | 3 | from langgraph.prebuilt.chat_agent_executor import create_react_agent 4 | from langgraph.prebuilt.tool_node import ( 5 | InjectedState, 6 | InjectedStore, 7 | ToolNode, 8 | tools_condition, 9 | ) 10 | from langgraph.prebuilt.tool_validator import ValidationNode 11 | 12 | __all__ = [ 13 | "create_react_agent", 14 | "ToolNode", 15 | "tools_condition", 16 | "ValidationNode", 17 | "InjectedState", 18 | "InjectedStore", 19 | ] 20 | -------------------------------------------------------------------------------- /libs/prebuilt/langgraph/prebuilt/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/prebuilt/langgraph/prebuilt/py.typed -------------------------------------------------------------------------------- /libs/prebuilt/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/prebuilt/tests/__init__.py -------------------------------------------------------------------------------- /libs/prebuilt/tests/compose-postgres.yml: -------------------------------------------------------------------------------- 1 | name: langgraph-tests 2 | services: 3 | postgres-test: 4 | image: postgres:16 5 | ports: 6 | - "5442:5432" 7 | environment: 8 | POSTGRES_DB: postgres 9 | POSTGRES_USER: postgres 10 | POSTGRES_PASSWORD: postgres 11 | healthcheck: 12 | test: pg_isready -U postgres 13 | start_period: 10s 14 | timeout: 1s 15 | retries: 5 16 | interval: 60s 17 | start_interval: 1s 18 | -------------------------------------------------------------------------------- /libs/sdk-js/.gitignore: -------------------------------------------------------------------------------- 1 | index.cjs 2 | index.js 3 | index.d.ts 4 | index.d.cts 5 | client.cjs 6 | client.js 7 | client.d.ts 8 | client.d.cts 9 | auth.cjs 10 | auth.js 11 | auth.d.ts 12 | auth.d.cts 13 | react.cjs 14 | react.js 15 | react.d.ts 16 | react.d.cts 17 | react-ui.cjs 18 | react-ui.js 19 | react-ui.d.ts 20 | react-ui.d.cts 21 | react-ui/server.cjs 22 | react-ui/server.js 23 | react-ui/server.d.ts 24 | react-ui/server.d.cts 25 | node_modules 26 | dist 27 | .yarn 28 | docs 29 | -------------------------------------------------------------------------------- /libs/sdk-js/.prettierrc: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /libs/sdk-js/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 LangChain, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /libs/sdk-js/jest.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('jest').Config} */ 2 | export default { 3 | preset: 'ts-jest', 4 | testEnvironment: 'node', 5 | extensionsToTreatAsEsm: ['.ts'], 6 | moduleNameMapper: { 7 | '^(\\.{1,2}/.*)\\.js$': '$1', 8 | }, 9 | transform: { 10 | '^.+\\.tsx?$': [ 11 | 'ts-jest', 12 | { 13 | useESM: true, 14 | }, 15 | ], 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /libs/sdk-js/langchain.config.js: -------------------------------------------------------------------------------- 1 | import { resolve, dirname } from "node:path"; 2 | import { fileURLToPath } from "node:url"; 3 | 4 | /** 5 | * @param {string} relativePath 6 | * @returns {string} 7 | */ 8 | function abs(relativePath) { 9 | return resolve(dirname(fileURLToPath(import.meta.url)), relativePath); 10 | } 11 | 12 | export const config = { 13 | internals: [/react/], 14 | entrypoints: { 15 | index: "index", 16 | client: "client", 17 | auth: "auth/index", 18 | react: "react/index", 19 | "react-ui": "react-ui/index", 20 | "react-ui/server": "react-ui/server/index", 21 | }, 22 | tsConfigPath: resolve("./tsconfig.json"), 23 | cjsSource: "./dist-cjs", 24 | cjsDestination: "./dist", 25 | additionalGitignorePaths: ["docs"], 26 | abs, 27 | }; 28 | -------------------------------------------------------------------------------- /libs/sdk-js/src/auth/index.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | AuthenticateCallback, 3 | AnyCallback, 4 | CallbackEvent, 5 | OnCallback, 6 | BaseAuthReturn, 7 | ToUserLike, 8 | BaseUser, 9 | } from "./types.js"; 10 | 11 | export class Auth< 12 | TExtra = {}, 13 | TAuthReturn extends BaseAuthReturn = BaseAuthReturn, 14 | TUser extends BaseUser = ToUserLike, 15 | > { 16 | /** 17 | * @internal 18 | * @ignore 19 | */ 20 | "~handlerCache": { 21 | authenticate?: AuthenticateCallback; 22 | callbacks?: Record; 23 | } = {}; 24 | 25 | authenticate( 26 | cb: AuthenticateCallback, 27 | ): Auth { 28 | this["~handlerCache"].authenticate = cb; 29 | return this as unknown as Auth; 30 | } 31 | 32 | on(event: T, callback: OnCallback): this { 33 | this["~handlerCache"].callbacks ??= {}; 34 | const events: string[] = Array.isArray(event) ? event : [event]; 35 | for (const event of events) { 36 | this["~handlerCache"].callbacks[event] = callback as AnyCallback; 37 | } 38 | return this; 39 | } 40 | } 41 | 42 | export type { 43 | Filters as AuthFilters, 44 | EventValueMap as AuthEventValueMap, 45 | } from "./types.js"; 46 | export { HTTPException } from "./error.js"; 47 | -------------------------------------------------------------------------------- /libs/sdk-js/src/index.ts: -------------------------------------------------------------------------------- 1 | export { Client, getApiKey } from "./client.js"; 2 | export type { ClientConfig, RequestHook } from "./client.js"; 3 | 4 | export type { 5 | Assistant, 6 | AssistantBase, 7 | AssistantGraph, 8 | AssistantVersion, 9 | Checkpoint, 10 | Config, 11 | Cron, 12 | CronCreateForThreadResponse, 13 | CronCreateResponse, 14 | DefaultValues, 15 | GraphSchema, 16 | Interrupt, 17 | Item, 18 | ListNamespaceResponse, 19 | Metadata, 20 | Run, 21 | SearchItem, 22 | SearchItemsResponse, 23 | Thread, 24 | ThreadState, 25 | ThreadStatus, 26 | ThreadTask, 27 | } from "./schema.js"; 28 | export { overrideFetchImplementation } from "./singletons/fetch.js"; 29 | 30 | export type { 31 | Command, 32 | OnConflictBehavior, 33 | RunsInvokePayload, 34 | } from "./types.js"; 35 | export type { 36 | AIMessage, 37 | FunctionMessage, 38 | HumanMessage, 39 | Message, 40 | RemoveMessage, 41 | SystemMessage, 42 | ToolMessage, 43 | } from "./types.messages.js"; 44 | export type { 45 | CustomStreamEvent, 46 | DebugStreamEvent, 47 | ErrorStreamEvent, 48 | EventsStreamEvent, 49 | FeedbackStreamEvent, 50 | MessagesStreamEvent, 51 | MessagesTupleStreamEvent, 52 | MetadataStreamEvent, 53 | StreamMode, 54 | UpdatesStreamEvent, 55 | ValuesStreamEvent, 56 | } from "./types.stream.js"; 57 | -------------------------------------------------------------------------------- /libs/sdk-js/src/react-ui/index.ts: -------------------------------------------------------------------------------- 1 | import { bootstrapUiContext } from "./client.js"; 2 | bootstrapUiContext(); 3 | 4 | export { 5 | useStreamContext, 6 | LoadExternalComponent, 7 | experimental_loadShare, 8 | } from "./client.js"; 9 | export { 10 | uiMessageReducer, 11 | isUIMessage, 12 | isRemoveUIMessage, 13 | type UIMessage, 14 | type RemoveUIMessage, 15 | } from "./types.js"; 16 | -------------------------------------------------------------------------------- /libs/sdk-js/src/react-ui/server/index.ts: -------------------------------------------------------------------------------- 1 | export { typedUi } from "./server.js"; 2 | export { 3 | uiMessageReducer, 4 | type UIMessage, 5 | type RemoveUIMessage, 6 | } from "../types.js"; 7 | -------------------------------------------------------------------------------- /libs/sdk-js/src/react/index.ts: -------------------------------------------------------------------------------- 1 | export { 2 | useStream, 3 | type MessageMetadata, 4 | type UseStream, 5 | type UseStreamOptions, 6 | } from "./stream.js"; 7 | -------------------------------------------------------------------------------- /libs/sdk-js/src/singletons/fetch.ts: -------------------------------------------------------------------------------- 1 | // Wrap the default fetch call due to issues with illegal invocations 2 | // in some environments: 3 | // https://stackoverflow.com/questions/69876859/why-does-bind-fix-failed-to-execute-fetch-on-window-illegal-invocation-err 4 | // @ts-expect-error Broad typing to support a range of fetch implementations 5 | const DEFAULT_FETCH_IMPLEMENTATION = (...args: any[]) => fetch(...args); 6 | 7 | const LANGSMITH_FETCH_IMPLEMENTATION_KEY = Symbol.for( 8 | "lg:fetch_implementation", 9 | ); 10 | 11 | /** 12 | * Overrides the fetch implementation used for LangSmith calls. 13 | * You should use this if you need to use an implementation of fetch 14 | * other than the default global (e.g. for dealing with proxies). 15 | * @param fetch The new fetch function to use. 16 | */ 17 | export const overrideFetchImplementation = (fetch: (...args: any[]) => any) => { 18 | (globalThis as any)[LANGSMITH_FETCH_IMPLEMENTATION_KEY] = fetch; 19 | }; 20 | 21 | /** 22 | * @internal 23 | */ 24 | export const _getFetchImplementation: () => (...args: any[]) => any = () => { 25 | return ( 26 | (globalThis as any)[LANGSMITH_FETCH_IMPLEMENTATION_KEY] ?? 27 | DEFAULT_FETCH_IMPLEMENTATION 28 | ); 29 | }; 30 | -------------------------------------------------------------------------------- /libs/sdk-js/src/utils/env.ts: -------------------------------------------------------------------------------- 1 | export function getEnvironmentVariable(name: string): string | undefined { 2 | // Certain setups (Deno, frontend) will throw an error if you try to access environment variables 3 | try { 4 | return typeof process !== "undefined" 5 | ? // eslint-disable-next-line no-process-env 6 | process.env?.[name] 7 | : undefined; 8 | } catch (e) { 9 | return undefined; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /libs/sdk-js/src/utils/signals.ts: -------------------------------------------------------------------------------- 1 | export function mergeSignals(...signals: (AbortSignal | null | undefined)[]) { 2 | const nonZeroSignals = signals.filter( 3 | (signal): signal is AbortSignal => signal != null, 4 | ); 5 | 6 | if (nonZeroSignals.length === 0) return undefined; 7 | if (nonZeroSignals.length === 1) return nonZeroSignals[0]; 8 | 9 | const controller = new AbortController(); 10 | for (const signal of signals) { 11 | if (signal?.aborted) { 12 | controller.abort(signal.reason); 13 | return controller.signal; 14 | } 15 | 16 | signal?.addEventListener("abort", () => controller.abort(signal.reason), { 17 | once: true, 18 | }); 19 | } 20 | 21 | return controller.signal; 22 | } 23 | -------------------------------------------------------------------------------- /libs/sdk-js/tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "module": "CommonJS", 5 | "moduleResolution": "Node", 6 | "declaration": false 7 | }, 8 | "exclude": ["node_modules", "dist", "**/tests"] 9 | } 10 | -------------------------------------------------------------------------------- /libs/sdk-js/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/recommended", 3 | "compilerOptions": { 4 | "target": "ES2021", 5 | "lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"], 6 | "module": "NodeNext", 7 | "moduleResolution": "nodenext", 8 | "esModuleInterop": true, 9 | "declaration": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true, 12 | "noUnusedLocals": true, 13 | "noUnusedParameters": true, 14 | "useDefineForClassFields": true, 15 | "strictPropertyInitialization": false, 16 | "allowJs": true, 17 | "strict": true, 18 | "jsx": "react-jsx", 19 | "outDir": "dist" 20 | }, 21 | "include": ["src/**/*"], 22 | "exclude": ["node_modules", "dist", "coverage"], 23 | "includeVersion": true, 24 | "typedocOptions": { 25 | "entryPoints": ["src/client.ts"], 26 | "readme": "none", 27 | "out": "docs", 28 | "plugin": ["typedoc-plugin-markdown"], 29 | "excludePrivate": true, 30 | "excludeProtected": true, 31 | "excludeExternals": false 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /libs/sdk-js/typedoc.auth.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageTitleTemplates": { 3 | "index": "{projectName}/auth" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /libs/sdk-js/typedoc.react.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageTitleTemplates": { 3 | "index": "{projectName}/react" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /libs/sdk-js/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import react from "@vitejs/plugin-react"; 2 | import { defineConfig } from "vitest/config"; 3 | 4 | export default defineConfig({ 5 | plugins: [react()], 6 | test: { 7 | environment: "jsdom", 8 | globals: true, 9 | include: ["src/**/*.test.ts", "src/**/*.test.tsx"], 10 | }, 11 | }); 12 | -------------------------------------------------------------------------------- /libs/sdk-py/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 LangChain, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /libs/sdk-py/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: lint format 2 | 3 | test: 4 | echo "No tests to run" 5 | 6 | ###################### 7 | # LINTING AND FORMATTING 8 | ###################### 9 | 10 | # Define a variable for Python and notebook files. 11 | PYTHON_FILES=. 12 | MYPY_CACHE=.mypy_cache 13 | lint format: PYTHON_FILES=. 14 | lint_diff format_diff: PYTHON_FILES=$(shell git diff --name-only --relative --diff-filter=d main . | grep -E '\.py$$|\.ipynb$$') 15 | 16 | lint lint_diff: 17 | uv run ruff check . 18 | [ "$(PYTHON_FILES)" = "" ] || uv run ruff format $(PYTHON_FILES) --diff 19 | [ "$(PYTHON_FILES)" = "" ] || uv run ruff check --select I $(PYTHON_FILES) 20 | [ "$(PYTHON_FILES)" = "" ] || mkdir -p $(MYPY_CACHE) || uv run mypy $(PYTHON_FILES) --cache-dir $(MYPY_CACHE) 21 | 22 | format format_diff: 23 | uv run ruff check --select I --fix $(PYTHON_FILES) 24 | uv run ruff format $(PYTHON_FILES) 25 | -------------------------------------------------------------------------------- /libs/sdk-py/README.md: -------------------------------------------------------------------------------- 1 | # LangGraph Python SDK 2 | 3 | This repository contains the Python SDK for interacting with the LangGraph Platform REST API. 4 | 5 | ## Quick Start 6 | 7 | To get started with the Python SDK, [install the package](https://pypi.org/project/langgraph-sdk/) 8 | 9 | ```bash 10 | pip install -U langgraph-sdk 11 | ``` 12 | 13 | You will need a running LangGraph API server. If you're running a server locally using `langgraph-cli`, SDK will automatically point at `http://localhost:8123`, otherwise 14 | you would need to specify the server URL when creating a client. 15 | 16 | ```python 17 | from langgraph_sdk import get_client 18 | 19 | # If you're using a remote server, initialize the client with `get_client(url=REMOTE_URL)` 20 | client = get_client() 21 | 22 | # List all assistants 23 | assistants = await client.assistants.search() 24 | 25 | # We auto-create an assistant for each graph you register in config. 26 | agent = assistants[0] 27 | 28 | # Start a new thread 29 | thread = await client.threads.create() 30 | 31 | # Start a streaming run 32 | input = {"messages": [{"role": "human", "content": "what's the weather in la"}]} 33 | async for chunk in client.runs.stream(thread['thread_id'], agent['assistant_id'], input=input): 34 | print(chunk) 35 | ``` 36 | -------------------------------------------------------------------------------- /libs/sdk-py/langgraph_sdk/__init__.py: -------------------------------------------------------------------------------- 1 | from langgraph_sdk.auth import Auth 2 | from langgraph_sdk.client import get_client, get_sync_client 3 | 4 | try: 5 | from importlib import metadata 6 | 7 | __version__ = metadata.version(__package__) 8 | except metadata.PackageNotFoundError: 9 | __version__ = "unknown" 10 | 11 | __all__ = ["Auth", "get_client", "get_sync_client"] 12 | -------------------------------------------------------------------------------- /libs/sdk-py/langgraph_sdk/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/langchain-ai/langgraph/533f5b3d6fe587b2e01140d02b92a355143001ba/libs/sdk-py/langgraph_sdk/py.typed -------------------------------------------------------------------------------- /libs/sdk-py/pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["hatchling"] 3 | build-backend = "hatchling.build" 4 | 5 | [project] 6 | name = "langgraph-sdk" 7 | version = "0.1.70" 8 | description = "SDK for interacting with LangGraph API" 9 | authors = [] 10 | requires-python = ">=3.9" 11 | readme = "README.md" 12 | license = "MIT" 13 | license-files = ['LICENSE'] 14 | dependencies = [ 15 | "httpx>=0.25.2", 16 | "orjson>=3.10.1", 17 | ] 18 | 19 | [project.urls] 20 | Repository = "https://www.github.com/langchain-ai/langgraph" 21 | 22 | [dependency-groups] 23 | dev = [ 24 | "ruff", 25 | "codespell", 26 | "pytest", 27 | "pytest-asyncio", 28 | "pytest-mock", 29 | "pytest-watch", 30 | "mypy", 31 | ] 32 | 33 | [tool.hatch.build.targets.wheel] 34 | include = ["langgraph_sdk"] 35 | 36 | [tool.pytest.ini_options] 37 | addopts = "--strict-markers --strict-config --durations=5 -vv" 38 | asyncio_mode = "auto" 39 | 40 | [tool.uv] 41 | default-groups = ['dev'] 42 | 43 | [tool.ruff] 44 | lint.select = [ 45 | "E", # pycodestyle 46 | "F", # Pyflakes 47 | "UP", # pyupgrade 48 | "B", # flake8-bugbear 49 | "I", # isort 50 | ] 51 | lint.ignore = ["E501", "B008"] 52 | --------------------------------------------------------------------------------