From 6eace78c53d5a34998ae247d470ec8e71fb14af9 Mon Sep 17 00:00:00 2001 From: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com> Date: Wed, 9 Jul 2025 13:23:28 -0400 Subject: [PATCH 1/5] patch[langgraph]: Fix hint for `invoke`/`stream` to allow for `Command` and `None` (#5414) use Command and None as well --- libs/langgraph/langgraph/pregel/__init__.py | 9 +++++---- libs/langgraph/langgraph/pregel/protocol.py | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/libs/langgraph/langgraph/pregel/__init__.py b/libs/langgraph/langgraph/pregel/__init__.py index 2397c1978..21d4d593b 100644 --- a/libs/langgraph/langgraph/pregel/__init__.py +++ b/libs/langgraph/langgraph/pregel/__init__.py @@ -99,6 +99,7 @@ from langgraph.types import ( All, CachePolicy, Checkpointer, + Command, Interrupt, Send, StateSnapshot, @@ -2342,7 +2343,7 @@ class Pregel(PregelProtocol[StateT, InputT, OutputT], Generic[StateT, InputT, Ou def stream( self, - input: InputT, + input: InputT | Command | None, config: RunnableConfig | None = None, *, stream_mode: StreamMode | Sequence[StreamMode] | None = None, @@ -2564,7 +2565,7 @@ class Pregel(PregelProtocol[StateT, InputT, OutputT], Generic[StateT, InputT, Ou async def astream( self, - input: InputT, + input: InputT | Command | None, config: RunnableConfig | None = None, *, stream_mode: StreamMode | Sequence[StreamMode] | None = None, @@ -2808,7 +2809,7 @@ class Pregel(PregelProtocol[StateT, InputT, OutputT], Generic[StateT, InputT, Ou def invoke( self, - input: InputT, + input: InputT | Command | None, config: RunnableConfig | None = None, *, stream_mode: StreamMode = "values", @@ -2883,7 +2884,7 @@ class Pregel(PregelProtocol[StateT, InputT, OutputT], Generic[StateT, InputT, Ou async def ainvoke( self, - input: InputT, + input: InputT | Command | None, config: RunnableConfig | None = None, *, stream_mode: StreamMode = "values", diff --git a/libs/langgraph/langgraph/pregel/protocol.py b/libs/langgraph/langgraph/pregel/protocol.py index e55be3cbc..dce0ef870 100644 --- a/libs/langgraph/langgraph/pregel/protocol.py +++ b/libs/langgraph/langgraph/pregel/protocol.py @@ -9,6 +9,7 @@ from langchain_core.runnables.graph import Graph as DrawableGraph from typing_extensions import Self from langgraph.pregel.types import All, StateSnapshot, StateUpdate, StreamMode +from langgraph.types import Command from langgraph.typing import InputT, OutputT, StateT @@ -98,7 +99,7 @@ class PregelProtocol(Runnable[InputT, Any], Generic[StateT, InputT, OutputT], AB @abstractmethod def stream( self, - input: InputT, + input: InputT | Command | None, config: RunnableConfig | None = None, *, stream_mode: StreamMode | list[StreamMode] | None = None, @@ -110,7 +111,7 @@ class PregelProtocol(Runnable[InputT, Any], Generic[StateT, InputT, OutputT], AB @abstractmethod def astream( self, - input: InputT, + input: InputT | Command | None, config: RunnableConfig | None = None, *, stream_mode: StreamMode | list[StreamMode] | None = None, @@ -122,7 +123,7 @@ class PregelProtocol(Runnable[InputT, Any], Generic[StateT, InputT, OutputT], AB @abstractmethod def invoke( self, - input: InputT, + input: InputT | Command | None, config: RunnableConfig | None = None, *, interrupt_before: All | Sequence[str] | None = None, @@ -132,7 +133,7 @@ class PregelProtocol(Runnable[InputT, Any], Generic[StateT, InputT, OutputT], AB @abstractmethod async def ainvoke( self, - input: InputT, + input: InputT | Command | None, config: RunnableConfig | None = None, *, interrupt_before: All | Sequence[str] | None = None, From 543cbe9032eba084cbc938fd887e14f24b864fb6 Mon Sep 17 00:00:00 2001 From: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com> Date: Wed, 9 Jul 2025 14:12:00 -0400 Subject: [PATCH 2/5] chore: add PR title linter (#5416) --- .github/workflows/pr_lint.yml | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/pr_lint.yml diff --git a/.github/workflows/pr_lint.yml b/.github/workflows/pr_lint.yml new file mode 100644 index 000000000..cada5b1ba --- /dev/null +++ b/.github/workflows/pr_lint.yml @@ -0,0 +1,43 @@ +name: PR Title Lint + +permissions: + pull-requests: read + +on: + pull_request: + types: [opened, edited, synchronize] + +jobs: + lint-pr-title: + runs-on: ubuntu-latest + steps: + - name: Validate PR Title + uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + feat + fix + docs + style + refactor + perf + test + build + ci + chore + revert + release + scopes: | + checkpoint + checkpoint-postgres + checkpoint-sqlite + cli + langgraph + prebuilt + scheduler-kafka + sdk-py + requireScope: false + ignoreLabels: | + ignore-lint-pr-title From 0733ec65adfbd256dbe4957b358bb0fb73cf18c0 Mon Sep 17 00:00:00 2001 From: Sam Crowder Date: Wed, 9 Jul 2025 11:37:39 -0700 Subject: [PATCH 3/5] docs: introduce LangGraph Server changelog (#5417) * introduce changelog * fix spelling * Update docs/mkdocs.yml Co-authored-by: Lauren Hirata Singh * Update docs/docs/cloud/reference/langgraph_server_changelog.md Co-authored-by: Lauren Hirata Singh * Update docs/docs/cloud/reference/langgraph_server_changelog.md Co-authored-by: Lauren Hirata Singh * Update langgraph_server_changelog.md --------- Co-authored-by: Lauren Hirata Singh --- .../reference/langgraph_server_changelog.md | 93 +++++++++++++++++++ docs/mkdocs.yml | 1 + 2 files changed, 94 insertions(+) create mode 100644 docs/docs/cloud/reference/langgraph_server_changelog.md diff --git a/docs/docs/cloud/reference/langgraph_server_changelog.md b/docs/docs/cloud/reference/langgraph_server_changelog.md new file mode 100644 index 000000000..bd5484e8c --- /dev/null +++ b/docs/docs/cloud/reference/langgraph_server_changelog.md @@ -0,0 +1,93 @@ +# LangGraph Server Changelog + +[LangGraph Server](../../concepts/langgraph_server.md) is an API platform for creating and managing agent-based applications. It provides built-in persistence, a task queue, and supports deploying, configuring, and running assistants (agentic workflows) at scale. This changelog documents all notable updates, features, and fixes to LangGraph Server releases. + +--- + +## v0.2.66 (2025-06-26) +- Fixed a 404 error when creating multiple runs with the same thread_id using `on_not_exist="create"`. + +## v0.2.65 (2025-06-25) +- Ensured that only fields from `assistant_versions` are returned when necessary. +- Ensured consistent data types for in-memory and PostgreSQL users, improving internal authentication handling. + +## v0.2.64 (2025-06-24) +- Added descriptions to version entries for better clarity. + +## v0.2.62 (2025-06-23) +- Improved user handling for custom authentication in the JS Studio. +- Added Prometheus-format run statistics to the metrics endpoint for better monitoring. +- Added run statistics in Prometheus format to the metrics endpoint. + +## v0.2.61 (2025-06-20) +- Set a maximum idle time for Redis connections to prevent unnecessary open connections. + +## v0.2.60 (2025-06-20) +- Enhanced error logging to include traceback details for dictionary operations. +- Added a `/metrics` endpoint to expose queue worker metrics for monitoring. + +## v0.2.57 (2025-06-18) +- Removed CancelledError from retriable exceptions to allow local interrupts while maintaining retriability for workers. +- Introduced middleware to gracefully shut down the server after completing in-flight requests upon receiving a SIGINT. +- Reduced metadata stored in checkpoint to only include necessary information. +- Improved error handling in join runs to return error details when present. + +## v0.2.56 (2025-06-17) +- Improved application stability by adding a handler for SIGTERM signals. + +## v0.2.55 (2025-06-17) +- Improved the handling of cancellations in the queue entrypoint. +- Improved cancellation handling in the queue entry point. + +## v0.2.54 (2025-06-16) +- Enhanced error message for LuaLock timeout during license validation. +- Fixed the $contains filter in custom auth by requiring an explicit ::text cast and updated tests accordingly. +- Ensured project and tenant IDs are formatted as UUIDs for consistency. + +## v0.2.53 (2025-06-13) +- Resolved a timing issue to ensure the queue starts only after the graph is registered. +- Improved performance by setting thread and run status in a single query and enhanced error handling during checkpoint writes. +- Reduced the default background grace period to 3 minutes. + +## v0.2.52 (2025-06-12) +- Now logging expected graphs when one is omitted to improve traceability. +- Implemented a time-to-live (TTL) feature for resumable streams. +- Improved query efficiency and consistency by adding a unique index and optimizing row locking. + +## v0.2.51 (2025-06-12) +- Handled `CancelledError` by marking tasks as ready to retry, improving error management in worker processes. +- Added LG API version and request ID to metadata and logs for better tracking. +- Added LG API version and request ID to metadata and logs to improve traceability. +- Improved database performance by creating indexes concurrently. +- Ensured postgres write is committed only after the Redis running marker is set to prevent race conditions. +- Enhanced query efficiency and reliability by adding a unique index on thread_id/running, optimizing row locks, and ensuring deterministic run selection. +- Resolved a race condition by ensuring Postgres updates only occur after the Redis running marker is set. + +## v0.2.46 (2025-06-07) +- Introduced a new connection for each operation while preserving transaction characteristics in Threads state `update()` and `bulk()` commands. + +## v0.2.45 (2025-06-05) +- Enhanced streaming feature by incorporating tracing contexts. +- Removed an unnecessary query from the Crons.search function. +- Resolved connection reuse issue when scheduling next run for multiple cron jobs. +- Removed an unnecessary query in the Crons.search function to improve efficiency. +- Resolved an issue with scheduling the next cron run by improving connection reuse. + +## v0.2.44 (2025-06-04) +- Enhanced the worker logic to exit the pipeline before continuing when the Redis message limit is reached. +- Introduced a ceiling for Redis message size with an option to skip messages larger than 128 MB for improved performance. +- Ensured the pipeline always closes properly to prevent resource leaks. + +## v0.2.43 (2025-06-04) +- Improved performance by omitting logs in metadata calls and ensuring output schema compliance in value streaming. +- Ensured the connection is properly closed after use. +- Aligned output format to strictly adhere to the specified schema. +- Stopped sending internal logs in metadata requests to improve privacy. + +## v0.2.42 (2025-06-04) +- Added timestamps to track the start and end of a request's run. +- Added tracer information to the configuration settings. +- Added support for streaming with tracing contexts. + +## v0.2.41 (2025-06-03) +- Added locking mechanism to prevent errors in pipelined executions. diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index f11c007ec..2f8ddad26 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -261,6 +261,7 @@ nav: - MCP Adapters: reference/mcp.md - LangGraph Platform: - Server API: cloud/reference/api/api_ref.md + - Server changelog: cloud/reference/langgraph_server_changelog.md - Control Plane API: cloud/reference/api/api_ref_control_plane.md - CLI: cloud/reference/cli.md - SDK (Python): cloud/reference/sdk/python_sdk_ref.md From 8ca5e56f52026c96ef7cb4a8e3e0a71500bd9430 Mon Sep 17 00:00:00 2001 From: Eugene Yurtsev Date: Wed, 9 Jul 2025 14:59:41 -0400 Subject: [PATCH 4/5] fix(docs): links in examples file (#5420) Fix broken links in examples --- .github/workflows/pr_lint.yml | 1 + docs/docs/examples/index.md | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr_lint.yml b/.github/workflows/pr_lint.yml index cada5b1ba..50749b528 100644 --- a/.github/workflows/pr_lint.yml +++ b/.github/workflows/pr_lint.yml @@ -38,6 +38,7 @@ jobs: prebuilt scheduler-kafka sdk-py + docs requireScope: false ignoreLabels: | ignore-lint-pr-title diff --git a/docs/docs/examples/index.md b/docs/docs/examples/index.md index 84c721ac3..aadfb0f2c 100644 --- a/docs/docs/examples/index.md +++ b/docs/docs/examples/index.md @@ -5,17 +5,17 @@ The pages in this section provide end-to-end examples for the following topics: ## General - [Template Applications](../concepts/template_applications.md): Create a LangGraph application from a template. -- [Agentic RAG](./rag/langgraph_agentic_rag.md): Build a retrieval agent that can decide when to use a retriever tool. -- [Agent Supervisor](./multi_agent/agent_supervisor.md): Build a supervisor agent that can manage a team of agents. -- [SQL agent](./sql/sql-agent.md): Build a SQL agent that can execute SQL queries and return the results. +- [Agentic RAG](../tutorials/rag/langgraph_agentic_rag.md): Build a retrieval agent that can decide when to use a retriever tool. +- [Agent Supervisor](../tutorials/multi_agent/agent_supervisor.md): Build a supervisor agent that can manage a team of agents. +- [SQL agent](../tutorials/sql/sql-agent.md): Build a SQL agent that can execute SQL queries and return the results. - [Prebuilt chat UI](../agents/ui.md): Use a prebuilt chat UI to interact with any LangGraph agent. - [Graph runs in LangSmith](../how-tos/run-id-langsmith.md): Use LangSmith to track and analyze graph runs. ## LangGraph Platform -- [Set up custom authentication](./auth/getting_started.md): Set up custom authentication for your LangGraph application. -- [Make conversations private](./auth/resource_auth.md): Make conversations private by using resource-based authentication. -- [Connect an authentication provider](./auth/add_auth_server.md): Connect an authentication provider to your LangGraph application. +- [Set up custom authentication](../tutorials/auth/getting_started.md): Set up custom authentication for your LangGraph application. +- [Make conversations private](../tutorials/auth/resource_auth.md): Make conversations private by using resource-based authentication. +- [Connect an authentication provider](../tutorials/auth/add_auth_server.md): Connect an authentication provider to your LangGraph application. - [Rebuild graph at runtime](../cloud/deployment/graph_rebuild.md): Rebuild a graph at runtime. - [Use RemoteGraph](../how-tos/use-remote-graph.md): Use RemoteGraph to deploy your LangGraph application to a remote server. - [Deploy CrewAI, AutoGen, and other frameworks](../how-tos/autogen-integration.md): Deploy CrewAI, AutoGen, and other frameworks with LangGraph. From 0ab97700560147cb9bfac1fe9b50098aaf6b1fd2 Mon Sep 17 00:00:00 2001 From: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com> Date: Wed, 9 Jul 2025 15:10:20 -0400 Subject: [PATCH 5/5] release(langgraph): v0.5.2 (#5421) langgraph bump --- libs/langgraph/pyproject.toml | 2 +- libs/langgraph/uv.lock | 4 ++-- libs/prebuilt/uv.lock | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/langgraph/pyproject.toml b/libs/langgraph/pyproject.toml index a8dbae74b..811c0a195 100644 --- a/libs/langgraph/pyproject.toml +++ b/libs/langgraph/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "langgraph" -version = "0.5.1" +version = "0.5.2" description = "Building stateful, multi-actor applications with LLMs" authors = [] requires-python = ">=3.9" diff --git a/libs/langgraph/uv.lock b/libs/langgraph/uv.lock index 2762e3fe1..4101e10e7 100644 --- a/libs/langgraph/uv.lock +++ b/libs/langgraph/uv.lock @@ -670,7 +670,7 @@ name = "importlib-metadata" version = "8.7.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "zipp", marker = "python_full_version < '3.11'" }, + { name = "zipp", marker = "python_full_version < '3.10'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/76/66/650a33bd90f786193e4de4b3ad86ea60b53c89b669a5c7be931fac31cdb0/importlib_metadata-8.7.0.tar.gz", hash = "sha256:d13b81ad223b890aa16c5471f2ac3056cf76c5f10f82d6f9292f0b415f389000", size = 56641, upload-time = "2025-04-27T15:29:01.736Z" } wheels = [ @@ -1192,7 +1192,7 @@ wheels = [ [[package]] name = "langgraph" -version = "0.5.1" +version = "0.5.2" source = { editable = "." } dependencies = [ { name = "langchain-core" }, diff --git a/libs/prebuilt/uv.lock b/libs/prebuilt/uv.lock index 4fbe095ef..a81d27a3c 100644 --- a/libs/prebuilt/uv.lock +++ b/libs/prebuilt/uv.lock @@ -316,7 +316,7 @@ wheels = [ [[package]] name = "langgraph" -version = "0.5.1" +version = "0.5.2" source = { editable = "../langgraph" } dependencies = [ { name = "langchain-core" },