Compare commits

...
4732 Commits
Author SHA1 Message Date
Sydney Runkle 4de4abbe29 comments 2026-01-21 15:37:53 -05:00
Sydney Runkle 834fa8932f async 2026-01-21 12:43:32 -05:00
Sydney Runkle 9458700fe9 lint 2026-01-21 09:08:21 -05:00
Sydney Runkle 122a63fc83 simplify injected args 2026-01-21 09:07:05 -05:00
Sydney Runkle d05eac67f8 simplify 2026-01-21 09:02:24 -05:00
Sydney Runkle 31b5a9c4fe dynamic tools 2026-01-21 08:41:30 -05:00
William FHandGitHub 30355a7a5d fix: aiosqlite's breaking change (#6699)
`aiosqlite` changed it's Connection type to no longer subclass
`threading.Thread`. This removed the is_alive method, which is called
proactively in setup().

This PR handles this in a backwards compat way.
2026-01-18 16:35:50 -08:00
b0c6126f2a chore(deps): upgrade dependencies with uv lock --upgrade (#6671)
This PR updates the dependencies in all Python packages using `uv lock
--upgrade`.

This is an automated PR created by the UV Lock Upgrade workflow.

Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com>
2026-01-18 16:19:35 -08:00
Vishnu SureshandGitHub 0cab88c7dd docs: clarify cron job schedule interpretation in UTC (#6692)
## Description

Adds docstring clarification that cron schedules are interpreted in UTC
for `CronClient.create`, `CronClient.create_for_thread`, and their sync
variants.
2026-01-16 14:31:11 -08:00
Lauren Hirata SinghandGitHub 8cb87eaf76 chore(docs): Update link for LangGraph guides in README (#6680)
https://langchain.slack.com/archives/C04GWPE38LV/p1768251150861949
2026-01-13 09:34:16 -05:00
Mason DaughertyandGitHub 089cdd0ffb chore: update twitter URLs (#6683) 2026-01-13 09:33:56 -05:00
Mason DaughertyandGitHub fb0091fd57 docs: restore examples/ (#6682) 2026-01-13 01:26:48 -05:00
William FHandGitHub e820097701 chore: Better error messages (#6681) 2026-01-12 16:29:04 -08:00
Sydney RunkleandGitHub f91d79d0c8 fix: flip default on base cache (#6677)
rebasing https://github.com/langchain-ai/langgraph/pull/6562 w/ current
main
2026-01-12 15:26:37 -05:00
cb2faa7dda fix(prebuilt): support generic type arguments for ToolRuntime injection (#6509)
**Description:**
This PR fixes an issue where injection types (like `ToolRuntime`) were
not recognized by `ToolNode` when used with generic type arguments
(e.g., `ToolRuntime[MyContext]`).

Previously, the `_is_injection` check relied solely on `isinstance` and
`issubclass`, which fail for `typing._GenericAlias` objects. This update
adds a check using `typing.get_origin()` to correctly identify the base
class of generic types, ensuring the runtime is injected correctly even
when type hints are present.

**Issue:** Fixes #6465

**Dependencies:** None

**Twitter handle:** @SidharthRajmoh2

---------

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2026-01-12 18:43:45 +00:00
Sydney RunkleandGitHub a5827c5c61 fix: change default recursion limit (#6676)
25 is pretty unreasonable for most applications, bumping up to 1000 by
default, burden really should be on the user to enforce this based on
their application
2026-01-12 18:43:06 +00:00
Josh RogersandGitHub 5212369bd0 feat(sdk-py): add end-time to crons client (#6674)
**Description:** The crons create endpoint supports an end-time field
that is not currently supported in the client. Adding that parameter
here.
**Issue:** N/A
**Dependencies:** N/A
**Twitter handle:** N/A
2026-01-12 12:11:55 -05:00
Mason DaughertyandGitHub 7045a23148 fix: add state attribute to ToolCallRequest overrides (#6668)
Following https://github.com/langchain-ai/langchain/pull/34692
2026-01-09 21:26:39 -05:00
Mason DaughertyandGitHub 728db10b1f fix: suppress unintended deprecation warning (#6669)
1. Any import `from langgraph.prebuilt import X` (even `ToolNode`,
`ToolRuntime`, etc.)
2. -> Loads `langgraph/prebuilt/__init__.py`
3. -> Line 3 imports `create_react_agent` from `chat_agent_executor.py`
4. -> `chat_agent_executor.py` loads completely
5. -> Line 111 evaluates: `StateSchema = TypeVar("StateSchema",
bound=AgentState | AgentStatePydantic)`
6. -> Accessing `AgentStatePydantic` triggers its `@deprecated`
decorator -> warning
2026-01-09 21:25:20 -05:00
454af21896 feat(sdk-py): cron.on_run_completed support (#6662)
**Description:** this PR adds cron.on_run_completed support to the SDK. 

documentation https://github.com/langchain-ai/docs/pull/2147
js equivalent change
https://github.com/langchain-ai/langgraphjs/pull/1845
original langgraph-api change
https://github.com/langchain-ai/langgraph-api/pull/1731

**Issue:** LSD-172

---------

Signed-off-by: Connor Braa <cwlbraa@langchain.dev>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:07:32 -08:00
Mason DaughertyandGitHub d066a321bc chore: more cleanup (#6667) 2026-01-09 15:07:12 -05:00
Mason DaughertyandGitHub b4630d8452 chore: delete docs (#6488) 2026-01-09 15:01:40 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
23961cff61 chore(deps): bump actions/download-artifact from 6 to 7 (#6588)
Bumps
[actions/download-artifact](https://github.com/actions/download-artifact)
from 6 to 7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/download-artifact/releases">actions/download-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v7.0.0</h2>
<h2>v7 - What's new</h2>
<blockquote>
<p>[!IMPORTANT]
actions/download-artifact@v7 now runs on Node.js 24 (<code>runs.using:
node24</code>) and requires a minimum Actions Runner version of 2.327.1.
If you are using self-hosted runners, ensure they are updated before
upgrading.</p>
</blockquote>
<h3>Node.js 24</h3>
<p>This release updates the runtime to Node.js 24. v6 had preliminary
support for Node 24, however this action was by default still running on
Node.js 20. Now this action by default will run on Node.js 24.</p>
<h2>What's Changed</h2>
<ul>
<li>Update GHES guidance to include reference to Node 20 version by <a
href="https://github.com/patrikpolyak"><code>@​patrikpolyak</code></a>
in <a
href="https://redirect.github.com/actions/download-artifact/pull/440">actions/download-artifact#440</a></li>
<li>Download Artifact Node24 support by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/download-artifact/pull/415">actions/download-artifact#415</a></li>
<li>fix: update <code>@​actions/artifact</code> to fix Node.js 24
punycode deprecation by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/download-artifact/pull/451">actions/download-artifact#451</a></li>
<li>prepare release v7.0.0 for Node.js 24 support by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/download-artifact/pull/452">actions/download-artifact#452</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/patrikpolyak"><code>@​patrikpolyak</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/download-artifact/pull/440">actions/download-artifact#440</a></li>
<li><a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/download-artifact/pull/415">actions/download-artifact#415</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/download-artifact/compare/v6.0.0...v7.0.0">https://github.com/actions/download-artifact/compare/v6.0.0...v7.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/download-artifact/commit/37930b1c2abaa49bbe596cd826c3c89aef350131"><code>37930b1</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/download-artifact/issues/452">#452</a>
from actions/download-artifact-v7-release</li>
<li><a
href="https://github.com/actions/download-artifact/commit/72582b9e0acd370909e83fa4a1fd0fca3ad452d8"><code>72582b9</code></a>
doc: update readme</li>
<li><a
href="https://github.com/actions/download-artifact/commit/0d2ec9d4cbcefe257d822f108de2a1f15f8da9f6"><code>0d2ec9d</code></a>
chore: release v7.0.0 for Node.js 24 support</li>
<li><a
href="https://github.com/actions/download-artifact/commit/fd7ae8fda6dc16277a9ffbc91cdb0eedf156e912"><code>fd7ae8f</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/download-artifact/issues/451">#451</a>
from actions/fix-storage-blob</li>
<li><a
href="https://github.com/actions/download-artifact/commit/d484700543354b15886d6a52910cf61b7f1d2b27"><code>d484700</code></a>
chore: restore minimatch.dep.yml license file</li>
<li><a
href="https://github.com/actions/download-artifact/commit/03a808050efe42bb6ad85281890afd4e4546672c"><code>03a8080</code></a>
chore: remove obsolete dependency license files</li>
<li><a
href="https://github.com/actions/download-artifact/commit/56fe6d904b0968950f8b68ea17774c54973ed5e2"><code>56fe6d9</code></a>
chore: update <code>@​actions/artifact</code> license file to 5.0.1</li>
<li><a
href="https://github.com/actions/download-artifact/commit/8e3ebc4ab4d2e095e5eb44ba1a4a53b6b03976ad"><code>8e3ebc4</code></a>
chore: update package-lock.json with <code>@​actions/artifact</code><a
href="https://github.com/5"><code>@​5</code></a>.0.1</li>
<li><a
href="https://github.com/actions/download-artifact/commit/1e3c4b4d4906c98ab57453c24efefdf16c078044"><code>1e3c4b4</code></a>
fix: update <code>@​actions/artifact</code> to ^5.0.0 for Node.js 24
punycode fix</li>
<li><a
href="https://github.com/actions/download-artifact/commit/458627d354794c71bc386c8d5839d20b5885fe2a"><code>458627d</code></a>
chore: use local <code>@​actions/artifact</code> package for Node.js 24
testing</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/download-artifact/compare/v6...v7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/download-artifact&package-manager=github_actions&previous-version=6&new-version=7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-09 14:45:09 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
0ada6cc49b chore(deps): bump peter-evans/create-pull-request from 7 to 8 (#6587)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 7 to 8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/create-pull-request/releases">peter-evans/create-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>Create Pull Request v8.0.0</h2>
<h2>What's new in v8</h2>
<ul>
<li>Requires <a
href="https://github.com/actions/runner/releases/tag/v2.327.1">Actions
Runner v2.327.1</a> or later if you are using a self-hosted runner for
Node 24 support.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>chore: Update checkout action version to v6 by <a
href="https://github.com/yonas"><code>@​yonas</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4258">peter-evans/create-pull-request#4258</a></li>
<li>Update actions/checkout references to <a
href="https://github.com/v6"><code>@​v6</code></a> in docs by <a
href="https://github.com/Copilot"><code>@​Copilot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4259">peter-evans/create-pull-request#4259</a></li>
<li>feat: v8 by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4260">peter-evans/create-pull-request#4260</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/yonas"><code>@​yonas</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4258">peter-evans/create-pull-request#4258</a></li>
<li><a href="https://github.com/Copilot"><code>@​Copilot</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4259">peter-evans/create-pull-request#4259</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.11...v8.0.0">https://github.com/peter-evans/create-pull-request/compare/v7.0.11...v8.0.0</a></p>
<h2>Create Pull Request v7.0.11</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: restrict remote prune to self-hosted runners by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4250">peter-evans/create-pull-request#4250</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.10...v7.0.11">https://github.com/peter-evans/create-pull-request/compare/v7.0.10...v7.0.11</a></p>
<h2>Create Pull Request v7.0.10</h2>
<p>⚙️ Fixes an issue where updating a pull request failed when targeting
a forked repository with the same owner as its parent.</p>
<h2>What's Changed</h2>
<ul>
<li>build(deps): bump the github-actions group with 2 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4235">peter-evans/create-pull-request#4235</a></li>
<li>build(deps-dev): bump prettier from 3.6.2 to 3.7.3 in the npm group
by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4240">peter-evans/create-pull-request#4240</a></li>
<li>fix: provider list pulls fallback for multi fork same owner by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4245">peter-evans/create-pull-request#4245</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/obnyis"><code>@​obnyis</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4064">peter-evans/create-pull-request#4064</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.9...v7.0.10">https://github.com/peter-evans/create-pull-request/compare/v7.0.9...v7.0.10</a></p>
<h2>Create Pull Request v7.0.9</h2>
<p>⚙️ Fixes an <a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4228">incompatibility</a>
with the recently released <code>actions/checkout@v6</code>.</p>
<h2>What's Changed</h2>
<ul>
<li>~70 dependency updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></li>
<li>docs: fix workaround description about <code>ready_for_review</code>
by <a href="https://github.com/ybiquitous"><code>@​ybiquitous</code></a>
in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3939">peter-evans/create-pull-request#3939</a></li>
<li>Docs: <code>add-paths</code> default behavior by <a
href="https://github.com/joeflack4"><code>@​joeflack4</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3928">peter-evans/create-pull-request#3928</a></li>
<li>docs: update to create-github-app-token v2 by <a
href="https://github.com/Goooler"><code>@​Goooler</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4063">peter-evans/create-pull-request#4063</a></li>
<li>Fix compatibility with actions/checkout@v6 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4230">peter-evans/create-pull-request#4230</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/joeflack4"><code>@​joeflack4</code></a>
made their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3928">peter-evans/create-pull-request#3928</a></li>
<li><a href="https://github.com/Goooler"><code>@​Goooler</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4063">peter-evans/create-pull-request#4063</a></li>
<li><a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4230">peter-evans/create-pull-request#4230</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/98357b18bf14b5342f975ff684046ec3b2a07725"><code>98357b1</code></a>
feat: v8 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4260">#4260</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/41c0e4b7899a4a0922bf899d64c5f25738cfe356"><code>41c0e4b</code></a>
Update actions/checkout references to <a
href="https://github.com/v6"><code>@​v6</code></a> in docs (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4259">#4259</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/994332de4c8124517167807167073cf397678768"><code>994332d</code></a>
chore: Update checkout action version to v6 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4258">#4258</a>)</li>
<li>See full diff in <a
href="https://github.com/peter-evans/create-pull-request/compare/v7...v8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-pull-request&package-manager=github_actions&previous-version=7&new-version=8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-09 14:44:51 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c0931f0c81 chore(deps): bump actions/cache from 4 to 5 (#6589)
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/cache/releases">actions/cache's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<blockquote>
<p>[!IMPORTANT]
<strong><code>actions/cache@v5</code> runs on the Node.js 24 runtime and
requires a minimum Actions Runner version of
<code>2.327.1</code>.</strong></p>
<p>If you are using self-hosted runners, ensure they are updated before
upgrading.</p>
</blockquote>
<hr />
<h2>What's Changed</h2>
<ul>
<li>Upgrade to use node24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1630">actions/cache#1630</a></li>
<li>Prepare v5.0.0 release by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1684">actions/cache#1684</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v4.3.0...v5.0.0">https://github.com/actions/cache/compare/v4.3.0...v5.0.0</a></p>
<h2>v4.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Add note on runner versions by <a
href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1642">actions/cache#1642</a></li>
<li>Prepare <code>v4.3.0</code> release by <a
href="https://github.com/Link"><code>@​Link</code></a>- in <a
href="https://redirect.github.com/actions/cache/pull/1655">actions/cache#1655</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1642">actions/cache#1642</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v4...v4.3.0">https://github.com/actions/cache/compare/v4...v4.3.0</a></p>
<h2>v4.2.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1620">actions/cache#1620</a></li>
<li>Upgrade <code>@actions/cache</code> to <code>4.0.5</code> and move
<code>@protobuf-ts/plugin</code> to dev depdencies by <a
href="https://github.com/Link"><code>@​Link</code></a>- in <a
href="https://redirect.github.com/actions/cache/pull/1634">actions/cache#1634</a></li>
<li>Prepare release <code>4.2.4</code> by <a
href="https://github.com/Link"><code>@​Link</code></a>- in <a
href="https://redirect.github.com/actions/cache/pull/1636">actions/cache#1636</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/nebuk89"><code>@​nebuk89</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1620">actions/cache#1620</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v4...v4.2.4">https://github.com/actions/cache/compare/v4...v4.2.4</a></p>
<h2>v4.2.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Update to use <code>@​actions/cache</code> 4.0.3 package &amp;
prepare for new release by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1577">actions/cache#1577</a>
(SAS tokens for cache entries are now masked in debug logs)</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1577">actions/cache#1577</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v4.2.2...v4.2.3">https://github.com/actions/cache/compare/v4.2.2...v4.2.3</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/cache/blob/main/RELEASES.md">actions/cache's
changelog</a>.</em></p>
<blockquote>
<h1>Releases</h1>
<h2>Changelog</h2>
<h3>5.0.1</h3>
<ul>
<li>Update <code>@azure/storage-blob</code> to <code>^12.29.1</code> via
<code>@actions/cache@5.0.1</code> <a
href="https://redirect.github.com/actions/cache/pull/1685">#1685</a></li>
</ul>
<h3>5.0.0</h3>
<blockquote>
<p>[!IMPORTANT]
<code>actions/cache@v5</code> runs on the Node.js 24 runtime and
requires a minimum Actions Runner version of <code>2.327.1</code>.
If you are using self-hosted runners, ensure they are updated before
upgrading.</p>
</blockquote>
<h3>4.3.0</h3>
<ul>
<li>Bump <code>@actions/cache</code> to <a
href="https://redirect.github.com/actions/toolkit/pull/2132">v4.1.0</a></li>
</ul>
<h3>4.2.4</h3>
<ul>
<li>Bump <code>@actions/cache</code> to v4.0.5</li>
</ul>
<h3>4.2.3</h3>
<ul>
<li>Bump <code>@actions/cache</code> to v4.0.3 (obfuscates SAS token in
debug logs for cache entries)</li>
</ul>
<h3>4.2.2</h3>
<ul>
<li>Bump <code>@actions/cache</code> to v4.0.2</li>
</ul>
<h3>4.2.1</h3>
<ul>
<li>Bump <code>@actions/cache</code> to v4.0.1</li>
</ul>
<h3>4.2.0</h3>
<p>TLDR; The cache backend service has been rewritten from the ground up
for improved performance and reliability. <a
href="https://github.com/actions/cache">actions/cache</a> now integrates
with the new cache service (v2) APIs.</p>
<p>The new service will gradually roll out as of <strong>February 1st,
2025</strong>. The legacy service will also be sunset on the same date.
Changes in these release are <strong>fully backward
compatible</strong>.</p>
<p><strong>We are deprecating some versions of this action</strong>. We
recommend upgrading to version <code>v4</code> or <code>v3</code> as
soon as possible before <strong>February 1st, 2025.</strong> (Upgrade
instructions below).</p>
<p>If you are using pinned SHAs, please use the SHAs of versions
<code>v4.2.0</code> or <code>v3.4.0</code></p>
<p>If you do not upgrade, all workflow runs using any of the deprecated
<a href="https://github.com/actions/cache">actions/cache</a> will
fail.</p>
<p>Upgrading to the recommended versions will not break your
workflows.</p>
<h3>4.1.2</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/cache/commit/9255dc7a253b0ccc959486e2bca901246202afeb"><code>9255dc7</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/cache/issues/1686">#1686</a>
from actions/cache-v5.0.1-release</li>
<li><a
href="https://github.com/actions/cache/commit/8ff5423e8b66eacab4e638ee52abbd2cb831366a"><code>8ff5423</code></a>
chore: release v5.0.1</li>
<li><a
href="https://github.com/actions/cache/commit/9233019a152bc768059ac1768b8e4403b5da16c1"><code>9233019</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/cache/issues/1685">#1685</a>
from salmanmkc/node24-storage-blob-fix</li>
<li><a
href="https://github.com/actions/cache/commit/b975f2bb844529e1063ad882c609b224bcd66eb6"><code>b975f2b</code></a>
fix: add peer property to package-lock.json for dependencies</li>
<li><a
href="https://github.com/actions/cache/commit/d0a0e1813491d01d574c95f8d189f62622bbb2ae"><code>d0a0e18</code></a>
fix: update license files for <code>@​actions/cache</code>,
fast-xml-parser, and strnum</li>
<li><a
href="https://github.com/actions/cache/commit/74de208dcfcbe85c0e7154e7b17e4105fe2554ff"><code>74de208</code></a>
fix: update <code>@​actions/cache</code> to ^5.0.1 for Node.js 24
punycode fix</li>
<li><a
href="https://github.com/actions/cache/commit/ac7f1152ead02e89c14b5456d14ab17591e74cfb"><code>ac7f115</code></a>
peer</li>
<li><a
href="https://github.com/actions/cache/commit/b0f846b50b6061d7a2ca6f1a2fea61d4a65d1a16"><code>b0f846b</code></a>
fix: update <code>@​actions/cache</code> with storage-blob fix for
Node.js 24 punycode depr...</li>
<li><a
href="https://github.com/actions/cache/commit/a7833574556fa59680c1b7cb190c1735db73ebf0"><code>a783357</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/cache/issues/1684">#1684</a>
from actions/prepare-cache-v5-release</li>
<li><a
href="https://github.com/actions/cache/commit/3bb0d78750a39cefce0c2b5a0a9801052b4359ad"><code>3bb0d78</code></a>
docs: highlight v5 runner requirement in releases</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/cache/compare/v4...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-09 14:44:43 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
73a5608fb5 chore(deps): bump actions/upload-artifact from 5 to 6 (#6590)
Bumps
[actions/upload-artifact](https://github.com/actions/upload-artifact)
from 5 to 6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<h2>v6 - What's new</h2>
<blockquote>
<p>[!IMPORTANT]
actions/upload-artifact@v6 now runs on Node.js 24 (<code>runs.using:
node24</code>) and requires a minimum Actions Runner version of 2.327.1.
If you are using self-hosted runners, ensure they are updated before
upgrading.</p>
</blockquote>
<h3>Node.js 24</h3>
<p>This release updates the runtime to Node.js 24. v5 had preliminary
support for Node.js 24, however this action was by default still running
on Node.js 20. Now this action by default will run on Node.js 24.</p>
<h2>What's Changed</h2>
<ul>
<li>Upload Artifact Node 24 support by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/719">actions/upload-artifact#719</a></li>
<li>fix: update <code>@​actions/artifact</code> for Node.js 24 punycode
deprecation by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/744">actions/upload-artifact#744</a></li>
<li>prepare release v6.0.0 for Node.js 24 support by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/745">actions/upload-artifact#745</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v5.0.0...v6.0.0">https://github.com/actions/upload-artifact/compare/v5.0.0...v6.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/upload-artifact/commit/b7c566a772e6b6bfb58ed0dc250532a479d7789f"><code>b7c566a</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/745">#745</a>
from actions/upload-artifact-v6-release</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/e516bc8500aaf3d07d591fcd4ae6ab5f9c391d5b"><code>e516bc8</code></a>
docs: correct description of Node.js 24 support in README</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/ddc45ed9bca9b38dbd643978d88e3981cdc91415"><code>ddc45ed</code></a>
docs: update README to correct action name for Node.js 24 support</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/615b319bd27bb32c3d64dca6b6ed6974d5fbe653"><code>615b319</code></a>
chore: release v6.0.0 for Node.js 24 support</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/017748b48f8610ca8e6af1222f4a618e84a9c703"><code>017748b</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/744">#744</a>
from actions/fix-storage-blob</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/38d4c7997f5510fcc41fc4aae2a6b97becdbe7fc"><code>38d4c79</code></a>
chore: rebuild dist</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/7d27270e0cfd253e666c44abac0711308d2d042f"><code>7d27270</code></a>
chore: add missing license cache files for <code>@​actions/core</code>,
<code>@​actions/io</code>, and mi...</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/5f643d3c9475505ccaf26d686ffbfb71a8387261"><code>5f643d3</code></a>
chore: update license files for <code>@​actions/artifact</code><a
href="https://github.com/5"><code>@​5</code></a>.0.1 dependencies</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/1df1684032c88614064493e1a0478fcb3583e1d0"><code>1df1684</code></a>
chore: update package-lock.json with <code>@​actions/artifact</code><a
href="https://github.com/5"><code>@​5</code></a>.0.1</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/b5b1a918401ee270935b6b1d857ae66c85f3be6f"><code>b5b1a91</code></a>
fix: update <code>@​actions/artifact</code> to ^5.0.0 for Node.js 24
punycode fix</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/upload-artifact/compare/v5...v6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-09 14:43:25 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
a0dee86a05 chore(deps): bump codespell-project/actions-codespell from 2.1 to 2.2 (#6424)
Bumps
[codespell-project/actions-codespell](https://github.com/codespell-project/actions-codespell)
from 2.1 to 2.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codespell-project/actions-codespell/releases">codespell-project/actions-codespell's
releases</a>.</em></p>
<blockquote>
<h2>v2.2</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<ul>
<li>Add the config file option and tests by <a
href="https://github.com/rdimaio"><code>@​rdimaio</code></a> in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/80">codespell-project/actions-codespell#80</a></li>
<li>Use <code>pip install</code> with <code>--no-cache-dir</code> in the
Dockerfile by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/89">codespell-project/actions-codespell#89</a></li>
<li>Upgrade to Python 3.13 by <a
href="https://github.com/candrews"><code>@​candrews</code></a> in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/82">codespell-project/actions-codespell#82</a></li>
<li>Add checkout action and problem matcher to README by <a
href="https://github.com/vadi2"><code>@​vadi2</code></a> in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/32">codespell-project/actions-codespell#32</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/rdimaio"><code>@​rdimaio</code></a> made
their first contribution in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/80">codespell-project/actions-codespell#80</a></li>
<li><a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
made their first contribution in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/89">codespell-project/actions-codespell#89</a></li>
<li><a href="https://github.com/candrews"><code>@​candrews</code></a>
made their first contribution in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/82">codespell-project/actions-codespell#82</a></li>
<li><a href="https://github.com/vadi2"><code>@​vadi2</code></a> made
their first contribution in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/32">codespell-project/actions-codespell#32</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codespell-project/actions-codespell/compare/v2...v2.2">https://github.com/codespell-project/actions-codespell/compare/v2...v2.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/8f01853be192eb0f849a5c7d721450e7a467c579"><code>8f01853</code></a>
MAINT: Release notes</li>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/23a4abea248a30208f0b9d8682ac515b5714cd3e"><code>23a4abe</code></a>
Add checkout action and problem matcher to README (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/32">#32</a>)</li>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/906f13fba196b1478f876bf3fdc4f9798c77b6f3"><code>906f13f</code></a>
Upgrade to Python 3.13 (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/82">#82</a>)</li>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/df0bba344d8a1022f611728aa58c5fdfd7c094b1"><code>df0bba3</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/85">#85</a>)</li>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/c460eef33ec1d5171b201b66ffc77bbdbdbb6b2a"><code>c460eef</code></a>
Use <code>pip install</code> with <code>--no-cache-dir</code> in the
Dockerfile (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/89">#89</a>)</li>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/037a23a348b32d9060fe3b94ddf99986b779de2c"><code>037a23a</code></a>
Add the config file option and tests (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/80">#80</a>)</li>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/8d1a4b1bd974b8082be0842c2e7e57c8bf6b9b63"><code>8d1a4b1</code></a>
Bump actions/setup-python from 5 to 6 (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/92">#92</a>)</li>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/71286cb40fe09b3222aff820311357b4e67cc206"><code>71286cb</code></a>
Bump actions/checkout from 4 to 5 (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/91">#91</a>)</li>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/fad9339798e1ee3fe979ae0a022c931786a408b8"><code>fad9339</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/84">#84</a>)</li>
<li>See full diff in <a
href="https://github.com/codespell-project/actions-codespell/compare/v2.1...v2.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=codespell-project/actions-codespell&package-manager=github_actions&previous-version=2.1&new-version=2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-09 14:43:09 -05:00
Sydney RunkleandGitHub 311465bbf7 fix: sanitize namespace for deeply nested graph jumps (#6665)
Fixes https://github.com/langchain-ai/langgraph/issues/6409
2026-01-09 14:39:33 -05:00
Mason DaughertyandGitHub 8ccead9560 docs: x-refs and explainer in tool node docs (#6653) 2026-01-05 20:17:38 +00:00
Mason DaughertyandGitHub 3a9749a0ed docs: ToolNode nit (#6652)
match the other bullets
2026-01-05 14:41:45 -05:00
Mason DaughertyandGitHub 196fbf2631 docs: storage nits (#6651) 2026-01-05 14:24:57 -05:00
0acd5decf8 fix: typo: saved the world "BaseMessge" to "BaseMessage" (#6639)
Changed "BaseMessge" to "BaseMessage" in test comments.

This critical 2-character fix prevents mass confusion among developers
who might have spent milliseconds wondering what a "Messge" is.

The world is now a safer place.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 03:58:57 +00:00
Connor BraaandGitHub eec823cbd6 release(sdk-py): bump to 0.3.1 (#6610)
bumping sdk-py for custom encryption cleanup changes (#6595) - these are
breaking changes on this beta, unreleased and unused feature.

Signed-off-by: Connor Braa <cwlbraa@langchain.dev>
2025-12-18 10:21:34 -08:00
Connor BraaandGitHub 9eac53db4b fix(sdk-py): remove model-type specific custom json encryption annotations & document key preservation limitations (#6595)
In langgraph-api, custom-encrypted JSONs need to continue to be
SQL-json-mergable after encryption. Previous WIP docs
advocated for custom encryption impls where all encrypted kv pairs were
shoved into a `__encrypted__: $encrypted_kvs` meta-key. Turns out that
pattern causes data loss when running PATCH-style partial updates or in
the many places langgraph-api json-SQL-merges across model types.

This PR contains 2 SDK fixes:
1. remove model-type specific custom json encryption annotations - these
cause surprising behavior as config and context data propagates across
model types, specifically because today we can't guarantee that data
encrypted as one model-type will be decrypted as the same model-type
because kv pairs move across model-types in pure SQL
2. document limitations and validation around "key preservation" in
custom json encryption functions. langgraph-api now validates that
custom JSON encryption fns don't change keys. That validation prevents
customizers from writing custom encryption functions that cause data
loss through patch endpoints and x-model merge propagation.

---------

Signed-off-by: Connor Braa <cwlbraa@langchain.dev>
2025-12-18 08:38:01 -08:00
William FHandGitHub 05e4efe712 release(cli): relax api bounds (#6606) 2025-12-17 06:10:37 -08:00
William FHandGitHub c80d93c78a fix(cli): Escape variable substitution in compose codegen (#6594) 2025-12-15 14:51:03 -08:00
Imvikram99andGitHub 87cb509528 feat(checkpoint): Validate checkpointer type at compile time (#6586)
Description: Catch invalid checkpointer objects early by validating any
checkpointer argument before compilation/execution, raising a clear
TypeError that instructs users to pass a proper BaseCheckpointSaver
(e.g., AsyncPostgresSaver) instead of stores like AsyncPostgresStore.
Includes shared validation logic and a regression test so we don’t see
AttributeError: 'AsyncPostgresStore' object has no attribute
'get_next_version' again.

Issue: Fixes #6585

Dependencies: None

Twitter handle: none
2025-12-15 07:22:47 +00:00
Josh RogersandGitHub 84023451a2 release(langgraph): bump to 1.0.5 (#6582)
- **Description:** Bumping to 1.0.5 for compatibility with the latest
changes to the python langgraph-sdk.
  - **Issue:** N/A
  - **Dependencies:** N/A
  - **Twitter handle:** N/A
2025-12-12 17:56:30 -05:00
efe78447b3 feat(sdk-py): emit id as part of stream events (#6581)
- **Description:** Provide the id of the event for routes that use SSE
streams. This will allow for more custom retry logic when streams
disconnect if needed.
  - **Issue:** N/A
  - **Dependencies:** N/A
  - **Twitter handle:** N/A

---------

Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-12-12 17:16:48 -05:00
Sydney RunkleandGitHub df19173191 fix: update readme (#6570)
remove usage of deprecated `create_react_agent` and generally
redirecting to docs bc they're so good now :)
2025-12-10 19:02:36 +00:00
William FHandGitHub 4d01e69b82 release(checkpoint-postgres): 3.0.1 (#6568) 2025-12-09 23:05:49 +00:00
William FHandGitHub e86b5f4da2 chore: pgqs (#6567)
Add more argument sanitization
2025-12-09 14:51:29 -08:00
Eugene YurtsevandGitHub b70d5aac0e release(checkpoint-sqlite): 3.0.1 (#6566)
Release 3.0.1
2025-12-09 17:00:00 -05:00
Eugene YurtsevandGitHub 297242913f fix(checkpoint-sqlite): harden (#6565)
harden
2025-12-09 16:47:55 -05:00
Mason DaughertyandGitHub 02965fb5f5 chore: revise CONTRIBUTING.md (#6561) 2025-12-09 20:33:11 +00:00
Mason DaughertyandGitHub 64f0458296 chore: nits (#6560)
- Delete `security.md` as it will be inherited from
`langchain-ai/.github`
- Move `CONTRIBUTING.md` to `.github` (will still appear on homepage),
cleaning up top level
- Copy contents of `AGENTS.md` to `CLAUDE.md` since CC still doesn't
take `AGENTS.md`
2025-12-09 15:23:59 -05:00
Andrew NguonlyandGitHub 76711536f9 feat(sdk-py): Add name parameter to Assistants count API (#6558)
**Description**: The Agent Server API now supports counting assistants
by name.

This is similar to adding the `name` parameter to the Assistants search
API: https://github.com/langchain-ai/langgraph/pull/6483
2025-12-09 11:09:12 -08:00
William FHandGitHub 6c6978918e chore(cli): Pass through webhook configuration in dev server (#6557) 2025-12-09 07:05:15 -08:00
William FHandGitHub 2f1a16006a release(cli): 0.4.8 (#6556)
For webhook configuration support
2025-12-09 13:25:02 +00:00
William FHandGitHub 269d08f5d3 feat(cli): webhook configuration (#6555) 2025-12-09 13:17:22 +00:00
94698c8a34 feat: custom encryption at rest (#6482)
**Description:** 
This PR adds the Python SDK types necessary for langgraph platform users
to inject their own custom encryption-at-rest functions. See [docs
PR](https://github.com/langchain-ai/docs/pull/1715) for more details.

note: this PR adds a starlette dev dependency so that custom encryption
can access BaseUser information.

**Issue:**
required for LSD-172 

**Dependencies:**
- [depended upon by associated langgraph-api
changes](https://github.com/langchain-ai/langgraph-api/pull/1773)(this
PR must merge before that one)
- [docs PR](https://github.com/langchain-ai/docs/pull/1715)

**TODO:**
- [x] move docs to docs repo
- [x] bump package versions before merge

---------

Signed-off-by: Connor Braa <cwlbraa@langchain.dev>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-06 00:10:17 +00:00
Mason DaughertyandGitHub 7d557cb865 chore: fix links for docs (#6538) 2025-12-05 23:09:41 +00:00
William FHandGitHub f211fadc2b release(sdk-py): Configure loopback client (#6536)
Will defer defaulting to deferred registration until a later date.
2025-12-05 11:56:40 -08:00
William FHandGitHub 024468c5dd chore: Bump lockfile (#6537) 2025-12-05 11:16:19 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
7f08a6dafd chore(deps): bump js-yaml from 4.1.0 to 4.1.1 in /docs/_scripts/js_translation/codeblocks (#6452)
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.1.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md">js-yaml's
changelog</a>.</em></p>
<blockquote>
<h2>[4.1.1] - 2025-11-12</h2>
<h3>Security</h3>
<ul>
<li>Fix prototype pollution issue in yaml merge (&lt;&lt;)
operator.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/nodeca/js-yaml/commit/cc482e775913e6625137572a3712d2826170e53a"><code>cc482e7</code></a>
4.1.1 released</li>
<li><a
href="https://github.com/nodeca/js-yaml/commit/50968b862e75866ef90e626572fe0b2f97b55f9f"><code>50968b8</code></a>
dist rebuild</li>
<li><a
href="https://github.com/nodeca/js-yaml/commit/d092d866031751cb27c12d93f3e2470ad74d678b"><code>d092d86</code></a>
lint fix</li>
<li><a
href="https://github.com/nodeca/js-yaml/commit/383665ff4248ec2192d1274e934462bb30426879"><code>383665f</code></a>
fix prototype pollution in merge (&lt;&lt;)</li>
<li><a
href="https://github.com/nodeca/js-yaml/commit/0d3ca7a27b03a6c974790a30a89e456007d62976"><code>0d3ca7a</code></a>
README.md: HTTP =&gt; HTTPS (<a
href="https://redirect.github.com/nodeca/js-yaml/issues/678">#678</a>)</li>
<li><a
href="https://github.com/nodeca/js-yaml/commit/49baadd52af887d2991e2c39a6639baa56d6c71b"><code>49baadd</code></a>
doc: 'empty' style option for !!null</li>
<li><a
href="https://github.com/nodeca/js-yaml/commit/ba3460eb9d3e4478edcbc29edabe17c2157fc9ce"><code>ba3460e</code></a>
Fix demo link (<a
href="https://redirect.github.com/nodeca/js-yaml/issues/618">#618</a>)</li>
<li>See full diff in <a
href="https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=js-yaml&package-manager=npm_and_yarn&previous-version=4.1.0&new-version=4.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-02 19:54:26 +00:00
William FHandGitHub 76203e2c20 chore: Sync langgraph.json schema (#6530) 2025-12-02 19:52:06 +00:00
b6cc022861 fix(checkpoint): InMemorySaver context managers should return self in… (#6529)
h/t to @lexi-k for openening. merged here to check/fix CI

Co-authored-by: lexi-k <69981673+lexi-k@users.noreply.github.com>
2025-12-02 11:47:41 -08:00
Mason DaughertyandGitHub 02bb7a436a chore: remove erroneous release title prefix (#6528) 2025-12-02 13:45:43 -05:00
Hunter LovellandGitHub 43d21e9c7d chore(ci): disable redirects build hook (#6527) 2025-12-02 08:43:57 -05:00
William FHandGitHub 55ed7d4b49 feat: Include pagination in assistants search response (#6526) 2025-12-01 20:18:26 -08:00
William FHandGitHub 2b78bf3bad fix: docstring for serializer protocol (#6525) 2025-12-01 18:14:12 +00:00
Mason DaughertyandGitHub 630bd9ab95 fix: release name should be same as package name (#6503) 2025-11-25 19:02:44 -05:00
William FHandGitHub b945b1f21e release(langgraph): 1.0.4 (#6502)
This patch release includes a couple of small fixes and improvements,
such as:
- Include interrupt information in the values stream mode (no longer
rely solely on the updates stream mode):
https://github.com/langchain-ai/langgraph/pull/6475
- Omit thread_id from configurable to allow using context for stateful
runs via RemoteGraph:
https://github.com/langchain-ai/langgraph/pull/6497
2025-11-25 20:27:49 +00:00
William FHandGitHub 4cb108ccd9 release(sdk-py): 0.2.11 (#6501) 2025-11-25 19:17:40 +00:00
Josh RogersandGitHub 23d78c2817 feat(sdk-py): add sentinel to skip auto loading api key on sdk client create (#6500)
**Description:** There are times a user might want to create the client,
but conditionally set the API key. For example, consider a complex auth
situation where the system has user callers using jwts and system
callers using API keys. This allows explicitly disabling the
auto-loading behavior of API keys in the client today, so no key is set.
**Issue:** N/A
**Dependencies:** None
**Twitter handle:** N/A
2025-11-25 11:10:56 -08:00
William FHandGitHub f8c1a323cc chore(sdk-py): Improve type-hinting of inputs (#6480) 2025-11-24 18:29:03 -08:00
William FHandGitHub b7e329cf0a chore: pop thread ID from configurable fields in remote graph (#6497)
Otherwise, you cannot use `context` with stateful runs, because the
server throws if you provide both configurable and context in a single
call (due to ambiguous parameters)
2025-11-24 16:09:08 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3f49249e72 chore(deps): bump actions/checkout from 5 to 6 (#6490)
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to
6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update README to include Node.js 24 support details and requirements
by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2248">actions/checkout#2248</a></li>
<li>Persist creds to a separate file by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2286">actions/checkout#2286</a></li>
<li>v6-beta by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2298">actions/checkout#2298</a></li>
<li>update readme/changelog for v6 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2311">actions/checkout#2311</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v5.0.0...v6.0.0">https://github.com/actions/checkout/compare/v5.0.0...v6.0.0</a></p>
<h2>v6-beta</h2>
<h2>What's Changed</h2>
<p>Updated persist-credentials to store the credentials under
<code>$RUNNER_TEMP</code> instead of directly in the local git
config.</p>
<p>This requires a minimum Actions Runner version of <a
href="https://github.com/actions/runner/releases/tag/v2.329.0">v2.329.0</a>
to access the persisted credentials for <a
href="https://docs.github.com/en/actions/tutorials/use-containerized-services/create-a-docker-container-action">Docker
container action</a> scenarios.</p>
<h2>v5.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Port v6 cleanup to v5 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2301">actions/checkout#2301</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v5...v5.0.1">https://github.com/actions/checkout/compare/v5...v5.0.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>V6.0.0</h2>
<ul>
<li>Persist creds to a separate file by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2286">actions/checkout#2286</a></li>
<li>Update README to include Node.js 24 support details and requirements
by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2248">actions/checkout#2248</a></li>
</ul>
<h2>V5.0.1</h2>
<ul>
<li>Port v6 cleanup to v5 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2301">actions/checkout#2301</a></li>
</ul>
<h2>V5.0.0</h2>
<ul>
<li>Update actions checkout to use node 24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li>
</ul>
<h2>V4.3.1</h2>
<ul>
<li>Port v6 cleanup to v4 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2305">actions/checkout#2305</a></li>
</ul>
<h2>V4.3.0</h2>
<ul>
<li>docs: update README.md by <a
href="https://github.com/motss"><code>@​motss</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li>
<li>Add internal repos for checking out multiple repositories by <a
href="https://github.com/mouismail"><code>@​mouismail</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li>
<li>Documentation update - add recommended permissions to Readme by <a
href="https://github.com/benwells"><code>@​benwells</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li>
<li>Adjust positioning of user email note and permissions heading by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li>
<li>Update CODEOWNERS for actions by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li>
<li>Update package dependencies by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li>
</ul>
<h2>v4.2.2</h2>
<ul>
<li><code>url-helper.ts</code> now leverages well-known environment
variables by <a href="https://github.com/jww3"><code>@​jww3</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li>
<li>Expand unit test coverage for <code>isGhes</code> by <a
href="https://github.com/jww3"><code>@​jww3</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li>
</ul>
<h2>v4.2.1</h2>
<ul>
<li>Check out other refs/* by commit if provided, fall back to ref by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li>
</ul>
<h2>v4.2.0</h2>
<ul>
<li>Add Ref and Commit outputs by <a
href="https://github.com/lucacome"><code>@​lucacome</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1180">actions/checkout#1180</a></li>
<li>Dependency updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>- <a
href="https://redirect.github.com/actions/checkout/pull/1777">actions/checkout#1777</a>,
<a
href="https://redirect.github.com/actions/checkout/pull/1872">actions/checkout#1872</a></li>
</ul>
<h2>v4.1.7</h2>
<ul>
<li>Bump the minor-npm-dependencies group across 1 directory with 4
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li>
<li>Bump actions/checkout from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li>
<li>Check out other refs/* by commit by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li>
<li>Pin actions/checkout's own workflows to a known, good, stable
version. by <a href="https://github.com/jww3"><code>@​jww3</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1776">actions/checkout#1776</a></li>
</ul>
<h2>v4.1.6</h2>
<ul>
<li>Check platform to set archive extension appropriately by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1732">actions/checkout#1732</a></li>
</ul>
<h2>v4.1.5</h2>
<ul>
<li>Update NPM dependencies by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1703">actions/checkout#1703</a></li>
<li>Bump github/codeql-action from 2 to 3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1694">actions/checkout#1694</a></li>
<li>Bump actions/setup-node from 1 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1696">actions/checkout#1696</a></li>
<li>Bump actions/upload-artifact from 2 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1695">actions/checkout#1695</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/checkout/commit/1af3b93b6815bc44a9784bd300feb67ff0d1eeb3"><code>1af3b93</code></a>
update readme/changelog for v6 (<a
href="https://redirect.github.com/actions/checkout/issues/2311">#2311</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/71cf2267d89c5cb81562390fa70a37fa40b1305e"><code>71cf226</code></a>
v6-beta (<a
href="https://redirect.github.com/actions/checkout/issues/2298">#2298</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/069c6959146423d11cd0184e6accf28f9d45f06e"><code>069c695</code></a>
Persist creds to a separate file (<a
href="https://redirect.github.com/actions/checkout/issues/2286">#2286</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493"><code>ff7abcd</code></a>
Update README to include Node.js 24 support details and requirements (<a
href="https://redirect.github.com/actions/checkout/issues/2248">#2248</a>)</li>
<li>See full diff in <a
href="https://github.com/actions/checkout/compare/v5...v6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 13:41:21 -08:00
Andrew NguonlyandGitHub 78910dade0 chore: Bump version of sdk-py to 0.2.10 (#6496)
**Description:** Updating `sdk-py` version for release.
2025-11-24 12:27:16 -08:00
Andrew NguonlyandGitHub 33fbd1bb9c feat(sdk-py): Add name parameter to Assistants search API (#6483)
**Description:** The Agent Server API now supports searching for
assistants by name.
2025-11-24 10:58:54 -08:00
Mason DaughertyandGitHub d45f52ab0c chore: clean up some refs (#6487) 2025-11-23 02:13:30 -05:00
William FHandGitHub ed07d4a5d4 chore(sdk-py): Add more type checking. (#6479) 2025-11-20 17:40:23 -08:00
Caspar BroekhuizenandGitHub 2284a54b64 fix: interrupt stream mode values (#6475)
This PR improves the consistency of interrupt streaming. 

- when streaming with stream_mode values, the stream chunk now contains
the entire state alongside the interrupt:

```python
class State(TypedDict):
    robot_input: str
# at this point in time robot_input is already set to  "beep boop i am a robot"
app.stream(..., stream_mode="values")
# before
{"__interrupt__": (Interrupt(value="interrupt",))}}
# after
{"robot_input": "beep boop i am a robot", "__interrupt__": (Interrupt(value="interrupt"))}
```

- when streaming with stream_mode=["values", "updates"], interrupts are
surfaced in both an update stream chunk and the value stream chunk, when
previously we keep interrupt in values only if we request values mode
only

```python
class State(TypedDict):
    robot_input: str
# at this point in time robot_input is already set to  "beep boop i am a robot"
app.stream(..., stream_mode=["values", "updates"])
# before (interrupt would only emit on update chunk, there would be no values chunk)
("updates", {"__interrupt__": (Interrupt(value="interrupt",))}})
# after
("updates", {"__interrupt__": (Interrupt(value="interrupt",))}})
("values", {"robot_input": "beep boop i am a robot", "__interrupt__": (Interrupt(value="interrupt"))})
```

For housekeeping: this PR improves on this revert:
https://github.com/langchain-ai/langgraph/pull/6141
2025-11-20 14:23:09 -08:00
Sydney RunkleandGitHub f8006b2fee release: langgraph-prebuilt 1.0.5 (#6473) 2025-11-20 11:45:19 -05:00
Sydney RunkleandGitHub 2164b7daa3 fix: refactor injection logic to respect function signatures (#6468)
## overview

The main purpose of this is to respect tool signatures that request
injected args (like `ToolRuntime`) even when the explicitly specified
`args_schema` does not.

Ex in the following example, we should still inject `runtime` despite
its absence in `ArgsSchema`

```py
class ArgsSchema(BaseModel):
    some_arg: int = Field(...)

@tool(args_schema=ArgsSchema)
def my_tool(some_arg: int, runtime: ToolRuntime): ...
```

This is accompanied by
https://github.com/langchain-ai/langchain/pull/34051 which has tests
that pass w/ this change. This tests injection w/ `create_agent` (more
end to end than tests added in
https://github.com/langchain-ai/langchain/pull/33999.

This unblocks the injection of `ToolRuntime` into MCP tools which is
exciting bc that exposes tool call id and state, which we previously
were unable to do.

## other benefits

* Cleaner code structure w/ more helpful docs about injected args.
* Nice perf boost, we're no longer inspecting the annotations of a
tool's schema 3 different times to detect store, state, and runtime
injections.

## additional notes

1. I could see a world where we want more of this logic to reside on the
tools themselves, but tools don't now about LG specific injection types
(like `ToolRuntime`, hence having this logic here for now).
2. We could separately add validation for the case where something is
specified in `args_schema` and not in the function signature (probably
at the tool level though).
2025-11-20 11:37:54 -05:00
Sydney RunkleandGitHub 6d20a0b9c7 fix: deprecate setattr on ToolCallRequest (#6462)
* one alternative considered was setting `frozen=True` on the dataclass,
but this is breaking, so a deprecation is a nicer approach
2025-11-19 13:12:11 -05:00
William FHandGitHub df8becd5cf refactor: separate prepare_push_* functions (#6450)
Extract two common cases from the big switch statement of
`prepare_single_task` since it's a tad more composable.

All this does is shift/extract code to separate functions
2025-11-14 16:13:03 -08:00
Lauren Hirata SinghandGitHub 056ba91a71 chore(docs): add more redirects + catchall (#6442) 2025-11-13 14:49:40 -05:00
Sydney RunkleandGitHub 02300de24c fix: dep warnings in prebuilt (#6443) 2025-11-13 13:59:34 -05:00
Sydney RunkleandGitHub ac16bdb795 release: prebuilt 1.0.3 (#6441) 2025-11-13 13:38:24 -05:00
Caspar BroekhuizenandGitHub 0d4ac836e3 chore: langgraph patch release (#6429) 2025-11-10 09:37:35 -08:00
Lauren Hirata SinghandGitHub 201c8015ea chore(docs): Update links in notebook_hooks.py for deployment (#6428) 2025-11-10 09:51:05 -05:00
Mason DaughertyandGitHub cf3e8252f5 feat(docs): warn that StateGraph is a builder class (#6417) 2025-11-07 21:09:15 -05:00
Mason DaughertyandGitHub 7a5e3c1e79 fix(docs): PartialState rendering in MkDocs (#6416)
The carat chars were not rendering without code style formatting
2025-11-07 21:08:01 -05:00
Mason DaughertyandGitHub 218c60717e fix(docs): synchronize invoke and ainvoke docstrings (#6415)
Similar to #6414
2025-11-07 20:44:33 -05:00
Mason DaughertyandGitHub 28b9f578b0 fix(docs): synchronize stream and astream docstrings (#6414)
`stream` and `astream` docstrings listed different available
`stream_mode` options.

Both methods support the same seven stream modes as defined in
`StreamMode`

Fixed for consistency
2025-11-07 20:44:25 -05:00
le-codeur-rapideandGitHub bef76b791c docs(langgraph): Fix docstring code examples of task function (#6410)
Hi all,
I found out that the sync and async code examples of the `task` function
in `libs/langgraph/langgraph/func/__init__.py` have a typo:
```
    Example: Sync Task
        ```python
        from langgraph.func import entrypoint, task


        @task
        def add_one(a: int) -> int:
            return a + 1


        @entrypoint()
        def add_one(numbers: list[int]) -> list[int]:
            futures = [add_one(n) for n in numbers]
            results = [f.result() for f in futures]
            return results


        # Call the entrypoint
        add_one.invoke([1, 2, 3])  # Returns [2, 3, 4]
        ```
```

Both task and entrypoint functions have the same name which gives an
error.

This is a small PR to fix this
2025-11-07 16:01:19 -05:00
a1b34efdb0 fix(checkpoint-postgres): ensure vector extension is created only if not exists (#6154)
Thank you for contributing to LangGraph! Follow these steps to mark your
pull request as ready for review. **If any of these steps are not
completed, your PR will not be considered for review.**

- [x] **PR title**: Follows the format: {TYPE}({SCOPE}): {DESCRIPTION}
  - Examples:
    - feat(core): add multi-tenant support
    - fix(cli): resolve flag parsing error
    - docs(openai): update API usage examples
  - Allowed `{TYPE}` values:
- feat, fix, docs, style, refactor, perf, test, build, ci, chore,
revert, release
  - Allowed `{SCOPE}` values (optional):
- langgraph, docs, cli, checkpoint, checkpoint-postgres,
checkpoint-sqlite, prebuilt, scheduler-kafka, sdk-py
- Once you've written the title, please delete this checklist item; do
not include it in the PR.

- **Description:** Azure Postgres SQL server has a limitation when doing
create extension vector is not exists, even though it manually created
before on a schema.
- **Issue:** Even though `CREATE EXTENSION vector` is executed manually
before, the permission issue arises. Putting it in an if else block
solves the issue and its not a breaking change.
```
Because vector isn't a trusted extension, only members of "azure_pg_admin" are allowed to use CREATE EXTENSION vector
HINT: to learn how to allow an extension or see the list of allowed extensions, please refer to https://go.microsoft.com/fwlink/?linkid=2301063
```

Co-authored-by: Josh Rogers <josh@langchain.dev>
2025-11-07 11:42:15 -05:00
André MenezesandGitHub 7ab5788f25 fix(langgraph): Unexpected behavior for stream_mode sequences that are not lists (#6354)
## Issue
The `stream_mode` argument type includes `Sequence`, but it doesn't
correctly support non-list sequences. On the other hand, the
`print_mode` argument works as expected.

### Example
```python
from langgraph.pregel.main import Pregel

pregel = Pregel(nodes={}, channels=None, input_channels=[], output_channels=[], auto_validate=False)
stream_modes, *_ = pregel._defaults(
    config={"recursion_limit": 1},
    stream_mode=("values", "messages"),
    print_mode=("values"),
    output_keys=None,
    interrupt_before=None,
    interrupt_after=None,
    durability=None,
)
print(stream_modes) # Expected `{'values', 'messages'}`, got `{('values', 'messages'), 'values'}`
```
2025-11-07 08:01:25 -05:00
Cole MurrayandGitHub b0a1029d55 fix(checkpoint-postgres): Replace f-string SQL formatting with parameterized queries in migration statements (#6328)
## Summary

Replace f-string SQL formatting with parameterized queries to prevent
potential SQL injection in checkpoint migration code.

## Changes

Updated the migration version tracking INSERT statements in all
checkpoint saver classes to use parameterized queries instead of
f-string formatting:

- `PostgresSaver`
(libs/checkpoint-postgres/langgraph/checkpoint/postgres/__init__.py:100)
- `AsyncPostgresSaver`
(libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py:104-106)
- `ShallowPostgresSaver`
(libs/checkpoint-postgres/langgraph/checkpoint/postgres/shallow.py:255)
- `AsyncShallowPostgresSaver`
(libs/checkpoint-postgres/langgraph/checkpoint/postgres/shallow.py:617-619)

**Before (vulnerable to SQL injection):**
```python
cur.execute(f"INSERT INTO checkpoint_migrations (v) VALUES ({v})")
```

**After (using parameterized query):**
```python
cur.execute("INSERT INTO checkpoint_migrations (v) VALUES (%s)", (v,))
```

## Risk Assessment

The practical risk is low since `v` is an integer loop variable
controlled by the codebase. However, using string formatting in SQL
queries is a well-known anti-pattern that can lead to SQL injection
vulnerabilities, especially if the code is later refactored or copied to
other contexts.

## Testing

-  All 216 tests passing on PostgreSQL 15 and 16
-  Linting and type checking passing
-  No functional changes to behavior
2025-11-07 08:00:10 -05:00
Mason DaughertyandGitHub c2ef3f3fd3 fix: remove SDK inline links (#6307)
these were broken; remove for now.
2025-11-07 07:56:00 -05:00
Michael LiandGitHub d455bd841d fix: fix previoius edge cases such as 0 (#6379)
Thank you for contributing to LangGraph! Follow these steps to mark your
pull request as ready for review. **If any of these steps are not
completed, your PR will not be considered for review.**

- [x] **PR title**: Follows the format: {TYPE}({SCOPE}): {DESCRIPTION}
  - Examples:
    - feat(core): add multi-tenant support
    - fix(cli): resolve flag parsing error
    - docs(openai): update API usage examples
  - Allowed `{TYPE}` values:
- feat, fix, docs, style, refactor, perf, test, build, ci, chore,
revert, release
  - Allowed `{SCOPE}` values (optional):
- langgraph, docs, cli, checkpoint, checkpoint-postgres,
checkpoint-sqlite, prebuilt, scheduler-kafka, sdk-py
- Once you've written the title, please delete this checklist item; do
not include it in the PR.

- [x] **PR message**: ***Delete this entire checklist*** and replace
with
- **Description:** a description of the change. Include a [closing
keyword](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)
if applicable.
  - **Issue:** the issue # it fixes, if applicable
  - **Dependencies:** any dependencies required for this change
- **Twitter handle:** if your PR gets announced, and you'd like a
mention, we'll gladly shout you out!

- [x] **Add tests and docs**: If you're adding a new integration, you
must include:
1. A test for the integration, preferably unit tests that do not rely on
network access,
2. An example notebook showing its use. It lives in
`docs/docs/integrations` directory.

- [x] **Lint and test**: Run `make format`, `make lint` and `make test`
from the root of the package(s) you've modified. We will not consider a
PR unless these three are passing in CI. See [contribution
guidelines](https://github.com/langchain-ai/langgraph/blob/main/CONTRIBUTING.md)
for more.

Additional guidelines:

- Make sure optional dependencies are imported within a function.
- Please do not add dependencies to `pyproject.toml` files (even
optional ones) unless they are **required** for unit tests.
- Most PRs should not touch more than one package.
- Changes should be backwards compatible.
2025-11-07 07:54:22 -05:00
Pedro Enrique Agurto CastilloandGitHub 69a09adef6 fix(langgraph): export REMOVE_ALL_MESSAGES in __all__ to fix linting (#6375)
`REMOVE_ALL_MESSAGES` is a public constant used with `RemoveMessage` to
clear all messages from the state:

```python
from langchain_core.messages import RemoveMessage
from langgraph.graph.message import REMOVE_ALL_MESSAGES

# Clear all messages
[RemoveMessage(id=REMOVE_ALL_MESSAGES)]
```

However, it is not exported in __all__, causing:

Linting errors in IDEs (PyCharm)
no-member warnings from Pylint
Confusion for users

This PR:

Adds REMOVE_ALL_MESSAGES to __all__
Adds inline docstring with usage example

No runtime behavior changes — only improves IDE support and API clarity.

Thank you for contributing to LangGraph! Follow these steps to mark your
pull request as ready for review. **If any of these steps are not
completed, your PR will not be considered for review.**

---
Local verification:
```bash
# Before
from langgraph.graph.message import REMOVE_ALL_MESSAGES  # Pylint: no-member

# After: no error
```
CI Note: This is a pure export/docs fix. `make lint` and `make test`
pass unchanged.
2025-11-07 07:52:27 -05:00
Kavya GoyalandGitHub 35aa98b110 fix(sdk-py): use correct f-string representation when loading error (#6388)
Thank you for contributing to LangGraph! Follow these steps to mark your
pull request as ready for review. **If any of these steps are not
completed, your PR will not be considered for review.**


## Description
- Fixed a bug in `libs/sdk-py/langgraph_sdk/auth/__init__.py` where the
error message for an already-set authentication handler did not properly
render the handler value.
- Updated the error string from a static `{self._authenticate_handler}`
to a correctly interpolated f-string.

```python
"Authentication handler already set as {self._authenticate_handler}."
```

```python
f"Authentication handler already set as {self._authenticate_handler}."
```

- Error messages now correctly display the actual handler instance,
improving debugging clarity.



- **Issue:** Fixes https://github.com/langchain-ai/langgraph/issues/6387
  - **Dependencies:** -
  - **Twitter handle:** -

- [x] **Add tests and docs**: If you're adding a new integration, you
must include:
1. A test for the integration, preferably unit tests that do not rely on
network access,
2. An example notebook showing its use. It lives in
`docs/docs/integrations` directory.

- [ ] **Lint and test**: Run `make format`, `make lint` and `make test`
from the root of the package(s) you've modified. We will not consider a
PR unless these three are passing in CI. See [contribution
guidelines](https://github.com/langchain-ai/langgraph/blob/main/CONTRIBUTING.md)
for more.

Additional guidelines:

- Make sure optional dependencies are imported within a function.
- Please do not add dependencies to `pyproject.toml` files (even
optional ones) unless they are **required** for unit tests.
- Most PRs should not touch more than one package.
- Changes should be backwards compatible.
2025-11-07 07:51:35 -05:00
Mason DaughertyandGitHub 0f83d9fafe style: update docstrings to reference StateGraph (#6308)
nit
2025-11-07 07:47:29 -05:00
Logan RosenandGitHub 52d66df92c docs(langgraph): update streaming guide links (#6314)
Updating links to the LangGraph streaming guide to point to the new
documentation website for 1.0.
2025-11-07 07:46:48 -05:00
Mason DaughertyandGitHub 4ec92f9fb1 chore: add pyproject.toml links (#6364) 2025-11-07 07:43:51 -05:00
inhunandGitHub 2b72953064 docs: add license files for checkpoint-sqlite and checkpoint-postgres (#6392)
In this PR:

- Add missing LICENSE files for checkpoint-sqlite and
checkpoint-postgres libraries.

Both libraries specify the MIT License in their pyproject.toml files,
but the actual LICENSE files were missing.
This update adds the corresponding LICENSE files to ensure proper
license documentation and compliance.
2025-11-07 07:39:06 -05:00
le-codeur-rapideandGitHub 232014e8ef docs(langgraph): Fix typo in docstring of PregelLoop.tick (#6407)
This is a very small PR to correct a typo in the docstring of the
`PregelLoop.tick()` method.
```python
  def tick(self) -> bool:
      """Execute a single iteration of the Pregel loop.

      Args:
          input_keys: The key(s) to read input from.

      Returns:
          True if more iterations are needed.
      """
```

Corrected to :
```python
  def tick(self) -> bool:
      """Execute a single iteration of the Pregel loop.

      Returns:
          True if more iterations are needed.
      """
```

The docstring was written in #2946 when the signature of tick was
```python
    def tick(
        self,
        *,
        input_keys: Union[str, Sequence[str]],
    ) -> bool:
```
but  it was simplified to 
```python
def tick(self) -> bool:
```
in #5080
2025-11-07 07:38:16 -05:00
Josh RogersandGitHub 9fd3dfc542 chore(checkpoint-postgres): bump to 3.0.1 (#6402)
**Description:** Bumping the checkpoint-postgres package to version
3.0.1 to release an update to migrations
(https://github.com/langchain-ai/langgraph/pull/6400).
**Issue:** N/A
**Dependencies:** N/A
**Twitter handle:** N/A
2025-11-06 11:14:02 -05:00
Josh RogersandGitHub ff38f75594 fix(checkpoint-postgres): make async PG checkpoint migration idempotent (#6400)
- **Description:** The final migration for the postgres checkpointer is
not currently idempotent. That presents problems when migrating from one
checkpointer to another or if migrations otherwise get applied twice.
This makes the final migration idempotent to avoid this problem.
- **Issue:** N/A
- **Dependencies:** N/A
- **Twitter handle:** N/A
2025-11-06 09:49:51 -05:00
Kathryn MayandGitHub bbdd007341 chore(docs): Update redirects for langgraph server to agent server rename (#6399)
Renaming LangGraph Server to Agent Server, this updates the redirects
from the old site to the new site's renamed files.
PR also includes some hosting --> platform setup redirects
2025-11-05 11:21:09 -05:00
Caspar BroekhuizenandGitHub 3c75e414e5 fix(langgraph): do not apply pending writes when updating state (#6389)
PR #6195 fixed `bulk_update_state` to populate `task.result` by calling
`prepare_next_tasks` to discover task IDs. Before #6195,
prepare_next_tasks was gated by the condition `CONFIG_KEY_CHECKPOINT_ID
not in config[CONF]` - so it only ran if we were resuming from an empty
checkpoint. This check was removed in order to properly populate task
results. However, the removal of this check inadvertently applied
pending writes during manual state updates which caused issues when
forking:

- When you fork from a checkpoint by calling `update_state(config,
new_values, as_node="mynode")`, pending writes from the original
execution were being applied
- This caused stale data to leak into forked threads (eg. old tool call
results appearing in forked execution)

Changes

Removed pending writes application from `bulk_update_state` and
`abulk_update_state`:
- Still call `prepare_next_tasks` to discover task IDs, but skip the
code that applies null writes and regular pending writes

Tests

- Added `test_fork_does_not_apply_pending_writes` for sync and async
which verifies forking doesn't include stale pending writes from
original execution
2025-11-04 14:38:40 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
575401c78c chore(deps): bump hono from 4.9.7 to 4.10.3 in /docs/_scripts/js_translation/codeblocks (#6339)
Bumps [hono](https://github.com/honojs/hono) from 4.9.7 to 4.10.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/honojs/hono/releases">hono's
releases</a>.</em></p>
<blockquote>
<h2>v4.10.3</h2>
<h2>Securiy Fix</h2>
<p>A security issue in the CORS middleware has been fixed. In some
cases, a request header could affect the Vary response header. Please
update to the latest version if you are using the CORS middleware.</p>
<h2>What's Changed</h2>
<ul>
<li>fix(aws-lambda): serve microsoft office files as binary in lambda
handler by <a
href="https://github.com/matthiasfeist"><code>@​matthiasfeist</code></a>
in <a
href="https://redirect.github.com/honojs/hono/pull/4469">honojs/hono#4469</a></li>
<li>fix(request-id): validation accepts <code>=</code> by <a
href="https://github.com/ryuapp"><code>@​ryuapp</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4478">honojs/hono#4478</a></li>
<li>refactor(jwt): reduce the size of the code generated by minification
by <a href="https://github.com/usualoma"><code>@​usualoma</code></a> in
<a
href="https://redirect.github.com/honojs/hono/pull/4480">honojs/hono#4480</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/matthiasfeist"><code>@​matthiasfeist</code></a>
made their first contribution in <a
href="https://redirect.github.com/honojs/hono/pull/4469">honojs/hono#4469</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/honojs/hono/compare/v4.10.2...v4.10.3">https://github.com/honojs/hono/compare/v4.10.2...v4.10.3</a></p>
<h2>v4.10.2</h2>
<h2>Security hardening improvement</h2>
<p>If you are using JWT middleware, please read the following and
consider applying the configuration.</p>
<h3>Improper Authorization in Hono (JWT Audience Validation)</h3>
<p>Hono’s JWT authentication middleware did not validate the aud
(Audience) claim by default. As a result, applications using the
middleware without an explicit audience check could accept tokens
intended for other audiences, leading to potential cross-service access
(token mix-up).</p>
<p>The issue is addressed by adding a new <code>verification.aud</code>
configuration option to allow RFC 7519–compliant audience validation.
This change is classified as a security hardening improvement, but the
lack of validation can still be considered a vulnerability in
deployments that rely on default JWT verification.</p>
<h3>Recommended secure configuration</h3>
<p>You can enable RFC 7519–compliant audience validation using the new
<code>verification.aud</code> option:</p>
<pre lang="ts"><code>import { Hono } from 'hono'
import { jwt } from 'hono/jwt'
<p>const app = new Hono()</p>
<p>app.use(<br />
'/api/*',<br />
jwt({<br />
secret: 'my-secret',<br />
verification: {<br />
// Require this API to only accept tokens with aud = 'service-a'<br />
aud: 'service-a',<br />
},<br />
})<br />
)<br />
</code></pre></p>
<h2>What's Changed</h2>
<ul>
<li>tests: Fix test case of handlers without a path by <a
href="https://github.com/IAmSSH"><code>@​IAmSSH</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4472">honojs/hono#4472</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/honojs/hono/commit/fcefd50c65144eda31e2bc6752c81904171d9629"><code>fcefd50</code></a>
4.10.3</li>
<li><a
href="https://github.com/honojs/hono/commit/95ae4d372119cddba32e4935d2bbc6f4e2768dab"><code>95ae4d3</code></a>
refactor(jwt): reduce the size of the code generated by minification (<a
href="https://redirect.github.com/honojs/hono/issues/4480">#4480</a>)</li>
<li><a
href="https://github.com/honojs/hono/commit/d9b8b4b73b4f997994f2764013207365fe711282"><code>d9b8b4b</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/honojs/hono/commit/52161170e83298fc3d13312bfceba3992916bfa2"><code>5216117</code></a>
fix(request-id): validation accepts <code>=</code> (<a
href="https://redirect.github.com/honojs/hono/issues/4478">#4478</a>)</li>
<li><a
href="https://github.com/honojs/hono/commit/253ec2857a083595e52a446694923645084e9ecd"><code>253ec28</code></a>
fix(aws-lambda): serve microsoft office files as binary in lambda
handler (<a
href="https://redirect.github.com/honojs/hono/issues/4">#4</a>...</li>
<li><a
href="https://github.com/honojs/hono/commit/0c6455dc10db6428257bdd601eca559247e27de6"><code>0c6455d</code></a>
4.10.2</li>
<li><a
href="https://github.com/honojs/hono/commit/45ba3bf9e3dff8e4bd85d6b47d4b71c8d6c66bef"><code>45ba3bf</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/honojs/hono/commit/4cbad8b3e2a67d77849710ec400d9de020c435fd"><code>4cbad8b</code></a>
tests: Fix test case of handlers without a path (<a
href="https://redirect.github.com/honojs/hono/issues/4472">#4472</a>)</li>
<li><a
href="https://github.com/honojs/hono/commit/db764c2f1d8a2905d66c78c41aa47e47d3a4165d"><code>db764c2</code></a>
4.10.1</li>
<li><a
href="https://github.com/honojs/hono/commit/8774bf9a59278a9593d5e91cc85543d5a4bb518c"><code>8774bf9</code></a>
fix(types): cannot <code>.use</code> non-return mw from
<code>createMiddleware</code> (<a
href="https://redirect.github.com/honojs/hono/issues/4465">#4465</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/honojs/hono/compare/v4.9.7...v4.10.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hono&package-manager=npm_and_yarn&previous-version=4.9.7&new-version=4.10.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-04 13:52:15 -08:00
William FHandGitHub 092c9ecde6 chore: update ormsgpack minbound and add OPT_REPLACE_SURROGATES (#6395)
This lets the default `msgpack` serialization mode handle more cases
where user data contains invalid unicode.
2025-11-04 13:51:34 -08:00
William FHandGitHub 8336686e89 release(cli): 0.4.7 expand api bounds (#6390)
Fixes #6380
2025-11-03 23:47:05 +00:00
Parker J. RuleandGitHub 8b080a091e fix(checkpoint): update checkpoint interface specification in README (#6386)
This syncs the checkpoint interface specification with the base class
(`BaseCheckpointSaver`) in
`langgraph/libs/checkpoint/langgraph/checkpoint/base /__init__.py`.
2025-11-03 21:44:41 +00:00
Asamu DavidandGitHub 1157ec77b4 fix(cli): add buildkit syntax directiive, update tests (#6385)
**Description:** Adds the syntax directive to generated dockerfile for
langgraph builds if we have additional contexts
**Issue:** fixes issue with python monorepo builds failing
**Dependencies:** N/A
2025-11-03 18:13:19 +00:00
William FHandGitHub a10a66cbd1 chore: Update cli config schema (#6372) 2025-11-01 09:50:46 -07:00
Kathryn MayandGitHub ae525fb74f docs: Update hosting page name redirect to platform setup (#6371) 2025-10-31 14:12:59 -04:00
Mason DaughertyandGitHub a6dde39be7 chore: style fixes for refs (#6365) 2025-10-30 17:59:40 -04:00
Sydney RunkleandGitHub c1661dd07f chore: bump prebuilt dep for lg (#6361) 2025-10-29 18:34:28 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2d848ffddd chore(deps): bump actions/upload-artifact from 4 to 5 (#6347)
Bumps
[actions/upload-artifact](https://github.com/actions/upload-artifact)
from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/upload-artifact/releases">actions/upload-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h2>What's Changed</h2>
<p><strong>BREAKING CHANGE:</strong> this update supports Node
<code>v24.x</code>. This is not a breaking change per-se but we're
treating it as such.</p>
<ul>
<li>Update README.md by <a
href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/681">actions/upload-artifact#681</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/712">actions/upload-artifact#712</a></li>
<li>Readme: spell out the first use of GHES by <a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a> in
<a
href="https://redirect.github.com/actions/upload-artifact/pull/727">actions/upload-artifact#727</a></li>
<li>Update GHES guidance to include reference to Node 20 version by <a
href="https://github.com/patrikpolyak"><code>@​patrikpolyak</code></a>
in <a
href="https://redirect.github.com/actions/upload-artifact/pull/725">actions/upload-artifact#725</a></li>
<li>Bump <code>@actions/artifact</code> to <code>v4.0.0</code></li>
<li>Prepare <code>v5.0.0</code> by <a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a> in
<a
href="https://redirect.github.com/actions/upload-artifact/pull/734">actions/upload-artifact#734</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/681">actions/upload-artifact#681</a></li>
<li><a href="https://github.com/nebuk89"><code>@​nebuk89</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/712">actions/upload-artifact#712</a></li>
<li><a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/727">actions/upload-artifact#727</a></li>
<li><a
href="https://github.com/patrikpolyak"><code>@​patrikpolyak</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/725">actions/upload-artifact#725</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v4...v5.0.0">https://github.com/actions/upload-artifact/compare/v4...v5.0.0</a></p>
<h2>v4.6.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Update to use artifact 2.3.2 package &amp; prepare for new
upload-artifact release by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/685">actions/upload-artifact#685</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/685">actions/upload-artifact#685</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v4...v4.6.2">https://github.com/actions/upload-artifact/compare/v4...v4.6.2</a></p>
<h2>v4.6.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Update to use artifact 2.2.2 package by <a
href="https://github.com/yacaovsnc"><code>@​yacaovsnc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/673">actions/upload-artifact#673</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v4...v4.6.1">https://github.com/actions/upload-artifact/compare/v4...v4.6.1</a></p>
<h2>v4.6.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Expose env vars to control concurrency and timeout by <a
href="https://github.com/yacaovsnc"><code>@​yacaovsnc</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/662">actions/upload-artifact#662</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-artifact/compare/v4...v4.6.0">https://github.com/actions/upload-artifact/compare/v4...v4.6.0</a></p>
<h2>v4.5.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: deprecated <code>Node.js</code> version in action by <a
href="https://github.com/hamirmahal"><code>@​hamirmahal</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/578">actions/upload-artifact#578</a></li>
<li>Add new <code>artifact-digest</code> output by <a
href="https://github.com/bdehamer"><code>@​bdehamer</code></a> in <a
href="https://redirect.github.com/actions/upload-artifact/pull/656">actions/upload-artifact#656</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/hamirmahal"><code>@​hamirmahal</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/upload-artifact/pull/578">actions/upload-artifact#578</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/upload-artifact/commit/330a01c490aca151604b8cf639adc76d48f6c5d4"><code>330a01c</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/734">#734</a>
from actions/danwkennedy/prepare-5.0.0</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/03f282445299bbefc96171af272a984663b63a26"><code>03f2824</code></a>
Update <code>github.dep.yml</code></li>
<li><a
href="https://github.com/actions/upload-artifact/commit/905a1ecb5915b264cbc519e4eb415b5d82916018"><code>905a1ec</code></a>
Prepare <code>v5.0.0</code></li>
<li><a
href="https://github.com/actions/upload-artifact/commit/2d9f9cdfa99fedaddba68e9b5b5c281eca26cc63"><code>2d9f9cd</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/725">#725</a>
from patrikpolyak/patch-1</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/9687587dec67f2a8bc69104e183d311c42af6d6f"><code>9687587</code></a>
Merge branch 'main' into patch-1</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/2848b2cda0e5190984587ec6bb1f36730ca78d50"><code>2848b2c</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/727">#727</a>
from danwkennedy/patch-1</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/9b511775fd9ce8c5710b38eea671f856de0e70a7"><code>9b51177</code></a>
Spell out the first use of GHES</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/cd231ca1eda77976a84805c4194a1954f56b0727"><code>cd231ca</code></a>
Update GHES guidance to include reference to Node 20 version</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/de65e23aa2b7e23d713bb51fbfcb6d502f8667d8"><code>de65e23</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-artifact/issues/712">#712</a>
from actions/nebuk89-patch-1</li>
<li><a
href="https://github.com/actions/upload-artifact/commit/8747d8cd7632611ad6060b528f3e0f654c98869c"><code>8747d8c</code></a>
Update README.md</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/upload-artifact/compare/v4...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-artifact&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-29 10:03:28 -07:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4c8d965710 chore(deps): bump actions/download-artifact from 5 to 6 (#6348)
Bumps
[actions/download-artifact](https://github.com/actions/download-artifact)
from 5 to 6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/download-artifact/releases">actions/download-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<h2>What's Changed</h2>
<p><strong>BREAKING CHANGE:</strong> this update supports Node
<code>v24.x</code>. This is not a breaking change per-se but we're
treating it as such.</p>
<ul>
<li>Update README for download-artifact v5 changes by <a
href="https://github.com/yacaovsnc"><code>@​yacaovsnc</code></a> in <a
href="https://redirect.github.com/actions/download-artifact/pull/417">actions/download-artifact#417</a></li>
<li>Update README with artifact extraction details by <a
href="https://github.com/yacaovsnc"><code>@​yacaovsnc</code></a> in <a
href="https://redirect.github.com/actions/download-artifact/pull/424">actions/download-artifact#424</a></li>
<li>Readme: spell out the first use of GHES by <a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a> in
<a
href="https://redirect.github.com/actions/download-artifact/pull/431">actions/download-artifact#431</a></li>
<li>Bump <code>@actions/artifact</code> to <code>v4.0.0</code></li>
<li>Prepare <code>v6.0.0</code> by <a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a> in
<a
href="https://redirect.github.com/actions/download-artifact/pull/438">actions/download-artifact#438</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/danwkennedy"><code>@​danwkennedy</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/download-artifact/pull/431">actions/download-artifact#431</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/download-artifact/compare/v5...v6.0.0">https://github.com/actions/download-artifact/compare/v5...v6.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/download-artifact/commit/018cc2cf5baa6db3ef3c5f8a56943fffe632ef53"><code>018cc2c</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/download-artifact/issues/438">#438</a>
from actions/danwkennedy/prepare-6.0.0</li>
<li><a
href="https://github.com/actions/download-artifact/commit/815651c680ffe1c95719d0ed08aba1a2f9d5c177"><code>815651c</code></a>
Revert &quot;Remove <code>github.dep.yml</code>&quot;</li>
<li><a
href="https://github.com/actions/download-artifact/commit/bb3a066a8babc8ed7b3e4218896c548fe34e7115"><code>bb3a066</code></a>
Remove <code>github.dep.yml</code></li>
<li><a
href="https://github.com/actions/download-artifact/commit/fa1ce46bbd11b8387539af12741055a76dfdf804"><code>fa1ce46</code></a>
Prepare <code>v6.0.0</code></li>
<li><a
href="https://github.com/actions/download-artifact/commit/4a24838f3d5601fd639834081e118c2995d51e1c"><code>4a24838</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/download-artifact/issues/431">#431</a>
from danwkennedy/patch-1</li>
<li><a
href="https://github.com/actions/download-artifact/commit/5e3251c4ff5a32e4cf8dd4adaee0e692365237ae"><code>5e3251c</code></a>
Readme: spell out the first use of GHES</li>
<li><a
href="https://github.com/actions/download-artifact/commit/abefc31eafcfbdf6c5336127c1346fdae79ff41c"><code>abefc31</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/download-artifact/issues/424">#424</a>
from actions/yacaovsnc/update_readme</li>
<li><a
href="https://github.com/actions/download-artifact/commit/ac43a6070aa7db8a41e756e7a2846221edca7027"><code>ac43a60</code></a>
Update README with artifact extraction details</li>
<li><a
href="https://github.com/actions/download-artifact/commit/de96f4613b77ec03b5cf633e7c350c32bd3c5660"><code>de96f46</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/download-artifact/issues/417">#417</a>
from actions/yacaovsnc/update_readme</li>
<li><a
href="https://github.com/actions/download-artifact/commit/7993cb44e9052f2f08f9b828ae5ef3ecca7d2ac7"><code>7993cb4</code></a>
Remove migration guide for artifact download changes</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/download-artifact/compare/v5...v6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/download-artifact&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-29 10:03:18 -07:00
Sydney RunkleandGitHub 4ac1c628ee chore: port tool node improvements back to langgraph (#6321)
namespace decisions

```
langgraph.prebuilt
  ├── ToolRuntime  # new
# all of the other stuff that was already there

langgraph.prebuilt.tool_node
  ├── ToolNode
  ├── ToolCallRequest  # new
  ├── ToolRuntime  # new
  ├── InjectedState
  ├── InjectedStore
  ├── ToolCallWrapper
  ├── AsyncToolCallWrapper
  ├── tools_condition
```
```
langchain.tools
  ├── ToolRuntime  # now from langgraph.prebuilt
  ├── InjectedState  # now from langgraph.prebuilt
  ├── InjectedStore  # now from langgraph.prebuilt
  ├── ToolException
  ├── tool
  ├── BaseTool
  ├── InjectedToolArg
  ├── InjectedToolCallId
```
2025-10-29 09:58:06 -07:00
Sydney RunkleandGitHub 41f8e61589 chore: bump core dep for prebuilt (#6323)
bumping core dependency for `langgraph-prebuilt` to `>1.0.0` so that we
can take advantage of internal utils that allow `ToolRuntime` injection.

We were previously bumping the version in lock step with prebuilt (prev
version was 0.3.67), so this pattern is in line with that.

Also updating snapshots accordingly:
* New mermaid syntax for a few graphs
* Removal of `examples` from `AIMessage`
2025-10-29 09:51:51 -07:00
Lauren Hirata SinghandGitHub 57a877279d chore(docs): Revert the revert "fix: rollback doc redirects" (add redirects) (#6353)
Reverts langchain-ai/langgraph#6301

This adds redirects back
2025-10-29 12:12:06 -04:00
Caspar BroekhuizenandGitHub d6dea53323 fix(langgraph): dont persist UntrackedValue (#6316)
UntrackedValue is a special channel type where the values in it are not
persisted to memory. Our v1 create_agent middleware used UntrackedValue
in middleware (e.g. ShellToolMiddleware) for some cool features like
temp files.

If a user has elected to use a checkpointer, we normally enforce that
the values they write to channels are serializable. However, this
doesn't make sense to enforce for UntrackedValues because the contract
is they're never written to checkpoint - so the user should not be
forced to make the contents of the channel serializable

However when using a checkpointer and durability sync/async, we found
that writes would still be persisted that contained UntrackedValue
contents in two forms:
a) UntrackedValue channel objects 
b) Send objects - in the state passed to another node

Patched this in put_writes by a) skipping persisting writes to
UntrackedValue channels altogether and b) popping all UntrackedValue kv
pairs nested within Send packets. We also need to sanitize in
_put_checkpoint which is called when durability=="exit".

Added a basic test for UntrackedValue in test_channel.py and added more
comprehensive tests using Send under some different scenarios in
test_pregel.py
2025-10-28 16:40:22 -07:00
Caspar BroekhuizenandGitHub 504e91ad5a feat(langgraph): add Overwrite to bypass reducer (#6286)
See https://github.com/langchain-ai/langgraph/pull/6277

Adds langgraph.types.Overwrite, a deterministic way to bypass a reducer.
When encountering a value wrapped with Overwrite,
BinaryOperatorAggregate overwrites the channel value.

<img width="227" height="329" alt="image"
src="https://github.com/user-attachments/assets/f2136117-9aa3-4246-863d-d5df0e7d1df1"
/>

If either node_b or node_c overwrite (but not both), then at END the
channel is equal to the value node_b or node_c wrote. Order of execution
doesn't matter because once an Overwrite value is encountered, regular
values are ignored (self.operator is not called for the rest of the
update)

If multiple nodes overwrite in the same superstep then
InvalidUpdateError is thrown

Usage
```python
from langgraph.types import Overwrite

def node_b(state:State):
    return {"messages": Overwrite(["b"])}
```
or
``` python
def node_b(state:State):
    return {"messages": {"__overwrite__": ["b"]}}
```
2025-10-27 11:31:35 -07:00
Mason DaughertyandGitHub 10abf2deb1 fix: replace python.langchain links with new docs.langchain (#6352) 2025-10-27 13:36:12 -04:00
Parker J. RuleandGitHub 5796ca9a0a fix(sdk-py): refine body param type (Auth.authenticate) (#6322)
Requests are not guaranteed to contain a body, and a request's body is
not guaranteed to be valid JSON. 

This updates the type signature for authentication handlers 
to account for these scenarios.
2025-10-22 17:35:15 +00:00
William FHandGitHub fca3e4513c release: Checkpointers 3.0 (#6313)
In this PR:

- Bump `langgraph-checkpoint` to 3.0
- Bump `langgraph-checkpoint-sqlite` to 3.0; Update
`langgraph-checkpoint` deps to >=3,<4
- Bump `langgraph-checkpoint-postgres` to 3.0; Update
`langgraph-checkpoint` max to <4 (keep prior min since the deprecated
functionality wasn't explicitly used)
- Bump `langgraph` to 1.0.1; update `langgraph-checkpoint` max bound to
4
- Bump `prebuilt` to 1.0.1; update `langgraph-checkpoint` max bound to 4
2025-10-20 11:31:55 -07:00
c5744f583b chore: Restrict "json" type deserialization (#6269)
- Rm untyped loads/dumps
- Restrict to an allow list

---------

Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>
2025-10-20 10:18:36 -07:00
Hunter LovellandGitHub d298b489b4 fix: rollback doc redirects (#6301) 2025-10-17 16:54:42 -04:00
Sydney RunkleandGitHub c4144bb48f release: langgraph + langgraph-prebuilt v1.0.0 (#6300) 2025-10-17 19:15:29 +00:00
Sydney RunkleandGitHub 2c3e380a35 feat: adding cursory Python 3.14 support (#6298)
* catching error thrown by asyncio
* using 2nd check for annotations given Pydantic 2.12 changes
* skipping tests for remote graph bc langgraph-api is dependent on
`jsonschema-rs`
* skipping tests w/ pydantic v1 models

```bash
hint: This usually indicates a problem with the package or the build environment.
  help: `jsonschema-rs` (v0.29.1) was included because `langgraph:dev` (v1.0.0rc1) depends on `langgraph-cli[inmem]` which
        depends on `langgraph-api` (v0.4.29) which depends on `jsonschema-rs`
```

not yet testing for free threaded python, that'll be much more involved!

ended up separating lint / testing deps during this process bc I was
getting a ton of not required deps while testing that were complicating
things :/
2025-10-17 08:26:52 -04:00
Lauren Hirata SinghandGitHub cf39fa5a91 fix(docs): fix catchall redirect (#6299) 2025-10-17 07:27:41 -04:00
Mason DaughertyandGitHub 7e666b58cd style: fixes for ref docs (#6297) 2025-10-16 20:58:16 -04:00
Asamu DavidandGitHub 3f400b38d1 fix(cli): install local deps in editable mode (#6294)
**Description** 

As part of this PR #6156, local deps are no longer installed in editable
mode. This change reverts that behaviour and ensures local packages are
installed in editable mode.

**Issue:** fixes #6288
2025-10-17 01:42:11 +01:00
Sydney RunkleandGitHub 6527df688c chore: release rcs for prebuilt + langgraph (#6296) 2025-10-17 00:35:56 +00:00
Sydney RunkleandGitHub aec841bd2a chore(prebuilt): un-deprecate tool node for now (#6295) 2025-10-16 20:27:24 -04:00
Sydney RunkleandGitHub 2d3121a17c chore: drop Python 3.9 (and syntax) (#6289)
* `strict=False` is the default, pyupgrade to min version 3.10 adds this
to be explicit w/ behavior
2025-10-16 20:17:46 -04:00
Lauren Hirata SinghandGitHub 06f9142419 chore(docs): Fix redirects (#6292) 2025-10-16 14:01:54 -04:00
Lauren Hirata SinghandGitHub a926450601 docs: Redirects for new docs (#5824)
This adds redirects to new Mintlify site and should be merged when old
LangGraph docs are deprecated (for v1)
2025-10-16 12:55:30 -04:00
abb96c0e2f chore(cli): re-word schema arguments (#6243)
Clean up config docstrings

---------

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-10-16 12:28:09 +00:00
d9e3d83894 docs: style linting (#6260)
also fixes some links

---------

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
Co-authored-by: ccurme <chester.curme@gmail.com>
Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-10-16 11:25:50 +00:00
cedecd8ed6 chore(docs): Update OpenAPI spec from LangGraph API v0.4.42 (#6287)
This PR updates the OpenAPI specification with changes detected from the
LangGraph API server.

**Changes detected as of LangGraph API version 0.4.42**

This update was automatically generated by the sync workflow in the
langgraph-api repository.

Co-authored-by: hinthornw <hinthornw@users.noreply.github.com>
2025-10-16 07:15:51 -04:00
6bf9a7a4bc docs: relocate init args to __init__ (#6259)
Griffe expects parameter documentation to be in the method where
parameters are defined, not in the class docstring.

Class docstrings describe what the class does, while `__init__`
docstrings describe how to instantiate it with specific parameters.

---------

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
Co-authored-by: ccurme <chester.curme@gmail.com>
Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-10-16 07:11:42 -04:00
bce1dcfcd2 release(langgraph): v1 working branch (#6093)
Diff viewer for langgraph v1 alpha releases

---------

Co-authored-by: ccurme <chester.curme@gmail.com>
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
Co-authored-by: Mason Daugherty <github@mdrxy.com>
Co-authored-by: Mason Daugherty <mason@langchain.dev>
2025-10-16 07:11:22 -04:00
Sam CrowderandGitHub 9b46cba1fb fix: rename away from LangGraph Platform (#6281)
some of these changes were obvious, and some were less obvious. In a few
spots, it felt like a judgement call if we should be saying LangSmith
Deployment of LangGraph Server. But hopefully either works.
2025-10-15 11:27:15 -07:00
Kathryn MayandGitHub a6dab889d1 docs: Update lgp home redirect to deployments (#6283) 2025-10-15 10:47:28 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Eugene Yurtsev
7c6dbb3972 chore(deps): bump astral-sh/setup-uv from 6 to 7 (#6273)
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 6
to 7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/setup-uv/releases">astral-sh/setup-uv's
releases</a>.</em></p>
<blockquote>
<h2>v7.0.0 🌈 node24 and a lot of bugfixes</h2>
<h2>Changes</h2>
<p>This release comes with a load of bug fixes and a speed up. Because
of switching from node20 to node24 it is also a breaking change. If you
are running on GitHub hosted runners this will just work, if you are
using self-hosted runners make sure, that your runners are up to date.
If you followed the normal installation instructions your self-hosted
runner will keep itself updated.</p>
<p>This release also removes the deprecated input
<code>server-url</code> which was used to download uv releases from a
different server.
The <a
href="https://github.com/astral-sh/setup-uv?tab=readme-ov-file#manifest-file">manifest-file</a>
input supersedes that functionality by adding a flexible way to define
available versions and where they should be downloaded from.</p>
<h3>Fixes</h3>
<ul>
<li>The action now respects when the environment variable
<code>UV_CACHE_DIR</code> is already set and does not overwrite it. It
now also finds <a
href="https://docs.astral.sh/uv/reference/settings/#cache-dir">cache-dir</a>
settings in config files if you set them.</li>
<li>Some users encountered problems that <a
href="https://github.com/astral-sh/setup-uv?tab=readme-ov-file#disable-cache-pruning">cache
pruning</a> took forever because they had some <code>uv</code> processes
running in the background. Starting with uv version <code>0.8.24</code>
this action uses <code>uv cache prune --ci --force</code> to ignore the
running processes</li>
<li>If you just want to install uv but not have it available in path,
this action now respects <code>UV_NO_MODIFY_PATH</code></li>
<li>Some other actions also set the env var <code>UV_CACHE_DIR</code>.
This action can now deal with that but as this could lead to unwanted
behavior in some edgecases a warning is now displayed.</li>
</ul>
<h3>Improvements</h3>
<p>If you are using minimum version specifiers for the version of uv to
install for example</p>
<pre lang="toml"><code>[tool.uv]
required-version = &quot;&gt;=0.8.17&quot;
</code></pre>
<p>This action now detects that and directly uses the latest version.
Previously it would download all available releases from the uv repo
to determine the highest matching candidate for the version specifier,
which took much more time.</p>
<p>If you are using other specifiers like <code>0.8.x</code> this action
still needs to download all available releases because the specifier
defines an upper bound (not 0.9.0 or later) and &quot;latest&quot; would
possibly not satisfy that.</p>
<h2>🚨 Breaking changes</h2>
<ul>
<li>Use node24 instead of node20 <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/608">#608</a>)</li>
<li>Remove deprecated input server-url <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/607">#607</a>)</li>
</ul>
<h2>🐛 Bug fixes</h2>
<ul>
<li>Respect UV_CACHE_DIR and cache-dir <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/612">#612</a>)</li>
<li>Use --force when pruning cache <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/611">#611</a>)</li>
<li>Respect UV_NO_MODIFY_PATH <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/603">#603</a>)</li>
<li>Warn when <code>UV_CACHE_DIR</code> has changed <a
href="https://github.com/jamesbraza"><code>@​jamesbraza</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/601">#601</a>)</li>
</ul>
<h2>🚀 Enhancements</h2>
<ul>
<li>Shortcut to latest version for minimum version specifier <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/598">#598</a>)</li>
</ul>
<h2>🧰 Maintenance</h2>
<ul>
<li>Bump dependencies <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/613">#613</a>)</li>
<li>Fix test-uv-no-modify-path <a
href="https://github.com/eifinger"><code>@​eifinger</code></a> (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/604">#604</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/3259c6206f993105e3a61b142c2d97bf4b9ef83d"><code>3259c62</code></a>
Bump deps (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/633">#633</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/bf8e8ed895b7f686f85839659243f31a7df4a977"><code>bf8e8ed</code></a>
Split up documentation (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/632">#632</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/9c6b5e9fb575cac8e82bb437dd7fc25a094bd85d"><code>9c6b5e9</code></a>
Add resolution-strategy input to support oldest compatible version
selection ...</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/a5129e99f44f5d2ba22cdc54770745bd6f0d9c33"><code>a5129e9</code></a>
Add copilot-instructions.md (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/630">#630</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/d18bcc753ac29c1ed721aa4a812a90eb937852d6"><code>d18bcc7</code></a>
Add value of UV_PYTHON_INSTALL_DIR to path (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/628">#628</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/bd1f875aba1ebb6d38211b773b094ad1dcca58df"><code>bd1f875</code></a>
Set output venv when activate-environment is used (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/627">#627</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/1a91c3851df47749b241e3c5c696350957c93ff0"><code>1a91c38</code></a>
chore: update known checksums for 0.9.2 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/626">#626</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/c79f606987cb4a0f3d1a95a3e44bcebfb0a9b303"><code>c79f606</code></a>
chore: update known checksums for 0.9.1 (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/625">#625</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/e0249f159931b41f44fc8208c9b4cff085288cc9"><code>e0249f1</code></a>
Fall back to PR for updating known versions (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/623">#623</a>)</li>
<li><a
href="https://github.com/astral-sh/setup-uv/commit/6d2eb15b4979924f7be71aa06908c6211f80ac88"><code>6d2eb15</code></a>
Cache python installs (<a
href="https://redirect.github.com/astral-sh/setup-uv/issues/621">#621</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/setup-uv/compare/v6...v7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=astral-sh/setup-uv&package-manager=github_actions&previous-version=6&new-version=7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-10-14 10:55:27 -04:00
Kathryn MayandGitHub e08b8352a8 docs: Update old LDP site redirects to Platform docs merge (#6242)
This PR updates the redirects from the old LGP site to the new address
on the Mintlify site for the platform merge.
2025-10-14 10:23:19 -04:00
Sam CrowderandGitHub f7fe7c6698 fix: Revert "fix(cli): rename studio to debugger (#6246)" (#6261) 2025-10-09 23:35:36 +00:00
Caspar BroekhuizenandGitHub c2bc6ab8e9 chore(langgraph): bump langgraph version (#6257)
- Bump langgraph version to 0.6.10
2025-10-09 09:39:42 -07:00
Caspar BroekhuizenandGitHub 420550501f fix(langgraph): revert selective interrupt task scheduling (#6252)
Reverts langchain-ai/langgraph#6158
2025-10-08 12:34:01 -07:00
Sam CrowderandGitHub a0599139b8 fix(cli): rename studio to debugger (#6246)
begin process of renaming Studio to Debugger

keep --studio-url around for now as an option as well
2025-10-08 09:40:26 -07:00
Parker J. RuleandGitHub c2f359f708 chore(cli): bump to 0.4.3 (#6251)
Releases #6193 (and a few other minor changes).
2025-10-08 15:31:54 +00:00
Caspar BroekhuizenandGitHub 7f78a011fd chore(langgraph): bump version (#6245)
- Bump langgraph version from 0.6.8 to 0.6.9
2025-10-07 13:45:25 -07:00
Caspar BroekhuizenandGitHub 7d166bfb9f chore(checkpoint): bump patch version (#6244)
- Bump `langgraph-checkpoint` to 2.1.2
- Bump `langgraph-checkpoint-postgres` to 2.0.25 and raise
`langgraph-checkpoint` dep lower bound to 2.1.2
2025-10-07 10:41:24 -07:00
6cc8899818 fix(langgraph): selective interrupt task scheduling (#6158)
### Description

Prevents interrupt tasks from executing when the resume value has not
yet been specified.

Implemented for sync and async Pregel loop

If a task execution is skipped, the skipped interrupt is still included
in the graph result for consistency:
``` python
result = graph.invoke(...)
interrupts = result.get("__interrupt__", [])   # [interrupt_1, interrupt_2]

partial_result = graph.invoke(Command(resume=interrupt_1_resume_map), ...)
remaining_interrupts = partial_result.get("__interrupt__", [])  # [interrupt_2]
```

### Tests

- `test_interrupt_with_send_payloads`: test for a single resume map that
resumes all interrupts at once
- `test_interrupt_with_send_payloads_sequential_resume`: test for two
resume maps delivered in sequence
- `test_node_with_multiple_interrupts_requires_full_resume` test
optimization for multiple interrupts within a single node

Solves https://github.com/langchain-ai/langgraph/issues/6208

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-10-06 13:11:52 -07:00
1ba96f49bf fix(checkpoint): handle metadata.writes when serializing old checkpoints with Jsonb (#6236)
Issue

Support for `Checkpoint.metadata.writes` was dropped in `langgraph`
v0.5.x.

In `langgraph-checkpoint-postgres` v2.0.23, metadata was serialized with
`BasePostgresSaver._dump_metadata` -> `JsonPlusSerializer.dumps` which
handles `pydantic.BaseModel`.

In v2.0.23, metadata is serialized with `psycopg.types.json.Jsonb`,
which raises `TypeError: Object of type AIMessage is not JSON
serializable` when trying to serialize `writes`.

Solution

- Add `BaseCheckpointSaver.get_serializable_checkpoint_metadata` which
pops the `writes` key.
- Log deprecation warning when strange version combinations are used 

Solves https://github.com/langchain-ai/langgraph/issues/5769

---------

Co-authored-by: Alex Kondratev <56111142+soapun@users.noreply.github.com>
2025-10-06 11:27:34 -07:00
Caspar BroekhuizenandGitHub b0958115c1 fix(langgraph): task result from stream mode debug / tasks should match format from get_state_history / get_state (#6233)
Overview

Python port of https://github.com/langchain-ai/langgraphjs/pull/1551

Introduces `map_task_result_writes` to standardize task result format
across `get_state_history` and `map_task_result_writes` response
structures.

Solves https://github.com/langchain-ai/langgraph/issues/6073
2025-10-03 09:06:58 -07:00
Mason DaughertyandGitHub 04fb14d3ae fix(langgraph): don't use rst code blocks in docstrings (#6231) 2025-10-01 00:08:07 +00:00
Mason DaughertyandGitHub efb0e8c176 docs(langgraph): standardize version-added admonitions (#6230) 2025-09-30 18:39:12 -04:00
Caspar BroekhuizenandGitHub 0584eaa5c4 fix(langgraph): fix supersteps not populating task.result field (#6195)
### Description

Fix `bulk_update_state` and `abulk_update_state` so history populates
`tasks[*].result` when creating state via supersteps.

There was a branch in these functions that I'm guessing was meant to be
triggered when a `StateUpdate.as_node` was the name of a real node (not
`"__input__"` or `"__copy__"`), but was never being triggered because of
a condition `CONFIG_KEY_CHECKPOINT_ID not in config[CONF]`:
```python
# apply pending writes, if not on specific checkpoint
if (
    CONFIG_KEY_CHECKPOINT_ID not in config[CONF]
    and saved is not None
    and saved.pending_writes
):
    next_tasks = prepare_next_tasks(...)
```

From what I can tell, in the bulk-update flow every superstep carries a
`checkpoint_id`, so the condition was always false. That skipped
`prepare_next_tasks(...)` and prevented us from discovering the task IDs
that we would need to attach the task result. So, I removed this check.

I also replaced the `pending_writes` check with a more lenient one (just
check it is not None to satisfy type checkers). I found that
`saved.pending_writes` was sometimes just `[]`, and in this case we
would skip `prepare_next_tasks(...)` and never attach the task result.

Now for each task discovered in `prepare_next_tasks(...)`, I collect the
task IDs and reuse them when running all writers of the chosen node
(applying the updates).

### Tests

- `test_supersteps_populate_task_results` for `PregelLoop` and
`AsyncPregelLoop`
 
These tests build a single node graph and compare history from two
threads: one uses `.invoke` and the other is build from supersteps. Both
tests fail on main and pass with this PR.

### Issue

Solves https://github.com/langchain-ai/langgraph/issues/6206
2025-09-30 12:52:59 -07:00
Caspar BroekhuizenandGitHub 0c73af5624 fix(langgraph): revert -- reuse cached writes on nested resume to prevent task re-execution (#6227)
Reverts langchain-ai/langgraph#6161
2025-09-30 11:28:41 -07:00
Isaac FranciscoandGitHub 9d1bb9d86c chore(checkpoint-postgres): bump version (#6222) 2025-09-30 07:41:59 -07:00
Kathryn MayandGitHub 7c69cb54a6 docs: Update redirects for studio obs consolidation (#6220)
Update the redirects from the old docs to page changes in the new docs,
namely consolidating all the observability studio guides onto one page.

Dependent on: https://github.com/langchain-ai/docs/pull/681
2025-09-29 15:18:40 -04:00
Kathryn MayandGitHub c2279cbe6f docs: Update redirects for consolidating studio content (#6219)
Contingent on this PR merging:
https://github.com/langchain-ai/docs/pull/679
2025-09-29 13:02:44 -04:00
Sydney RunkleandGitHub 3a024cff6d release(langgraph): 0.6.8 (#6215) 2025-09-29 09:16:43 +00:00
4a0b2fa0ef chore(deps): upgrade dependencies with uv lock --upgrade (#6211)
This PR updates the dependencies in all Python packages using `uv lock
--upgrade`.

This is an automated PR created by the UV Lock Upgrade workflow.

Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-09-29 09:07:51 +00:00
Sydney RunkleandGitHub 36179ab1d2 fix(langgraph): handle multiple annotations w/ BaseChannel detection (#6210)
This PR ensures that even if a type has multiple annotations, we can
still detect the `BaseChannel` subclasses attached.

```py
class State(TypedDict):
    # recognized as EphemeralValue(int)
    foo: Annotated[int, EphemeralValue]

    # now recognized as EphemeralValue(int)
    bar: Annotated[int, EphemeralValue, OtherMetadata]

    # now recognized as EphemeralValue(int)
    baz: Annotated[int, SomeMetadata, EphemeralValue, OtherMetadata]
```
2025-09-26 17:22:24 -04:00
Parker J. RuleandGitHub 20ddb2b8b4 fix(langgraph): CheckpointTask.state can be a StateSnapshot (#6201)
This adds `StateSnapshot` to the union type annotation of
`CheckpointTask.state`.

The annotation was previously incomplete: `map_debug_checkpoint()`
generates `CheckpointPayload` objects from `PregelTask` objects, and the
`state` field in `PregelTask` is of type `None | RunnableConfig |
StateSnapshot`.
2025-09-25 22:30:19 +00:00
Parker J. RuleandGitHub b0a25f2794 feat(cli): add flag in HttpConfig for auth on custom routes (#6193)
We currently only support auth on the default routes; we'd like to be
able to support it on all (non-meta/liveness probe) routes by default.
This is the first step in that direction.
2025-09-25 17:17:33 -04:00
Parker J. RuleandGitHub ea0aebaa2e chore(sdk-py): refine FilterType, add subset containment to $contains docs (#6200)
The `$contains` auth operator supports subset containment checks, but
this has previously been undocumented. This updates `FilterType` and its
associated docstring to reflect this support.
2025-09-25 15:58:35 -04:00
Mason DaughertyandGitHub 26c68aa528 docs: update README and scripts for improved clarity (#6197) 2025-09-25 17:31:27 +00:00
Mason DaughertyandGitHub 4101aebeea chore(langgraph): clean up ruff format config (#6188)
Each of the settings present are already defaults in the ruff config:

https://docs.astral.sh/ruff/settings/
2025-09-25 17:07:00 +00:00
Mason DaughertyandGitHub 90ac06deb6 style(langgraph): docstring code format pass (#6187) 2025-09-25 13:00:21 -04:00
Isaac FranciscoandGitHub 32d66d48eb chore(sdk-py): type errors nicely (#6173)
This PR types errors in a nicer way
2025-09-24 12:58:38 -04:00
Isaac FranciscoandGitHub d933d455ec fix(cli): change prerelease behavior (#6156)
respect users config, use uv defaults
2025-09-24 09:54:24 -07:00
c421afba65 chore(langgraph): adding author credit for non-ASCII text support (#6186)
Co-authored-by: dcdmm <dcdmm@users.noreply.github.com>
2025-09-24 09:05:11 -04:00
6139dacef9 fix(langgraph): cleanup orphaned waiter task in AsyncPregelLoop (#6167)
### Summary

This PR fixes an issue where `AsyncPregelLoop` could leave behind an
orphaned `stream.wait()` task, resulting in warnings like:

```
Task was destroyed but it is pending!
```

### Related Discussion
This PR is in response to:
[langchain-ai/langgraph#6163](https://github.com/langchain-ai/langgraph/discussions/6163)


### Problem

* In the async path, `get_waiter()` was creating a new `asyncio.Task`
via

  ```python
  aioloop.create_task(stream.wait())
  ```

  but never tracked or cleaned it up.
* On cancellation or shutdown, these tasks remained pending and produced
warnings.

### Solution

* Changed `get_waiter()` to:

  * Maintain a **single waiter task** (similar to the sync path).
  * Auto-clear the reference when the task finishes.
* Added `_cleanup_waiter()`:

* On exit, attempt to wake the waiter (`stream._count.release()` if
available).
* Otherwise, cancel and `await` the pending task to ensure proper
cleanup.
* Wrapped the `while loop.tick():` block in a `try/finally` to guarantee
`_cleanup_waiter()` runs on exit.
* Added missing `import contextlib`.

### Impact

* Prevents orphaned `stream.wait()` tasks.
* Removes noisy `"Task was destroyed but it is pending!"` warnings.
* Behavior of async streaming remains unchanged, only lifecycle
management improved.

### Test Plan

* Reproduced the issue by running async streaming with cancellation.
* Verified warnings no longer appear after the fix.
* Ran existing test suite (all passing).

### Notes

* Sync and Async implementations now follow the same principle: *only
one waiter at a time, always cleaned up on exit*.
* Backwards-compatible; no API changes.


### Repro & Verification

To confirm the issue and the fix I used the following minimal repro
snippet:

```python
# lg_repro.py
import asyncio
import os

# Enable asyncio debug logs to surface pending task warnings
os.environ.setdefault("PYTHONASYNCIODEBUG", "1")

from langgraph.graph import START, END, StateGraph

State = dict

# Slow async node: processes once, then sleeps to keep the waiter alive
async def slow_node(state: State) -> State:
    await asyncio.sleep(0.2)  # simulate work
    state["count"] = state.get("count", 0) + 1
    await asyncio.sleep(1.0)  # keep stream.wait() waiter active
    return state

# Build simple graph: START -> slow_node -> END
builder = StateGraph(State)
builder.add_node("slow", slow_node)
builder.add_edge(START, "slow")
builder.add_edge("slow", END)
graph = builder.compile()

async def run_and_cancel():
    # astream with messages mode triggers internal stream.wait() waiter
    async def consumer():
        async for _ in graph.astream({"msg": "hi"}, stream_mode="messages"):
            await asyncio.sleep(0.05)

    t = asyncio.create_task(consumer(), name="astream-consumer")

    # Allow the stream to start, then cancel the consumer
    await asyncio.sleep(0.1)
    t.cancel()
    try:
        await t
    except asyncio.CancelledError:
        pass

    # Let loop settle to show pending waiter task if not cleaned
    await asyncio.sleep(0.05)

def main():
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    loop.set_debug(True)
    try:
        loop.run_until_complete(run_and_cancel())
    finally:
        # If the internal waiter is not cleaned, closing the loop will warn
        loop.close()

if __name__ == "__main__":
    main()
````

**How to run**

```powershell
# Before (main branch)
git checkout main
pip install -e libs/langgraph
$env:PYTHONASYNCIODEBUG=1; python lg_repro.py

# After (patched branch)
git checkout async-waiter-cleanup
pip install -e libs/langgraph
$env:PYTHONASYNCIODEBUG=1; python lg_repro.py
```

**Observed results**

* **main branch (before fix):**
  Shows warnings like:

  ```
  Task was destroyed but it is pending!
  ... coro=<AsyncQueue.wait() ...>
  created at langgraph/pregel/main.py:2927
  ```
* **patched branch (after fix):**
No warnings. The single waiter is properly cleaned up on exit via
`_cleanup_waiter()` (release semaphore if available, then cancel/await).

---

This confirms that the patch removes the orphaned `stream.wait()` task
and prevents
`"Task was destroyed but it is pending!"` warnings during
cancellation/shutdown.

---------

Co-authored-by: Caspar Broekhuizen <caspar@langchain.dev>
2025-09-23 17:11:17 -07:00
Caspar BroekhuizenandGitHub affaa90d2a fix(langgraph): fix graph rendering for defer=True (#6130)
### Description

Some graphs with `defer=True` nodes rendered incorrectly. E.g.:
* edge C2 -> E1 is missing and edge C2 -> END should not appear in #5772
* edge E3 -> END is missing and edge E -> END should not appear in #5182
* extra edge #5369

Fix:
* Record the destinations declared by get_static_writes for each node.
Build step_sources as a union of the runtime writes and the static
writes (instead of just runtime writes).
* Label deferred nodes with 'deferred'

### https://github.com/langchain-ai/langgraph/issues/5772

'Before' is how they were rendered before this PR

| No defer    | Before (defer `E1`) | After (defer `E1`)
| -------- | ------- | ------- |
| <img height="400" alt="defer_after"
src="https://github.com/user-attachments/assets/0a9fc992-1b6a-4c6d-8752-de54c703c329"
/> | <img height="400" alt="defer_before"
src="https://github.com/user-attachments/assets/825b09fc-3fb8-461a-9928-20c8d9cfc533"
/> | <img height="400" alt="defer_after"
src="https://github.com/user-attachments/assets/ce5334f7-b469-47b0-8f1e-35bda2544a4e"
/> |

Before:
* For deferred joins (NamedBarrierValueAfterFinish), a writer from an
upstream node may not produce a runtime task.writes entry until the
barrier opens. draw_graph() builds edges from task.writes, so one side
of the join (here C2) never gets recorded as a source, and C2 is seen as
a sink, so there is an implicit edge: C2 -> END edge added.

After:
* C2's write to the join channel is recorded even if the barrier hasn’t
opened. When E1 finally schedules, we correctly find both sources B2 and
C2 for the same trigger and emit edges: B2 -> E1 and C2 -> E1.

With C2 -> E1 present, C2 is no longer a terminus, so the unexpected
edge: C2 -> END is not added.

### Other graphs

Graphs for the most part remain unchanged. See: 

### #5182 

| No defer    | Before (defer `d`) | After (defer `d`)
| -------- | ------- | ------- |
| <img height="400" alt="defer_after"
src="https://github.com/user-attachments/assets/3509d25c-f3ad-473c-b877-c155b8008cd5"
/> | <img height="400" alt="defer_before"
src="https://github.com/user-attachments/assets/7af38e77-eb70-414d-b8fe-667da943f9e0"
/> | <img height="400" alt="defer_after"
src="https://github.com/user-attachments/assets/bc87a19f-b4fb-42d3-a6ee-5b0982d9af71"
/> |

### https://github.com/langchain-ai/langgraph/issues/5369

| No defer | Before (defer `595577`, `52642`) | After (defer `595577`,
`52642`)
| -------- | ------- | ------- |
| <img height="400" alt="defer_after"
src="https://github.com/user-attachments/assets/7c0824ce-3921-4dce-bc16-278f64289d28"
/> | <img height="400" alt="defer_before"
src="https://github.com/user-attachments/assets/28661079-7502-4912-874b-c086c0204a87"
/> | <img height="400" alt="defer_after"
src="https://github.com/user-attachments/assets/2a04956a-ed79-40e5-98b8-f6ecb2597a2e"
/> |
2025-09-23 12:47:50 -07:00
shaktiman101GitHubgoogle-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>William FHCaspar Broekhuizen
9f969f5fe1 fix(checkpoint-sqlite): Handle TTL refresh correctly in AsyncSqliteStore.asearch (#5213)
The original implementation for `refresh_on_read=True` in `asearch` for
AsyncSqliteStore used a CTE with an UPDATE statement, which is not
well-supported by SQLite in that specific construction, leading to a
syntax error.

This commit changes the approach:
1. `_prepare_batch_search_queries` in `BaseSqliteStore` no longer
constructs a CTE-based UPDATE. Instead, it returns a flag indicating if
TTL refresh is needed for the searched items.
2. `_batch_search_ops` in both `AsyncSqliteStore` and `SqliteStore` now
check this flag. If true, they perform a separate UPDATE statement after
fetching the search results to refresh the TTL of those items.

Additionally, a new test case `test_async_asearch_refresh_ttl` was added
and existing test logic was refined to accurately verify this behavior.

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
Co-authored-by: Caspar Broekhuizen <caspar@langchain.dev>
2025-09-23 10:25:06 -07:00
Parker J. RuleandGitHub fb531b2473 feat(cli): add configuration for server customization ordering (#6179)
This adds a configuration option in `HttpConfig` that allows LangGraph
Platform users to apply custom authentication hooks before (other)
custom middleware. Currently, the order is fixed (custom middleware is
always evaluated before custom auth).

(Apologies for the noise in
[de187a9](https://github.com/langchain-ai/langgraph/pull/6179/commits/de187a989e807c5687c22db1fc065d24030fa6b7),
apparently from the forced application of new linter rules.)
2025-09-22 11:17:24 -04:00
fe4029b3b8 chore(deps): upgrade dependencies with uv lock --upgrade (#6176)
This PR updates the dependencies in all Python packages using `uv lock
--upgrade`.

This is an automated PR created by the UV Lock Upgrade workflow.

Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-09-22 10:21:40 -04:00
Nuno CamposandGitHub 7cd9a8e5dd sdk-py 0.2.9 2025-09-20 19:47:04 +01:00
Nuno CamposandGitHub 5ba02d5b46 feat: sdk-py: Reconnect to long-lived responses on wait/join/cancel endpoints (#6168)
- When connection is dropped while waiting, reconnect up to 5 times if a
Location header is present
2025-09-20 19:44:07 +01:00
Caspar BroekhuizenandGitHub 11834512db test(cli): add tests for util.py (#6172)
### Description

Added unit tests for util.py.

Authored by @oumizx. Had to copy #6113 into this separate PR because
langgraph/libs/cli was having issues with secrets.
2025-09-19 17:17:05 -07:00
eeb731c07e test: Add tests for before and limit parameters for list SqliteSaver (#5816)
**Description:** 

Add test for before and limit parameters for the list in SqliteSaver
which was marked as TODO.

---------

Co-authored-by: Caspar Broekhuizen <caspar@langchain.dev>
2025-09-19 16:53:30 -07:00
f0fced262a fix(langgraph): fix PostgresSaver crashing when loading older checkpoints (#6162)
### Description

https://github.com/langchain-ai/langgraph/issues/6137 and
https://github.com/langchain-ai/langgraph/issues/5677 reported issues
where older checkpoints read by AsyncPostgresSaver/PostgresSaver from
`langgraph-checkpoint-postgres==2.0.19` fail to read channel values,
throwing `NoneType object is not a mapping`. This was due to a bug in
how `channel_values` is assembled:
```python
"channel_values": {
    **value["checkpoint"].get("channel_values"),  # <--- if channel_values doesn't exist (old checkpoint), **None errors
    **self._load_blobs(value["channel_values"]),
},
```
This bug was observed for checkpoints generated by
`langgraph-checkpoint-postgres<=2.0.19`.

Fixed by providing a fallback to
`value["checkpoint"].get("channel_values")`:
```python
**value["checkpoint"],
"channel_values": {
    **(
        value["checkpoint"].get("channel_values") or {}
    ),  # 'or {}' needed for backwards compat with v3 checkpoints and below, as v4 introduced channel_values key
    **self._load_blobs(value["channel_values"]),
},
```

### Tests
Added test for AsyncPostgresSaver and test for PostgresSaver, using
monkeypatch to remove `channel_values` before CheckpointTuple is
assembled in `_load_checkpoint_tuple`.

### Solves
https://github.com/langchain-ai/langgraph/issues/6137 and
https://github.com/langchain-ai/langgraph/issues/5677

---------

Co-authored-by: Shahrukh Shaik <144558473+shahrukh-shaik@users.noreply.github.com>
2025-09-17 17:50:39 -07:00
8dc4465d05 fix(langgraph): reuse cached writes on nested resume to prevent task re-execution (#6161)
**Description**: fix #6050. 

Root cause: In nested graphs, the first tick after resume often included
a checkpoint_id, which set skip_done_tasks=False. This skipped matching
pending writes and re-executed already-completed helper @task on
subsequent resumes.

Change: Initialize skip_done_tasks=True when resuming inside a nested
graph. Use original config[CONF] for checkpoint_id presence, and
self.config[CONF] for resuming (current loop state). Added a concise
comment clarifying the different config sources.

**Issue**: #6050 

**Tests**: 
Add regression test `test_nested_graph_resume_reuses_cached_task_writes`

---------

Signed-off-by: jitokim <pigberger70@gmail.com>
Co-authored-by: Caspar Broekhuizen <casparbroekhuizen@gmail.com>
2025-09-17 12:35:07 -07:00
Nuno CamposandGitHub d0a3eaf601 sdk-py 0.2.8 2025-09-17 18:23:53 +01:00
Nuno CamposandGitHub 6f45f13952 fix: Handle SSE stream reconnection in Python SDK (#6159)
## Summary
- add a public accessor for the last received SSE event id
- retry async and sync SSE streams using the Location reconnect path and
Last-Event-ID while skipping empty events
- add regression tests that simulate interrupted SSE streams for both
async and sync clients

## Testing
- make format
- make lint
- make test

------
https://chatgpt.com/codex/tasks/task_e_68ca8bfa26cc832d98bcb359884962ec
2025-09-17 13:21:35 -04:00
Isaac FranciscoandGitHub 328129e5bd chore(sdk-py): allow UUIDs in config (#6151) 2025-09-17 09:57:47 -04:00
Caspar BroekhuizenandGitHub 2d05a17dfb fix(checkpoint): use tolerant float comparison to fix test failing on x86_64 architecture (#6157)
### Description

`test_embed_with_path` was failing on x86_64 architecture due to numeric
precision differences. `pytest.approx` was already used later on in this
test for float comparison, so this PR just updates a missed assertion.

Fixes https://github.com/langchain-ai/langgraph/issues/5845
2025-09-16 16:42:20 -07:00
Nuno Campos 5a36229e38 sdk-py 0.2.7 2025-09-16 16:29:27 +01:00
Nuno CamposandGitHub eeadeb282e fix: Ensure SSE streams flush trailing events (#6155)
## Summary
- ensure both async and sync HTTP clients flush the SSE decoder after
streaming
- add regression tests covering trailing SSE events without a
terminating blank line

## Testing
- make format
- make lint
- make test

------
https://chatgpt.com/codex/tasks/task_e_68c9727ca9f8832d9f207323c5e02a72
2025-09-16 16:25:47 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3a22aa0af3 chore(deps): bump actions/github-script from 7 to 8 (#6150)
Bumps [actions/github-script](https://github.com/actions/github-script)
from 7 to 8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/github-script/releases">actions/github-script's
releases</a>.</em></p>
<blockquote>
<h2>v8.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update Node.js version support to 24.x by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/637">actions/github-script#637</a></li>
<li>README for updating actions/github-script from v7 to v8 by <a
href="https://github.com/sneha-krip"><code>@​sneha-krip</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/653">actions/github-script#653</a></li>
</ul>
<h2>⚠️ Minimum Compatible Runner Version</h2>
<p><strong>v2.327.1</strong><br />
<a
href="https://github.com/actions/runner/releases/tag/v2.327.1">Release
Notes</a></p>
<p>Make sure your runner is updated to this version or newer to use this
release.</p>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/637">actions/github-script#637</a></li>
<li><a
href="https://github.com/sneha-krip"><code>@​sneha-krip</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/653">actions/github-script#653</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/github-script/compare/v7.1.0...v8.0.0">https://github.com/actions/github-script/compare/v7.1.0...v8.0.0</a></p>
<h2>v7.1.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Upgrade husky to v9 by <a
href="https://github.com/benelan"><code>@​benelan</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/482">actions/github-script#482</a></li>
<li>Add workflow file for publishing releases to immutable action
package by <a
href="https://github.com/Jcambass"><code>@​Jcambass</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/485">actions/github-script#485</a></li>
<li>Upgrade IA Publish by <a
href="https://github.com/Jcambass"><code>@​Jcambass</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/486">actions/github-script#486</a></li>
<li>Fix workflow status badges by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/497">actions/github-script#497</a></li>
<li>Update usage of <code>actions/upload-artifact</code> by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/512">actions/github-script#512</a></li>
<li>Clear up package name confusion by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/514">actions/github-script#514</a></li>
<li>Update dependencies with <code>npm audit fix</code> by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/515">actions/github-script#515</a></li>
<li>Specify that the used script is JavaScript by <a
href="https://github.com/timotk"><code>@​timotk</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/478">actions/github-script#478</a></li>
<li>chore: Add Dependabot for NPM and Actions by <a
href="https://github.com/nschonni"><code>@​nschonni</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/472">actions/github-script#472</a></li>
<li>Define <code>permissions</code> in workflows and update actions by
<a href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in
<a
href="https://redirect.github.com/actions/github-script/pull/531">actions/github-script#531</a></li>
<li>chore: Add Dependabot for .github/actions/install-dependencies by <a
href="https://github.com/nschonni"><code>@​nschonni</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/532">actions/github-script#532</a></li>
<li>chore: Remove .vscode settings by <a
href="https://github.com/nschonni"><code>@​nschonni</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/533">actions/github-script#533</a></li>
<li>ci: Use github/setup-licensed by <a
href="https://github.com/nschonni"><code>@​nschonni</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/473">actions/github-script#473</a></li>
<li>make octokit instance available as octokit on top of github, to make
it easier to seamlessly copy examples from GitHub rest api or octokit
documentations by <a
href="https://github.com/iamstarkov"><code>@​iamstarkov</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/508">actions/github-script#508</a></li>
<li>Remove <code>octokit</code> README updates for v7 by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/557">actions/github-script#557</a></li>
<li>docs: add &quot;exec&quot; usage examples by <a
href="https://github.com/neilime"><code>@​neilime</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/546">actions/github-script#546</a></li>
<li>Bump ruby/setup-ruby from 1.213.0 to 1.222.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/github-script/pull/563">actions/github-script#563</a></li>
<li>Bump ruby/setup-ruby from 1.222.0 to 1.229.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/github-script/pull/575">actions/github-script#575</a></li>
<li>Clearly document passing inputs to the <code>script</code> by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/603">actions/github-script#603</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/github-script/pull/610">actions/github-script#610</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/benelan"><code>@​benelan</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/482">actions/github-script#482</a></li>
<li><a href="https://github.com/Jcambass"><code>@​Jcambass</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/485">actions/github-script#485</a></li>
<li><a href="https://github.com/timotk"><code>@​timotk</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/478">actions/github-script#478</a></li>
<li><a
href="https://github.com/iamstarkov"><code>@​iamstarkov</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/508">actions/github-script#508</a></li>
<li><a href="https://github.com/neilime"><code>@​neilime</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/546">actions/github-script#546</a></li>
<li><a href="https://github.com/nebuk89"><code>@​nebuk89</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/github-script/pull/610">actions/github-script#610</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/github-script/compare/v7...v7.1.0">https://github.com/actions/github-script/compare/v7...v7.1.0</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/github-script/commit/ed597411d8f924073f98dfc5c65a23a2325f34cd"><code>ed59741</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/github-script/issues/653">#653</a>
from actions/sneha-krip/readme-for-v8</li>
<li><a
href="https://github.com/actions/github-script/commit/2dc352e4baefd91bec0d06f6ae2f1045d1687ca3"><code>2dc352e</code></a>
Bold minimum Actions Runner version in README</li>
<li><a
href="https://github.com/actions/github-script/commit/01e118c8d0d22115597e46514b5794e7bc3d56f1"><code>01e118c</code></a>
Update README for Node 24 runtime requirements</li>
<li><a
href="https://github.com/actions/github-script/commit/8b222ac82eda86dcad7795c9d49b839f7bf5b18b"><code>8b222ac</code></a>
Apply suggestion from <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a></li>
<li><a
href="https://github.com/actions/github-script/commit/adc0eeac992408a7b276994ca87edde1c8ce4d25"><code>adc0eea</code></a>
README for updating actions/github-script from v7 to v8</li>
<li><a
href="https://github.com/actions/github-script/commit/20fe497b3fe0c7be8aae5c9df711ac716dc9c425"><code>20fe497</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/github-script/issues/637">#637</a>
from actions/node24</li>
<li><a
href="https://github.com/actions/github-script/commit/e7b7f222b11a03e8b695c4c7afba89a02ea20164"><code>e7b7f22</code></a>
update licenses</li>
<li><a
href="https://github.com/actions/github-script/commit/2c81ba05f308415d095291e6eeffe983d822345b"><code>2c81ba0</code></a>
Update Node.js version support to 24.x</li>
<li>See full diff in <a
href="https://github.com/actions/github-script/compare/v7...v8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/github-script&package-manager=github_actions&previous-version=7&new-version=8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-15 14:00:34 -04:00
Caspar BroekhuizenandGitHub 9467a0e2bb revert(langgraph): restore logic to surface interrupts for stream_mod… (#6141)
### Description

Revert change in #5201 that prevented the surfacing of interrupts when
`stream_mode="values"`. [Comment highlighting affected
lines](https://github.com/langchain-ai/langgraph/pull/5201#discussion_r2344884841)

Resolves #5409 

### Test

Add test to verify interrupts are properly surfaced when
`stream_mode="values"` (`test_interrupt_stream_mode_values`)
2025-09-14 19:11:19 -07:00
8b55dff7a5 chore(deps): upgrade dependencies with uv lock --upgrade (#6146)
This PR updates the dependencies in all Python packages using `uv lock
--upgrade`.

This is an automated PR created by the UV Lock Upgrade workflow.

To make tests pass:
* linting fixes
* whitespace fixes in snapshots

---------

Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com>
Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>
2025-09-14 19:36:43 -04:00
Huaiwu LiandGitHub a19b74154a docs: Add missing merge parameter documentation in push_ui_message (#6145)
**Description:**
This PR adds missing documentation for the `merge` parameter in the
`push_ui_message` function. The parameter was present in the function
signature but lacked documentation in the docstring, which could confuse
API users.

  Changes made:
  - Added clear documentation for the `merge` parameter
  - Explains the behavior difference between `merge=True`
  (merges props) and `merge=False` (replaces props)
  - Includes default value information

  **Issue:**
  N/A - Documentation improvement

  **Dependencies:**
  None
2025-09-14 23:34:34 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
0607dc4611 chore(deps): bump hono from 4.9.6 to 4.9.7 in /docs/_scripts/js_translation/codeblocks (#6143)
Bumps [hono](https://github.com/honojs/hono) from 4.9.6 to 4.9.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/honojs/hono/releases">hono's
releases</a>.</em></p>
<blockquote>
<h2>v4.9.7</h2>
<h2>Security</h2>
<ul>
<li>Fixed an issue in the <code>bodyLimit</code> middleware where the
body size limit could be bypassed when both <code>Content-Length</code>
and <code>Transfer-Encoding</code> headers were present. If you are
using this middleware, please update immediately. <a
href="https://github.com/honojs/hono/security/advisories/GHSA-92vj-g62v-jqhh">Security
Advisory</a></li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>fix(client): Fix <code>parseResponse</code> not parsing json in
react native by <a
href="https://github.com/lr0pb"><code>@​lr0pb</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4399">honojs/hono#4399</a></li>
<li>chore: add <code>.tool-versions</code> file by <a
href="https://github.com/3w36zj6"><code>@​3w36zj6</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4397">honojs/hono#4397</a></li>
<li>chore: update <code>bun install</code> commands to use
<code>--frozen-lockfile</code> by <a
href="https://github.com/3w36zj6"><code>@​3w36zj6</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4398">honojs/hono#4398</a></li>
<li>test(jwk): Add tests of JWK token verification by <a
href="https://github.com/buckett"><code>@​buckett</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4402">honojs/hono#4402</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/lr0pb"><code>@​lr0pb</code></a> made
their first contribution in <a
href="https://redirect.github.com/honojs/hono/pull/4399">honojs/hono#4399</a></li>
<li><a href="https://github.com/buckett"><code>@​buckett</code></a> made
their first contribution in <a
href="https://redirect.github.com/honojs/hono/pull/4402">honojs/hono#4402</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/honojs/hono/compare/v4.9.6...v4.9.7">https://github.com/honojs/hono/compare/v4.9.6...v4.9.7</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/honojs/hono/commit/5ece99500fbcdc1026ab7f458f65cbe9eab29a6b"><code>5ece995</code></a>
4.9.7</li>
<li><a
href="https://github.com/honojs/hono/commit/605c70560b52f13af10379f79b76717042fafe8d"><code>605c705</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/honojs/hono/commit/6792789ec06bd14c96ecdf38a368f7d7526e601a"><code>6792789</code></a>
test(jwk): Add tests of JWK token verification (<a
href="https://redirect.github.com/honojs/hono/issues/4402">#4402</a>)</li>
<li><a
href="https://github.com/honojs/hono/commit/2f489b3562cd0d29075062b2ea0648ab92b88727"><code>2f489b3</code></a>
chore: update <code>bun install</code> commands to use
<code>--frozen-lockfile</code> (<a
href="https://redirect.github.com/honojs/hono/issues/4398">#4398</a>)</li>
<li><a
href="https://github.com/honojs/hono/commit/9b0a8f51ed15910b86cd2a6dd8f15b16b45e1c06"><code>9b0a8f5</code></a>
chore: add <code>.tool-versions</code> file (<a
href="https://redirect.github.com/honojs/hono/issues/4397">#4397</a>)</li>
<li><a
href="https://github.com/honojs/hono/commit/5b277d811cc655667683ae60141f739fa40b65e1"><code>5b277d8</code></a>
fix(client): Fix <code>parseResponse</code> not parsing json in react
native (<a
href="https://redirect.github.com/honojs/hono/issues/4399">#4399</a>)</li>
<li>See full diff in <a
href="https://github.com/honojs/hono/compare/v4.9.6...v4.9.7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hono&package-manager=npm_and_yarn&previous-version=4.9.6&new-version=4.9.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-14 19:11:30 -04:00
William FHandGitHub a3ee814539 chore(langgraph): Log when no values event is emitted from RemoteGraph (#6140) 2025-09-12 14:05:07 -07:00
William FHandGitHub b65140a892 chore(cli): Add config schema (#6142)
So you can IDE LSP support / autocompletion
2025-09-12 12:16:07 -07:00
Tadeo Donegana BraunschweigandGitHub 77a63608d1 docs: Update broken link in persistence_postgres.ipynb (#6135)
* Updated the relocation notice in `examples/persistence_postgres.ipynb`
to reference the correct new documentation at `add-memory.md` instead of
the previous notebook link.
2025-09-12 10:56:01 -04:00
Isaac FranciscoandGitHub c6179ca9d5 fix(cli): fix CLI integration test (#6129)
CLI integration tests were failing due to missing env vars, just needed
to copy to the places where the build commands were running from
2025-09-10 16:45:49 -07:00
f087567853 fix(cli): handle Docker SemVer build metadata in version parsing #5965 (#6024)
Description:
Corrects _parse_version to support Docker versions with SemVer build
metadata (e.g., 28.1.1+1), resolving #5965. Adds comprehensive unit
tests for version parsing, including normal, v-prefixed, prerelease,
build metadata, combined prerelease/build metadata, and edge cases with
missing components.

Issue:
Closes #5965

Dependencies:
None

---------

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-09-10 14:31:07 -04:00
bdef6b3f5d fix(langgraph): get_graph generates unexpected conditional edge (#6122)
### Description

* Fix `get_graph()` generating an unexpected conditional edge to
`__end__` when the last step has a single (non-terminal) source and the
graph is cyclic.

### Issue
* There was a fallback path that was triggered in `draw_graph()` when,
for a Pregel instance; no termini exist and there is only a single step
source (the last one). In this case an edge was added: (last source) ->
`__end__`, even when another node already had a valid edge: (node) ->
`__end__`.

See this example:
<details>

<summary>code</summary>

```python
from langgraph.graph import END, START, StateGraph
from pydantic import BaseModel

class State(TypedDict):
    messages: list[str]

def chatbot_node(state: State) -> State:
    return {"messages": state["messages"] + ["chatbot"]}

def tools_node(state: State) -> State:
    return {"messages": state["messages"] + ["tools"]}

def human_node(state: State) -> State:
    return {"messages": state["messages"] + ["human"]}

def tools_condition(_: State) -> str:
    return "tools"

def end_condition(_: State) -> str:
    return "chatbot"

workflow = StateGraph(State)
workflow.add_node("chatbot", chatbot_node)
workflow.add_node("tools", tools_node)
workflow.add_node("human", human_node)

workflow.add_edge(START, "human")
workflow.add_edge("tools", "chatbot")
# graph_builder.add_edge("chatbot", "human") !!!

workflow.add_conditional_edges(
    "chatbot", tools_condition, {"tools": "tools", "human": "human"}
)
workflow.add_conditional_edges(
    "human", end_condition, {"chatbot": "chatbot", END: END}
)

app = workflow.compile()
mermaid = app.get_graph().draw_mermaid()
```

</details>

The code above, as-is, generates the graph on the left. There is an
unexpected conditional edge: chatbot -> `__end__`. If you uncomment the
commented line and introduce a static edge: chatbot -> human,
`get_graph()` returns the correct representation:

1 Without `graph_builder.add_edge("chatbot", "human")` | 2 With
`graph_builder.add_edge("chatbot", "human")`
:-------------------------:|:-------------------------:

![](https://github.com/user-attachments/assets/aa3149c2-ceee-4c0c-9c0c-e999caf042f0)
|
![](https://github.com/user-attachments/assets/ea53287f-1d68-47d6-8b36-9ec7ca1d52fa)

* In case 1), the graph is cyclic so termini is empty, and the last
`step_sources` set during the static walk contains only the chatbot
node, so an edge is added: chatbot -> `__end__`.
* In case 2), the graph is cyclic so termini is empty, and the last
`step_sources` set during the static walk contains only the human node,
so an edge is added: human -> `__end__`, but `add_edge()` dedups (the
edge already exists) so the graph appears correct.

### Solution
* Check that no valid edges: (node) -> `__end__` exist before triggering
the fallback path and creating an edge.

Before             |  After
:-------------------------:|:-------------------------:

![](https://github.com/user-attachments/assets/aa3149c2-ceee-4c0c-9c0c-e999caf042f0)
|
![](https://github.com/user-attachments/assets/9de4ab4f-6503-4894-bfda-37aba1d1be05)

After: The graph is cyclic so termini is empty, and the last
`step_sources` contains the chatbot node, but an edge already exists:
human -> `__end__`, so no more edges are added.

### Tests
* `test_get_graph_nonterminal_last_step_source()` which asserts no
unexpected edge to `__end__` is produced from the last nonterminal step
source.

### Issue

Closes #4394

---------

Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-09-10 11:28:33 -04:00
Sydney RunkleandGitHub 677d941bb6 fix(langgraph): type checking for async w/ functional API (#6126)
Fixes https://github.com/langchain-ai/langgraph/issues/4140
Fixes https://github.com/langchain-ai/langgraph/issues/3310
2025-09-10 11:26:02 -04:00
Sydney RunkleandGitHub a43acc33bd feat(langgraph): prevent arbitrary resumes w/ multiple pending interrupts (#6108)
The idea here is that we don't want to allow resuming a graph w/ an
arbitrary resume value if there are multiple interrupts in the queue,
because the order in which interrupts enter the queue is not
deterministic. We want to instead enforce that each resume value is
mapped to an interrupt id.

Instead, when multiple interrupts are present, a user should invoke w/ a
resume map, mapping interrupt id -> resume value.

The logic was more complex than expected because there are 2 copies of
an interrupt in `checkpoint_pending_writes` for the cases w/ the
functional API, because an interrupt in a task interrupts the task and
entrypoint.

This is technically breaking (users resuming multiple hanging interrupts
w/ multiple resume calls can no longer do this... but the behavior for
this case was non-deterministic in the first place so we can sell this
as a fix).
2025-09-10 08:31:11 -04:00
Sydney RunkleandGitHub 326fd55e4f fix(langgraph): key error on runtime for config w/o configurable (#6106)
Fixes https://github.com/langchain-ai/langgraph/issues/6072

Long term we probably want a more robust approach to configurable
management in terms of required / not required attributes.
2025-09-10 12:19:33 +00:00
Lauren Hirata SinghandGitHub 6037f0210f docs: Update banner for docs deprecation notice (#6120) 2025-09-09 20:33:11 -04:00
Sydney RunkleandGitHub d9328027f9 fix: use langgraph template for docs issue (#6121) 2025-09-09 18:20:15 -04:00
Sydney RunkleandGitHub 7170e04aa6 chore: update issue templates to redirect docs stuff (#6119) 2025-09-09 18:17:11 -04:00
20581e61c0 fix(checkpoint-postgres): export PoolConfig from package init (#5934)
### Description
Export PoolConfig from langgraph.store.postgres.__init__ so the
documented import from langgraph.store.postgres import
AsyncPostgresStore, PoolConfig works as shown in the AsyncPostgresStore
examples. This resolves a docs vs. code inconsistency without changing
behavior.

### Issue
N/A

### Dependencies:
None

---------

Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-09-09 21:41:51 +00:00
4af07942ed chore(ci): Run CI int tests in parallel (#5976)
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-09-09 19:01:12 +00:00
Caspar BroekhuizenandGitHub 682f39e0d3 fix(checkpoint): preserve non-ascii text in InMemoryStore embeddings (#6111)
### Description
* Set `ensure_ascii=False` for all `json.dumps` calls in
`get_text_at_path`. Preserves non-ASCII text instead of embedding
`\uXXXX` escapes.

**Before**
```python
store.put(("user_123", "memories"), "1", {"text": "这是中文"})
# embeds {"text": "\\u8fd9\\u662f\\u4e2d\\u6587"}
```

**After**
```python
store.put(("user_123", "memories"), "1", {"text": "这是中文"})
# embeds {"text": "这是中文"}
```

### Tests & Docs

* Add unit test `test_non_ascii` that writes three records (Chinese,
Japanese, Korean) to an `InMemoryStore`, searches with the same strings,
and asserts the correct top hit with a score >= 0.15 for each.

### Issue
Fixes #5946
2025-09-09 17:52:11 +00:00
Sakshi GuptaandGitHub 7bbe8d8628 docs: Update graph-api.md for "Extended example: specifying LLM at runtime" (#5938)
docs (graphapi) : Handle Missing Context in LLM Invocation - Invoking
the LLM without explicitly passing a context parameter resulted in the
following error:
`AttributeError: 'NoneType' object has no attribute 'model_provider'`
This occurred because the context was None, and the system attempted to
access model_provider. This PR ensures that when context is not
provided, an empty context is passed explicitly. This allows the system
to correctly fall back to the default value defined in the
ContextSchema.model_provider attribute.
2025-09-09 15:43:42 +00:00
4dfd1c368c Fix to graph-api docs Send API example (#5576)
Very small update to docs, I think there is an add_edge that shouldn't
be there and a bug.

Adding the Annotated, resolves this error I received running the
example.

Traceback (most recent call last):
File "/Users/toddchaney/repos/work/importal-apps/python-worker/main.py",
line 52, in <module>
for step in graph.stream({"topic": "animals"}, stream_mode = ["updates",
"values"]):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/toddchaney/repos/work/importal-apps/python-worker/.venv/lib/python3.12/site-packages/langgraph/pregel/__init__.py",
line 2544, in stream
    loop.after_tick()
File
"/Users/toddchaney/repos/work/importal-apps/python-worker/.venv/lib/python3.12/site-packages/langgraph/pregel/loop.py",
line 526, in after_tick
    self.updated_channels = apply_writes(
                            ^^^^^^^^^^^^^
File
"/Users/toddchaney/repos/work/importal-apps/python-worker/.venv/lib/python3.12/site-packages/langgraph/pregel/algo.py",
line 299, in apply_writes
    if channels[chan].update(vals) and next_version is not None:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/toddchaney/repos/work/importal-apps/python-worker/.venv/lib/python3.12/site-packages/langgraph/channels/last_value.py",
line 58, in update
    raise InvalidUpdateError(msg)
langgraph.errors.InvalidUpdateError: At key 'jokes': Can receive only
one value per step. Use an Annotated key to handle multiple values.
For troubleshooting, visit:
https://python.langchain.com/docs/troubleshooting/errors/INVALID_CONCURRENT_GRAPH_UPDATE

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-09-09 15:27:23 +00:00
b75daf093e docs(multi-agent page): fix a couple of broken links (#5813)
On this page:
https://langchain-ai.github.io/langgraph/concepts/multi_agent/
The last couple of links are broken

**First link:**

https://langchain-ai.github.io/langgraph/concepts/how-tos/subgraph.ipynb#different-state-schemas
should be updated to

https://langchain-ai.github.io/langgraph/how-tos/subgraph/#different-state-schemas

**Second link:**

https://langchain-ai.github.io/langgraph/concepts/how-tos/graph-api.ipynb#pass-private-state-between-nodes
should be updated to

https://langchain-ai.github.io/langgraph/how-tos/graph-api/#pass-private-state-between-nodes

---------

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-09-09 15:14:25 +00:00
Mohammad MohtashimandGitHub faacbc1570 docs(prebuilt): remaining_steps explanation added in create_react_agent (#5847)
- **Description:** A better explanation of `remaining_steps` to clarify
what it does.
- **Issue:** #5548
2025-09-09 15:07:07 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Sydney Runkle
f5f536ba78 chore(deps): bump actions/download-artifact from 4 to 5 (#5868)
Bumps
[actions/download-artifact](https://github.com/actions/download-artifact)
from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/download-artifact/releases">actions/download-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/download-artifact/pull/407">actions/download-artifact#407</a></li>
<li>BREAKING fix: inconsistent path behavior for single artifact
downloads by ID by <a
href="https://github.com/GrantBirki"><code>@​GrantBirki</code></a> in <a
href="https://redirect.github.com/actions/download-artifact/pull/416">actions/download-artifact#416</a></li>
</ul>
<h2>v5.0.0</h2>
<h3>🚨 Breaking Change</h3>
<p>This release fixes an inconsistency in path behavior for single
artifact downloads by ID. <strong>If you're downloading single artifacts
by ID, the output path may change.</strong></p>
<h4>What Changed</h4>
<p>Previously, <strong>single artifact downloads</strong> behaved
differently depending on how you specified the artifact:</p>
<ul>
<li><strong>By name</strong>: <code>name: my-artifact</code> → extracted
to <code>path/</code> (direct)</li>
<li><strong>By ID</strong>: <code>artifact-ids: 12345</code> → extracted
to <code>path/my-artifact/</code> (nested)</li>
</ul>
<p>Now both methods are consistent:</p>
<ul>
<li><strong>By name</strong>: <code>name: my-artifact</code> → extracted
to <code>path/</code> (unchanged)</li>
<li><strong>By ID</strong>: <code>artifact-ids: 12345</code> → extracted
to <code>path/</code> (fixed - now direct)</li>
</ul>
<h4>Migration Guide</h4>
<h5> No Action Needed If:</h5>
<ul>
<li>You download artifacts by <strong>name</strong></li>
<li>You download <strong>multiple</strong> artifacts by ID</li>
<li>You already use <code>merge-multiple: true</code> as a
workaround</li>
</ul>
<h5>⚠️ Action Required If:</h5>
<p>You download <strong>single artifacts by ID</strong> and your
workflows expect the nested directory structure.</p>
<p><strong>Before v5 (nested structure):</strong></p>
<pre lang="yaml"><code>- uses: actions/download-artifact@v4
  with:
    artifact-ids: 12345
    path: dist
# Files were in: dist/my-artifact/
</code></pre>
<blockquote>
<p>Where <code>my-artifact</code> is the name of the artifact you
previously uploaded</p>
</blockquote>
<p><strong>To maintain old behavior (if needed):</strong></p>
<pre lang="yaml"><code>&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/download-artifact/commit/634f93cb2916e3fdff6788551b99b062d0335ce0"><code>634f93c</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/download-artifact/issues/416">#416</a>
from actions/single-artifact-id-download-path</li>
<li><a
href="https://github.com/actions/download-artifact/commit/b19ff4302770b82aa4694b63703b547756dacce6"><code>b19ff43</code></a>
refactor: resolve download path correctly in artifact download tests
(mainly ...</li>
<li><a
href="https://github.com/actions/download-artifact/commit/e262cbee4ab8c473c61c59a81ad8e9dc760e90db"><code>e262cbe</code></a>
bundle dist</li>
<li><a
href="https://github.com/actions/download-artifact/commit/bff23f9308ceb2f06d673043ea6311519be6a87b"><code>bff23f9</code></a>
update docs</li>
<li><a
href="https://github.com/actions/download-artifact/commit/fff8c148a8fdd56aa81fcb019f0b5f6c65700c4d"><code>fff8c14</code></a>
fix download path logic when downloading a single artifact by id</li>
<li><a
href="https://github.com/actions/download-artifact/commit/448e3f862ab3ef47aa50ff917776823c9946035b"><code>448e3f8</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/download-artifact/issues/407">#407</a>
from actions/nebuk89-patch-1</li>
<li><a
href="https://github.com/actions/download-artifact/commit/47225c44b359a5155efdbbbc352041b3e249fb1b"><code>47225c4</code></a>
Update README.md</li>
<li>See full diff in <a
href="https://github.com/actions/download-artifact/compare/v4...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/download-artifact&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-09-09 10:48:03 -04:00
Kenta MurataandGitHub 7284326160 fix(docs): Embed appropriate image files in graph-api.md (#6082)
This fixes some images that refer to incorrect files.
2025-09-09 14:42:26 +00:00
Shelton CuiandGitHub 62f7548532 docs(docs): fix incorrect return type in should_continue example (#6068)
Description:
The documentation for the should_continue function contained an
incorrect return type annotation.
It was shown as Literal["environment", END], but the actual logic
returns "Action" or END.

This PR updates the example to use Literal["Action", END] so that the
documentation matches the intended behavior of the function.

Issue:
N/A

Dependencies:
None
2025-09-09 14:33:27 +00:00
Sydney RunkleandGitHub e6a9e1d1c1 chore: update examples with context API (#5865) 2025-09-09 10:31:40 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Sydney Runkle
94fa329100 chore(deps): bump actions/checkout from 4 to 5 (#5930)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to
5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update actions checkout to use node 24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li>
<li>Prepare v5.0.0 release by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2238">actions/checkout#2238</a></li>
</ul>
<h2>⚠️ Minimum Compatible Runner Version</h2>
<p><strong>v2.327.1</strong><br />
<a
href="https://github.com/actions/runner/releases/tag/v2.327.1">Release
Notes</a></p>
<p>Make sure your runner is updated to this version or newer to use this
release.</p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v4...v5.0.0">https://github.com/actions/checkout/compare/v4...v5.0.0</a></p>
<h2>v4.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>docs: update README.md by <a
href="https://github.com/motss"><code>@​motss</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li>
<li>Add internal repos for checking out multiple repositories by <a
href="https://github.com/mouismail"><code>@​mouismail</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li>
<li>Documentation update - add recommended permissions to Readme by <a
href="https://github.com/benwells"><code>@​benwells</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li>
<li>Adjust positioning of user email note and permissions heading by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li>
<li>Update CODEOWNERS for actions by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li>
<li>Update package dependencies by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li>
<li>Prepare release v4.3.0 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2237">actions/checkout#2237</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/motss"><code>@​motss</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li>
<li><a href="https://github.com/mouismail"><code>@​mouismail</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li>
<li><a href="https://github.com/benwells"><code>@​benwells</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li>
<li><a href="https://github.com/nebuk89"><code>@​nebuk89</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li>
<li><a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v4...v4.3.0">https://github.com/actions/checkout/compare/v4...v4.3.0</a></p>
<h2>v4.2.2</h2>
<h2>What's Changed</h2>
<ul>
<li><code>url-helper.ts</code> now leverages well-known environment
variables by <a href="https://github.com/jww3"><code>@​jww3</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li>
<li>Expand unit test coverage for <code>isGhes</code> by <a
href="https://github.com/jww3"><code>@​jww3</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v4.2.1...v4.2.2">https://github.com/actions/checkout/compare/v4.2.1...v4.2.2</a></p>
<h2>v4.2.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Check out other refs/* by commit if provided, fall back to ref by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Jcambass"><code>@​Jcambass</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1919">actions/checkout#1919</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v4.2.0...v4.2.1">https://github.com/actions/checkout/compare/v4.2.0...v4.2.1</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>V5.0.0</h2>
<ul>
<li>Update actions checkout to use node 24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li>
</ul>
<h2>V4.3.0</h2>
<ul>
<li>docs: update README.md by <a
href="https://github.com/motss"><code>@​motss</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li>
<li>Add internal repos for checking out multiple repositories by <a
href="https://github.com/mouismail"><code>@​mouismail</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li>
<li>Documentation update - add recommended permissions to Readme by <a
href="https://github.com/benwells"><code>@​benwells</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li>
<li>Adjust positioning of user email note and permissions heading by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li>
<li>Update CODEOWNERS for actions by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li>
<li>Update package dependencies by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li>
</ul>
<h2>v4.2.2</h2>
<ul>
<li><code>url-helper.ts</code> now leverages well-known environment
variables by <a href="https://github.com/jww3"><code>@​jww3</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li>
<li>Expand unit test coverage for <code>isGhes</code> by <a
href="https://github.com/jww3"><code>@​jww3</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li>
</ul>
<h2>v4.2.1</h2>
<ul>
<li>Check out other refs/* by commit if provided, fall back to ref by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li>
</ul>
<h2>v4.2.0</h2>
<ul>
<li>Add Ref and Commit outputs by <a
href="https://github.com/lucacome"><code>@​lucacome</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1180">actions/checkout#1180</a></li>
<li>Dependency updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>- <a
href="https://redirect.github.com/actions/checkout/pull/1777">actions/checkout#1777</a>,
<a
href="https://redirect.github.com/actions/checkout/pull/1872">actions/checkout#1872</a></li>
</ul>
<h2>v4.1.7</h2>
<ul>
<li>Bump the minor-npm-dependencies group across 1 directory with 4
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li>
<li>Bump actions/checkout from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li>
<li>Check out other refs/* by commit by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li>
<li>Pin actions/checkout's own workflows to a known, good, stable
version. by <a href="https://github.com/jww3"><code>@​jww3</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1776">actions/checkout#1776</a></li>
</ul>
<h2>v4.1.6</h2>
<ul>
<li>Check platform to set archive extension appropriately by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1732">actions/checkout#1732</a></li>
</ul>
<h2>v4.1.5</h2>
<ul>
<li>Update NPM dependencies by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1703">actions/checkout#1703</a></li>
<li>Bump github/codeql-action from 2 to 3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1694">actions/checkout#1694</a></li>
<li>Bump actions/setup-node from 1 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1696">actions/checkout#1696</a></li>
<li>Bump actions/upload-artifact from 2 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1695">actions/checkout#1695</a></li>
<li>README: Suggest <code>user.email</code> to be
<code>41898282+github-actions[bot]@users.noreply.github.com</code> by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1707">actions/checkout#1707</a></li>
</ul>
<h2>v4.1.4</h2>
<ul>
<li>Disable <code>extensions.worktreeConfig</code> when disabling
<code>sparse-checkout</code> by <a
href="https://github.com/jww3"><code>@​jww3</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1692">actions/checkout#1692</a></li>
<li>Add dependabot config by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1688">actions/checkout#1688</a></li>
<li>Bump the minor-actions-dependencies group with 2 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1693">actions/checkout#1693</a></li>
<li>Bump word-wrap from 1.2.3 to 1.2.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1643">actions/checkout#1643</a></li>
</ul>
<h2>v4.1.3</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/checkout/commit/08c6903cd8c0fde910a37f88322edcfb5dd907a8"><code>08c6903</code></a>
Prepare v5.0.0 release (<a
href="https://redirect.github.com/actions/checkout/issues/2238">#2238</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/9f265659d3bb64ab1440b03b12f4d47a24320917"><code>9f26565</code></a>
Update actions checkout to use node 24 (<a
href="https://redirect.github.com/actions/checkout/issues/2226">#2226</a>)</li>
<li>See full diff in <a
href="https://github.com/actions/checkout/compare/v4...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-09-09 14:28:41 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Sydney Runkle
264caa0684 chore(deps): bump amannn/action-semantic-pull-request from 5 to 6 (#5929)
Bumps
[amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request)
from 5 to 6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/amannn/action-semantic-pull-request/releases">amannn/action-semantic-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<h2><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v5.5.3...v6.0.0">6.0.0</a>
(2025-08-13)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li>Upgrade action to use Node.js 24 and ESM (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/287">#287</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li>Upgrade action to use Node.js 24 and ESM (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/287">#287</a>)
(<a
href="https://github.com/amannn/action-semantic-pull-request/commit/bc0c9a79abfe07c0f08c498dd4a040bd22fe9b79">bc0c9a7</a>)</li>
</ul>
<h2>v5.5.3</h2>
<h2><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v5.5.2...v5.5.3">5.5.3</a>
(2024-06-28)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Bump <code>braces</code> dependency (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/269">#269</a>.
by <a href="https://github.com/EelcoLos"><code>@​EelcoLos</code></a>)
(<a
href="https://github.com/amannn/action-semantic-pull-request/commit/2d952a1bf90a6a7ab8f0293dc86f5fdf9acb1915">2d952a1</a>)</li>
</ul>
<h2>v5.5.2</h2>
<h2><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v5.5.1...v5.5.2">5.5.2</a>
(2024-04-24)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Bump tar from 6.1.11 to 6.2.1 (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/262">#262</a>
by <a href="https://github.com/EelcoLos"><code>@​EelcoLos</code></a>)
(<a
href="https://github.com/amannn/action-semantic-pull-request/commit/9a90d5a5ac979326e3bb9272750cdd4f192ce24a">9a90d5a</a>)</li>
</ul>
<h2>v5.5.1</h2>
<h2><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v5.5.0...v5.5.1">5.5.1</a>
(2024-04-24)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Bump ip from 2.0.0 to 2.0.1 (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/263">#263</a>
by <a href="https://github.com/EelcoLos"><code>@​EelcoLos</code></a>)
(<a
href="https://github.com/amannn/action-semantic-pull-request/commit/5e7e9acca3ddc6a9d7b640fe1f905c4fff131f4a">5e7e9ac</a>)</li>
</ul>
<h2>v5.5.0</h2>
<h2><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v5.4.0...v5.5.0">5.5.0</a>
(2024-04-23)</h2>
<h3>Features</h3>
<ul>
<li>Add outputs for <code>type</code>, <code>scope</code> and
<code>subject</code> (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/261">#261</a>
by <a href="https://github.com/bcaurel"><code>@​bcaurel</code></a>) (<a
href="https://github.com/amannn/action-semantic-pull-request/commit/b05f5f6423ef5cdfc7fdff00c4c10dd9a4f54aff">b05f5f6</a>)</li>
</ul>
<h2>v5.4.0</h2>
<h2><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v5.3.0...v5.4.0">5.4.0</a>
(2023-11-03)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md">amannn/action-semantic-pull-request's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v5.2.0...v5.3.0">5.3.0</a>
(2023-09-25)</h2>
<h3>Features</h3>
<ul>
<li>Use Node.js 20 in action (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/240">#240</a>)
(<a
href="https://github.com/amannn/action-semantic-pull-request/commit/4c0d5a21fc86635c67cc57ffe89d842c34ade284">4c0d5a2</a>)</li>
</ul>
<h2><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v5.1.0...v5.2.0">5.2.0</a>
(2023-03-16)</h2>
<h3>Features</h3>
<ul>
<li>Update dependencies by <a
href="https://github.com/EelcoLos"><code>@​EelcoLos</code></a> (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/229">#229</a>)
(<a
href="https://github.com/amannn/action-semantic-pull-request/commit/e797448a07516738bcfdd6f26ad1d1f84c58d0cc">e797448</a>)</li>
</ul>
<h2><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v5.0.2...v5.1.0">5.1.0</a>
(2023-02-10)</h2>
<h3>Features</h3>
<ul>
<li>Add regex support to <code>scope</code> and
<code>disallowScopes</code> configuration (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/226">#226</a>)
(<a
href="https://github.com/amannn/action-semantic-pull-request/commit/403a6f89242a0d0d3acde94e6141b2e0f4da8838">403a6f8</a>)</li>
</ul>
<h3><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v5.0.1...v5.0.2">5.0.2</a>
(2022-10-17)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>Upgrade <code>@actions/core</code> to avoid deprecation warnings (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/208">#208</a>)
(<a
href="https://github.com/amannn/action-semantic-pull-request/commit/91f4126c9e8625b9cadd64b02a03018fa22fc498">91f4126</a>)</li>
</ul>
<h3><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v5.0.0...v5.0.1">5.0.1</a>
(2022-10-14)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>Upgrade GitHub Action to use Node v16 (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/207">#207</a>)
(<a
href="https://github.com/amannn/action-semantic-pull-request/commit/6282ee339b067cb8eab05026f91153f873ad37fb">6282ee3</a>)</li>
</ul>
<h2><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v4.6.0...v5.0.0">5.0.0</a>
(2022-10-11)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li>Enum options need to be newline delimited (to allow whitespace
within them) (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/205">#205</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li>Enum options need to be newline delimited (to allow whitespace
within them) (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/205">#205</a>)
(<a
href="https://github.com/amannn/action-semantic-pull-request/commit/c906fe1e5a4bcc61624931ca94da9672107bd448">c906fe1</a>)</li>
</ul>
<h2><a
href="https://github.com/amannn/action-semantic-pull-request/compare/v4.5.0...v4.6.0">4.6.0</a>
(2022-09-26)</h2>
<h3>Features</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/amannn/action-semantic-pull-request/commit/fdd4d3ddf614fbcd8c29e4b106d3bbe0cb2c605d"><code>fdd4d3d</code></a>
chore: Release 6.0.1 [skip ci]</li>
<li><a
href="https://github.com/amannn/action-semantic-pull-request/commit/58e4ab40f59be79f2c432bf003e34a31174e977a"><code>58e4ab4</code></a>
fix: Actually execute action (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/289">#289</a>)</li>
<li><a
href="https://github.com/amannn/action-semantic-pull-request/commit/04a8d177d951f6d3dff9f6fbfa336354c60a1112"><code>04a8d17</code></a>
chore: Release 6.0.0 [skip ci]</li>
<li><a
href="https://github.com/amannn/action-semantic-pull-request/commit/bc0c9a79abfe07c0f08c498dd4a040bd22fe9b79"><code>bc0c9a7</code></a>
feat!: Upgrade action to use Node.js 24 and ESM (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/287">#287</a>)</li>
<li><a
href="https://github.com/amannn/action-semantic-pull-request/commit/631ffdc0283366e1d671846987cd2532bebcaba7"><code>631ffdc</code></a>
build(deps): bump the github-action-workflows group with 2 updates (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/286">#286</a>)</li>
<li><a
href="https://github.com/amannn/action-semantic-pull-request/commit/c1807ceb58850d1d23bc4bb1de293f0f07ddc198"><code>c1807ce</code></a>
build: configure Dependabot (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/231">#231</a>)</li>
<li><a
href="https://github.com/amannn/action-semantic-pull-request/commit/335288255954904a41ddda8947c8f2c844b8bfeb"><code>3352882</code></a>
docs: Remove <code>synchronize</code> trigger (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/281">#281</a>)</li>
<li><a
href="https://github.com/amannn/action-semantic-pull-request/commit/04501d43b574e4c1d23c629ffe4dcec27acfdeff"><code>04501d4</code></a>
docs: More restrictive permissions (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/280">#280</a>)</li>
<li><a
href="https://github.com/amannn/action-semantic-pull-request/commit/40166f00814508ec3201fc8595b393d451c8cd80"><code>40166f0</code></a>
chore: Update actions in release workflow (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/276">#276</a>)</li>
<li><a
href="https://github.com/amannn/action-semantic-pull-request/commit/80c0371c57c5142ed6c844270bba1864bac8a4c6"><code>80c0371</code></a>
docs: Mention <code>reopened</code> trigger in README (<a
href="https://redirect.github.com/amannn/action-semantic-pull-request/issues/272">#272</a>
by <a
href="https://github.com/garysassano"><code>@​garysassano</code></a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/amannn/action-semantic-pull-request/compare/v5...v6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=amannn/action-semantic-pull-request&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-09-09 10:28:09 -04:00
Sydney RunkleandGitHub cd33de2ad1 chore: minor CI/link fixes (#6116) 2025-09-09 14:22:19 +00:00
692f177a10 docs(langgraph): unindent text (#5906)
**Description:** unintend wrongly indented bulleted list and paragraph.

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-09-09 14:19:24 +00:00
Sakshi GuptaandGitHub 14d4be6c4a docs: Import RetryPolicy from types not pregel (#5941)
docs (graphapi.md) : With the new langgraph version, the RetryPolicy
needs to be imported from `langgraph.types` to avoid `ImportError:
cannot import name 'RetryPolicy' from 'langgraph.pregel'`
2025-09-09 14:18:48 +00:00
Kathryn MayandGitHub 2e133d6189 docs: Add redirect to standalone server page (#5855)
add redirect for deployment name change
2025-09-09 10:17:14 -04:00
Xin ZhangandGitHub 89de950307 docs (langgraph): Fix bug in the code example (#6114)
- **Description:** Fix the wrong variable name in the example of
`memory.md`.
  - **Dependencies:** NA.
2025-09-09 12:17:07 +00:00
xindooandGitHub 788b62c0fb docs(langgraph):Correct variable name in context.md (#6022)
Ensures the variable name used in the documentation accurately reflects
the codebase.
2025-09-08 20:54:42 +00:00
zzxxj216andGitHub 1539a55d2c docs(langgraph): correct typo "runtie" to "runtime" in StateGraph (#6060)
**Description:** Fix a typo where "runtie" was incorrectly used instead
of "runtime" in line 158 of the StateGraph class in state.py. This
resolves the example error caused by the misspelled variable name.

**Dependencies:** None
2025-09-08 20:54:35 +00:00
Mohammad YehyaandGitHub f3055178f3 docs: Fix Example Code Snippet in HITL (#5999)
Description: Fixing the example code snippet at this
[url](https://langchain-ai.github.io/langgraph/how-tos/human_in_the_loop/add-human-in-the-loop/#resume-multiple-interrupts-with-one-invocation).

Fixes: 
- i.interrupt_id -> i.id, since interrupt_id is deprecrated
- f"human input for prompt {i.value}" -> f"edited text for
{i.value['text_to_revise']}", to match the output statement
- parent.get_state -> graph.get_state, no variable named parent
- get_state(thread_config) -> get_state(config), no variable named
thread_config
2025-09-08 20:53:22 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Sydney Runkle
c0067cd304 chore: bump actions/upload-pages-artifact from 3 to 4 (#6004)
Bumps
[actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact)
from 3 to 4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/upload-pages-artifact/releases">actions/upload-pages-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Potentially breaking change: hidden files (specifically dotfiles)
will not be included in the artifact by <a
href="https://github.com/tsusdere"><code>@​tsusdere</code></a> in <a
href="https://redirect.github.com/actions/upload-pages-artifact/pull/102">actions/upload-pages-artifact#102</a>
If you need to include dotfiles in your artifact: instead of using this
action, create your own artifact according to these requirements <a
href="https://github.com/actions/upload-pages-artifact?tab=readme-ov-file#artifact-validation">https://github.com/actions/upload-pages-artifact?tab=readme-ov-file#artifact-validation</a></li>
<li>Pin <code>actions/upload-artifact</code> to SHA by <a
href="https://github.com/heavymachinery"><code>@​heavymachinery</code></a>
in <a
href="https://redirect.github.com/actions/upload-pages-artifact/pull/127">actions/upload-pages-artifact#127</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/upload-pages-artifact/compare/v3.0.1...v4.0.0">https://github.com/actions/upload-pages-artifact/compare/v3.0.1...v4.0.0</a></p>
<h2>v3.0.1</h2>
<h1>Changelog</h1>
<ul>
<li>Group tar's output to prevent it from messing up action logs <a
href="https://github.com/SilverRainZ"><code>@​SilverRainZ</code></a> (<a
href="https://redirect.github.com/actions/upload-pages-artifact/issues/94">#94</a>)</li>
<li>Update README.md <a
href="https://github.com/uiolee"><code>@​uiolee</code></a> (<a
href="https://redirect.github.com/actions/upload-pages-artifact/issues/88">#88</a>)</li>
<li>Bump the non-breaking-changes group with 1 update <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/upload-pages-artifact/issues/92">#92</a>)</li>
<li>Update Dependabot config to group non-breaking changes <a
href="https://github.com/JamesMGreene"><code>@​JamesMGreene</code></a>
(<a
href="https://redirect.github.com/actions/upload-pages-artifact/issues/91">#91</a>)</li>
<li>Bump actions/checkout from 3 to 4 <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> (<a
href="https://redirect.github.com/actions/upload-pages-artifact/issues/76">#76</a>)</li>
</ul>
<p>See details of <a
href="https://github.com/actions/upload-pages-artifact/compare/v3.0.0...v3.0.1">all
code changes</a> since previous release.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/upload-pages-artifact/commit/7b1f4a764d45c48632c6b24a0339c27f5614fb0b"><code>7b1f4a7</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-pages-artifact/issues/127">#127</a>
from heavymachinery/pin-sha</li>
<li><a
href="https://github.com/actions/upload-pages-artifact/commit/4cc19c7d3f3e6c87c68366501382a03c8b1ba6db"><code>4cc19c7</code></a>
Pin <code>actions/upload-artifact</code> to SHA</li>
<li><a
href="https://github.com/actions/upload-pages-artifact/commit/2d163be3ddce01512f3eea7ac5b7023b5d643ce1"><code>2d163be</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-pages-artifact/issues/107">#107</a>
from KittyChiu/main</li>
<li><a
href="https://github.com/actions/upload-pages-artifact/commit/c70484322b1c476728dcd37fac23c4dea2a0c51a"><code>c704843</code></a>
fix: linted README</li>
<li><a
href="https://github.com/actions/upload-pages-artifact/commit/9605915f1d2fc79418cdce4d5fbe80511c457655"><code>9605915</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-pages-artifact/issues/106">#106</a>
from KittyChiu/kittychiu/update-readme-1</li>
<li><a
href="https://github.com/actions/upload-pages-artifact/commit/e59cdfe6d6b061aab8f0619e759cded914f3ab03"><code>e59cdfe</code></a>
Update README.md</li>
<li><a
href="https://github.com/actions/upload-pages-artifact/commit/a2d67043267d885050434d297d3dd3a3a14fd899"><code>a2d6704</code></a>
doc: updated usage section in readme</li>
<li><a
href="https://github.com/actions/upload-pages-artifact/commit/984864e7b70fb5cb764344dc9c4b5c087662ef50"><code>984864e</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-pages-artifact/issues/105">#105</a>
from actions/Jcambass-patch-1</li>
<li><a
href="https://github.com/actions/upload-pages-artifact/commit/45dc78884ca148c05eddcd8ac0a804d3365e9014"><code>45dc788</code></a>
Add workflow file for publishing releases to immutable action
package</li>
<li><a
href="https://github.com/actions/upload-pages-artifact/commit/efaad07812d4b9ad2e8667cd46426fdfb7c22e22"><code>efaad07</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/upload-pages-artifact/issues/102">#102</a>
from actions/hidden-files</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/upload-pages-artifact/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/upload-pages-artifact&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-09-08 20:52:35 +00:00
Kenta MurataandGitHub b90d7c4e58 fix(docs): Fix indentation of info block in graph-api.md (#6081)
The "Why split application steps into a sequence with LangGraph?" info
block in `graph-api.md` is broken.

Before:
<img width="889" height="529" alt="image"
src="https://github.com/user-attachments/assets/7c60e4f0-7de2-4ffa-8493-ad958e4af211"
/>


After:
<img width="895" height="494" alt="image"
src="https://github.com/user-attachments/assets/3aefe0ca-1cb8-4d03-b1ed-7c3475204c88"
/>
2025-09-08 20:51:16 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2c14b1d658 chore bump hono from 4.8.9 to 4.9.6 in /docs/_scripts/js_translation/codeblocks (#6078)
Bumps [hono](https://github.com/honojs/hono) from 4.8.9 to 4.9.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/honojs/hono/releases">hono's
releases</a>.</em></p>
<blockquote>
<h2>v4.9.6</h2>
<h2>Security</h2>
<p>Fixed a bug in URL path parsing (<code>getPath</code>) that could
cause path confusion under malformed requests.</p>
<p>If you rely on reverse proxies (e.g. Nginx) for ACLs or restrict
access to endpoints like <code>/admin</code>, please update
immediately.</p>
<p>See advisory for details: GHSA-9hp6-4448-45g2</p>
<h2>What's Changed</h2>
<ul>
<li>chore: update packages in the router bench by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4386">honojs/hono#4386</a></li>
<li>chore(benchmarks): remove comment-out from router bench by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4387">honojs/hono#4387</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/honojs/hono/compare/v4.9.5...v4.9.6">https://github.com/honojs/hono/compare/v4.9.5...v4.9.6</a></p>
<h2>v4.9.5</h2>
<h2>What's Changed</h2>
<ul>
<li>chore: replace supertest with undici by <a
href="https://github.com/BarryThePenguin"><code>@​BarryThePenguin</code></a>
in <a
href="https://redirect.github.com/honojs/hono/pull/4365">honojs/hono#4365</a></li>
<li>fix(aws-lambda): preserve percent-encoded values in query strings by
<a href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4372">honojs/hono#4372</a></li>
<li>feat(cors): Allow async functions for <code>origin</code> and
<code>allowMethods</code> by <a
href="https://github.com/jobrk"><code>@​jobrk</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4373">honojs/hono#4373</a></li>
<li>feat(cors): Correct origin function return type asynchronously
returning null or undefined for origin by <a
href="https://github.com/jobrk"><code>@​jobrk</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4375">honojs/hono#4375</a></li>
<li>fix(service-worker): correct args for <code>app.fetch</code> in
<code>handle</code> by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4374">honojs/hono#4374</a></li>
<li>fix(language-detector): Detect language from path after getPath
changed by <a
href="https://github.com/iflamed"><code>@​iflamed</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4369">honojs/hono#4369</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/jobrk"><code>@​jobrk</code></a> made
their first contribution in <a
href="https://redirect.github.com/honojs/hono/pull/4373">honojs/hono#4373</a></li>
<li><a href="https://github.com/iflamed"><code>@​iflamed</code></a> made
their first contribution in <a
href="https://redirect.github.com/honojs/hono/pull/4369">honojs/hono#4369</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/honojs/hono/compare/v4.9.4...v4.9.5">https://github.com/honojs/hono/compare/v4.9.4...v4.9.5</a></p>
<h2>v4.9.4</h2>
<h2>What's Changed</h2>
<ul>
<li>chore: add a type cast to run <code>deno publish</code> by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4364">honojs/hono#4364</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/honojs/hono/compare/v4.9.3...v4.9.4">https://github.com/honojs/hono/compare/v4.9.3...v4.9.4</a></p>
<h2>v4.9.3</h2>
<h2>What's Changed</h2>
<ul>
<li>feat(csrf): Add modern CSRF protection with Fetch Metadata support
by <a href="https://github.com/meck93"><code>@​meck93</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4353">honojs/hono#4353</a></li>
<li>tests: use vitest projects by <a
href="https://github.com/BarryThePenguin"><code>@​BarryThePenguin</code></a>
in <a
href="https://redirect.github.com/honojs/hono/pull/4359">honojs/hono#4359</a></li>
<li>feat(proxy): add <code>customFetch</code> option to allow custom
fetch function by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4360">honojs/hono#4360</a></li>
<li>chore: update <code>typescript</code> to <code>5.9.2</code> by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4362">honojs/hono#4362</a></li>
<li>chore: add <code>packageManager</code> field to
<code>package.json</code> by <a
href="https://github.com/yusukebe"><code>@​yusukebe</code></a> in <a
href="https://redirect.github.com/honojs/hono/pull/4363">honojs/hono#4363</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/honojs/hono/compare/v4.9.2...v4.9.3">https://github.com/honojs/hono/compare/v4.9.2...v4.9.3</a></p>
<h2>v4.9.2</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/honojs/hono/commit/7f4311c010dbd15bd25e16551ecf58059887d105"><code>7f4311c</code></a>
4.9.6</li>
<li><a
href="https://github.com/honojs/hono/commit/1d79aedc3f82d8c9969b115fe61bc4bd705ec8de"><code>1d79aed</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/honojs/hono/commit/adecab1caeb2665c8da83a470de958566890d6ba"><code>adecab1</code></a>
chore(benchmarks): remove comment-out from router bench (<a
href="https://redirect.github.com/honojs/hono/issues/4387">#4387</a>)</li>
<li><a
href="https://github.com/honojs/hono/commit/b3d5b404291a71ec088c5f5c9d6f2940150fbb5b"><code>b3d5b40</code></a>
chore: update packages in the router bench (<a
href="https://redirect.github.com/honojs/hono/issues/4386">#4386</a>)</li>
<li><a
href="https://github.com/honojs/hono/commit/98cb9633174a9a1a5279c37ee2a262658c6af60c"><code>98cb963</code></a>
4.9.5</li>
<li><a
href="https://github.com/honojs/hono/commit/b3e8cab13da828f2af84fe6dcce6e2e8a156b85f"><code>b3e8cab</code></a>
fix(language-detector): Detect language from path after getPath changed
(<a
href="https://redirect.github.com/honojs/hono/issues/4369">#4369</a>)</li>
<li><a
href="https://github.com/honojs/hono/commit/0e3db674ad3f40be215a55a18062dd8e387ce525"><code>0e3db67</code></a>
fix(service-worker): correct args for <code>app.fetch</code> in
<code>handle</code> (<a
href="https://redirect.github.com/honojs/hono/issues/4374">#4374</a>)</li>
<li><a
href="https://github.com/honojs/hono/commit/c4577e93746c4642d5e663509febcb803d20f47e"><code>c4577e9</code></a>
fix(cors): Allow returning null or undefined for origin (<a
href="https://redirect.github.com/honojs/hono/issues/4375">#4375</a>)</li>
<li><a
href="https://github.com/honojs/hono/commit/5bfbff8acf54395174d54c65ad8d796493c2b7ea"><code>5bfbff8</code></a>
feat(cors): Allow async functions for <code>origin</code> and
<code>allowMethods</code> (<a
href="https://redirect.github.com/honojs/hono/issues/4373">#4373</a>)</li>
<li><a
href="https://github.com/honojs/hono/commit/a2685692543ceb0a4cfcc1e6a95f4f9cda73f14f"><code>a268569</code></a>
fix(aws-lambda): preserve percent-encoded values in query strings (<a
href="https://redirect.github.com/honojs/hono/issues/4372">#4372</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/honojs/hono/compare/v4.8.9...v4.9.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hono&package-manager=npm_and_yarn&previous-version=4.8.9&new-version=4.9.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 16:49:55 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
50ce6badee chore: bump actions/setup-python from 5 to 6 (#6099)
Bumps [actions/setup-python](https://github.com/actions/setup-python)
from 5 to 6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/setup-python/releases">actions/setup-python's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<h2>What's Changed</h2>
<h3>Breaking Changes</h3>
<ul>
<li>Upgrade to node 24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1164">actions/setup-python#1164</a></li>
</ul>
<p>Make sure your runner is on version v2.327.1 or later to ensure
compatibility with this release. <a
href="https://github.com/actions/runner/releases/tag/v2.327.1">See
Release Notes</a></p>
<h3>Enhancements:</h3>
<ul>
<li>Add support for <code>pip-version</code> by <a
href="https://github.com/priyagupta108"><code>@​priyagupta108</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1129">actions/setup-python#1129</a></li>
<li>Enhance reading from .python-version by <a
href="https://github.com/krystof-k"><code>@​krystof-k</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/787">actions/setup-python#787</a></li>
<li>Add version parsing from Pipfile by <a
href="https://github.com/aradkdj"><code>@​aradkdj</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1067">actions/setup-python#1067</a></li>
</ul>
<h3>Bug fixes:</h3>
<ul>
<li>Clarify pythonLocation behaviour for PyPy and GraalPy in environment
variables by <a
href="https://github.com/aparnajyothi-y"><code>@​aparnajyothi-y</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1183">actions/setup-python#1183</a></li>
<li>Change missing cache directory error to warning by <a
href="https://github.com/aparnajyothi-y"><code>@​aparnajyothi-y</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1182">actions/setup-python#1182</a></li>
<li>Add Architecture-Specific PATH Management for Python with --user
Flag on Windows by <a
href="https://github.com/aparnajyothi-y"><code>@​aparnajyothi-y</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1122">actions/setup-python#1122</a></li>
<li>Include python version in PyPy python-version output by <a
href="https://github.com/cdce8p"><code>@​cdce8p</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1110">actions/setup-python#1110</a></li>
<li>Update docs: clarification on pip authentication with setup-python
by <a
href="https://github.com/priya-kinthali"><code>@​priya-kinthali</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1156">actions/setup-python#1156</a></li>
</ul>
<h3>Dependency updates:</h3>
<ul>
<li>Upgrade idna from 2.9 to 3.7 in /<strong>tests</strong>/data by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/setup-python/pull/843">actions/setup-python#843</a></li>
<li>Upgrade form-data to fix critical vulnerabilities <a
href="https://redirect.github.com/actions/setup-python/issues/182">#182</a>
&amp; <a
href="https://redirect.github.com/actions/setup-python/issues/183">#183</a>
by <a
href="https://github.com/aparnajyothi-y"><code>@​aparnajyothi-y</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1163">actions/setup-python#1163</a></li>
<li>Upgrade setuptools to 78.1.1 to fix path traversal vulnerability in
PackageIndex.download by <a
href="https://github.com/aparnajyothi-y"><code>@​aparnajyothi-y</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1165">actions/setup-python#1165</a></li>
<li>Upgrade actions/checkout from 4 to 5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/setup-python/pull/1181">actions/setup-python#1181</a></li>
<li>Upgrade <code>@​actions/tool-cache</code> from 2.0.1 to 2.0.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/actions/setup-python/pull/1095">actions/setup-python#1095</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/krystof-k"><code>@​krystof-k</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/787">actions/setup-python#787</a></li>
<li><a href="https://github.com/cdce8p"><code>@​cdce8p</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/1110">actions/setup-python#1110</a></li>
<li><a href="https://github.com/aradkdj"><code>@​aradkdj</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/setup-python/pull/1067">actions/setup-python#1067</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-python/compare/v5...v6.0.0">https://github.com/actions/setup-python/compare/v5...v6.0.0</a></p>
<h2>v5.6.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Workflow updates related to Ubuntu 20.04 by <a
href="https://github.com/aparnajyothi-y"><code>@​aparnajyothi-y</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1065">actions/setup-python#1065</a></li>
<li>Fix for Candidate Not Iterable Error by <a
href="https://github.com/aparnajyothi-y"><code>@​aparnajyothi-y</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1082">actions/setup-python#1082</a></li>
<li>Upgrade semver and <code>@​types/semver</code> by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1091">actions/setup-python#1091</a></li>
<li>Upgrade prettier from 2.8.8 to 3.5.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1046">actions/setup-python#1046</a></li>
<li>Upgrade ts-jest from 29.1.2 to 29.3.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1081">actions/setup-python#1081</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/setup-python/compare/v5...v5.6.0">https://github.com/actions/setup-python/compare/v5...v5.6.0</a></p>
<h2>v5.5.0</h2>
<h2>What's Changed</h2>
<h3>Enhancements:</h3>
<ul>
<li>Support free threaded Python versions like '3.13t' by <a
href="https://github.com/colesbury"><code>@​colesbury</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/973">actions/setup-python#973</a></li>
<li>Enhance Workflows: Include ubuntu-arm runners, Add e2e Testing for
free threaded and Upgrade <code>@​action/cache</code> from 4.0.0 to
4.0.3 by <a
href="https://github.com/priya-kinthali"><code>@​priya-kinthali</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1056">actions/setup-python#1056</a></li>
<li>Add support for .tool-versions file in setup-python by <a
href="https://github.com/mahabaleshwars"><code>@​mahabaleshwars</code></a>
in <a
href="https://redirect.github.com/actions/setup-python/pull/1043">actions/setup-python#1043</a></li>
</ul>
<h3>Bug fixes:</h3>
<ul>
<li>Fix architecture for pypy on Linux ARM64 by <a
href="https://github.com/mayeut"><code>@​mayeut</code></a> in <a
href="https://redirect.github.com/actions/setup-python/pull/1011">actions/setup-python#1011</a>
This update maps arm64 to aarch64 for Linux ARM64 PyPy
installations.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/setup-python/commit/e797f83bcb11b83ae66e0230d6156d7c80228e7c"><code>e797f83</code></a>
Upgrade to node 24 (<a
href="https://redirect.github.com/actions/setup-python/issues/1164">#1164</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/3d1e2d2ca0a067f27da6fec484fce7f5256def85"><code>3d1e2d2</code></a>
Revert &quot;Enhance cache-dependency-path handling to support files
outside the w...</li>
<li><a
href="https://github.com/actions/setup-python/commit/65b071217a8539818fdb8b54561bcbae40380a54"><code>65b0712</code></a>
Clarify pythonLocation behavior for PyPy and GraalPy in environment
variables...</li>
<li><a
href="https://github.com/actions/setup-python/commit/5b668cf7652160527499ee14ceaff4be9306cb88"><code>5b668cf</code></a>
Bump actions/checkout from 4 to 5 (<a
href="https://redirect.github.com/actions/setup-python/issues/1181">#1181</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/f62a0e252fe7114e86949abfa6e1e89f85bb38c2"><code>f62a0e2</code></a>
Change missing cache directory error to warning (<a
href="https://redirect.github.com/actions/setup-python/issues/1182">#1182</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/9322b3ca74000aeb2c01eb777b646334015ddd72"><code>9322b3c</code></a>
Upgrade setuptools to 78.1.1 to fix path traversal vulnerability in
PackageIn...</li>
<li><a
href="https://github.com/actions/setup-python/commit/fbeb884f69f0ac1c0257302f62aa524c2824b649"><code>fbeb884</code></a>
Bump form-data to fix critical vulnerabilities <a
href="https://redirect.github.com/actions/setup-python/issues/182">#182</a>
&amp; <a
href="https://redirect.github.com/actions/setup-python/issues/183">#183</a>
(<a
href="https://redirect.github.com/actions/setup-python/issues/1163">#1163</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/03bb6152f4f691b9d64579a1bd791904a083c452"><code>03bb615</code></a>
Bump idna from 2.9 to 3.7 in /<strong>tests</strong>/data (<a
href="https://redirect.github.com/actions/setup-python/issues/843">#843</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/36da51d563b70a972897150555bb025096d65565"><code>36da51d</code></a>
Add version parsing from Pipfile (<a
href="https://redirect.github.com/actions/setup-python/issues/1067">#1067</a>)</li>
<li><a
href="https://github.com/actions/setup-python/commit/3c6f142cc0036d53007e92fa1e327564a4cfb7aa"><code>3c6f142</code></a>
update documentation (<a
href="https://redirect.github.com/actions/setup-python/issues/1156">#1156</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/setup-python/compare/v5...v6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 16:49:17 -04:00
Sydney RunkleandGitHub 6fc5b3aeda release(langgraph): 0.6.7 (#6092) 2025-09-07 13:49:43 +00:00
Harrison ChaseandGitHub b543752878 chore: update emphemeral local (#6091)
basically - for conditional edges, we use this to merge the updates from
state with the state object (before the actual update really occurs in
the tick.after)

otherwise - an emphemeral value will actually last through the logic in
the conditional edge of the node after
2025-09-07 09:42:11 -04:00
William FHandGitHub 8f6ad0b25a chore(sdk-py): Cleanup docstring indentation (#6087) 2025-09-05 22:56:03 +00:00
Isaac FranciscoandGitHub ada5d2ecb1 feat(cli): bump version (#6086)
version bump for: https://github.com/langchain-ai/langgraph/pull/6085
2025-09-05 15:52:30 -07:00
Isaac FranciscoandGitHub eaeafe54ab feat(cli): support prereleases (#6085)
We previously errored when a user had prerelease dependencies, this PR
passes the `--prereleases=allow` flag to our `uv pip install` call.

This PR also adds a test to verify that said deployments will build and
run as expected.
2025-09-05 15:45:48 -07:00
William FHandGitHub f761116de7 chore(sdk-py): Clean up docstring for get_client (#6084)
Main thing here is to call out the ASGITransport behavior
2025-09-05 13:43:31 -07:00
Nuno CamposandGitHub 36cf353d19 fix: Unwrap Required/NotRequired special forms before resolving channel/reducer annotations (#6080) 2025-09-05 10:27:10 +01:00
d503c0bf33 WIP: monorepo support in CLI (#6028)
This PR introduces the `--build-command` and `--install-command`
arguments to `langgraph build`.

`--install-command` is a custom install command. If passed, it will be
run from wherever the `langgraph build` call was made, i.e. NOT where
the langgraph.json file lives (except if these are the same place). This
will override the detected install command that we previously used.

`--build-command` is a custom build command. This will run from wherever
the langgraph.json file lives, and will be done after the install has
been run.

You don't need to provide both. Just providing one will make the install
(detected or supplied) run in the directory from where `langgraph build
was called` and then have the build command (if one exists) run in the
directory where langgraph.json exists.

I think we should probably allow configuring the directories from which
these commands get run, but I don't think this needs to be part of the
MVP.

---------

Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-09-04 12:29:11 -07:00
William FHandGitHub 25ba4c3bda feat(sdk-py): Specify ttl on thread creation and update (#6075) 2025-09-03 18:48:57 -07:00
dfc1c59ebf chore(docs): Update OpenAPI spec from LangGraph API v0.4.11 (#6074)
This PR updates the OpenAPI specification with changes detected from the
LangGraph API server.

**Changes detected as of LangGraph API version 0.4.11**

This update was automatically generated by the sync workflow in the
langgraph-api repository.

Co-authored-by: hinthornw <hinthornw@users.noreply.github.com>
2025-09-03 18:37:39 -07:00
William FHandGitHub 6f4c5fefee feat(sdk-py): Support ids filtering in threads search (#6067) 2025-09-02 17:49:11 -07:00
7cf230defa chore(docs): Update OpenAPI spec from LangGraph API v0.4.9 (#6066)
This PR updates the OpenAPI specification with changes detected from the
LangGraph API server.

**Changes detected as of LangGraph API version 0.4.9**

This update was automatically generated by the sync workflow in the
langgraph-api repository.

Co-authored-by: hinthornw <hinthornw@users.noreply.github.com>
2025-09-02 17:04:30 -07:00
5db65e0281 chore(docs): Update OpenAPI spec from LangGraph API v0.4.8 (#6065)
This PR updates the OpenAPI specification with changes detected from the
LangGraph API server.

**Changes detected as of LangGraph API version 0.4.8**

This update was automatically generated by the sync workflow in the
langgraph-api repository.

Co-authored-by: hinthornw <hinthornw@users.noreply.github.com>
2025-09-02 15:25:52 -07:00
b08c2e092f chore(docs): Update OpenAPI spec from LangGraph API v0.4.8 (#6048)
This PR updates the OpenAPI specification with changes detected from the
LangGraph API server.

**Changes detected as of LangGraph API version 0.4.8**

This update was automatically generated by the sync workflow in the
langgraph-api repository.

Co-authored-by: hinthornw <hinthornw@users.noreply.github.com>
2025-09-02 10:10:12 -07:00
Sydney RunkleandGitHub 120ae38c12 chore(docs): fix runtime context link (#6043) 2025-08-29 13:45:39 -04:00
Isaac FranciscoandGitHub 22942d4eec release(sdk-py): 0.2.4 (#6038) 2025-08-28 23:34:33 +00:00
Isaac FranciscoandGitHub 1756ce1dd2 feat(sdk-py): add endpoint for thread streaming (#6009)
SDK support for:
https://github.com/langchain-ai/langgraph-api/pull/1217/
2025-08-28 16:12:04 +00:00
Isaac FranciscoandGitHub 0b4638269b feat(sdk-py): add durability flag (#5963) 2025-08-27 19:21:25 +00:00
Isaac FranciscoandGitHub 1ebdb1ba31 chore: Update schema for new config allowed in LGP (#5875) 2025-08-27 11:20:06 -07:00
hari-dhanushkodiandGitHub f3423c052e fix(docs): add revision queuing docs (#5997) 2025-08-27 07:47:45 -07:00
b63572ee16 chore: Update OpenAPI spec from LangGraph API v0.4.0 (#6011)
This PR updates the OpenAPI specification with changes detected from the
LangGraph API server.

**Changes detected as of LangGraph API version 0.4.0**

This update was automatically generated by the sync workflow in the
langgraph-api repository.

Co-authored-by: hinthornw <hinthornw@users.noreply.github.com>
2025-08-26 20:51:30 -07:00
William FHandGitHub ddf4e62bde release(cli): 0.4.0 (#6014)
Relax upper-bound to permit server versions 0.4.*
2025-08-26 12:59:12 +00:00
William FHandGitHub d73902ae76 feat(sdk-py): Count endpoints (#5986) 2025-08-21 18:15:52 +00:00
William FHandGitHub 501ba8be34 release(cli): Bump max bound of langgraph-api (#5978) 2025-08-21 00:59:27 +00:00
William FHandGitHub 998e194e82 release(cli): Support bookworm, trixie, etc. (#5975)
Also add support for pinning to a semantic version.
2025-08-20 15:40:04 +00:00
ef65d3cf88 chore(cli): Update OpenAPI spec from LangGraph API v0.2.137 (#5967)
This PR updates the OpenAPI specification with changes detected from the
LangGraph API server.

**Changes detected as of LangGraph API version 0.2.137**

This update was automatically generated by the sync workflow in the
langgraph-api repository.

Co-authored-by: hinthornw <hinthornw@users.noreply.github.com>
2025-08-20 07:42:33 -07:00
William FHandGitHub a692e24a58 fix(langgraph): Remote Baggage (#5964)
Fix baggage propagation for opt-in distributed tracing when no
additional headers are provided.
2025-08-20 01:47:12 +00:00
BrodyandGitHub a566f1f892 fix(docs): update sales links (#5956)
**Description:** updates sales team links to point to our form.
  
**Issue:** DOC-170 (internal Linear ticket)
2025-08-19 08:11:51 -07:00
William FHandGitHub c0b29a6df5 chore(langgraph): Add passthrough params/headers to invoke/stream/etc. (#5940) 2025-08-18 19:38:08 +00:00
Ankit R.andGitHub a86eb4c5d0 docs(persistence): fix StateSnapshot formatting (#5928)
This PR fixes a minor formatting inconsistency in the StateSnapshot
examples within persistence.md.

Specifically, the next=('node_b',) value was inline with values={...},
which is inconsistent with other snapshots.
It has been moved to a new line for better readability and consistency
across examples.
2025-08-18 19:33:43 +00:00
William FHandGitHub 3488eb2a2c chore(sdk-py): Update types (#5939) 2025-08-18 18:29:07 +00:00
wakita181009andGitHub 875f20ba9f feat(sdk-py): define aclose method to LangGraphClient (#5931)
This PR adds an aclose method to the LangGraphClient.

When using the client in a FastAPI application, it's common to share a
single instance across the application's lifespan. The absence of an
aclose method makes it difficult to gracefully close the underlying HTTP
session on application shutdown. This change enables proper resource
management by allowing the client to be closed cleanly.
2025-08-18 11:22:02 -07:00
William FHandGitHub 723d4641b0 chore(sdk-py): Update params type in SDK (#5937) 2025-08-18 17:53:20 +00:00
William FHandGitHub ae62b8faf2 chore: Update release check of version (#5936) 2025-08-18 10:18:53 -07:00
William FHandGitHub 9918488169 feat(sdk-py): client qparams (#5918)
And add linting & dyanmic version string
2025-08-18 10:05:24 -07:00
Lauren Hirata SinghandGitHub c37c9cbab3 docs: update redirects (#5935) 2025-08-18 09:14:49 -07:00
William FHandGitHub 0cd8745aad feat(sdk-py): Select-statement (#5933) 2025-08-18 06:42:01 -07:00
Lauren Hirata SinghandGitHub 33d13c6f52 docs: update banner (#5911) 2025-08-14 10:54:18 -07:00
Lauren Hirata SinghandGitHub 054e2759ca docs: banner for deep research (#5908)
Publish at 10AM PT
2025-08-14 10:04:48 -07:00
William FHandGitHub 23b71048c1 release(langgraph): 0.6.5 (#5901) 2025-08-13 23:35:58 +00:00
Nuno CamposandGitHub a15f542a1f fix: Persist resume_map values (#5898)
Thank you for contributing to LangGraph! Follow these steps to mark your
pull request as ready for review. **If any of these steps are not
completed, your PR will not be considered for review.**

- [ ] **PR title**: Follows the format: {TYPE}({SCOPE}): {DESCRIPTION}
  - Examples:
    - feat(core): add multi-tenant support
    - fix(cli): resolve flag parsing error
    - docs(openai): update API usage examples
  - Allowed `{TYPE}` values:
- feat, fix, docs, style, refactor, perf, test, build, ci, chore,
revert, release
  - Allowed `{SCOPE}` values (optional):
- langgraph, docs, cli, checkpoint, checkpoint-postgres,
checkpoint-sqlite, prebuilt, scheduler-kafka, sdk-py
- Once you've written the title, please delete this checklist item; do
not include it in the PR.

- [ ] **PR message**: ***Delete this entire checklist*** and replace
with
- **Description:** a description of the change. Include a [closing
keyword](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)
if applicable.
  - **Issue:** the issue # it fixes, if applicable
  - **Dependencies:** any dependencies required for this change
- **Twitter handle:** if your PR gets announced, and you'd like a
mention, we'll gladly shout you out!

- [ ] **Add tests and docs**: If you're adding a new integration, you
must include:
1. A test for the integration, preferably unit tests that do not rely on
network access,
2. An example notebook showing its use. It lives in
`docs/docs/integrations` directory.

- [ ] **Lint and test**: Run `make format`, `make lint` and `make test`
from the root of the package(s) you've modified. We will not consider a
PR unless these three are passing in CI. See [contribution
guidelines](https://github.com/langchain-ai/langgraph/blob/main/CONTRIBUTING.md)
for more.

Additional guidelines:

- Make sure optional dependencies are imported within a function.
- Please do not add dependencies to `pyproject.toml` files (even
optional ones) unless they are **required** for unit tests.
- Most PRs should not touch more than one package.
- Changes should be backwards compatible.
2025-08-13 19:33:20 +01:00
d43eaf1f42 chore(docs): add remaining js translations (#5825)
Related Linear ticket:
https://linear.app/langchain/issue/DOC-51/add-js-translations-for-remaining-pages

---------

Co-authored-by: Brody Klapko <brody@langchain.dev>
2025-08-12 09:47:11 -04:00
Sam CrowderandGitHub 16b363fbb0 feat(langgraph): implement redis node level cache (#5834)
###   Description

Adds Redis as a supported cache backend for LangGraph node-level
caching, enabling distributed caching across multiple processes/servers.
This implementation follows the same patterns as existing InMemoryCache
and SqliteCache.

###  Key changes
  - New RedisCache class implementing the BaseCache interface
  - Support for TTL-based expiration and batch operations
  - Worker-specific cache prefixes for parallel test isolation

###  Dependencies

  - redis package (already included in dev dependencies)

### Test Plan

- Unit tests: Added Redis cache tests covering basic operations, TTL,
batch operations, and error handling
- Integration tests: Redis cache integrated into existing LangGraph test
suite, tested with all checkpointer combinations
2025-08-11 09:19:34 -07:00
Sydney RunkleandGitHub 68a75135b0 release: langgraph + prebuilt 0.6.4 (#5854) 2025-08-07 18:12:26 +00:00
Isaac FranciscoandGitHub 5c0c0fb186 fix: mypy issue with conditional edges (#5851)
Send should inherit from hashable, and need to use Sequence since List
is invariant.

https://github.com/langchain-ai/langgraph/issues/5850
2025-08-07 08:46:44 -07:00
4571b708d9 fix(langgraph): support emitting messages from subgraphs when messages mode explicitly requested (#5836)
Reproduces:
https://github.com/langchain-ai/langgraph/issues/5249#issuecomment-3156519635
Caused after this change:
https://github.com/langchain-ai/langgraph/pull/4843

Fix to allow emitting messages from subgraphs if the subgraphs
explicitly used a stream mode "messages".

```python

def node_in_parent(...):
   # subgraph was called as a function.
   # messages are explicitly requested.
   for event in subgraph.stream(..., stream_mode="messages"):
      # something is done with `event`
   return ...

# subgraphs = False!
parent_graph.invoke(..., subgraphs=False)
```

The code above should continue to work correctly regardless of the value
of subgraphs as streaming messages was requested explicitly in the
parent node!

---------

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-08-07 10:10:52 -04:00
Sydney RunkleandGitHub e365b2b8bd fix(prebuilt): raise on additional deprecated kwargs (#5848) 2025-08-06 21:08:42 +00:00
Isaac FranciscoandGitHub b5504506a7 fix: add resiliency for task cancellation (#5846) 2025-08-06 13:31:52 -07:00
Nuno CamposandGitHub c6ae8d25b9 perf: Save updated_channels to checkpoint (#5828)
- This makes prepare_next_tasks constant on number of nodes in all
cases, whereas before we were falling back to node iteration when
resuming from an existing checkpoint
2025-08-06 19:09:33 +01:00
Sydney RunkleandGitHub 0bd7dd2c52 chore(langgraph): deprecate MessageGraph (#5843)
`MessageGraph` is deprecated, to be removed in v2.

A `StateGraph` with a `messages` key should be used instead.
Alternatively, folks can use `Annotated[list[AnyMessage], add_messages]` as their state schema.
2025-08-06 14:17:50 +00:00
Sydney RunkleandGitHub 82978a8dd8 chore(prebuilt): revert tool arg injection refactor (#5842)
Reverts https://github.com/langchain-ai/langgraph/pull/5562

I anticipate that we want to do another pass at a refactor here in the
short term, but this makes it easier to adapt to new langchain core
message types for v0.4 support in the short term.
2025-08-06 10:12:08 -04:00
Kathryn MayandGitHub 925150a35d docs: Update redirects for deployment option renaming (#5823)
Updates the URLs for the new site deployment options after a rename.
2025-08-04 15:32:11 -04:00
Sydney RunkleandGitHub 2920a9dd19 fix(langgraph): Tidy up AgentState (#5801)
Fixes https://github.com/langchain-ai/langgraph/issues/5784

* Removes usage of `is_last_step`, no longer needed with
`remaining_steps`
* Make `remaining_steps` `NotRequired` so that json schema doesn't
suggest need for user input
* Move `PregelScratchpad` to shared utils file to prevent circular
import issue (it's used from `channels/managed` and other pregel files).
* Ensures that managed values wrapped in `NotRequired` or `Required` are
still recognized!
2025-08-03 07:12:53 -04:00
Eugene YurtsevandGitHub db8ed4e9e4 fix(docs): update agents.md (#5800)
fix comment in tip
2025-08-02 06:09:09 -04:00
Lauren Hirata SinghandGitHub b16fcc8468 docs: remove broken links (#5803) 2025-08-01 15:41:21 -04:00
Sydney RunkleandGitHub a2fe4df89b release: langgraph + prebuilt 0.6.3 (#5799) 2025-08-01 14:52:38 -04:00
open-swe[bot]GitHubopen-swe[bot] <open-swe@users.noreply.github.com>Sydney Runkle
69dd20e523 fix(langgraph): Add warning for incorrect node signature with mistyped config param (#5798)
Fixes: #5787

Ensures that if `config` is not typed as one of `RunanbleConfig` or
`Optional[RunnableConfig]` a warning is raised to help developers avoid
unexpected results at invocation time.

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>
2025-08-01 17:25:14 +00:00
open-swe[bot]GitHubopen-swe[bot] <open-swe@users.noreply.github.com>
5152a96fce fix(docs): Correct import statement for InMemorySaver in conceptual docs (#5797)
Fixes #5781

Fixes the incorrect import statement in the Python documentation
tutorial.

- Changed import from `MemorySaver` to `InMemorySaver`
- Ensures consistency between import statement and class instantiation
- Verified through formatting and linting checks

The documentation now correctly reflects the proper import for the
InMemorySaver class.

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2025-08-01 14:54:30 +00:00
Sydney RunkleandGitHub 220314b53a fix(langgraph): fix up deprecation warnings (#5796)
Fixes https://github.com/langchain-ai/langgraph/issues/5795

* Must use `category=None` on decorator so that we get type checking
support but no dupe warning
* Fixed tuple on `confix_type` warning causing false warning
2025-08-01 14:33:46 +00:00
38bbd92e01 feat(langgraph): add durability mode for invoke and ainvoke (#5771)
Fixes https://github.com/langchain-ai/langgraph/issues/5741

Follow up to https://github.com/langchain-ai/langgraph/pull/5432

Plus clean up deprecation logic for `checkpoint_during` and add tests.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-08-01 10:30:24 -04:00
Eugene YurtsevandGitHub e3cb2dd23b chore(docs): fix more admonitions (#5792)
Fix more admonitions
2025-07-31 22:57:44 -04:00
Eugene YurtsevandGitHub 2f23d1a30d chore(docs): fix js build (#5793)
Fix js build
2025-07-31 22:57:32 -04:00
Eugene YurtsevandGitHub 88e195bb78 chore(docs): fix admonitions in graph api page (#5791)
fix many admonitions in the graph API page
2025-07-31 21:50:27 -04:00
41a4f993b1 docs: Update link maps for reference docs (#5745)
Update link maps

---------

Co-authored-by: Hunter Lovell <hunter@hntrl.io>
2025-07-31 18:06:35 -04:00
b8f3f48da9 fix(docs): Add missing imports to make examples runnable (#5477)
I suppose that the code snippets are intended to run each on its own. To
guarantee this the snippet for the example:
"Write long-temr memory from tools"
needs to include `RunnableConfig`
Same also for the second commit of this pull request.

The other commits are about similar issues, where imports are missing to
make a snippet executable on its own.

---------

Signed-off-by: Kai Wendel <kai.wendel@iws.uni-stuttgart.de>
Co-authored-by: Eugene Yurtsev <eugene@langchain.dev>
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-07-31 20:04:52 +00:00
94f7f0632d docs(docs): fix image in "Run graph nodes in parallel" section of N Graph API how-to (#5527)
**Description:**
Replaced the outdated image in the "Run graph nodes in parallel" section
of the N Graph API how-to guide to correctly show parallel node
execution.

**Twitter handle:** @MichaelLoukeris

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-07-31 20:02:33 +00:00
Xin JinandGitHub b3e0582255 docs: clarify draw_mermaid_png only works in jupyter (#5609)
Nit, without comments I thought image would somehow show in terminal,
but that's not true you'd only get image to show if in jupyter notebook.
Don't have to merge, i'm just seeing this particular as not a pleasure
DevX.

<img width="848" height="440" alt="Screenshot 2025-07-21 at 12 26 04 PM"
src="https://github.com/user-attachments/assets/50261b35-f09d-4516-86f4-14e8bf53f8e2"
/>
2025-07-31 15:54:45 -04:00
24c7a8db3f Remove duplicated pretty_print_messages helper in Multi‑agent supervisor tutorial (#5617)
**Description:**  
Closes #___

Removed the redundant `pretty_print_message`/`pretty_print_messages`
helper snippet from
`docs/docs/tutorials/multi_agent/agent_supervisor.md`. Now there is a
single, authoritative definition of these functions, which:

- Simplifies the tutorial  
- Avoids reader confusion over which helper to use  
- Prevents future drift between duplicate code blocks  

**Issue:** Closes #___  
**Dependencies:** None

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-07-31 19:54:22 +00:00
f8eb4244e0 docs(graphapi): update the graph image for the "Combine control flow and state updates with Command" example (#5626)
The example had the node names as - node_a, node_b & node_c. But the
graph shows the image of generate_topics. This change includes the
addition of complete & accurate graph.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-07-31 19:52:55 +00:00
Syed Baqar AbbasandGitHub 62c3bbc9fe docs: Removed repetition of block pretty_print_messages (#5636)
## docs: Removed repetition of block pretty_print_messages
- **Description:** The documentation had the same cell duplicated, I
fixed it by deleting one example
  - **Issue:** #5616
2025-07-31 19:49:48 +00:00
Kathryn MayandGitHub 76bbb761b4 docs: Add studio troubleshooting to redirects (#5783)
Add a redirect from
https://langchain-ai.github.io/langgraph/troubleshooting/studio/ to
https://docs.langchain.com/langgraph-platform/troubleshooting-studio
2025-07-31 15:31:35 -04:00
Sydney RunkleandGitHub 80cd91344f chore: no ci on v1 branch (#5782) 2025-07-31 19:08:10 +00:00
Lauren Hirata SinghandGitHub 9e4c41cbed docs: remove LGP mentions (#5780) 2025-07-31 14:13:56 -04:00
ShehabandGitHub 1fda568df9 fix(docs): extended examples in graph API docs (#5774)
Fixes #5770
2025-07-31 18:00:54 +00:00
08295ecadb chore(prebuilt): add supported input types for model in create_react_agent (#5748)
- **Description:** Update the type annotations in create_react_agent to
allow one to provide a callable for the model that uses bind_tools and
returns a Runnable[LanguageModelInput, BaseMessage]
  - **Issue:** #5739

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-07-31 14:00:12 -04:00
Lauren Hirata SinghandGitHub 4ecbabafe8 docs: redirects for LGP mintlify (#5767)
- Added redirects for all of the LGP docs we're moving to Mintlify
- Exclude files not listed in nav from search
- Update banner
2025-07-31 13:10:45 -04:00
Sam CrowderandGitHub 246efe71f4 fix: change from developer to enterprise (#5778) 2025-07-31 09:42:19 -07:00
Eugene YurtsevandGitHub 116121eb3a feat(docs): dynamic model and tool selection in create react agent (#5777)
Document dynamic models and dynamic tools
2025-07-31 11:22:30 -04:00
William FHandGitHub 18887e9f86 fix(langgraph): Remove duplicate call to ensure_config (#5768) 2025-07-31 09:15:03 -04:00
Sam CrowderandGitHub bec28226d0 fix: removing standalone container lite from old docs (#5759) 2025-07-30 18:21:37 -07:00
Sam CrowderandGitHub 967e368e14 fix: add link that points to where changelog now lives (#5758) 2025-07-30 17:49:51 -07:00
Lauren Hirata SinghandGitHub 9d4dd066e5 docs: Revert "docs: Delete LGP nav Items from docs" (#5753)
Reverts langchain-ai/langgraph#5743
2025-07-30 18:15:19 -04:00
Lauren Hirata SinghandGitHub 81027b2b80 docs: fix redirects to external pages (#5752) 2025-07-30 16:52:13 -04:00
Sydney RunkleandGitHub 296bf5f75e fix(docs): context docs formatting (#5751) 2025-07-30 16:41:49 -04:00
Sydney RunkleandGitHub f43c806736 release(langgraph): 0.6.2 (#5750) 2025-07-30 20:35:27 +00:00
Sydney RunkleandGitHub 36f444dcb6 release(prebuilt): 0.6.2 (#5749) 2025-07-30 20:27:10 +00:00
Sydney RunkleandGitHub 781a115f92 fix(prebuilt): assign context_schema to config_schema with correct condition (#5746) 2025-07-30 20:08:45 +00:00
95d056e735 docs: Delete LGP nav Items from docs (#5743)
Remove the files and nav for LGP docs in the mkdocs site.

---------

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-07-30 15:49:54 -04:00
open-swe[bot]GitHubopen-swe[bot] <open-swe@users.noreply.github.com>Sydney RunkleSydney RunkleEugene Yurtsev
64adb2bab3 feat: Add context coercion for LangGraph runtime (#5736)
Fixes #5735

Implement context coercion functionality for LangGraph runtime to
improve API usability.

Key changes:
- Added `_coerce_context` function in `pregel/main.py`
- Supports coercion for:
  - Pydantic BaseModel
  - Dataclasses
  - TypedDict
- Comprehensive test coverage added in `tests/test_runtime.py`
- Handles edge cases like None context and missing fields

The implementation allows users to pass dictionaries as context, which
will be automatically converted to the expected schema type, making the
API more flexible and user-friendly.

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-07-30 19:08:45 +00:00
Syed Baqar AbbasandGitHub e87f0fb0cd docs: The notebook redirects to a page that does not exist (#5638)
**docs: The notebook redirects to a page that does not exist**
- **Description:** The current documentation redirects to a file that
does not exist. I have removed the doc to avoid confusion.
  - **Issue:** Fixes #5637
2025-07-30 18:26:28 +00:00
c70f283f83 chore(examples): remove outdated HITL notebooks pointing to 404s (#5731)
**Description:**  
Removed 4 broken notebooks in `examples/human_in_the_loop/` that
referenced missing files (list below). These notebooks displayed
redirect messages but the new paths are either invalid or don’t contain
content.
Filenames:
1. examples/human_in_the_loop/dynamic_breakpoints.ipynb
2. examples/human_in_the_loop/edit-graph-state.ipynb
3. examples/human_in_the_loop/review-tool-calls.ipynb
4. examples/human_in_the_loop/time-travel.ipynb


**Issue:**  
Closes #5642

**Dependencies:**  
None

Co-authored-by: gawhaarya <gawhaneaarya@gmail.com>
2025-07-30 18:25:55 +00:00
Sydney RunkleandGitHub 1d6b0c36e9 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5732) 2025-07-30 14:20:35 -04:00
Hunter LovellandGitHub e5344d35af fix(docs): squash js docs build errors (#5723) 2025-07-30 16:14:51 +00:00
Sam Crowder 9f48bb0b61 Update changelog via LangGraph Server Changelog Bot 2025-07-30 08:39:34 -07:00
Sam CrowderandGitHub 5333fc9c21 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5718) 2025-07-29 21:51:35 -07:00
d59091672f feat: add docs translations (#5552)
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Tat Dat Duong <david@duong.cz>
2025-07-30 02:18:30 +00:00
Sam Crowder da7ff1421d Update changelog via LangGraph Server Changelog Bot 2025-07-29 17:42:16 -07:00
Eugene YurtsevandGitHub 72e418e4d0 release(prebuilt): 0.6.1 (#5713)
Release 0.6.1 allowing ToolNode to handle Command that removes all
messages
2025-07-29 20:39:42 +00:00
8cea8ae1de fix(prebuilt): update ToolNode to allow Command update to remove all messages (#5678)
## Description

Previously, when a tool returned `Command` to update the graph's state,
the `_validate_tool_command` method in `ToolNode` would raise a
`ValueError` if the `messages_update` list contained only a
`RemoveMessage(id=REMOVE_ALL_MESSAGES)` object. This was because the
validation logic expected a matching `ToolMessage` for the tool call and
did not account for this specific state-clearing scenario.

This commit modifies the validation logic to check if the
`messages_update` list contains a single
`RemoveMessage(id=REMOVE_ALL_MESSAGES)` element. If this condition is
met, the `ToolMessage` validation is bypassed, allowing a tool to clear
the entire message history without causing a validation error.

A new test case, `test_tool_node_command_remove_all_messages`, has been
added to `tests/test_tool_node.py` to verify this change and prevent
future regressions.

## Example

Here is a self-contained example that illustrates the problem and the
fix. Without this change, the code block for `Example 2` would raise a
`ValueError`.

```python
from typing import Annotated, List

from langchain_core.messages import (
    AIMessage,
    AnyMessage,
    HumanMessage,
    RemoveMessage,
    ToolMessage,
)
from langchain_core.tools import InjectedToolCallId, tool
from langchain_openai import ChatOpenAI
from langgraph.graph import END, StateGraph, add_messages
from langgraph.graph.message import REMOVE_ALL_MESSAGES
from langgraph.prebuilt import InjectedState, ToolNode
from langgraph.types import Command
from pydantic import BaseModel, Field


# Agent state tracks current and all messages
class AgentState(BaseModel):
    messages: Annotated[List[AnyMessage], add_messages] = Field(
        default_factory=list, description="Current conversation messages."
    )
    all_messages: Annotated[List[AnyMessage], add_messages] = Field(
        default_factory=list, description="All messages, including removed ones."
    )


# Tool to clear history if long enough, otherwise returns a warning
@tool
def clear_history_tool(
    state: Annotated[AgentState, InjectedState],
    tool_call_id: Annotated[str, InjectedToolCallId],
):
    """Clears message history if it's long enough."""
    if len(state.messages) < 3:
        return Command(
            update={
                "messages": [
                    ToolMessage(
                        "History is not long enough to be cleared. Please try again.",
                        tool_call_id=tool_call_id,
                    )
                ]
            }
        )
    else:
        return Command(
            update={
                "messages": [RemoveMessage(id=REMOVE_ALL_MESSAGES)],
                "all_messages": state.messages
                + [
                    ToolMessage(
                        "History has been successfully cleared.",
                        tool_call_id=tool_call_id,
                    )
                ],
            }
        )


# Bind the tool to the model
model = ChatOpenAI(model="gpt-4o-mini").bind_tools([clear_history_tool])


def model_node(state: AgentState):
    return {"messages": [model.invoke(state.messages)]}


# Build the agent graph
graph_builder = StateGraph(AgentState)
graph_builder.add_node("model", model_node)
graph_builder.add_node("tools", ToolNode([clear_history_tool]))
graph_builder.set_entry_point("model")
graph_builder.add_edge("model", "tools")
graph_builder.add_edge("tools", END)
graph = graph_builder.compile()


def print_messages(header, messages):
    print(f"\n{header}")
    for message in messages:
        message.pretty_print()


### Example 1: Not enough history to clear
state_1 = AgentState(
    messages=[HumanMessage(content="Please clear my message history.")]
)
output_1 = graph.invoke(state_1)
print_messages("First call: State 'messages'", output_1["messages"])
print_messages("First call: State 'all_messages'", output_1["all_messages"])

### Example 2: History is cleared
state_2 = AgentState(
    messages=[
        HumanMessage(content="Will this PR get merged?"),
        AIMessage(content="Maybe, if it's good enough."),
        HumanMessage(content="Please clear my message history."),
    ]
)
# Without the changes in this PR, the following line will raise a ValueError
output_2 = graph.invoke(state_2)
print_messages("Second call: State 'messages'", output_2["messages"])
print_messages("Second call: State 'all_messages'", output_2["all_messages"])
```

### Outputs

*Without the changes in this PR:*

```
First call: State 'messages'
================================ Human Message =================================

Please clear my message history.
================================== Ai Message ==================================
Tool Calls:
  clear_history_tool (ba421ac3-1e1a-4208-a8f6-c5500ee0abcc)
 Call ID: ba421ac3-1e1a-4208-a8f6-c5500ee0abcc
  Args:
================================= Tool Message =================================
Name: clear_history_tool

History is not long enough to be cleared. Please try again.

First call: State 'all_messages'


Traceback (most recent call last):
  File "main.py", line 114, in <module>
    output_2 = graph.invoke(state_2)
               ^^^^^^^^^^^^^^^^^^^^^
  File ".venv/lib/python3.11/site-packages/langgraph/pregel/__init__.py", line 2844, in invoke
    for chunk in self.stream(
  File ".venv/lib/python3.11/site-packages/langgraph/pregel/__init__.py", line 2534, in stream
    for _ in runner.tick(
  File ".venv/lib/python3.11/site-packages/langgraph/prebuilt/tool_node.py", line 241, in _func
    outputs = [
              ^
  File ".venv/lib/python3.11/concurrent/futures/_base.py", line 619, in result_iterator
    yield _result_or_cancel(fs.pop())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".venv/lib/python3.11/concurrent/futures/_base.py", line 317, in _result_or_cancel
    return fut.result(timeout)
           ^^^^^^^^^^^^^^^^^^^
  File ".venv/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File ".venv/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File ".venv/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".venv/lib/python3.11/site-packages/langchain_core/runnables/config.py", line 555, in _wrapped_fn
    return contexts.pop().run(fn, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".venv/lib/python3.11/site-packages/langgraph/prebuilt/tool_node.py", line 353, in _run_one
    return self._validate_tool_command(response, call, input_type)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".venv/lib/python3.11/site-packages/langgraph/prebuilt/tool_node.py", line 616, in _validate_tool_command
    raise ValueError(
ValueError: Expected to have a matching ToolMessage in Command.update for tool 'clear_history_tool', got: [RemoveMessage(content='', additional_kwargs={}, response_metadata={}, id='__remove_all__')]. Every tool call (LLM requesting to call a tool) in the message history MUST have a corresponding ToolMessage. You can fix it by modifying the tool to return `Command(update={"messages": [ToolMessage("Success", tool_call_id=tool_call_id), ...]}, ...)`.
```

*With the changes in this PR:*

```
First call: State 'messages'
================================ Human Message =================================

Please clear my message history.
================================== Ai Message ==================================
Tool Calls:
  clear_history_tool (ba421ac3-1e1a-4208-a8f6-c5500ee0abcc)
 Call ID: ba421ac3-1e1a-4208-a8f6-c5500ee0abcc
  Args:
================================= Tool Message =================================
Name: clear_history_tool

History is not long enough to be cleared. Please try again.

First call: State 'all_messages'


Second call: State 'messages'

Second call: State 'all_messages'
================================ Human Message =================================

Will this PR get merged?
================================== Ai Message ==================================

Maybe, if it's good enough.
================================ Human Message =================================

Please clear my message history.
================================== Ai Message ==================================
Tool Calls:
  clear_history_tool (499b1be3-6df1-493f-85e5-8d7e429dead8)
 Call ID: 499b1be3-6df1-493f-85e5-8d7e429dead8
  Args:
================================= Tool Message =================================
Name: clear_history_tool

History has been successfully cleared.
```

## Twitter handle

[@samuelpullely](https://x.com/samuelpullely)

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-07-29 20:30:42 +00:00
Sydney RunkleandGitHub 85d2c7623a release(langgraph): 0.6.1 (#5712) 2025-07-29 20:25:49 +00:00
Sydney RunkleandGitHub 7436777e7d fix(langgraph): enforce config injection even when optional (#5708) 2025-07-29 16:11:36 -04:00
Sydney Runkle 479373bd81 lint 2025-07-29 15:19:44 -04:00
Sydney Runkle dd91819c92 enforce config injection 2025-07-29 15:13:51 -04:00
Sydney RunkleandGitHub b07964c98e fix(langgraph): always use parent runtime info if available (#5707) 2025-07-29 15:05:54 -04:00
Sydney Runkle 163d14f812 typo 2025-07-29 14:59:14 -04:00
Sydney Runkle c0185f04e5 more robust tests 2025-07-29 14:58:16 -04:00
Sydney Runkle 82b31c9ffd nits 2025-07-29 14:54:58 -04:00
Sydney Runkle aade865727 remove unintentional import 2025-07-29 14:50:11 -04:00
Sydney Runkle 184bcacb53 use parent runtime 2025-07-29 14:47:05 -04:00
Eugene YurtsevandGitHub d68bac3865 chore(docs): Support custom link titles (#5706)
Support custom link titles for custom link syntax
2025-07-29 14:17:03 -04:00
Sydney RunkleandGitHub 824c309035 docs: update context conceptual page (#5696) 2025-07-29 11:06:08 -04:00
Sydney Runkle fdfd06056e move tip 2025-07-29 11:00:40 -04:00
469ebd3492 Apply suggestions from code review
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-07-29 10:58:59 -04:00
Sydney Runkle 474fb7b33e consolidate 2025-07-29 10:22:50 -04:00
Eugene YurtsevandGitHub 416da06d6b feat(docs): manually insert fill in most of the magic links (#5702)
These were done "manually" using openai. Likely error prone. We'll need to validate all the links.
2025-07-29 14:22:45 +00:00
Sydney Runkle 2297271863 refining tips 2025-07-29 10:19:48 -04:00
4910830efe Apply suggestions from code review
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-07-29 10:04:49 -04:00
Eugene YurtsevandGitHub 027bb0a1b8 feat(docs): Support cross language "auto links" (#5699)
Introduces a syntax for cross-reference links that work across language
and change behavior depending on which scope they appear in.


```markdown
@[interrupt]

:::python
@[StateGraph]
:::

:::js
@[create_react_agent]
:::

```

Can be compiled to

```markdown

# a link that changes based on global context or compile target
<div> ... </div>  -> `interrupt` in global context

:::python
[StateGraph](link to python cross reference)
:::

:::js
[create_react_agent](link to js cross reference)
:::
```



TODO:

- [x] fix broken unit test
- [x] no f strings in logger (it's a sin)
- [x] remove cross-refs.txt (we'll instead start updating the cross link
map)
2025-07-29 10:00:23 -04:00
Sydney RunkleandGitHub cd30b9cfea docs: Add better definition for max_concurrency (#5701) 2025-07-29 08:39:46 -04:00
Lauren Hirata Singh 5eb9826c46 docs: Add better definition for max_concurrency 2025-07-29 07:15:47 -04:00
Lauren Hirata SinghandGitHub fa43b4694a Apply suggestions from code review 2025-07-29 07:03:12 -04:00
Sydney Runkle 4d80f4b1a5 a few more nits 2025-07-28 19:11:30 -04:00
Sydney Runkle 70185d350e adding xlinks 2025-07-28 19:02:47 -04:00
Sydney Runkle 89efd6e915 formatting 2025-07-28 18:50:37 -04:00
Lance Martin d88ca6f649 Update 2025-07-28 15:15:45 -07:00
Sydney RunkleandGitHub fadbe7d710 fix(docs): clarify value of context (#5689) 2025-07-28 16:38:02 -04:00
Sydney Runkle c861614337 Merge branch 'sr/more-context-for-context' of https://github.com/langchain-ai/langgraph into sr/more-context-for-context 2025-07-28 16:34:54 -04:00
Sydney Runkle c020f01425 final nits 2025-07-28 16:34:13 -04:00
14949c81c8 Apply suggestions from code review
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-07-28 16:22:16 -04:00
Sydney Runkle 3af857922a formatting for bullets 2025-07-28 16:19:27 -04:00
Sydney Runkle 7ec049e0c7 note on window 2025-07-28 16:15:56 -04:00
Sydney Runkle 1923ff8d85 first pass 2025-07-28 16:15:14 -04:00
Sydney RunkleandGitHub 4b9b7d0b1c fix(docs): better docs for resuming multiple interrupts (#5688) 2025-07-28 16:05:22 -04:00
624247a51f Update docs/docs/agents/context.md
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-07-28 15:31:36 -04:00
Sydney Runkle b21b595927 Merge branch 'sr/more-docs' of https://github.com/langchain-ai/langgraph into sr/more-docs 2025-07-28 15:21:24 -04:00
Sydney Runkle f4633a0015 single example 2025-07-28 15:20:32 -04:00
Sam CrowderandGitHub 86017c010c docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5686) 2025-07-28 12:17:20 -07:00
Sydney Runkle 2115cffc94 notes on context 2025-07-28 15:17:05 -04:00
03726f9bc6 Update docs/docs/how-tos/human_in_the_loop/add-human-in-the-loop.md
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-07-28 15:14:37 -04:00
Sydney Runkle 509dfd1f21 better hitl multi interrupt resume docs 2025-07-28 15:05:57 -04:00
Sam Crowder efca21070d Update changelog via LangGraph Server Changelog Bot 2025-07-28 10:10:50 -07:00
Sam CrowderandGitHub dba20d0577 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5680) 2025-07-28 07:51:52 -07:00
Sam Crowder 5145dac12b Update changelog via LangGraph Server Changelog Bot 2025-07-28 07:39:31 -07:00
Sydney RunkleandGitHub 440c7ff12a release(langgraph): v0.6.0 (#5684) 2025-07-28 09:11:43 -04:00
Sydney RunkleandGitHub 5eef290c4e fix(langgraph): backwards compat config utils (#5683) 2025-07-28 09:06:38 -04:00
Sydney Runkle a8b3746356 release prep v0.6 2025-07-28 09:05:23 -04:00
Sydney Runkle 7541331643 no top level file 2025-07-28 09:00:09 -04:00
Sydney Runkle 76814676c2 finalize utils 2025-07-28 08:57:46 -04:00
Sydney RunkleandGitHub 0804984f9d Merge branch 'main' into sr/config-utils 2025-07-28 08:54:49 -04:00
Sydney Runkle 8f11b6a003 ensure_config and patch_configurable 2025-07-28 08:53:10 -04:00
Sam Crowder aa6b122e4c Update changelog via LangGraph Server Changelog Bot 2025-07-27 08:43:43 -07:00
23491e5c9a docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5676)
Automated changelog update created by the LangGraph Server Changelog
Bot.

Feel free to merge anytime.

---------

Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-07-27 13:38:15 +00:00
Sydney Runkle 1491f30a07 ensure config also 2025-07-25 16:23:28 -04:00
Sydney RunkleandGitHub f63635d3c8 release: langgraph v0.6.0a1, langgraph-prebuilt v0.6.0a1 (#5671) 2025-07-25 15:53:08 -04:00
Sydney RunkleandGitHub 6672032568 chore: add backwards compat utils imports to make v0.6 migration easier (#5670) 2025-07-25 15:44:02 -04:00
Sydney Runkle 311ce7b04f alpha bumps 2025-07-25 15:41:51 -04:00
Sydney Runkle 14b732740e removal notice 2025-07-25 15:37:41 -04:00
Sydney Runkle 370825a48a lint 2025-07-25 15:36:56 -04:00
Sydney Runkle 264bae5a7e adding backwards compat utils imports to make my life easier 2025-07-25 15:35:48 -04:00
f6aa19709e feat(prebuilt): Add dynamic model to create_react_agent (#5651)
This PR allows a developer to change the model configuration at run time based on context. This includes that list of tools available to the model to call.

```python
def create_react_agent(
    model: Union[
        str, 
	LanguageModelLike,
        Callable[[SateLike, Runtime...], BaseChatModel], # <--- New
    ],
    tools: Union[
      Sequence[Union[BaseTool, Callable, dict[str, Any]]], ToolNode]
    ],
    *,
....


llm = init_chat_model(...)

def prepare_model(state, runtime):
   selected_tool_names = func(state, context)
   return llm.bind(tools=selected_tool_names)

create_react_agent(
  prepare_model,
  tools=all_known_tools
)
```

## Semantics

1. `tools` = are the known tools, used to configure ToolNode and will
configure:
    1. model provided as string
    2. model provided as BaseChatModel (if it has no tools bound to it)
2. If a user provides a dynamic model (callable), the user is
responsible for binding tools


Alternative considered:

1. Passing `Callable[[SateLike, Config...], list[BaseTool]]` to tools
2. Passing `Callable[[SateLike, Config...], list[str]]` to a tool
selector

Both have the issue that there's non obvious interplay between tool
selection and dynamic models. (i.e., if we want to introduce dynamic
models at in the future, the API will become tricky to explain)

---------

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-07-25 14:48:15 -04:00
Sydney RunkleandGitHub 8495f6f95d chore(ci): harden release workflow (#5669) 2025-07-25 14:45:18 -04:00
Eugene Yurtsev 6710908d40 x 2025-07-25 14:37:03 -04:00
Eugene Yurtsev d24ad3d980 x 2025-07-25 14:34:49 -04:00
Eugene Yurtsev 2d8288fd0f reduce permissions 2025-07-25 14:14:07 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c1ef10a0ec chore: bump form-data from 4.0.1 to 4.0.4 in /docs (#5615)
Bumps [form-data](https://github.com/form-data/form-data) from 4.0.1 to
4.0.4.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/form-data/form-data/blob/master/CHANGELOG.md">form-data's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/form-data/form-data/compare/v4.0.3...v4.0.4">v4.0.4</a>
- 2025-07-16</h2>
<h3>Commits</h3>
<ul>
<li>[meta] add <code>auto-changelog</code> <a
href="https://github.com/form-data/form-data/commit/811f68282fab0315209d0e2d1c44b6c32ea0d479"><code>811f682</code></a></li>
<li>[Tests] handle predict-v8-randomness failures in node &lt; 17 and
node &gt; 23 <a
href="https://github.com/form-data/form-data/commit/1d11a76434d101f22fdb26b8aef8615f28b98402"><code>1d11a76</code></a></li>
<li>[Fix] Switch to using <code>crypto</code> random for boundary values
<a
href="https://github.com/form-data/form-data/commit/3d1723080e6577a66f17f163ecd345a21d8d0fd0"><code>3d17230</code></a></li>
<li>[Tests] fix linting errors <a
href="https://github.com/form-data/form-data/commit/5e340800b5f8914213e4e0378c084aae71cfd73a"><code>5e34080</code></a></li>
<li>[meta] actually ensure the readme backup isn’t published <a
href="https://github.com/form-data/form-data/commit/316c82ba93fd4985af757b771b9a1f26d3b709ef"><code>316c82b</code></a></li>
<li>[Dev Deps] update <code>@ljharb/eslint-config</code> <a
href="https://github.com/form-data/form-data/commit/58c25d76406a5b0dfdf54045cf252563f2bbda8d"><code>58c25d7</code></a></li>
<li>[meta] fix readme capitalization <a
href="https://github.com/form-data/form-data/commit/2300ca19595b0ee96431e868fe2a40db79e41c61"><code>2300ca1</code></a></li>
</ul>
<h2><a
href="https://github.com/form-data/form-data/compare/v4.0.2...v4.0.3">v4.0.3</a>
- 2025-06-05</h2>
<h3>Fixed</h3>
<ul>
<li>[Fix] <code>append</code>: avoid a crash on nullish values <a
href="https://redirect.github.com/form-data/form-data/issues/577"><code>[#577](https://github.com/form-data/form-data/issues/577)</code></a></li>
</ul>
<h3>Commits</h3>
<ul>
<li>[eslint] use a shared config <a
href="https://github.com/form-data/form-data/commit/426ba9ac440f95d1998dac9a5cd8d738043b048f"><code>426ba9a</code></a></li>
<li>[eslint] fix some spacing issues <a
href="https://github.com/form-data/form-data/commit/20941917f0e9487e68c564ebc3157e23609e2939"><code>2094191</code></a></li>
<li>[Refactor] use <code>hasown</code> <a
href="https://github.com/form-data/form-data/commit/81ab41b46fdf34f5d89d7ff30b513b0925febfaa"><code>81ab41b</code></a></li>
<li>[Fix] validate boundary type in <code>setBoundary()</code> method <a
href="https://github.com/form-data/form-data/commit/8d8e4693093519f7f18e3c597d1e8df8c493de9e"><code>8d8e469</code></a></li>
<li>[Tests] add tests to check the behavior of <code>getBoundary</code>
with non-strings <a
href="https://github.com/form-data/form-data/commit/837b8a1f7562bfb8bda74f3fc538adb7a5858995"><code>837b8a1</code></a></li>
<li>[Dev Deps] remove unused deps <a
href="https://github.com/form-data/form-data/commit/870e4e665935e701bf983a051244ab928e62d58e"><code>870e4e6</code></a></li>
<li>[meta] remove local commit hooks <a
href="https://github.com/form-data/form-data/commit/e6e83ccb545a5619ed6cd04f31d5c2f655eb633e"><code>e6e83cc</code></a></li>
<li>[Dev Deps] update <code>eslint</code> <a
href="https://github.com/form-data/form-data/commit/4066fd6f65992b62fa324a6474a9292a4f88c916"><code>4066fd6</code></a></li>
<li>[meta] fix scripts to use prepublishOnly <a
href="https://github.com/form-data/form-data/commit/c4bbb13c0ef669916657bc129341301b1d331d75"><code>c4bbb13</code></a></li>
</ul>
<h2><a
href="https://github.com/form-data/form-data/compare/v4.0.1...v4.0.2">v4.0.2</a>
- 2025-02-14</h2>
<h3>Merged</h3>
<ul>
<li>[Fix] set <code>Symbol.toStringTag</code> when available <a
href="https://redirect.github.com/form-data/form-data/pull/573"><code>[#573](https://github.com/form-data/form-data/issues/573)</code></a></li>
<li>[Fix] set <code>Symbol.toStringTag</code> when available <a
href="https://redirect.github.com/form-data/form-data/pull/573"><code>[#573](https://github.com/form-data/form-data/issues/573)</code></a></li>
<li>fix (npmignore): ignore temporary build files <a
href="https://redirect.github.com/form-data/form-data/pull/532"><code>[#532](https://github.com/form-data/form-data/issues/532)</code></a></li>
<li>fix (npmignore): ignore temporary build files <a
href="https://redirect.github.com/form-data/form-data/pull/532"><code>[#532](https://github.com/form-data/form-data/issues/532)</code></a></li>
</ul>
<h3>Fixed</h3>
<ul>
<li>[Fix] set <code>Symbol.toStringTag</code> when available (<a
href="https://redirect.github.com/form-data/form-data/issues/573">#573</a>)
<a
href="https://redirect.github.com/form-data/form-data/issues/396"><code>[#396](https://github.com/form-data/form-data/issues/396)</code></a></li>
<li>[Fix] set <code>Symbol.toStringTag</code> when available (<a
href="https://redirect.github.com/form-data/form-data/issues/573">#573</a>)
<a
href="https://redirect.github.com/form-data/form-data/issues/396"><code>[#396](https://github.com/form-data/form-data/issues/396)</code></a></li>
<li>[Fix] set <code>Symbol.toStringTag</code> when available <a
href="https://redirect.github.com/form-data/form-data/issues/396"><code>[#396](https://github.com/form-data/form-data/issues/396)</code></a></li>
</ul>
<h3>Commits</h3>
<ul>
<li>Merge tags v2.5.3 and v3.0.3 <a
href="https://github.com/form-data/form-data/commit/92613b9208556eb4ebc482fdf599fae111626fb6"><code>92613b9</code></a></li>
<li>[Tests] migrate from travis to GHA <a
href="https://github.com/form-data/form-data/commit/806eda77740e6e3c67c7815afb216f2e1f187ba5"><code>806eda7</code></a></li>
<li>[Tests] migrate from travis to GHA <a
href="https://github.com/form-data/form-data/commit/8fdb3bc6b5d001f8909a9fca391d1d1d97ef1d79"><code>8fdb3bc</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/form-data/form-data/commit/41996f5ac73a867046d48512cab62e64fc846dad"><code>41996f5</code></a>
v4.0.4</li>
<li><a
href="https://github.com/form-data/form-data/commit/316c82ba93fd4985af757b771b9a1f26d3b709ef"><code>316c82b</code></a>
[meta] actually ensure the readme backup isn’t published</li>
<li><a
href="https://github.com/form-data/form-data/commit/2300ca19595b0ee96431e868fe2a40db79e41c61"><code>2300ca1</code></a>
[meta] fix readme capitalization</li>
<li><a
href="https://github.com/form-data/form-data/commit/811f68282fab0315209d0e2d1c44b6c32ea0d479"><code>811f682</code></a>
[meta] add <code>auto-changelog</code></li>
<li><a
href="https://github.com/form-data/form-data/commit/5e340800b5f8914213e4e0378c084aae71cfd73a"><code>5e34080</code></a>
[Tests] fix linting errors</li>
<li><a
href="https://github.com/form-data/form-data/commit/1d11a76434d101f22fdb26b8aef8615f28b98402"><code>1d11a76</code></a>
[Tests] handle predict-v8-randomness failures in node &lt; 17 and node
&gt; 23</li>
<li><a
href="https://github.com/form-data/form-data/commit/58c25d76406a5b0dfdf54045cf252563f2bbda8d"><code>58c25d7</code></a>
[Dev Deps] update <code>@ljharb/eslint-config</code></li>
<li><a
href="https://github.com/form-data/form-data/commit/3d1723080e6577a66f17f163ecd345a21d8d0fd0"><code>3d17230</code></a>
[Fix] Switch to using <code>crypto</code> random for boundary
values</li>
<li><a
href="https://github.com/form-data/form-data/commit/d8d67dc8ac79285154edf7d3f57dbab593b9a146"><code>d8d67dc</code></a>
v4.0.3</li>
<li><a
href="https://github.com/form-data/form-data/commit/e6e83ccb545a5619ed6cd04f31d5c2f655eb633e"><code>e6e83cc</code></a>
[meta] remove local commit hooks</li>
<li>Additional commits viewable in <a
href="https://github.com/form-data/form-data/compare/v4.0.1...v4.0.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=form-data&package-manager=npm_and_yarn&previous-version=4.0.1&new-version=4.0.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-25 13:31:18 -04:00
Eugene YurtsevandGitHub a3d7b6f44e chore(checkpoint-sqlite): Release 2.0.11 (#5667)
Release new version
2025-07-25 17:26:26 +00:00
Eugene YurtsevandGitHub bc9d45b476 fix(checkpoint-sqlite): add validation to filter keys in sql store (#5666)
This PR adds validation to keys used in filtering logic in the SQLite store implementation.
2025-07-25 13:01:13 -04:00
Sydney RunkleandGitHub 7d3f0089aa docs: more thorough notes on v0.6 features and changes (#5623) 2025-07-25 09:33:53 -04:00
Sydney RunkleandGitHub ed678f4701 Merge branch 'main' into sr/version-added-for-context 2025-07-25 09:27:52 -04:00
Sydney Runkle 22411ba0fd lint 2025-07-25 09:27:34 -04:00
Sydney Runkle 5b9021ff37 typo 2025-07-25 09:25:26 -04:00
Sydney Runkle aaff464115 move deprecation note for config_schema 2025-07-25 09:23:59 -04:00
Sam CrowderandGitHub 3a23a256e2 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5657) 2025-07-24 20:37:10 -07:00
Sam Crowder f6857395b9 Update changelog via LangGraph Server Changelog Bot 2025-07-24 20:19:17 -07:00
William FHandGitHub cdaa7ba003 chore: typing for headers in remote graph (#5653) 2025-07-24 18:00:44 -07:00
Sydney Runkle 39745ed794 Merge branch 'sr/version-added-for-context' of https://github.com/langchain-ai/langgraph into sr/version-added-for-context 2025-07-24 17:31:25 -04:00
Sydney Runkle 738bb8a343 Merge branch 'sr/fixes-for-v6' into sr/version-added-for-context 2025-07-24 17:31:21 -04:00
Sydney RunkleandGitHub b2dde8d9af Merge branch 'main' into sr/version-added-for-context 2025-07-24 17:29:54 -04:00
Sydney Runkle 5312edc830 more runtime details 2025-07-24 17:28:58 -04:00
Sydney Runkle 276310e116 fix and interrupt 2025-07-24 16:54:20 -04:00
Sydney Runkle 39977ded8c runtime api ref 2025-07-24 16:36:51 -04:00
Sydney Runkle 439038fc3a deprecation for config_schema in docs 2025-07-24 16:23:42 -04:00
Sam CrowderandGitHub 2e5445c565 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5650) 2025-07-24 11:35:22 -07:00
Sam Crowder d38510ad03 Update changelog via LangGraph Server Changelog Bot 2025-07-24 09:18:21 -07:00
Sydney RunkleandGitHub 951486d107 release(prebuilt): 0.6.0 (#5648) 2025-07-24 10:38:24 -04:00
Sydney Runkle 745a1e7a29 bumping required prebuilt version 2025-07-24 10:27:20 -04:00
Sam CrowderandGitHub 24731d6a28 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5625) 2025-07-23 20:06:22 -07:00
Sam Crowder a4689a5d10 Update changelog via LangGraph Server Changelog Bot 2025-07-23 18:59:50 -07:00
langchain-infraandGitHub b05ce0bf60 release(cli): Release new CLI version with support for api-version flag (#5640) 2025-07-23 19:47:25 -04:00
David Asamu 4501e41991 uv sync 2025-07-24 00:36:02 +01:00
Asamu DavidandGitHub bc83287fc8 bump version number
new CLI version with support for api-version flag
2025-07-24 00:19:57 +01:00
Andrew NguonlyandGitHub 11547e1990 docs: Add more clarification about the LangSmith API key for LangGraph Platform deployments (#5635) 2025-07-23 11:39:39 -07:00
langchain-infraandGitHub fadd9c4577 feat(cli): add support for api-version (#5584) 2025-07-23 12:33:04 -04:00
Asamu DavidandGitHub fd2933a792 Merge branch 'main' into david/30-06/support-base-image-tag 2025-07-23 15:42:24 +01:00
David Asamu 40fa69f8ee lint and format fixes 2025-07-23 15:39:34 +01:00
Sam Crowder 0824161984 Update changelog via LangGraph Server Changelog Bot 2025-07-22 13:47:31 -07:00
Sam CrowderandGitHub b028f502e1 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5611) 2025-07-22 12:47:33 -07:00
William FHandGitHub 9dc3fed6b8 feat(langgraph): Support sending distributed tracing headers (#5619) 2025-07-22 12:47:23 -07:00
Sydney Runkle 0232201b7b improving docs for context 2025-07-22 13:28:27 -04:00
Sydney RunkleandGitHub 869b0f2de4 release(sdk-py): 0.2.0 (#5622) 2025-07-22 13:27:04 -04:00
Sydney Runkle 90e3adcd71 bump sdk version 2025-07-22 13:20:55 -04:00
Sydney RunkleandGitHub cb918601d1 release: prep for langgraph v0.6 (#5325) 2025-07-22 13:14:31 -04:00
Sydney Runkle 4a4c8db635 fix header 2025-07-22 12:54:21 -04:00
Sydney Runkle 56a9ce57b1 docs build fixes 2025-07-22 12:46:56 -04:00
Sydney Runkle d1ee1cf1f1 docs fix 2025-07-22 11:19:08 -04:00
Sydney RunkleandGitHub 29c3a579b3 release(sdk-py): use v0.2.0a1 for testing with sdk (#5621) 2025-07-22 15:08:07 +00:00
Sydney RunkleandGitHub 9e3cb1f034 feat(sdk-py): sdk support for context API (#5566)
Adding support for the `context` arg to `invoke/stream` to the sdk. This
is paired with an update to the API as well that adds `context` support
to the `assistants` and `runs` endpoints.

Bumping version to v0.2.0 on the `v1` branch given this and the
interrupt schema changes.
2025-07-22 10:48:12 -04:00
Sydney RunkleandGitHub 508e333220 Merge branch 'main' into v1 2025-07-22 08:55:42 -04:00
Sam Crowder aa1bbe3d01 Update changelog via LangGraph Server Changelog Bot 2025-07-21 17:41:55 -07:00
Sydney RunkleandGitHub 139cad373b fix(docs): use InMemorySaver instead of MemorySaver (#5608)
Also, remove comment from bash script that makes insertion of `uv`
harder
2025-07-21 18:49:55 +00:00
Sydney RunkleandGitHub 2a86abb8c4 chore: lint v1 branch (due to auto merges) (#5607) 2025-07-21 18:43:22 +00:00
Sydney RunkleandGitHub d1f0799002 Merge branch 'main' into v1 2025-07-21 14:35:13 -04:00
Sydney RunkleandGitHub be088801ba fix(langgraph): fix assertion in test (#5606) 2025-07-21 14:25:37 -04:00
Sydney RunkleandGitHub 1ee6bfeb8d release(langgraph): v0.5.4 (#5605) 2025-07-21 18:17:00 +00:00
Nuno CamposandGitHub 2153d36726 feat(langgraph): Handle ParentCommand in RemoteGraph (#5600)
- when receiving a "command" stream event raise ParentCommand exception
for caller graph to handle
2025-07-21 18:48:40 +01:00
Sydney RunkleandGitHub 819eae891e feat(sdk-py): add interrupts to ThreadState (#5603) 2025-07-21 16:33:00 +00:00
Sydney Runkle 457edaa75b locks 2025-07-21 12:32:23 -04:00
Sydney RunkleandGitHub 90ba4c5205 Merge branch 'main' into v1 2025-07-21 10:06:23 -04:00
Sydney RunkleandGitHub b3c5298100 fix(langgraph): ignore write to END with Command (#5601)
Fixes https://github.com/langchain-ai/langgraph/issues/5572

End is a special terminal node, so we don't need a branch to channel
like we do for other values passed to `Command.goto`
2025-07-21 14:03:00 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9d9476e664 chore: bump codespell-project/actions-codespell from 2.0 to 2.1 (#5597)
Bumps
[codespell-project/actions-codespell](https://github.com/codespell-project/actions-codespell)
from 2.0 to 2.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codespell-project/actions-codespell/releases">codespell-project/actions-codespell's
releases</a>.</em></p>
<blockquote>
<h2>v2.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Use v2 in README by <a
href="https://github.com/okuramasafumi"><code>@​okuramasafumi</code></a>
in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/69">codespell-project/actions-codespell#69</a></li>
<li>Bump actions/checkout from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/72">codespell-project/actions-codespell#72</a></li>
<li>Bump actions/setup-python from 4 to 5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/74">codespell-project/actions-codespell#74</a></li>
<li>feat: bump to use node20 runtime by <a
href="https://github.com/kbdharun"><code>@​kbdharun</code></a> in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/71">codespell-project/actions-codespell#71</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/76">codespell-project/actions-codespell#76</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/okuramasafumi"><code>@​okuramasafumi</code></a>
made their first contribution in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/69">codespell-project/actions-codespell#69</a></li>
<li><a
href="https://github.com/dependabot"><code>@​dependabot</code></a> made
their first contribution in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/72">codespell-project/actions-codespell#72</a></li>
<li><a href="https://github.com/kbdharun"><code>@​kbdharun</code></a>
made their first contribution in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/71">codespell-project/actions-codespell#71</a></li>
<li><a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
made their first contribution in <a
href="https://redirect.github.com/codespell-project/actions-codespell/pull/76">codespell-project/actions-codespell#76</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codespell-project/actions-codespell/compare/v2...v2.1">https://github.com/codespell-project/actions-codespell/compare/v2...v2.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/406322ec52dd7b488e48c1c4b82e2a8b3a1bf630"><code>406322e</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/76">#76</a>)</li>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/3174815d6231f5bdc24dbfb6fc3b8caec73d521c"><code>3174815</code></a>
feat: bump to use node20 runtime (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/71">#71</a>)</li>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/8edd9f294002b35e8d7de67b06ac493e89114b91"><code>8edd9f2</code></a>
Bump actions/setup-python from 4 to 5 (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/74">#74</a>)</li>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/8dc81685022bbd5008e21ddb6f44abe4eb4f27b1"><code>8dc8168</code></a>
Bump actions/checkout from 3 to 4 (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/72">#72</a>)</li>
<li><a
href="https://github.com/codespell-project/actions-codespell/commit/41170f1b9c4f5c5788cb677c6c2f9ef26010243d"><code>41170f1</code></a>
Use v2 in README (<a
href="https://redirect.github.com/codespell-project/actions-codespell/issues/69">#69</a>)</li>
<li>See full diff in <a
href="https://github.com/codespell-project/actions-codespell/compare/v2.0...v2.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=codespell-project/actions-codespell&package-manager=github_actions&previous-version=2.0&new-version=2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 09:30:41 -04:00
Sydney RunkleandGitHub 03bec97767 feat(sdk-py): add interrupts to thread state (#5580) 2025-07-20 23:46:38 +00:00
AG2AI-AdminandGitHub dd9b5c42e8 chore(docs): Migrate from pyautogen to ag2 Library (#5577) 2025-07-20 19:43:54 -04:00
Eugene YurtsevandGitHub 951a3f2d1c ci: Update privileged.yml (#5481) 2025-07-20 17:34:20 -04:00
Sakshi GuptaandGitHub adaa340c15 fix(docs): jokes needs reducer in graph-api.md (#5489) (#5489) 2025-07-20 17:32:47 -04:00
Yagnesh M. BhadiyadraandGitHub 2c85cba9ca fix(docs): Change of condition arguments in Command API example for ease of reading. (#5571) 2025-07-20 20:58:37 +00:00
cb7b924006 feat: Implement durability mode argument (#5432)
- Replaces checkpoint_during: bool
- checkpoint_during is deprecated but still respected
- We implement three durability modes (from least to most durable):
- "exit" - save checkpoint only when the graph exits (equivalent to
checkpoint_during=False)
- "async" - save checkpoint asynchronously while the next step executes
(the default, equivalent to old checkpoint_during=True)
- "sync" - save checkpoint synchronously before the next step starts
(new mode, slower but most durable)

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-07-20 15:42:18 +01:00
Sydney RunkleandGitHub c61ac946af feat(docs): add python alt for UI how to (#5593)
Fixes https://github.com/langchain-ai/langgraph/issues/5311
2025-07-20 09:33:17 -04:00
David Asamu ec0a30008c more semantic variable name 2025-07-19 03:30:29 +01:00
Asamu DavidandGitHub 00c7909c27 Merge branch 'main' into david/30-06/support-base-image-tag 2025-07-19 03:20:09 +01:00
David Asamu 58d396fcf1 merge main 2025-07-19 03:17:17 +01:00
David Asamu 9f0abf014d format changed files 2025-07-19 03:06:17 +01:00
David Asamu 8d6cd15669 add api-version option 2025-07-19 02:55:47 +01:00
Andrew NguonlyandGitHub 61676b8db0 docs: Change 'that' to 'than' (#5581) 2025-07-18 14:54:55 -07:00
langchain-infraandGitHub 3b85e53360 docs: fix egress formatting (#5575) 2025-07-18 10:43:03 -04:00
infra 250a17d711 docs: fix egress formatting 2025-07-18 09:42:46 -05:00
Eugene YurtsevandGitHub f63bec8578 chore(prebuilt): restructure tool node and tool injection logic (#5562)
* Cleaning up the underlying tool injection logic which is happening in
multiple locations.
* State was being injected into the ToolCall via Send in two places in
create react agent and the logic doesn't belong there, the actual
injection should be happening inside the ToolNode where there's
awareness of what run time parameters the tool accepts.

Change is required to unblock:
https://github.com/langchain-ai/langgraph/pull/5537
2025-07-18 09:59:14 -04:00
langchain-infraandGitHub dc0f0c5944 docs: add egress docs for LGP self hosted (#5569) 2025-07-18 03:14:40 -04:00
infra 777fe692d4 docs: add egress docs for LGP self hosted 2025-07-18 00:40:15 -04:00
infra fdbe31a3aa docs: add egress docs for LGP self hosted 2025-07-18 00:28:04 -04:00
Sam CrowderandGitHub 78a9933144 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5561) 2025-07-17 20:45:42 -07:00
Eugene YurtsevandGitHub 5717eefa79 feat(docs): Document disabling webhooks (#5535)
Add information about disabling webhooks
2025-07-17 15:23:00 -04:00
5978012619 release(cli): Release new CLI version with increased bounds for server (#5565)
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-07-17 12:22:30 -07:00
Eugene YurtsevandGitHub b447a1c7cf fix(docs): fix langgraph cli reference (#5563)
Fix for wrong indentation that completely messes up formatting
2025-07-17 12:10:11 -07:00
open-swe[bot]GitHubopen-swe-dev[bot] <open-swe-dev@users.noreply.github.com>Eugene Yurtsev
f87608a16f chore(prebuilt): Remove dead code from prebuilt tests (#5555)
Fixes #5554

This PR removes unused utility classes and functions from the prebuilt
tests directory to clean up dead code.

Changes include:
- Removed unused classes from `libs/prebuilt/tests/any_str.py`:
  - Deleted FloatBetween, AnyDict, AnyVersion, and UnsortedSequence
  - Kept only AnyStr class

- Removed unused functions from `libs/prebuilt/tests/messages.py`:
  - Deleted _AnyIdDocument and _AnyIdAIMessageChunk
  - Kept _AnyIdHumanMessage and _AnyIdToolMessage

- Removed unused classes from `libs/prebuilt/tests/memory_assert.py`:
- Deleted NoopSerializer, MemorySaverAssertCheckpointMetadata, and
MemorySaverNoPending
  - Kept MemorySaverAssertImmutable

Verification:
- Manually checked for no remaining references to removed code
- Maintained existing import structures
- Preserved functionality of the prebuilt test suite

The changes reduce code complexity and remove unnecessary utility
classes that were not being used in the test suite.

---------

Co-authored-by: open-swe-dev[bot] <open-swe-dev@users.noreply.github.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-07-17 18:45:10 +00:00
Sydney RunkleandGitHub a5fe3316b6 chore(langgraph): bump api version and prep for v0.6 alpha (#5559)
Bumping version on `v1` branch so that we can access most recent
`langgraph-cli[inmem]` changes (with v0.6 compat) for store injection.
2025-07-17 14:40:09 -04:00
Sam Crowder e0699fbdaf Update changelog via LangGraph Server Changelog Bot 2025-07-17 11:04:52 -07:00
Lauren Hirata SinghandGitHub b4eb57da67 docs: Rearrange nav (#5560)
Move Prebuilts overview and Run an agent to the guides page
2025-07-17 13:47:43 -04:00
Sam CrowderandGitHub cec3bef7ea docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5558)
Automated changelog update created by the LangGraph Server Changelog
Bot.

Feel free to merge anytime.
2025-07-17 12:41:13 -04:00
Sydney RunkleandGitHub adc732272c refactor(langgraph): improve Runtime interface re patch/overrides (#5546) 2025-07-17 09:57:25 -04:00
Nuno Campos 71dc92b349 langgraph-checkpoint 2.1.1 2025-07-17 15:04:57 +02:00
79b4642e55 fix(docs): broken URL in _AIO_ERROR_MSG for AsyncSqliteSaver (#5483)
remove unreachable `yield` from unimplemented async methods

---------

Co-authored-by: Nuno Campos <nuno@langchain.dev>
2025-07-17 12:26:22 +00:00
Nuno CamposandGitHub 48446bcbd2 chore(docs): Mention dataclass (#5470) 2025-07-17 14:23:41 +02:00
Nuno CamposandGitHub cf95c870fe fix(checkpoint): fix AsyncBatchedBaseStore getting stuck (#5504) 2025-07-17 12:50:18 +02:00
Nuno CamposandGitHub a34c38a53d docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5547) 2025-07-17 12:24:24 +02:00
Sam Crowder db5276ded1 Update changelog via LangGraph Server Changelog Bot 2025-07-16 16:32:19 -07:00
Sam CrowderandGitHub 9c67b9ce4b docs(docs): add disclaimer about overriding otel with DD_API_KEY (#5538) 2025-07-16 16:06:54 -07:00
Lauren Hirata SinghandGitHub 08667fe786 docs: More tracing (#5545)
docs: add more about tracing
2025-07-16 19:06:43 -04:00
Sydney Runkle c6d674cd3e Merge branch 'main' into v1 2025-07-16 18:32:07 -04:00
Sydney RunkleandGitHub 294078adab release(langgraph): revert alpha release, going to do v0.6 off main instead (#5543)
Revert "release(langgraph): v1.0.0a1 (#5520)"

This reverts commit 2eecaa8500.
2025-07-16 18:30:43 -04:00
Sam CrowderandGitHub 48dabc0538 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5540)
Update changelog via LangGraph Server Changelog Bot
2025-07-16 18:24:46 -04:00
d2cc02d789 Update docs/docs/cloud/reference/env_var.md
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-07-16 14:17:56 -07:00
Lauren Hirata SinghandGitHub 92c66d13ec docs: add o11y overview (#5542)
* docs: add o11y overview

* add section for enabling tracing
2025-07-16 16:32:11 -04:00
Sam Crowder 7f821deded remove word tracing 2025-07-16 11:36:16 -07:00
Sam Crowder 12a601c8a3 fix: add disclaimer to the docs about DD_API_KEY overriding app-level tracing 2025-07-16 11:35:48 -07:00
Eugene YurtsevandGitHub d64447c4c2 chore(prebuilt): Allow testing fast (#5533)
Allow testing fast
2025-07-16 15:56:28 +00:00
0d2db35d93 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5530)
* Update changelog via LangGraph Server Changelog Bot

* Update docs/docs/cloud/reference/langgraph_server_changelog.md

* Update docs/docs/cloud/reference/langgraph_server_changelog.md

---------

Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-07-16 14:01:46 +00:00
Sydney RunkleandGitHub 6e9e1ca146 refactor(langgraph): make constants generally private with a few select exports (#5529) 2025-07-16 09:27:04 -04:00
renchaoandGitHub b290e1ffdc docs(mcp): update workflow usage examples (#5525)
Update mcp.md

 "END" is missing
2025-07-16 13:21:26 +00:00
Nuno Campos a5eb6a75bf checkpoint-postgres 2.0.23 2025-07-16 11:58:07 +02:00
Nuno CamposandGitHub 7a136aaff6 perf(checkpoint-postgres): Reduce writes to checkpoint_blobs table (#5524) 2025-07-16 11:57:11 +02:00
Nuno Campos e973e936c3 perf: checkpoint-postgres: Reduce writes to checkpoint_blobs table
- Channels containing primitive values don't need to be stored in separate rows in blobs table, as the overhead of a separate row will usually be higher than the size of the value
- This applies for instance to all internal channels used to manage edges, so it has a big impact just from that. It can also apply to user-managed channels depending on their values
- The same channel may switch storage between versions without any issue
2025-07-16 11:43:51 +02:00
066f3b21f8 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5523)
* Update changelog via LangGraph Server Changelog Bot

* Update docs/docs/cloud/reference/langgraph_server_changelog.md

---------

Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-07-16 06:39:09 +00:00
Sydney RunkleandGitHub 2eecaa8500 release(langgraph): v1.0.0a1 (#5520)
prep for alpha release
2025-07-15 16:23:59 -04:00
Sydney RunkleandGitHub d935a2d110 refactor(langgraph): move typing constructs in constants.py -> _internal/_typing.py (#5518) 2025-07-15 16:13:34 -04:00
+3 d5b8733a40 ci(docs): Add codespell for docs md and py files (#5494)
* docs: Add codespell for markdown files

* update

* remove path

* fix

* update linting guidelines

* chore[deps]: upgrade dependencies with `uv lock --upgrade` (#5471)

Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com>

* fix(checkpoint): correct logging call to use logger (#5458)

fix[checkpoint]: correct logging call to use logger

* release(langgraph): v0.5.3 (#5498)

bump

* extend to cover python files used for reference docs

* fix(docs): Update the graph image link (#5500)

Update the graph image link

Point to the correct image reference for Map-Reduce and the Send API example

* fix(docs): Update graph-api.md File to reflect correct image (#5499)

Update graph-api.md File to reflect correct image

Referencing to the correct image file

* docs(prebuilt): improve documentation in ToolNode module (#5497)

Update documentation in ToolNode module

* Update changelog via LangGraph Server Changelog Bot

* feat(sdk-py): Show is_studio_user (#5505)

* Update changelog via LangGraph Server Changelog Bot

* fix(docs): Node caching explanation code required a small fix,. (#5473)

fix(docs): Node caching explanation code required a small fix, to avoid confusion to readers. The code had `time.sleep(2)` but the note mentioned one second only.

Co-authored-by: ygicp <yagnesh@infocusp.com>

* fix(langgraph): add `stacklevel=2` to the warnings to point to the caller’s codes (#5457)

chore: add stacklevel=2 to the warnings to point to the caller’s codes

* chore(docs): Improve example in use mcp (#5480)

* Make example more explicit

* Update docs/docs/agents/mcp.md

* fix(docs): update examples link (#5515)

Co-authored-by: ahmed murtaza <ahmed.gmurtaza@gmail.com>

* docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5514)

Update changelog via LangGraph Server Changelog Bot

* fix readmes

* fix

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com>
Co-authored-by: Michael Li <michaelli65535@gmail.com>
Co-authored-by: Sakshi Gupta <64280320+sakshi1989@users.noreply.github.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Sam Crowder <samecrowder@gmail.com>
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
Co-authored-by: Yagnesh M. Bhadiyadra <35532869+yagneshmb@users.noreply.github.com>
Co-authored-by: ygicp <yagnesh@infocusp.com>
Co-authored-by: Ahmed Murtaza <ahmed.gmurtaza@hotmail.com>
Co-authored-by: ahmed murtaza <ahmed.gmurtaza@gmail.com>
2025-07-15 19:22:48 +00:00
Lauren Hirata SinghandGitHub 40c0e44b9a docs: Update with links to Forum (#5440)
Also updates some outdated references to LangChain
2025-07-15 14:55:15 -04:00
Mason DaughertyandGitHub b5afec4b2a chore: add PR template (#5491) 2025-07-15 14:48:59 -04:00
Sam CrowderandGitHub d674e1bddd docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5514)
Update changelog via LangGraph Server Changelog Bot
2025-07-15 11:13:18 -04:00
8c68f739b9 fix(docs): update examples link (#5515)
Co-authored-by: ahmed murtaza <ahmed.gmurtaza@gmail.com>
2025-07-15 15:03:56 +00:00
Eugene YurtsevandGitHub 1500ebd3d7 chore(docs): Improve example in use mcp (#5480)
* Make example more explicit

* Update docs/docs/agents/mcp.md
2025-07-15 15:01:16 +00:00
Sydney RunkleandGitHub 0837263542 feat(langgraph): new context api (replacing config['configurable'] and config_schema) (#5243) 2025-07-15 09:20:20 -04:00
Michael LiandGitHub 18633bc99e fix(langgraph): add stacklevel=2 to the warnings to point to the caller’s codes (#5457)
chore: add stacklevel=2 to the warnings to point to the caller’s codes
2025-07-15 01:01:29 +00:00
2558f81889 fix(docs): Node caching explanation code required a small fix,. (#5473)
fix(docs): Node caching explanation code required a small fix, to avoid confusion to readers. The code had `time.sleep(2)` but the note mentioned one second only.

Co-authored-by: ygicp <yagnesh@infocusp.com>
2025-07-15 00:58:32 +00:00
Sam CrowderandGitHub b832fefc58 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5506) 2025-07-14 17:11:02 -07:00
Sam Crowder 444d699fe8 Update changelog via LangGraph Server Changelog Bot 2025-07-14 17:04:46 -07:00
William FHandGitHub e315fb7397 feat(sdk-py): Show is_studio_user (#5505) 2025-07-14 16:55:32 -07:00
Darren Clark 0d8dfa7bba fix(checkpoint): fix AsyncBatchedBaseStore getting stuck
This commit fixes #5503

Gist of it is:

- `asyncio.exception.InvalidStateError` were being raised when the
  future was cancelled
- this exception bubbled up and killed the background task
- `AsyncBatchedBaseStore` stopped doing queries because the background
  task wasn't running anymore

This commit adds some "if future is not done" checks to guard against
this.
2025-07-14 18:03:51 -04:00
Sam CrowderandGitHub 2c2ace2a40 docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5502) 2025-07-14 13:50:02 -07:00
Sam Crowder 74218fadad Update changelog via LangGraph Server Changelog Bot 2025-07-14 13:47:00 -07:00
Eugene YurtsevandGitHub 7a39e5fc6e docs(prebuilt): improve documentation in ToolNode module (#5497)
Update documentation in ToolNode module
2025-07-14 16:43:35 -04:00
Sakshi GuptaandGitHub 06144b3b13 fix(docs): Update graph-api.md File to reflect correct image (#5499)
Update graph-api.md File to reflect correct image

Referencing to the correct image file
2025-07-14 20:39:47 +00:00
Sakshi GuptaandGitHub b19572351e fix(docs): Update the graph image link (#5500)
Update the graph image link

Point to the correct image reference for Map-Reduce and the Send API example
2025-07-14 20:38:53 +00:00
Sydney RunkleandGitHub a5ce13eb45 release(langgraph): v0.5.3 (#5498)
bump
2025-07-14 20:05:52 +00:00
Michael LiandGitHub e91f72dd48 fix(checkpoint): correct logging call to use logger (#5458)
fix[checkpoint]: correct logging call to use logger
2025-07-14 19:16:10 +00:00
3d9cb305b4 chore[deps]: upgrade dependencies with uv lock --upgrade (#5471)
Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-07-14 13:48:40 -04:00
jitoandGitHub de1460937a docs(checkpoint-postgres): fix typo in comment (#5486)
fix typo in comment

Signed-off-by: jitokim <pigberger70@gmail.com>
2025-07-14 16:58:13 +00:00
Sydney RunkleandGitHub e0bf4a7bc3 Merge branch 'main' into v1 2025-07-14 12:54:11 -04:00
Hunter LovellandGitHub 06f311fffb chore: add forum to readme (#5488)
* chore: add forum to readme

* chore(langgraph): sync readme
2025-07-14 12:51:18 -04:00
Micael JarniacandGitHub 5bdb887638 docs: fix Langraph typo (#5490) 2025-07-14 12:49:38 -04:00
Sydney RunkleandGitHub 6c4034420c fix(langgraph): remove ABC spec for PregelProtocol (#5485) 2025-07-14 12:24:49 -04:00
Lauren Hirata SinghandGitHub fa5d93ac2f docs: Fix image in Graph API how to (#5487)
docs: Fix iimage in Graph API how to

Closes https://github.com/langchain-ai/langgraph/issues/5451
2025-07-14 11:48:50 -04:00
Krishna NadigerandGitHub d14a6e2c04 fix(docs): Corrected Send import in example code of "Map-Reduce and the Sen… (#5466)
Fix: Corrected Send import in example code of "Map-Reduce and the Send API"

Fixes #5465 - Moved Send import from langgraph.graph to langgraph.types
2025-07-14 14:49:13 +00:00
jitoandGitHub 54dadadac4 docs(prebuilt): fix typo in interrupt.py (#5478)
fix typo in interrupt.py

Signed-off-by: jitokim <pigberger70@gmail.com>
2025-07-14 14:06:13 +00:00
langchain-infraandGitHub d073e1bd8a docs: fix langgraph dataplane docs (#5474) 2025-07-13 19:53:04 -04:00
infra 28c276f377 docs: fix langgraph dataplane docs 2025-07-13 19:10:57 -04:00
William Fu-Hinthorn a71eb09488 chore[docs]: Mention dataclass 2025-07-12 14:11:25 -07:00
Lauren Hirata SinghandGitHub 579c7831b9 docs: static vs dynamic interrupts (#5426)
* docs: static vs dynamic interrupts

* fixes based on feedback

* fix image

* Add section about debugging in Studio

* Reorg content based on feedback

* fix

* fix links

* fix wording

* fix wording
2025-07-11 17:07:43 -04:00
Xin JinandGitHub 16da5f4779 fix: markdown title copy button (#5462)
fix url remove dup title
2025-07-11 21:02:58 +00:00
Eugene YurtsevandGitHub f59a1339c9 chore(docs): Consolidate hooks for copy markdown and notebooks (#5459)
Consolidating the hooks to avoid duplication of logic

We need this change for consolidating js and python content: we need include-markdown to run as a mkdocs plugin before our pipeline (rather than as markdown extension which runs after our hooks plugin).
2025-07-11 20:44:46 +00:00
Xin JinandGitHub d166e9b8e9 fix: llm.txt url link broken (#5460)
fix url issue
2025-07-11 16:40:37 -04:00
Xin JinandGitHub 4da35babda feat: add copy page button functionality and fix llms-text output (#5419)
* feat: add copy page button functionality and fix llms-text output

- Add copy page button with CSS and JS implementation
- Implement copy page hooks for MkDocs integration
- Fix HTML filtering and DOM text reinterpreted as HTML issues
- Update llms-text target to generate docs/llm.txt instead of docs/llms-full.txt
- Add necessary styling and package.json dependencies

* fix missing button in preview

* remove the over-processing

* disable API reference
2025-07-11 15:13:55 -04:00
Sam CrowderandGitHub c3d882e87a docs: [LangGraph Server Changelog Bot] Changelog updates for new version(s) (#5455)
Update changelog via LangGraph Server Changelog Bot
2025-07-11 11:55:08 -07:00
jitoandGitHub fbade9e300 docs: fix variable reference in agent evaluator example (#5434)
Signed-off-by: jitokim <pigberger70@gmail.com>
2025-07-11 14:57:49 +00:00
jitoandGitHub 0b6a9e345d fix(langgraph): replace _state_schema to state_schema when accessing StateGraph (#5436) 2025-07-11 01:39:59 +00:00
William FHandGitHub 9b9bf88aee fix(checkpoint-postgres): Remove python invalid escape warning (#5441) 2025-07-10 22:38:05 +00:00
Sydney RunkleandGitHub 5f00938aa2 feat(langgraph): add type checking for matching node signatures vs input_schema for add_node (#5424) 2025-07-10 09:42:37 -04:00
William FHandGitHub 67a86f2dc2 fix[docs]: Add missing flags for langgraph up command (#5429) 2025-07-10 02:07:48 +00:00
Sam CrowderandGitHub ad44d1fe66 docs: [LangGraph Changelog Bot] Changelog updates for new version(s) (#5427) 2025-07-09 18:41:03 -07:00
Sam Crowder 5c45f7c330 Update changelog via LangGraph Changelog Bot 2025-07-09 18:06:04 -07:00
Sam CrowderandGitHub bb2f448175 docs: [LangGraph Changelog Bot] Changelog updates for new version(s) (#5425) 2025-07-09 13:55:14 -07:00
Sam Crowder 8a9f3dbf6f Update changelog via LangGraph Changelog Bot 2025-07-09 13:34:04 -07:00
Sam Crowder 63f051ad28 Update changelog via LangGraph Changelog Bot 2025-07-09 13:25:47 -07:00
Sydney RunkleandGitHub e5ded1888b Merge branch 'main' into v1 2025-07-09 15:26:08 -04:00
Sydney RunkleandGitHub 0ab9770056 release(langgraph): v0.5.2 (#5421)
langgraph bump
2025-07-09 19:10:20 +00:00
Eugene YurtsevandGitHub 8ca5e56f52 fix(docs): links in examples file (#5420)
Fix broken links in examples
2025-07-09 14:59:41 -04:00
0733ec65ad docs: introduce LangGraph Server changelog (#5417)
* introduce changelog

* fix spelling

* Update docs/mkdocs.yml

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>

* Update docs/docs/cloud/reference/langgraph_server_changelog.md

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>

* Update docs/docs/cloud/reference/langgraph_server_changelog.md

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>

* Update langgraph_server_changelog.md

---------

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-07-09 14:37:39 -04:00
Sydney RunkleandGitHub 543cbe9032 chore: add PR title linter (#5416) 2025-07-09 14:12:00 -04:00
Sydney RunkleandGitHub d1710e2eac change[langgraph]: clean up Interrupt interface for v1 (#5405) 2025-07-09 14:03:08 -04:00
Sydney RunkleandGitHub 6eace78c53 patch[langgraph]: Fix hint for invoke/stream to allow for Command and None (#5414)
use Command and None as well
2025-07-09 13:23:28 -04:00
Sydney RunkleandGitHub e5947bcd30 Merge branch 'main' into v1 2025-07-09 13:06:41 -04:00
jitoandGitHub 1240f8bdca fix: correct troubleshooting link path (#5411)
fix: correct troubleshooting link path from index.md.md to index.md

Signed-off-by: jitokim <pigberger70@gmail.com>
2025-07-09 16:20:33 +00:00
Eugene YurtsevandGitHub 4d7c107bb8 Update config.yml (#5412) 2025-07-09 12:19:49 -04:00
Andrew NguonlyandGitHub 7a4fd25185 docs: Add RESUMABLE_STREAM_TTL_SECONDS to env vars list (#5413)
* Add RESUMABLE_STREAM_TTL_SECONDS to env vars list.

* Update default value for BG_JOB_SHUTDOWN_GRACE_PERIOD_SECS.

* Update LANGGRAPH_POSTGRES_POOL_MAX_SIZE description.
2025-07-09 10:53:21 -04:00
Kai-WendelandGitHub 7a66213535 Fix typo in types.py in the interrupt example (#5407)
Update types.py

This example still lacked to include `Command`.
2025-07-08 20:49:04 +00:00
nlimpidandGitHub c8d32f104d fix(doc): remove incorrect navigation title overrides for mobile (#5399) 2025-07-08 20:09:57 +00:00
William FHandGitHub 2fee649980 chore: (cli) Update description of disable_meta (#5406) 2025-07-08 19:55:10 +00:00
William FHandGitHub 0d8a8c5847 feat: [CLI] Add arg to retain build deps (setuptools, pip, wheel) (#5404) 2025-07-08 19:41:47 +00:00
Michael LiandGitHub 9cb6365914 docs: update file paths to make the examples more robust (#5382)
* cli: update file paths to make the examples more robust

* fix: fix the prompt path
2025-07-08 18:58:04 +00:00
Sydney RunkleandGitHub b6dc566ec7 Merge branch 'main' into v1 2025-07-08 14:55:09 -04:00
Jake BroekhuizenandGitHub fb1c0ae9f9 docs: Updating mcp_tools_node fn & referencing runtime graph rebuild docs (#5328)
Fix: Updating mcp_tools_node fn & referencing runtime graph rebuild docs
2025-07-08 12:55:15 -04:00
Lauren Hirata SinghandGitHub 4de1bd6e66 docs: cleanup (#5401)
* docs: cleanup

* fix nav

* fix

* fix nits
2025-07-08 12:33:14 -04:00
+8
Lauren Hirata SinghGitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>sydney-runkleSydney RunkleAndrew NguonlyMichael LijitoSerhii Polishchukhari-dhanushkodidependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Fadel AkramDavidYoussef Ahmed Mohamed Abdelrahmangithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>Nick RileyEugene Yurtsevccurme
f21fc056bf docs: Convert example notebooks (#5381)
* Agentic RAG

* Fix formatting

* Agent supervisor

* fix links

* SQL agent

* Graph Runs in LS

* fix format

* Autogen + LG tutorial

* fixes

* update sql

* remove old notebooks

* docs: Add section about data region for LGP data plane (#5378)

Add section about data region.

* fix: remove empty notebook (#5379)

* Fix docstring for _unset_config_context function (#5374)

Signed-off-by: jitokim <pigberger70@gmail.com>

* Fix typo in StreamMode debug description: checlkpoints → checkpoints (#5371)

Signed-off-by: jitokim <pigberger70@gmail.com>

* fix: remove unused import in generate_llms_text.py (#5380)

* dcos: Fix deprecation of TavilySearch (#5375)

Fix deprecation: The class `TavilySearchResults` was deprecated in LangChain 0.3.25 and will be removed in 1.0

* Fix typo: funtion → function (#5370)

fix typos

Signed-off-by: jitokim <pigberger70@gmail.com>

* docs: feedback edits (#5387)

* docs: update lgp deployment metric list (#5388)

* chore(deps): bump peter-evans/create-pull-request from 6 to 7 (#5365)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: correct link in docs/docs/how-tos/graph-api.md (#5377)

Update graph-api.md

* docs: Update quick_start.md Rest API Guide (#5368)

Update quick_start.md Rest API Guide

The curl command in the quick start needs some minor changes to work out of the box. I hope by adding these changes then new users can get started more quickly

* Remove duplicate CONFIG_KEY_CHECKPOINT_MAP from RESERVED set (#5372)

Signed-off-by: jitokim <pigberger70@gmail.com>

* docs: fix typo in persistence (#5329)

* docs: fix typo in application_structure

* docs: fix typo in persistence

* chore[deps]: upgrade dependencies with `uv lock --upgrade` (#5358)

* chore: upgrade dependencies with `uv lock --upgrade`

* linting

* upgrade PR title

---------

Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com>
Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>

* Updated examples for SummarizationNode to account for serde with persistence layers (#5257)

* docs: move script into scripts (#5384)

* docs: update sql tutorial (#5389)

---------

Signed-off-by: jitokim <pigberger70@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andrew Nguonly <andrewnguonly@users.noreply.github.com>
Co-authored-by: Michael Li <michaelli65535@gmail.com>
Co-authored-by: jito <pigberger70@gmail.com>
Co-authored-by: Serhii Polishchuk <serhii.polishchuk@gelato.com>
Co-authored-by: hari-dhanushkodi <hari@langchain.dev>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Fadel Akram <af8356207@gmail.com>
Co-authored-by: David <31293924+dreadn0ught@users.noreply.github.com>
Co-authored-by: Youssef Ahmed Mohamed Abdelrahman <109446360+unauthorised-401@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com>
Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>
Co-authored-by: Nick Riley <nick@sparkida.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: ccurme <chester.curme@gmail.com>
2025-07-08 10:36:47 -04:00
lc-arjunandGitHub 1f1d032430 docs: add tunnel flag to node server docs (#5398) 2025-07-08 06:59:02 -07:00
Sydney Runkle a84b744eb6 Merge branch 'main' into v1 2025-07-08 09:55:13 -04:00
lc-arjunandGitHub 6f86a8c4cb Revert "docs: add -tunnel flag for node server" (#5397)
Revert "docs: add -tunnel flag for node server (#5373)"

This reverts commit 4abf948462.
2025-07-08 06:49:13 -07:00
Nick RileyandGitHub d5ab8b42e0 Updated examples for SummarizationNode to account for serde with persistence layers (#5257) 2025-07-07 16:31:55 -07:00
87f2e69395 chore[deps]: upgrade dependencies with uv lock --upgrade (#5358)
* chore: upgrade dependencies with `uv lock --upgrade`

* linting

* upgrade PR title

---------

Co-authored-by: sydney-runkle <54324534+sydney-runkle@users.noreply.github.com>
Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>
2025-07-07 23:24:32 +00:00
Youssef Ahmed Mohamed AbdelrahmanandGitHub 4c73b176ff docs: fix typo in persistence (#5329)
* docs: fix typo in application_structure

* docs: fix typo in persistence
2025-07-07 23:22:53 +00:00
jitoandGitHub 4321ed0f87 Remove duplicate CONFIG_KEY_CHECKPOINT_MAP from RESERVED set (#5372)
Signed-off-by: jitokim <pigberger70@gmail.com>
2025-07-07 19:19:16 -04:00
DavidandGitHub cba4d9e3bc docs: Update quick_start.md Rest API Guide (#5368)
Update quick_start.md Rest API Guide

The curl command in the quick start needs some minor changes to work out of the box. I hope by adding these changes then new users can get started more quickly
2025-07-07 19:18:55 -04:00
Fadel AkramandGitHub fa36a50444 docs: correct link in docs/docs/how-tos/graph-api.md (#5377)
Update graph-api.md
2025-07-07 23:14:17 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
5413f9db9f chore(deps): bump peter-evans/create-pull-request from 6 to 7 (#5365)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 6 to 7.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v6...v7)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-07 19:00:51 -04:00
ccurmeandGitHub 8118e90543 docs: update sql tutorial (#5389) 2025-07-07 18:02:02 -04:00
hari-dhanushkodiandGitHub c13c474626 docs: update lgp deployment metric list (#5388) 2025-07-07 17:44:57 -04:00
Lauren Hirata SinghandGitHub cd58fad69d docs: feedback edits (#5387) 2025-07-07 17:03:05 -04:00
jitoandGitHub f3a7925d86 Fix typo: funtion → function (#5370)
fix typos

Signed-off-by: jitokim <pigberger70@gmail.com>
2025-07-07 20:09:55 +00:00
Serhii PolishchukandGitHub de6c25689d dcos: Fix deprecation of TavilySearch (#5375)
Fix deprecation: The class `TavilySearchResults` was deprecated in LangChain 0.3.25 and will be removed in 1.0
2025-07-07 16:00:57 -04:00
Michael LiandGitHub 141afa8c62 fix: remove unused import in generate_llms_text.py (#5380) 2025-07-07 15:54:02 -04:00
jitoandGitHub e99f6292c5 Fix typo in StreamMode debug description: checlkpoints → checkpoints (#5371)
Signed-off-by: jitokim <pigberger70@gmail.com>
2025-07-07 19:27:09 +00:00
jitoandGitHub 1800df7048 Fix docstring for _unset_config_context function (#5374)
Signed-off-by: jitokim <pigberger70@gmail.com>
2025-07-07 19:25:06 +00:00
Eugene YurtsevandGitHub 7f57e00975 docs: move script into scripts (#5384) 2025-07-07 15:10:01 -04:00
Michael LiandGitHub 844417591d fix: remove empty notebook (#5379) 2025-07-07 19:09:00 +00:00
Andrew NguonlyandGitHub c9966c4feb docs: Add section about data region for LGP data plane (#5378)
Add section about data region.
2025-07-07 12:39:44 -04:00
lc-arjunandGitHub 4abf948462 docs: add -tunnel flag for node server (#5373)
add -tunnel flag for node server
2025-07-07 08:05:46 -07:00
jessicaouandGitHub 269590c4d9 docs: update case studies (#5353) 2025-07-06 20:37:54 -04:00
Shivang AgarwalandGitHub d8756f257e Updated TAVILY Key Setup (#5346) 2025-07-07 00:36:28 +00:00
Chris GandGitHub cac0cd5522 docs: update name of CompiledGraph CompiledStateGraph (#5348)
The name (and type) has changed. See:
https://langchain-ai.github.io/langgraph/reference/graphs/#langgraph.graph.state.StateGraph.compile
2025-07-07 00:35:37 +00:00
David DuongandGitHub c91208429e fix(docs): invalid command for creating langgraph app (#5349) 2025-07-04 16:30:06 +02:00
Tat Dat Duong 690b6f4ea1 fix(docs): invalid command for creating langgraph app
Closes https://github.com/langchain-ai/langgraphjs/issues/1331
2025-07-04 16:29:38 +02:00
Sydney RunkleandGitHub f5b888dd72 run CI on v1 branch temporarily (#5341)
temporarily run CI on v1 as well
2025-07-03 23:53:38 +00:00
Sydney RunkleandGitHub 7a8f29847b fix conflicts in state.py (#5340)
* fix conflicts
* lockfile fixes
2025-07-03 23:33:39 +00:00
Sydney RunkleandGitHub f001246794 Merge branch 'main' into v1 2025-07-03 19:27:07 -04:00
Andrew NguonlyandGitHub 07cd4d83e1 docs: Add note about preemptive compute infra (#5339)
* Add note about preemtive compute infra.

* Fix spelling error.
2025-07-03 16:04:27 -07:00
David DuongandGitHub fcdfc1d5e4 chore: move sdk-js to langgraphjs (#5334) 2025-07-03 16:58:31 +02:00
Tat Dat Duong dc95d1af88 Add a README.md 2025-07-03 16:52:35 +02:00
Tat Dat Duong 042e8ef315 chore: remove sdk-js
`sdk-js` has been moved here: https://github.com/langchain-ai/langgraphjs/tree/main/libs/sdk
2025-07-03 16:50:51 +02:00
Eugene YurtsevandGitHub 37d1ac1dce ci: one more workflow without explicit permissions (#5326) 2025-07-02 22:26:32 -04:00
Josh RogersandGitHub ecfabdf73a Adding disable_webhook to cli docs (#5320)
* Adding disable_webhook to cli docs
* Adding disable_webhook config
2025-07-02 22:14:01 -04:00
Lauren Hirata SinghandGitHub 543e4c4e7e docs: Convert notebooks (#5322)
* docs: Convert subgraphs notebook

* graph api conversion

* fix examples

* add

* fixes

* fix links

* fix links

* be gone!

* multi-agent conversion

* fix link

* fix links

* fix link
2025-07-02 23:28:42 +00:00
22e09d2739 Create user_agent_auth.md (#5299)
* Create user_agent_auth.md

Adding documentation for agent authentication on behalf of a user

* Update user_agent_auth.md

* Rename user_agent_auth.md to user-agent-auth.md

* break content out to separate guides

* add links/overview

* edits

* fix sentence

* Fix broken links

* Fix: Change 'get_user_config' fn name to 'my_node'

* Fix: Add reference to custom auth in MCP docs example

---------

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-07-02 22:05:07 +00:00
Andrew NguonlyandGitHub 89451f4ea2 docs: Add LGP control plane API docs page (#5319)
Add control plane API docs page.
2025-07-02 14:30:00 -07:00
Sydney Runkle b7d11b4141 Merge branch 'main' into v1 2025-07-02 17:23:45 -04:00
Sydney RunkleandGitHub 1d3fd9a46b chore: merge main into v1 (#5324) 2025-07-02 17:13:31 -04:00
Sydney RunkleandGitHub 813a1d6d0c langgraph: release v0.5.1 (#5323)
* bump
* lock
2025-07-02 21:06:05 +00:00
Eugene YurtsevandGitHub e28af0ffc3 ci: set explicit workflow permissions to read (should be a no-op) (#5318)
* We're using restricted GITHUB_TOKENS by default.
* This is expected to be a no-op operation for codeql.
2025-07-02 17:02:17 -04:00
Sydney RunkleandGitHub 8c4e698c5a langgraph[change]: solidify public/private differentiations (#5252)
* public interfaces for channels
* public interfaces for func
* public interfaces for graph
* pi for managed
* first pass public interface for top level modules
* first pass at private for utils -> _internal
* private interface for pregel
* scratchpad/stream protocol move
* docs update
* backwards compat for runnable
* deprecation warning for send and interrupt
* deprecation for pregel import
2025-07-02 16:48:53 -04:00
Sydney RunkleandGitHub 339de4c204 langgraph[fix]: remove deprecated pydantic logic + fix schema gen behavior for typed dicts (#5296) 2025-07-02 20:08:48 +00:00
lc-arjunandGitHub 0885e7833b docs: cli data storage handling (#5188)
Write up initial docs on how data is managed in the langgraph server, what telemetry is collected (and why), and how to opt-out.
2025-07-02 12:19:46 -07:00
Josh RogersandGitHub 669cf817e8 Bump js sdk to 0.0.89 (#5313) 2025-07-02 09:56:04 -07:00
Sydney RunkleandGitHub 000f5c3043 fix[deps]: update lockfiles / deps bounds for internal tools (#5301)
update lockfiles / deps bounds
2025-07-02 10:30:55 -04:00
Sydney RunkleandGitHub b3708bd7f6 ci: add automated uv lock --upgrade workflow (#5307) 2025-07-02 10:10:01 -04:00
Sydney RunkleandGitHub 8271e39e00 dependabot: no kafka (#5306)
* fix list of dirs
* another patch
2025-07-02 13:15:00 +00:00
Sydney RunkleandGitHub 60560ea755 dependabot: fix list of dirs for pip updates (#5305)
fix list of dirs
2025-07-02 13:12:22 +00:00
waqarahmed6095andGitHub e2acfb24cc Update use_stream_react.md (#5304)
Problem of two times heading 
"How to integrate LangGraph into your React application"
2025-07-02 13:10:57 +00:00
Sydney RunkleandGitHub 191192b142 upgrade dependabot scope (#5303) 2025-07-02 09:09:11 -04:00
Josh RogersandGitHub df368bdd30 Updating message types to include all base message fields (#5298) 2025-07-01 15:40:13 -07:00
Josh RogersandGitHub 4ec897033f Update LGP api reference docs (#5297) 2025-07-01 11:45:30 -07:00
Sydney RunkleandGitHub c989f1c898 langgraph: remove support for thread_ts (old alias for checkpoint_id) (#5295)
* remove support for thread_ts

* docs and tests
2025-07-01 13:42:25 -04:00
c16e42e6d5 fix broken link (#5291)
* fix broken link

* Apply suggestions from code review

Fix link

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>

---------

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-07-01 13:52:26 +00:00
David DuongandGitHub 376469ea90 release(sdk-js): 0.0.88 (#5294) 2025-07-01 14:30:37 +02:00
Tat Dat Duong 7e2af0ce8d release(sdk-js): 0.0.88 2025-07-01 14:21:11 +02:00
Youssef Ahmed Mohamed AbdelrahmanandGitHub 1b205a99cb docs: fix typo in application_structure (#5289) 2025-07-01 12:09:14 +00:00
Sam CrowderandGitHub 0a8ba20f5f docs: remove beta flag on self hosted plane (#5288) 2025-06-30 22:41:05 -04:00
Sam CrowderandGitHub 048cb3584c self hosted control plane no longer in beta (#5286)
* self hosted control plane no longer in beta

* accidental changes
2025-06-30 17:34:18 -07:00
Sam CrowderandGitHub 22c35b7bc8 switch order of MCP methods in API spec (#5287) 2025-06-30 17:33:59 -07:00
David DuongandGitHub f3ed32e611 feat(react): enhance useStream with initialValues, newThreadId, and onStop callback for improved UX (#5111) 2025-07-01 01:53:28 +02:00
Tat Dat Duong 276675b618 Make sure to spread stream values 2025-07-01 01:39:53 +02:00
Tat Dat Duong 882de42996 Fix non-existent assistantId 2025-07-01 01:35:59 +02:00
Tat Dat Duong 70be50f37b Fix typo 2025-07-01 01:33:08 +02:00
Tat Dat Duong 1c7234e9c5 Update README.md 2025-07-01 01:32:27 +02:00
Tat Dat Duong 3d88f75254 Cleanup 2025-07-01 01:19:07 +02:00
Lauren Hirata SinghandGitHub 407abbe9ff Add forum links (#5282) 2025-06-30 16:11:46 -04:00
ccurmeandGitHub 6182cd1dcb prebuilt: release 0.5.2 (#5280) 2025-06-30 15:50:21 -04:00
Lauren Hirata SinghandGitHub 1d276dd753 docs: cronjob nav (#5281) 2025-06-30 15:34:29 -04:00
ccurmeandGitHub a48d8cb69b prebuilt[patch]: import recognized tool message content block types from langchain-core (#5275) 2025-06-30 15:22:19 -04:00
Lauren Hirata SinghandGitHub a05a251caf docs: Fix nav (#5279) 2025-06-30 15:18:43 -04:00
MauritsBrinkmanandTat Dat Duong c7bbb26ac0 test: add useStream onStop callback tests 2025-06-30 16:43:48 +02:00
MauritsBrinkmanandTat Dat Duong ac9b6c416e feat: add onStop callback to useStream for custom stop behavior
Add onStop callback to useStream hook enabling developers to customize
UI behavior when streams are stopped. This is especially useful for
UI messages with loading states that need to show "stopped" status
instead of remaining in infinite loading state.

The callback provides the same mutate function as onCustomEvent for
immediate local state updates, while users can optionally update
server thread state using the threads client.

Example usage:
```typescript
const stream = useStream({
  assistantId: "my-assistant",
  onStop: async ({ mutate }) => {
    // Immediate UI update - stop loading components
    mutate((prev) => ({
      ...prev,
      ui: prev.ui?.map(component =>
        component.props?.isLoading
          ? {
              ...component,
              props: {
                ...component.props,
                isLoading: false,
                isStopped: true
              }
            }
          : component
      )
    }));

    // Optional server thread state update
    if (stream.threadId) {
      await stream.client.threads.updateState(stream.threadId, {
        values: {
          ui: prev.ui // persist stopped state to server
        }
      });
    }
  }
});
```

This is especially useful for cases where gen UI components have loading states,
where we don't want the loading state to persist on cancellation.
2025-06-30 16:43:13 +02:00
MauritsBrinkmanandTat Dat Duong d4b4eebe4a fix(sdk-js): convert SSE classes to factory functions to resolve tree shaking
- Convert BytesLineDecoder and SSEDecoder from classes extending TransformStream to factory functions
- Fixes tree shaking failures that prevented build completion
- Maintains identical API functionality, just removes 'new' keyword usage
- All tests continue to pass

Resolves tree shaking side effect detection issues with TransformStream extension
2025-06-30 16:43:13 +02:00
MauritsBrinkmanandTat Dat Duong f8e1e803e1 docs(react): add documentation and tests for initialValues and newThreadId options
- Document initialValues for cached thread display
- Document newThreadId for optimistic thread creation
- Add comprehensive test coverage for both features
2025-06-30 16:43:12 +02:00
MauritsBrinkmanandTat Dat Duong 141a6af4f7 feat(react): add initialValues option to useStream for cached thread display
Add initialValues parameter to UseStreamOptions to enable immediate display
of cached thread data while official history is being fetched from the server.

This addresses the common use case where applications cache thread data
locally (IndexedDB, localStorage, etc.) and want to show it instantly when
users navigate to existing threads, providing better UX with faster loading.

Key changes:
- Add initialValues?: Partial<StateType> | null to UseStreamOptions interface
- Update values precedence: streamValues > initialValues > historyValues
- Ensure optimisticValues properly override initialValues during submission
- Maintain full backward compatibility with existing API

Example usage:
```typescript
const stream = useStream({
  threadId,
  assistantId: 'my-assistant',
  initialValues: cachedThreadData?.values // Show cached data immediately
});
```

The values flow now follows this priority:
1. Initial load: shows initialValues while history loads
2. During submit: optimisticValues take precedence
3. After server response: official history replaces all
2025-06-30 16:43:12 +02:00
MauritsBrinkmanandTat Dat Duong 8a763ad358 feat(react): add newThreadId option to useStream for optimistic UI
Add optional newThreadId parameter to useStream hook that allows specifying
a thread ID for new thread creation while keeping threadId null. This enables
optimistic UI patterns where developers need to know the thread ID beforehand
for routing/navigation without causing 404 errors from attempting to fetch
non-existent thread history.

Usage:
- Set threadId: null and newThreadId: "predetermined-id"
- Submit message to create thread with specified ID
- Use onThreadId callback to update threadId after creation

This solves the UX problem of having to await thread creation before
enabling optimistic navigation to e.g. /[threadId] routes.
2025-06-30 16:43:12 +02:00
David DuongandGitHub 16d02e63a1 fix: Allow configuring stream mode in useStream.joinStream() (#5146) 2025-06-30 16:37:56 +02:00
David DuongandGitHub 03421c2b04 chore(sdk-js): use embed LGP server for MSW mocking (#5174) 2025-06-30 16:33:47 +02:00
Tat Dat Duong 2508aa45ea Use published package 2025-06-30 13:51:32 +02:00
Sam CrowderandGitHub 9e035264f8 slightly more explanation when we say dont use in serverless (#5245)
slightly more explanation
2025-06-29 21:59:48 -04:00
joaquin-borggio-lcandGitHub 84e14f47bf docs: Add pre-req for egress to control plane (#5241)
added pre-req for egress
2025-06-27 14:18:39 -07:00
Lauren Hirata SinghandGitHub 83bbe42eab docs: Nav reorg (#5236)
* docs: Nav consolidation

* nav

* reorg

* fix links

* fix

* prebuilts

* fix spelling

* reorg

* reorg
2025-06-27 14:06:26 -04:00
David DuongandGitHub 70894af72c fix(sdk-js): avoid stale client when fetching history (#5240) 2025-06-27 20:04:41 +02:00
Tat Dat Duong e466327524 Bump to 0.0.87 2025-06-27 20:03:03 +02:00
Tat Dat Duong b6655fe083 Use the client hash only in useEffect 2025-06-27 19:59:21 +02:00
Tat Dat Duong 9b7cc1c82e fix(sdk-js): avoid stale client when fetching history 2025-06-27 19:51:49 +02:00
Nuno CamposandGitHub 80d6bddd1b Fix deadlock in SqliteStore (#5234) 2025-06-27 09:03:57 -07:00
Nuno Campos c406aede96 Fix deadlock in SqliteStore
- If setup wasnt called separately _cursor() and setup() would deadlock
- The call to setup() in _cursor() should be outside the lock block, as setup() also acquires the lock and re-checks the setup flag
2025-06-27 08:57:35 -07:00
Eugene YurtsevandGitHub 96bfc8bad9 docs: cross links for functional api (#5231)
add cross-links
2025-06-27 11:31:18 -04:00
0fd6306623 docs: Time travel and breakpoints (#5215)
* docs: Time travel and breakpoints

* fix links

* fix

* edits

* Fix link

* Remove circular redirects

* revert llms.txt

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-06-27 14:49:53 +00:00
Yassin NouhandGitHub f01ab13cab DOC: Add missing docs_txt = format_docs() lines in adaptive RAG tutorial (#5222) 2025-06-27 10:45:12 -04:00
Eugene YurtsevandGitHub 1beaf48cf9 docs: quick nav fixes (#5229)
Quick nav fixes
2025-06-27 10:37:42 -04:00
Sam CrowderandGitHub 847b0e8243 add warning about serverless (#5218) 2025-06-27 07:31:52 -07:00
Eugene YurtsevandGitHub 02a2467610 docs: context update (#5207)
Update context
2025-06-27 14:25:54 +00:00
Sydney RunkleandGitHub fa5e7a97c2 release[prebuilt]: bump version to v0.5.1 (#5228)
version bump
2025-06-27 14:02:14 +00:00
Sydney RunkleandGitHub 233a92ccb9 fix[prebuilt]: bind tools even if it's only provider tools (#5227)
bind tools even if just provider tools
2025-06-27 09:49:26 -04:00
lc-arjunandGitHub e277a6bd9b chore: sdk bumps (#5220)
* chore: sdk bumps

* uv lock
2025-06-26 17:57:05 -07:00
lc-arjunandGitHub 16250fe038 chore: update api ref docs and fix schemas (#5219) 2025-06-26 17:41:03 -07:00
Nuno Campos 216d1be0a5 Revert "Reapply "docs: deploy from v0 branch for now (#4960)" (#5184) (#5185)"
This reverts commit cb63c1ab72.
2025-06-26 15:52:45 -07:00
Nuno Campos 0a4cd5fcaa 0.5.0 2025-06-26 15:47:46 -07:00
Nuno CamposandGitHub f8503670af Add test for reducer exceptions (#5217) 2025-06-26 12:48:07 -07:00
Nuno Campos 0f22841f78 Add test for reducer exceptions 2025-06-26 11:40:55 -07:00
lc-arjunandGitHub 4a26ca5bc2 feat: crons sorting sdk (#5197)
* feat: crons sorting sdk

* update sync clients

* lock file

* lock file

* lock file
2025-06-26 11:27:44 -07:00
William FHandGitHub a622218746 chore: (CLI) bump api minbound (#5206) 2025-06-25 19:28:13 -07:00
William FHandGitHub 7fda427601 fix: [prebuilt] Checks for pre-bound model with builtin tools (#5203) 2025-06-26 01:34:21 +00:00
Nuno CamposandGitHub 1c9bfba23a feat(langgraph): task masquerading with update state (#5189) 2025-06-25 17:13:54 -07:00
Nuno Campos cee9ac0b7a One more 2025-06-25 17:07:26 -07:00
Nuno Campos 3ddb6b1477 One more 2025-06-25 17:05:41 -07:00
Nuno Campos 8a5519da29 Fix update_state bugs 2025-06-25 17:02:08 -07:00
Nuno CamposandTat Dat Duong abc5a5ff44 Update 2025-06-26 01:30:52 +02:00
Nuno CamposandTat Dat Duong 38ab90217f Fix assertion 2025-06-26 01:30:52 +02:00
Tat Dat Duong 005edb2979 Async test 2025-06-26 01:30:51 +02:00
Tat Dat Duong c5a851cd91 Use as_node=END instead 2025-06-26 01:30:51 +02:00
Tat Dat Duong 06a42aee53 Remove if/else 2025-06-26 01:30:51 +02:00
Tat Dat Duong 04b9947a41 Fix mypy 2025-06-26 01:30:51 +02:00
Tat Dat Duong 239df52e74 Avoid creating new root checkpoint to preserve behaviour 2025-06-26 01:30:48 +02:00
Tat Dat Duong 8a67a5ac25 Fix format 2025-06-26 01:30:11 +02:00
Tat Dat Duong adb2eee54b Remove dict 2025-06-26 01:30:10 +02:00
Tat Dat Duong 263a583f01 Fix lint 2025-06-26 01:30:10 +02:00
Tat Dat Duong 565d52975c Fix test 2025-06-26 01:30:10 +02:00
Tat Dat Duong 865fba9d50 feat(langgraph): task masquerading with update state 2025-06-26 01:30:10 +02:00
Nuno CamposandGitHub 929bba8337 Add print_mode= arg to invoke/stream (#5201) 2025-06-25 16:21:19 -07:00
Nuno CamposandGitHub 634511350f Remove unused branch in update_state (#5195) 2025-06-25 16:08:48 -07:00
Nuno Campos c9dcd3fbb5 Map debug=True to print_mode=['values', 'updates'] 2025-06-25 16:08:20 -07:00
Eugene YurtsevandGitHub 10a0a8633a docs: consolidate models (#5200)
* Expand chat model documentation a bit. 
* Adds links to langchain docs to make relevant information easier to find.
* This is a stop-gap until we merge langchain and langgraph docs
2025-06-25 15:55:17 -04:00
Eugene YurtsevandGitHub 23327f5647 docs: update mcp docs (#5191)
Update MCP docs
2025-06-25 15:06:35 -04:00
Nuno Campos e23da72ccd Add print_mode= arg to invoke/stream
- This is more flexible version of the debug= flag, which we'll deprecate
2025-06-25 11:52:42 -07:00
0aefe68a5f docs: HITL consolidation (#5192)
* HITL consolidation, minus server

* Fix links

* Fix server page

* remove extra page

* nits

* updates based on feedback

* Update docs/docs/concepts/human_in_the_loop.md

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>

* edits based on feedback

---------

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-06-25 14:16:46 -04:00
Eugene YurtsevandGitHub 5b8edf3c72 docs: consolidate tool documentation (#5190)
Consolidate tool documentation

- [x] Cross links between conceptual doc and tools guide
- [x] Tools guide includes both workflow and agent usage example
2025-06-25 14:13:11 -04:00
Lauren Hirata SinghandGitHub b64e1bcae4 docs: Add FAQ for nodes executed (#5198)
Add FAQ for nodes executed
2025-06-25 12:28:21 -04:00
Nuno Campos d877ea479b Remove unused branch in update_state
- update_state(None, as_node=None) was not tested/used, and was too similar in behavior to __copy__ / __end__, so removing it
2025-06-25 08:38:20 -07:00
Sydney RunkleandGitHub cb63c1ab72 Reapply "docs: deploy from v0 branch for now (#4960)" (#5184) (#5185)
This reverts commit a7ea5e44ce.
2025-06-24 16:01:03 +00:00
Sydney RunkleandGitHub a7ea5e44ce Revert "docs: deploy from v0 branch for now (#4960)" (#5184)
This reverts commit aedf974dfd.
2025-06-24 14:59:33 +00:00
Lauren Hirata SinghandGitHub c3ae5e6b71 docs: Reorganize existing content (#5122)
* Organize existing content differently

* Fix broken links

* Remove cookie consent popup

* edits

* Consolidate streaming

* Remove agents/streaming

* Fix broken links

* Edit stream modes

* Change titles

* Fix titles based on feedback

* Move LGP to platform section

* Update navigation

* Consolidate assistant conceptual guides

* docs: Memory consolidation (#5149)

* Memory consolidation

* Fix broken links

* fix links

* Fix links

* Fix links

* General content clean up for memory

* fix links

* Fix link

* fix links

* Fix title

* Edits based on feedback

* Link to memory store
2025-06-24 09:29:59 -04:00
Vedant PanchalandGitHub ac328c3fd8 [fix] snippet for Agents as a Tool (#5181)
snippet had a missing decorator that might lead the user to confuse whether it is really a tool
2025-06-24 11:44:32 +00:00
Nuno CamposandGitHub ebd7977936 Revert change to default value of checkpoint_during arg (#5177) 2025-06-23 18:12:19 -07:00
Nuno Campos a6381c32b0 Revert change to default value of checkpoint_during arg 2025-06-23 18:05:46 -07:00
Nuno CamposandGitHub 294d346650 Fix bug where Command(update=) could be ignored if there was a 2nd interrupt after it (#5175) 2025-06-23 17:35:36 -07:00
Nuno Campos 866c8009dc Fix bug where Command(update=) could be ignored if there was a 2nd interrupt after it
- writes from the null task (ie. from outside tasks) should be accummulated across invocations
2025-06-23 17:23:53 -07:00
Tat Dat Duong 9a0cee5cd0 chore(sdk-js): use embed LGP server for MSW mocking 2025-06-24 02:14:19 +02:00
Rauf ParchievandGitHub 73bed2cf7c Update workflows.md (#5116) 2025-06-23 23:54:45 +00:00
Eugene YurtsevandGitHub 4cffe58065 docs: fix tab syntax errors and admonition syntax errors (#5091) 2025-06-23 19:53:54 -04:00
nikhildigdeandGitHub e73964a971 Update custom_routes.md (#5110)
Updated the statement about app.py
2025-06-23 23:53:25 +00:00
William Fu-Hinthorn de91f21f6b Update cli config doc on pip_installer 2025-06-23 16:40:07 -07:00
David DuongandGitHub 41eed326b8 Disable values update on use stream in interrupt events (#5041) 2025-06-24 00:08:14 +02:00
Mason DaughertyandGitHub 946d23213d docs: add Homebrew install option to CLI docs (#5160)
Add Homebrew install option to CLI docs
2025-06-23 11:33:12 -04:00
hari-dhanushkodiandGitHub c78197a583 add more docs for lgp deployment metrics (#5151) 2025-06-23 07:12:06 -07:00
Lauren Hirata SinghandGitHub 50756207ee docs: fix a typo 'prebuit' to 'prebuilt' in notebook_hooks.py (#5154) 2025-06-23 09:44:45 -04:00
OfirTeneJunoandGitHub 903cec0cfa Merge branch 'main' into interrupt-use-stream-values 2025-06-23 13:25:35 +03:00
foie0222 f63952595d fix: a typo prebuit to prebuilt 2025-06-21 17:49:40 +09:00
Andrew NguonlyandGitHub 4a252bd03a docs: Remove note for LANGSMITH_TRACING environment variable (#5147)
Remove note for LANGSMITH_TRACING.
2025-06-20 13:36:29 -07:00
Eugene YurtsevandGitHub f0f329d9e1 docs: Add conditional js/python rendering (#5128)
# Overview

Adding conditional rendering logic to co-locate js and python documentation.

* `:::` conditional syntax can be used to switch between python only or js only content.
* Contains simple unit tests for `:::`
* PR adds set up for a way to implement a context switch between languages, but it will not be enabled until JS content is merged in.
* Contains a script that can add javascript documentation 

Implementation of: https://github.com/langchain-ai/langgraph/pull/5118

## Example

Example of conditional rendering / compilation.


```markdown

### Config (static context)

Config is for immutable data like user metadata or API keys. Use
when you have values that don't change mid-run.

Specify configuration using a key called **"configurable"** which is reserved
for this purpose:


:::python

This content will only be rendered for the python site.
:::

:::js
this content will only be rendered for the js / ts site.
:::

```
2025-06-20 16:20:16 -04:00
bracesproul 78bef6bc0c formatting 2025-06-19 11:20:17 -07:00
bracesproul 7bd364c457 fix: Allow configuring stream mode in useStream.joinStream() 2025-06-19 11:14:59 -07:00
OfirTeneJunoandGitHub 77306c5142 Merge branch 'main' into interrupt-use-stream-values 2025-06-19 14:06:24 +03:00
Nuno CamposandGitHub eba18c3213 Reduce extraneous keys in checkpoint.metadata (#5133) 2025-06-17 17:46:45 -07:00
Nuno Campos a1c856c088 Reduce extraneous keys in checkpoint.metadata
- Leave it up to each checkpointer implementation to decide whether to merge in configurable/metadata (previously PregelLoop would do some of this always)
- Never copy over internal langgraph keys into checkpoint.metadata (these are redundant/misleading to include)
2025-06-17 17:40:18 -07:00
Josh RogersandGitHub 92010f84ec Adding disable_mcp field to cli docs (#5132) 2025-06-17 16:22:50 -07:00
Nuno CamposandGitHub 3b8f3f9de3 If FuturesDict callback has been GCed, don't call it (#5131) 2025-06-17 14:03:16 -07:00
Nuno Campos 6dcff8a839 If FuturesDict callback has been GCed, don't call it 2025-06-17 13:47:47 -07:00
1309243b29 docs: studio evals (#5129)
* docs: studio evals

* docs: added studio evals images (#5076)

* docs: added studio evals images

* Update docs/docs/cloud/how-tos/studio/run_evals.md

Co-authored-by: lc-arjun <arjun@langchain.dev>

* Update docs/docs/cloud/how-tos/studio/run_evals.md

Co-authored-by: lc-arjun <arjun@langchain.dev>

* Update docs/docs/cloud/how-tos/studio/run_evals.md

Co-authored-by: lc-arjun <arjun@langchain.dev>

* docs: updated studio evals

* Update docs/docs/cloud/how-tos/studio/run_evals.md

Co-authored-by: lc-arjun <arjun@langchain.dev>

* docs: removed images

---------

Co-authored-by: lc-arjun <arjun@langchain.dev>

* final changes

* i think its this

---------

Co-authored-by: Marco Perini <perinim.98@gmail.com>
2025-06-17 12:32:04 -07:00
Nuno Campos 771c6150a4 langgraph 0.5.0rc1 2025-06-16 17:52:13 -07:00
Nuno Campos edfb65fd3a langgraph-prebuilt 0.5.0rc0 2025-06-16 17:47:21 -07:00
Lauren Hirata SinghandGitHub 0f92470e49 docs: Remove cookie consent (#5123) 2025-06-16 18:41:55 -04:00
Nuno Campos dfcaf97c73 langgraph 0.5.0rc0 2025-06-16 15:17:56 -07:00
Nuno Campos 63a0028372 langgraph-checkpoint 2.1.0 2025-06-16 14:58:50 -07:00
Nuno CamposandGitHub 1134017d07 Preparation for 0.5 release: langgraph-checkpoint (#5124)
Prepare langgraph-checkpoint for 0.5

- Given we have no upper bound on langgraph-checkpoint dep need to undo all changes in langgraph-checkpoint that might break previous versions of langgraph
2025-06-16 21:57:11 +00:00
Lauren Hirata Singh 33feba4877 Remove cookie consent 2025-06-16 16:33:32 -04:00
Nuno CamposandGitHub 4fec8e9dec Preparation for 0.5 release (#5121) 2025-06-16 13:14:25 -07:00
Nuno Campos c137169325 Preparation for 0.5 release
- Update deprecation warnings to mention 0.5, no 1.0
- Add back type hint support for Runnable arg to add_node
2025-06-16 13:07:52 -07:00
Nuno CamposandGitHub 1e2672e63d Restore shallow checkpointer (#5105) 2025-06-16 11:23:27 -07:00
Nuno CamposandGitHub 06803ab683 Add migration for pending_sends (#5106) 2025-06-16 11:23:17 -07:00
hari-dhanushkodiandGitHub 3488ee47e0 chore: add docs for lgp deployment monitoring (#5104) 2025-06-16 10:21:42 -07:00
Nuno CamposandGitHub 289bdd0cea Introduce "tasks" and "checkpoints" stream modes (#5117) 2025-06-16 10:14:18 -07:00
Nuno Campos 417103066b Lint 2025-06-16 09:29:03 -07:00
Nuno Campos 25a59447c1 Introduce "tasks" and "checkpoints" stream modes
- These are split out of "debug" stream mode, which is now an alias for ["tasks", "checkpoints"]
2025-06-16 08:47:45 -07:00
Nuno Campos 21906d2b7b Add migration for pending_sends
- Checkpoints saved on older versions of langgraph will be compatible with langgraph 0.5 and 1.0
2025-06-13 17:42:14 -07:00
Nuno Campos 0cad7019cb Restore shallow checkpointer
- This should definitely be removed soon, but let's give people more time to update
2025-06-13 17:37:40 -07:00
Nuno CamposandGitHub 7e735672bf Restore compatibility with custom checkpointer classes created in prior versions (#5103) 2025-06-13 16:36:36 -07:00
Nuno Campos 5498893780 Restore compatibility with custom checkpointer classes created in prior versions
- Ensure existing custom checkpointer classes are compatible with new langgraph-checkpoint release
2025-06-13 16:29:55 -07:00
Nuno CamposandGitHub e80f47aa01 Revert removals of APIs that were slated for removal in 1.0 (#5101) 2025-06-13 16:09:20 -07:00
Nuno Campos a0b2f742a3 Revert "Remove UntrackedValue channel"
This reverts commit 05f3904d09.
2025-06-13 15:36:47 -07:00
William FHandGitHub b7973d65db fix: Update lockfile (#5102) 2025-06-13 14:53:40 -07:00
Nuno Campos 3fa3a586b5 Revert "Remove MessageGraph (#4875)"
This reverts commit a5e6223569.
2025-06-13 14:21:05 -07:00
William FHandGitHub 053b606b46 cli: 0.3.3 (#5100) 2025-06-13 13:15:26 -07:00
William FHandGitHub 4548a0ebe8 feat: Customizable Pip Installer (#5098)
Let you set "pip_installer": "pip" (or uv) to handle corner cases in install compatibilities
2025-06-13 10:35:28 -07:00
Sydney RunkleandGitHub 0171e9a323 fix(langgraph): remove deprecated output usage in favor of output_schema (#5095)
use output_schema
2025-06-13 12:34:39 -04:00
Sydney RunkleandGitHub c439cb0872 refactor(langgraph): Remove PregelNode's inheritance from Runnable (#5093)
remove Runnable inheritance for PregelNode
2025-06-13 10:17:42 -04:00
Nuno CamposandGitHub 2a4d7e8889 Remove support for node reading a single managed value (#5083) 2025-06-12 15:19:55 -07:00
Nuno Campos 7f3578e0f1 Remove support for node reading a single managed value
- This has never been used and is not useful or intended functionality
2025-06-12 15:11:19 -07:00
Lauren Hirata SinghandGitHub e2f96b5ae5 revert incident banner (#5082) 2025-06-12 17:24:36 -04:00
Lauren Hirata Singh 0d5f7e55bf revert incident banner 2025-06-12 17:10:22 -04:00
Lauren Hirata SinghandGitHub 9209f11187 incident banner (#5081) 2025-06-12 16:04:20 -04:00
Lauren Hirata SinghandGitHub bb1c5b8cdf Update docs/overrides/main.html 2025-06-12 15:57:14 -04:00
Nuno CamposandGitHub d6bb008ff4 PregelLoop: Simplify tick() method (#5080)
* PregelLoop: Simplify tick() method

- Split out superstep finish into separate after_tick() method
- Handle input in __enter__
- Remove unnecessary recursive shortcut
- Remove input sentinel objects

* Lint
2025-06-12 19:53:55 +00:00
Lauren Hirata Singh 6130e08fa6 incident banner 2025-06-12 15:52:36 -04:00
Sydney RunkleandGitHub 3ad061f0d7 serialize/deserialize pandas with pickle fallback (#5057) 2025-06-12 15:14:00 -04:00
Nuno CamposandGitHub 116b5d1cac Remove code paths no longer needed (#5079) 2025-06-12 11:47:10 -07:00
Nuno Campos 0aff02e180 Remove code paths no longer needed
- These were only used by the kafka scheduler
2025-06-12 11:25:20 -07:00
Nuno CamposandGitHub 074af5c122 Avoid saving checkpoints for subgraphs when checkpoint_during=False (#5051) 2025-06-11 11:11:02 -07:00
langchain-infraandGitHub 29ffaa0e0b docs: fix config section (#5066) 2025-06-11 13:23:33 -04:00
Sydney RunkleandGitHub 45cd4e1928 oss: auto apply labels to contributor issues (#5067)
auto apply labels
2025-06-11 17:19:49 +00:00
langchain-infraandGitHub 480271f753 docs: add mount prefix environment variable (#5060) 2025-06-11 11:20:19 -04:00
infra 66fdf60e47 docs: add mount prefix environment variable 2025-06-11 11:18:16 -04:00
infra 0894daf3fc docs: add mount prefix environment variable 2025-06-11 11:17:45 -04:00
Lauren Hirata SinghandGitHub 850c55d630 Revert "fix assistants overview link" (#5059) 2025-06-11 11:02:17 -04:00
Lauren Hirata SinghandGitHub c0d65ff409 Revert "fix assistants overview link (#5058)"
This reverts commit be7b60a722.
2025-06-11 10:58:52 -04:00
Lauren Hirata SinghandGitHub be7b60a722 fix assistants overview link (#5058) 2025-06-11 10:58:07 -04:00
Eugene YurtsevandGitHub d467ec6556 Remove gitmcp badge (#5055)
* Remove gitmcp badge

* xt

* x
2025-06-11 10:55:05 -04:00
b8683ab67a docs: Update subgraphs.md (#5052)
* Update subgraphs.md

The state while defining the Subgraph is updated. Also an edge connecting START to the call_model node in the subgraph was created.

* Update docs/docs/concepts/subgraphs.md

* Update docs/docs/concepts/subgraphs.md

---------

Co-authored-by: Eugene Yurtsev <eugene@langchain.dev>
2025-06-11 13:49:51 +00:00
OfirTeneJunoandGitHub 666279a241 Merge branch 'main' into interrupt-use-stream-values 2025-06-11 09:53:25 +03:00
William Fu-Hinthorn 6a9ca8d67e Update existing 2025-06-10 17:59:41 -07:00
William Fu-Hinthorn 3b98044f2f Add tests 2025-06-10 17:29:27 -07:00
Nuno Campos a4a8934bd3 Avoid saving checkpoints for subgraphs when checkpoint_during=False
- We can avoid saving checkpoints for successful subgraphs which do not request multi-turn memory
2025-06-10 17:25:05 -07:00
Nuno CamposandGitHub 470b9a4b97 Clean up PregelNode attributes (#5049) 2025-06-10 17:24:03 -07:00
Nuno Campos 516175780d Clean up things for Matt! 2025-06-10 16:14:15 -07:00
William FHandGitHub 571780f74c fix: header merging (#4926) 2025-06-10 14:44:34 -07:00
Emmanuel FerdmanandGitHub d719438307 fix: throw exception on multiple injections (#5033)
Throw exception on for multiple injections

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-06-10 16:54:01 -04:00
Simon FrankandGitHub 85c809a651 docs: fixed a wrong import in persistence docs (#5045) 2025-06-10 20:53:50 +00:00
Nuno CamposandGitHub 0441fd156f Add docs for checkpoint encryption (#5047)
docs: list CipherProtocol in API
2025-06-10 16:52:45 -04:00
Nuno CamposandGitHub 37b5d3886c Add library overview to AGENTS.md (#5044) 2025-06-10 10:08:55 -07:00
Nuno Campos b95267a3cc Refine dependency map 2025-06-10 10:06:08 -07:00
OfirTeneJuno 2172bc89ed remove yarn 2025-06-10 17:37:27 +03:00
OfirTeneJuno 4138ef9c43 Change to continue 2025-06-10 17:33:52 +03:00
OfirTeneJuno 0ff181b7ce Disable values update on use stream in interrupt events 2025-06-10 17:21:17 +03:00
Nuno CamposandGitHub 2e33c520a5 Support numpy array serialization in JsonPlusSerializer (#5035)
* Handle numpy Fortran arrays

* Lint

* Lint

* Lint
2025-06-10 01:17:28 +00:00
Nuno CamposandGitHub 67b1dc602e Update ormsgpack (#5034)
* Update ormsgpack

- Now supports bytearray/memoryview passthrough

* Lint
2025-06-10 00:30:58 +00:00
Naohiro YoshidaandGitHub 1519b90414 Centralized CheckpointTuple creation into a shared function for checkpoint_postgres (#4970) 2025-06-09 18:40:17 +00:00
YkohandGitHub 0035ab9825 docs: Replace unsupported models with structured output-supported models (#3982) 2025-06-09 14:17:05 -04:00
c42cd57a32 chore: Update variable naming in postgres store (#4096)
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-06-09 17:54:06 +00:00
acc56e094a docs: add query params for Store semantic search (#4828)
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-06-09 17:47:50 +00:00
Yassin NouhandGitHub 6b30d4fd8f docs: enhance PostgresSaver connection requirements explanation (#4953)
docs: enhance PostgresSaver connection requirements explanation - Add detailed explanation of why autocommit=True and row_factory=dict_row are required - Include example of incorrect usage and resulting errors - Addresses issue #4937 about incomplete setup documentation
2025-06-09 17:12:44 +00:00
fcc37cd06b docs: update tutorial/rag/langgraph_adaptive_rag.ipynb (#2006)
- add some explanations of ipynb code in markdown cell.

Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
2025-06-09 12:54:29 -04:00
William FHandGitHub c17ee1bf5a feat: [CLI] Add support for building deps with uv (#4995) 2025-06-09 08:57:29 -07:00
William FHandGitHub 88c603b00b fix: (sdk-js) Expand ToolMessage Type (#5015) 2025-06-09 08:22:35 -07:00
Sydney RunkleandGitHub c12f7cb2b9 github: support blank issues (help with v1 planning) (#4999)
blank issues
2025-06-09 13:52:14 +00:00
🤖Esteban Dalel RandGitHub 6d7d689578 docs: highlight changed lines in 3-add-memory.md (#4930) 2025-06-08 14:08:04 +00:00
LostInCode404andGitHub f1b7eca7fc docs: Update 1-build-basic-chatbot.md to add a section about END node (#4886)
Update `1-build-basic-chatbot.md` to add a section about `END` node
2025-06-08 13:51:17 +00:00
Michael LiandGitHub 93766a6df1 docs: fix assistants url at manage_assistants.md (#4993)
* docs: fix agent supervisor doc codes

* docs: fix assistants url at manage_assistants.md
2025-06-08 13:49:45 +00:00
Dionysis GlytsosandGitHub a9d4e0da29 docs: fix typos (#4992)
Fix typos
2025-06-08 13:46:41 +00:00
Sydney RunkleandGitHub 9105e60a34 graph: improve generics on StateGraph etc + move typing utils to private file (#4982) 2025-06-06 19:51:05 -04:00
Sydney RunkleandGitHub b735452153 deprecate input and output in favor of input_schema and output_schema (#4983) 2025-06-06 19:44:56 -04:00
Sydney Runkle 5920d8aa92 using StateT as default for InputT 2025-06-06 12:58:19 -04:00
533f5b3d6f docs: fix task description example in the agent supervisor tutorial (#4938)
* docs: fix agent supervisor doc codes

---------

Co-authored-by: vbarda <vadym@langchain.dev>
2025-06-06 13:41:41 +00:00
Asamu DavidandGitHub be5889a7df docs: add docs for image_distro cli option (#4974) 2025-06-05 23:11:47 +01:00
David Asamu 0bf268feca add docs for image_distro cli option 2025-06-05 17:23:05 +01:00
Sydney RunkleandGitHub 5e7566f4a3 lint: use pep 604 union syntax and pep 585 generic syntax (#4963)
* new union syntax

* fix test

* second round of conversions by injecting future annotations

* format + add top level makefile
2025-06-04 21:50:16 -04:00
Sydney RunkleandGitHub 494c8ef0d2 docs: remove references to StateGraph(dict) (#4964)
remove StateGraph(dict)
2025-06-04 21:29:19 -04:00
lc-arjunandGitHub 45e60ff9e1 fix: camel case to snake case conversion (#4966) 2025-06-04 17:31:12 -07:00
Nuno Campos 194c4c1d1c cli 0.2.12 2025-06-04 15:50:07 -07:00
1a76f6a92a 🐛 [CLI] Generate one --build-context argument for each dependency in the docker build command. (#4962)
* Generate one `--build-context` for each dependency in the `docker build` command.

* Try and fix test

---------

Co-authored-by: Nuno Campos <nuno@langchain.dev>
2025-06-04 22:48:48 +00:00
Sydney RunkleandGitHub aedf974dfd docs: deploy from v0 branch for now (#4960)
only deploy docs on v0
2025-06-04 13:27:48 -04:00
Sydney RunkleandGitHub c0b6a85488 docs: format to allow for deploy (#4959)
formatting
2025-06-04 17:20:19 +00:00
Sydney RunkleandGitHub 9fde14079a docs: use retry_policy instead of retry in docs (#4958) 2025-06-04 17:12:13 +00:00
Sydney RunkleandGitHub 02f3944e88 rename retry -> retry_policy (#4957) 2025-06-04 14:55:06 +00:00
Nuno CamposandGitHub 1ea5812ed0 Fix step_timeout causing ParentCommand/GraphInterrupt exception to bubble up (#4950) 2025-06-03 17:32:46 -07:00
Nuno Campos 314115513c Fix step_timeout causing ParentCommand/GraphInterrupt exception to bubble up
- We should not re-raise exceptions in commit() as that is now called in a future done callback
- panic_or_proceed takes care of re-raising exceptions as needed anyway
2025-06-03 17:26:29 -07:00
Nuno Campos 161a1e3af6 Remove from ci matrix 2025-06-03 17:26:13 -07:00
Nuno Campos f8995f234c Remove scheduler-kafka library
Superseded by upcoming distributed runner
2025-06-03 17:25:17 -07:00
Nuno CamposandGitHub 5f1d76ba3b docs: fix a grammar issue in multiple files (#4935) 2025-06-03 17:04:20 -07:00
Asamu DavidandGitHub 13ebe1ad8c cli v0.2.11 release (#4941) 2025-06-04 01:00:06 +01:00
David Asamu ae2b766d0f bump version 2025-06-04 00:53:56 +01:00
Nuno CamposandGitHub b211d4e767 Make it possible to run test command without docker installed (#4948) 2025-06-03 16:29:14 -07:00
Nuno CamposandGitHub 0b609646d5 Fix async callback manager tag handling (#4949) 2025-06-03 16:23:22 -07:00
Nuno Campos 5ab5da767b Pass tags when configuring async callback manager 2025-06-03 16:17:17 -07:00
Nuno CamposandGitHub a534807ec9 Allow same-name channels and nodes in StateGraph (#4944) 2025-06-03 16:15:07 -07:00
Nuno Campos 89e827bd15 Make it possible to run test command without docker installed 2025-06-03 16:14:46 -07:00
Nuno CamposandGitHub d4018497a9 Fix ensure_config docstring (#4947) 2025-06-03 16:02:44 -07:00
Nuno Campos 7080eaa79e docs: fix ensure_config docstring 2025-06-03 15:56:41 -07:00
Nuno CamposandGitHub 9c6e8d5237 Fix duplicate article typos in docs (#4946) 2025-06-03 15:56:04 -07:00
langchain-infraandGitHub ae3c2e0b89 fix: use right deployment link (#4945) 2025-06-03 18:55:05 -04:00
Nuno Campos cd2847ee07 docs: fix double article typos 2025-06-03 15:53:19 -07:00
infra 7335b80586 fix: use right deployment link 2025-06-03 18:42:11 -04:00
Asamu DavidandGitHub 394ea1c12b Merge branch 'main' into david/06-03/update-cli-version 2025-06-03 23:40:10 +01:00
Nuno CamposandGitHub b00ea605e2 checkpoint-postgres: Use lock also for pipeline mode (#4942) 2025-06-03 15:30:04 -07:00
Nuno Campos bb990715f1 Allow same-name channels and nodes in StateGraph
- We no longer auto create a same-name channel for each node, so this limitation can now be lifted
2025-06-03 15:29:49 -07:00
Asamu DavidandGitHub fce7652b7c Merge branch 'main' into david/06-03/update-cli-version 2025-06-03 23:26:42 +01:00
langchain-infraandGitHub 8837b8534f fix: use right link (#4943) 2025-06-03 18:15:51 -04:00
infra 4473db6361 fix: use right link 2025-06-03 18:12:41 -04:00
Nuno Campos c31c940bbb checkpoint-postgres: Use lock also for pipeline mode 2025-06-03 14:59:56 -07:00
Asamu DavidandGitHub 5c18123bb7 cli v0.2.11 release
## Description 

bump cli version to 0.2.11
2025-06-03 21:37:25 +01:00
Asamu DavidandGitHub 7ba5636200 add support for image_distro in config file (#4871) 2025-06-03 20:59:06 +01:00
Sydney RunkleandGitHub 37c215b5a2 Improve type checking on graph init and invoke/stream (#4932) 2025-06-03 15:21:51 -04:00
Asamu DavidandGitHub f528f5ebd6 Merge branch 'main' into david/05-28/support-image-distro-config 2025-06-03 18:18:22 +01:00
Michael Li cd28bef155 docs: fix a grammar issue in multiple files 2025-06-04 01:20:29 +10:00
David DuongandGitHub 3a74514bc3 fix(sdk-js): uiMessageReducer should handle undefined metadata (#4931) 2025-06-03 15:21:25 +02:00
Tat Dat Duong 2b759a2a33 fix(sdk-js): uiMessageReducer should handle undefined metadata 2025-06-03 15:20:13 +02:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
723cff9001 build(deps): bump actions/setup-node from 3 to 4 (#4915)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-03 08:37:31 -04:00
lc-arjunandGitHub 7d27d108fc bump sdk (#4925) 2025-06-02 18:16:08 -07:00
Arjun Natarajan f4b480c4b8 bump sdk 2025-06-02 18:13:36 -07:00
lc-arjunandGitHub 8c560ef62a feat: support custom tracer when creating run in ts sdk (#4924) 2025-06-02 18:10:01 -07:00
David Asamu 1e324b681a update dockerfile generation logic, fix pip removal in wolfi 2025-06-03 01:43:59 +01:00
Arjun Natarajan 6002aebec5 maybe nees the full lint rewrite 2025-06-02 17:35:12 -07:00
Arjun Natarajan b438210a0d maybe fixes lint 2025-06-02 17:33:29 -07:00
Arjun Natarajan b908e96541 need to export it here too 2025-06-02 17:27:33 -07:00
Arjun Natarajan 70dc0323c1 i want this exported 2025-06-02 17:26:20 -07:00
Arjun Natarajan a75e40192f perhaps better typing 2025-06-02 17:18:59 -07:00
Arjun Natarajan 952017fbe2 feat: support custom tracer when creating run in ts sdk 2025-06-02 17:17:07 -07:00
Nuno CamposandGitHub 36bd88287f Fix makefile command file for dev server (#4922) 2025-06-02 16:41:59 -07:00
Nuno Campos 5e5840805e Fix makefile command file for dev server
- pidfile was always empty
2025-06-02 16:35:48 -07:00
Nuno CamposandGitHub 7828003958 Fix Command(graph=PARENT) when used together w checkpointer=True (#4921) 2025-06-02 16:18:52 -07:00
Nuno Campos e5e78e4192 Fix Command(graph=PARENT) when used together w checkpointer=True 2025-06-02 16:05:32 -07:00
William FHandGitHub e2b14a9499 feat: Add onRequest callback to JS SDK (#4919)
Add onRequest callback
2025-06-02 13:43:16 -07:00
Nuno CamposandGitHub 2563301f39 Remove unused deprecation decorator/warning (#4917) 2025-06-02 15:53:26 -04:00
David Asamu bbbadc3db9 regenerate schema + lint & format 2025-06-02 20:50:48 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
b4cb4e72ab build(deps): bump actions/configure-pages from 4 to 5 (#4916)
Bumps [actions/configure-pages](https://github.com/actions/configure-pages) from 4 to 5.
- [Release notes](https://github.com/actions/configure-pages/releases)
- [Commits](https://github.com/actions/configure-pages/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/configure-pages
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 15:36:18 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
7e45a0530b build(deps): bump actions/cache from 3 to 4 (#4913)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 15:17:21 -04:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dd059fea3c build(deps): bump actions/checkout from 3 to 4 (#4912)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-02 15:17:04 -04:00
Michael LiandGitHub 871b1dccd8 docs: fix grammar issues in deployment_options.md and faq.md (#4905) 2025-06-02 15:04:03 -04:00
Daiki InoueandGitHub f8b5e05c47 docs: fix a typo (#4908) 2025-06-02 15:03:23 -04:00
Eugene YurtsevandGitHub 6cde3ee7a3 ci: add depandabot config for upgrading actions (#4911)
Depandabot config for suggesting to update old actions
2025-06-02 15:03:03 -04:00
Michael LiandGitHub d44581d754 docs: fix typos in langgraph_studio.md and low_level.md (#4909) 2025-06-02 17:49:04 +00:00
Michael LiandGitHub dc787b5aa6 docs: fix grammar issues in langgraph_data_plane.md and langgraph_platform.md (#4906)
* docs: fix grammar issues in langgraph_data_plane.md and langgraph_platform.md

* docs: further update the wording in langgraph_data_plane.md
2025-06-02 17:48:55 +00:00
Michael LiandGitHub 0d6af09187 docs: fix grammar issues in application_structure.md and assistants.md (#4904)
* docs: fix a grammar error in mcp.md

* docs: fix a grammar error in multi-agent.md

* docs: fix grammar issues in application_structure.md and assistants.md
2025-06-02 13:48:50 -04:00
Michael LiandGitHub 469576f966 docs: fix grammar issues in langgraph_self_hosted_control_plane.md and langgraph_server.md (#4907) 2025-06-02 17:47:16 +00:00
Michael LiandGitHub f00b994692 docs: fix incorrect word in memory.md (#4902) 2025-06-02 13:48:18 +00:00
Michael LiandGitHub 7d6243e6b4 docs: fix incorrect word in custom_docker.md (#4901) 2025-06-02 13:48:06 +00:00
Michael LiandGitHub 8fd50a50d4 docs: fix grammar errors in mcp.md and multi-agent.md (#4903)
* docs: fix a grammar error in mcp.md

* docs: fix a grammar error in multi-agent.md
2025-06-02 13:46:29 +00:00
Sydney RunkleandGitHub eaa1b37645 Require state_schema in StateGraph.__init__ (#4897) 2025-06-02 01:52:35 +00:00
David DuongandGitHub 21f762140a docs(sdk-js): improve resumability docs (#4899) 2025-06-02 02:10:16 +02:00
Tat Dat Duong 5973fcb0ae docs(sdk-js): improve resumability docs 2025-06-02 02:09:43 +02:00
David DuongandGitHub 624c688013 feat(sdk-js): add docs for reconnectOnMount, expose run metadata (#4898) 2025-06-02 01:53:46 +02:00
Tat Dat Duong d05b323b88 feat(sdk-js): add docs for reconnectOnMount, expose run metadata 2025-06-02 01:52:40 +02:00
Ikpreet S BabraandGitHub 765bc3b9e0 docs: Update 2-add-tools.md (#4896)
Typo in first sentence.
2025-06-01 10:47:35 +00:00
Nuno CamposandGitHub 78d3d8c802 Remove add_conditional_edge(..., then=) (#4893)
- This is redundant with deferred nodes, and not documented
2025-06-01 06:46:51 -04:00
Nuno CamposandGitHub 3b85c83d51 Avoid repeated runtime calls to get_type_hints (#4888) 2025-05-31 08:37:23 -07:00
Eugene YurtsevandGitHub 08f88ce8da docs: add gtm (#4887)
Add google tag manager
2025-05-30 21:49:22 -04:00
Nuno Campos d661d528b2 Avoid repeated runtime calls to get_type_hints
- Replace get_type_hints logic with much simpler implementation which only collects annotated keys (not the annotations themselves)
- Cache annotations in a WeakKeyDictionary
2025-05-30 16:30:53 -07:00
Sydney RunkleandGitHub 5cbf31e8a4 Remove non-state Graph (#4872) 2025-05-29 21:56:53 -04:00
a5e6223569 Remove MessageGraph (#4875)
Remove MessageGraph

Co-authored-by: Nuno Campos <nuno@langchain.dev>
2025-05-29 21:50:23 -04:00
Nuno CamposandSydney Runkle afb83d2201 Remove non-state Graph
- Not used in any examples/docs
2025-05-29 21:38:58 -04:00
David Asamu 1e8f5dd2b6 add warning when image distro is not configured as wolfi 2025-05-30 00:25:27 +01:00
David Asamu 574a9246a6 add unit tests for image_distro config 2025-05-29 23:30:27 +01:00
David Asamu c46f7a4c3d add support for image_distro in config file 2025-05-29 21:54:54 +01:00
langchain-infraandGitHub 8e82c7d1a0 docs: fix self hosted control plane concepts/docs (#4870) 2025-05-29 16:16:02 -04:00
infra 2066e4c018 docs: fix self hosted control plane concepts/docs 2025-05-29 13:10:16 -07:00
Sydney RunkleandGitHub f8fae30aa9 docs: fix pprint import (#4869) 2025-05-29 19:37:43 +00:00
Nuno CamposandGitHub 2615c7046c Remove UntrackedValue channel (#4868) 2025-05-29 12:14:36 -07:00
Nuno Campos 05f3904d09 Remove UntrackedValue channel
- This is incompatible with distributed execution modes, so needs to go
2025-05-29 12:07:51 -07:00
Nuno CamposandGitHub 583fe9fd84 Remove UntrackedValue channel (#4859) 2025-05-29 11:52:10 -07:00
Nuno Campos 0afc4ebda3 Flip default for checkpoint_during
- Now defaulting to False, ie. saving only the final checkpoint
- All features other than time travel into an intermediate step are supported by checkpoint_during=False so this is a better default for almost all use cases
2025-05-29 11:45:54 -07:00
Nuno CamposandGitHub d55cafad29 Remove Channel node builder (#4858) 2025-05-28 14:30:12 -07:00
Nuno Campos 1b961f68b9 Remove Channel node builder
- Replaced by NodeBuilder introduced in earlier PR
2025-05-28 14:14:47 -07:00
Nuno CamposandGitHub 045d6dfb82 Update managed value usage in local_read (#4854) 2025-05-28 14:05:14 -07:00
Nuno CamposandGitHub 26d5fccfa0 Modify stream mode messages and custom to respect subgraphs=False (#4843) 2025-05-28 14:05:03 -07:00
Nuno CamposandGitHub 76661f4c9c Remove Checkpoint.writes (#4822) 2025-05-28 14:04:45 -07:00
Nuno CamposandGitHub 9320bedd2a Remove Checkpoint.pending_sends (#4820) 2025-05-28 14:04:26 -07:00
Nuno CamposandGitHub 3737d886e7 Pregel: Add NodeBuilder class to replace Channel.subscribe_to (#4819) 2025-05-28 14:04:08 -07:00
Nuno CamposandGitHub 8386eaceab Remove dict subclasses used for values/updates stream chunks (#4816) 2025-05-28 14:03:40 -07:00
Nuno CamposandGitHub c32677c92d Remove old checkpoint test fixtures (#4814) 2025-05-28 14:03:12 -07:00
Nuno CamposandGitHub e384ccacaf Remove postgres shallow checkpointer (#4813) 2025-05-28 14:02:58 -07:00
Nuno CamposandGitHub dc95f95181 Remove ChannelsManager, ManagedValues are now static classes and never instantiated (#4812) 2025-05-28 14:02:43 -07:00
Nuno CamposandGitHub 2e4645ce61 Remove Context channel / managed value, Remove SharedValue (#4857) 2025-05-28 14:02:12 -07:00
Nuno CamposandGitHub efb282a197 Remove SchemaCoercionMapper (#4855) 2025-05-28 10:51:32 -07:00
Nuno Campos 89ce6ea2a8 Remove SchemaCoercionMapper 2025-05-28 10:42:43 -07:00
Nuno Campos 197b01e985 Update managed value usage in local_read 2025-05-28 10:40:20 -07:00
DHParkandGitHub 1e87312d1f Update graph-api.ipynb (#4824) 2025-05-28 13:39:22 +00:00
vksxandGitHub bcc6485f6c (docs) fix broken links (#4823) 2025-05-28 13:36:48 +00:00
Sydney RunkleandGitHub ce5f248e3b docs: fix typo (#4852)
minor fix
2025-05-28 13:35:17 +00:00
Sydney RunkleandGitHub 5602c29668 prebuilt: release 0.2.2 (#4851)
bump prebuilt
2025-05-28 13:33:39 +00:00
Nuno Campos bc404d14f6 Format 2025-05-27 16:07:54 -07:00
Sydney RunkleandGitHub 19ca6b416b fix: post_model_hook should inject state + store into tool calls if necessary (#4842) 2025-05-27 17:42:20 +00:00
Nuno Campos 936176eb21 Remove Checkpoint.writes
- This has been superseded by saving the individual writes of each task through put_writes()
- Removing this speeds up checkpoint operations as it was duplicating data saved elsewhere already
2025-05-25 19:06:46 -07:00
Nuno Campos 4e8fbe4525 Remove Checkpoint.pending_sends
- Instead store sends in a Topic channel, removing the need to fetch sends as writes against the parent checkpoint
- Remove deprecated/unused functions in langgraph-checkpoint (will require bumping min range for langgraph-checkpoint in langgraph lib)
- Implement migration of old pending sends in langgraph-checkpoint-postgres
- Ensure parent config of `checkpoint_during=False` checkpoints always points to checkpoints that were also saved
2025-05-25 19:06:02 -07:00
Nuno Campos 85522ec6a6 Pregel: Add NodeBuilder class to replace Channel.subscribe_to
- For now keeping Channel.subscribe_to given it was used in docs
2025-05-24 20:35:37 -07:00
Nuno Campos 0f8f5444bc Lint 2025-05-24 14:54:57 -07:00
Nuno Campos bc17c3522b Remove old checkpoint test fixtures
- Now all tests fully migrated to more recent sync_checkpointer and async_checkpointer fixtures for parametrising on checkpointer
- Use sync/async_store fixtures where tests used only in memory store
- Remove unused "should snapshot" check for older versions of langchain core no longer tested against
2025-05-24 14:27:13 -07:00
Nuno Campos 8c11c1155a Remove postgres shallow checkpointer
- This was deprecated, and superseded by checkpoint_during=False, which is available for all checkpointers
2025-05-24 12:39:50 -07:00
Nuno Campos 9c79d887a0 Remove ChannelsManager, ManagedValues are now static classes and never instantiated
- This keeps the existing API for accessing IsLastValue, RemainingSteps, but simplifies the internal implementation
- This lets us remove ChannelsManager completely, which no longer needs to be a context manager, now replaced w function channels_from_checkpoint
- Managed values are now simple functions that return a value given a PregelScratchpad, which will be easier to implement in distributed runner
2025-05-24 12:15:11 -07:00
Nuno Campos 889b40e7a8 Remove Context channel / managed value, Remove SharedValue
- Both have been deprecated long ago, have not been present in docs for quite a while
- Removing these lets us delete some code paths that were dedicated to this, easing work on distributed runner
2025-05-24 11:05:15 -07:00
Lauren Hirata SinghandGitHub 2553ae0b87 docs: Fix links (#4807) 2025-05-23 22:34:08 -04:00
Lauren Hirata Singh 3e4b69af3f Fix links 2025-05-23 22:30:43 -04:00
Lauren Hirata SinghandGitHub 0c6367c186 docs: fix link to examples page in readme.md (#4710) 2025-05-23 22:26:30 -04:00
Lauren Hirata SinghandGitHub 99860b5713 Update README.md 2025-05-23 22:12:18 -04:00
Lauren Hirata SinghandGitHub a69860baa6 Merge branch 'main' into fix-examples-link-readme 2025-05-23 22:08:32 -04:00
Lauren Hirata SinghandGitHub 6fc21046cd Update libs/langgraph/README.md 2025-05-23 22:06:43 -04:00
Lauren Hirata SinghandGitHub 754420e9a2 Update libs/langgraph/README.md 2025-05-23 22:03:39 -04:00
Lauren Hirata SinghandGitHub 15126ad827 Create overview.md 2025-05-23 22:02:14 -04:00
芥子观须弥andGitHub 6633173918 Fix: Ensure route function returns "b" to enable a → b → a loop (#4738)
fix: correct route function to return 'b' instead of 'a' when not terminating

This fixes a bug in the graph API how-to where the route function incorrectly returned 'a'. Now it correctly returns 'b' as intended.
2025-05-23 23:56:51 +00:00
Nuno Campos 0139e11ae5 0.4.7 2025-05-23 16:51:48 -07:00
Nuno CamposandGitHub bfbe55ab64 Fix stream mode not respected in subgraphs (#4806) 2025-05-23 16:47:01 -07:00
Nuno Campos 36478eb745 Fix stream mode not respected in subgraphs
- The default applied for subgraphs should be applied only when stream mode arg not passed in
2025-05-23 16:40:51 -07:00
Nuno CamposandGitHub 8fb91569b9 Add tests for stream_events when using imperative api (#4805) 2025-05-23 16:40:38 -07:00
Nuno Campos 9bf6728354 Try to make test less flaky 2025-05-23 16:32:51 -07:00
Nuno Campos 126a8f5bc6 Lock 2025-05-23 16:22:12 -07:00
Nuno Campos 9170f636d0 Lock 2025-05-23 16:14:15 -07:00
Nuno Campos 8207d3fefb Add tests for stream_events when using imperative api 2025-05-23 16:11:12 -07:00
Nuno Campos ade3f372a5 0.4.6 2025-05-23 15:24:07 -07:00
Nuno CamposandGitHub 3a55d1137b Fix exception handling for imperative tasks (#4802) 2025-05-23 15:23:15 -07:00
Nuno Campos bece43dc67 Fix 2025-05-23 15:06:18 -07:00
Nuno Campos 913b8d5e95 Lint 2025-05-23 14:32:45 -07:00
Andrew NguonlyandGitHub 29f6ea7f61 docs: Add warning about immutable deployment types (#4804)
* Add more details about database for deployment types. Clarify that deployment type cannot be changed.

* Add note about Development type disk capacity.
2025-05-23 14:04:46 -07:00
Nuno Campos 3c0d9346c2 Add sync test 2025-05-23 13:51:13 -07:00
Nuno Campos 0ebb78d9b2 Fix 2025-05-23 13:50:11 -07:00
Nuno Campos 70153ceba2 Fix exception handling for imperative tasks
- These exceptions should not be re-raised at end of tick, given they're handled explicitly by the developer in their entrypoint
2025-05-23 12:26:27 -07:00
Sydney RunkleandGitHub a9c87ed8b6 prebuilt: release 0.2.1 (#4801)
lockfile and version updates
2025-05-23 18:07:24 +00:00
Sydney RunkleandGitHub 837fe59e24 prebuilt: support provider builtin tools in create_react_agent (#4800) 2025-05-23 13:58:53 -04:00
Andrew NguonlyandGitHub 596a26461c docs: Add note about Enterprise plan in banner for all self-hosted deployment options. (#4797)
Add note about Enterprise plan in banner for all self-hosted deployment options.
2025-05-22 18:38:06 -07:00
Sydney RunkleandGitHub aff3be03dc prebuilt: release 0.2.0 (#4793) 2025-05-22 17:54:58 +00:00
David DuongandGitHub 1000b81eca feat(langgraph): push_messages should directly write to the state (#4791) 2025-05-22 19:41:51 +02:00
Tat Dat Duong 10c6ed7320 Code review 2025-05-22 19:35:44 +02:00
Tat Dat Duong 28e0e7f3ae feat(langgraph): push_messages should directly write to the state 2025-05-22 19:35:15 +02:00
Sydney RunkleandGitHub 87fa661ac0 temp: remove ToolInterruptNode code (#4792)
remove tool node specific code for post_model_hook release
2025-05-22 13:28:59 -04:00
David DuongandGitHub 3189b8fcda feat(sdk-js): Add rejoining of streams (#4744) 2025-05-22 19:19:07 +02:00
Tat Dat Duong 74b18acfc2 Bump to 0.0.78 2025-05-22 19:08:39 +02:00
Tat Dat Duong 1ff5e2966b Add joinStream method 2025-05-22 19:07:01 +02:00
Diwakar GuptaandGitHub 1ba2b3fba9 Merge branch 'main' into fix-examples-link-readme 2025-05-22 22:34:22 +05:30
Tat Dat Duong 102b1f63f3 Fix assumption on sessionStorage 2025-05-22 19:01:14 +02:00
Tat Dat Duong 74dbccd408 Rename to reconnectOnMount 2025-05-22 18:42:38 +02:00
Tat Dat Duong f5a2410ddc Make useStream more hackable 2025-05-22 18:38:09 +02:00
Sydney RunkleandGitHub 4cade428d8 docs: adding interactive graph widget (#4785) 2025-05-22 12:23:43 -04:00
Tat Dat Duong 5823a659fc use sessionStorage instead 2025-05-22 18:11:38 +02:00
Tat Dat Duong f2c32727e8 Fix invalid states 2025-05-22 18:09:16 +02:00
Tat Dat Duong 9d71d941fd resumable 2025-05-22 17:45:52 +02:00
Tat Dat Duong 0db618ae75 Further cleanup 2025-05-22 17:45:52 +02:00
Tat Dat Duong 49746ab3a3 Code cleanup 2025-05-22 17:45:51 +02:00
Tat Dat Duong 5c7ef9a4fc Fix race condition 2025-05-22 17:45:51 +02:00
Tat Dat Duong 62e688bb37 Add rejoining of streams 2025-05-22 17:45:51 +02:00
Sydney RunkleandGitHub 42eff39cd0 docs: fix top nav (#4783)
fix top nav
2025-05-21 19:30:13 -04:00
David DuongandGitHub 39172f2ff9 feat(graph): add push_message method to push manually to messages / message-tuple stream (#4722) 2025-05-22 01:01:48 +02:00
Nuno CamposandGitHub 0202c83e73 Apply same condition for stream_mode=values in suppress interrupt (#4782) 2025-05-21 15:55:55 -07:00
Tat Dat Duong ab924c72fa Add message state test 2025-05-22 00:49:23 +02:00
Nuno Campos 1833889316 Apply same condition for stream_mode=values in suppress interrupt 2025-05-21 15:23:27 -07:00
Tat Dat Duong 7a6bdb3441 Remove redundant cast 2025-05-22 00:23:26 +02:00
David DuongandGitHub ea7f45dba7 feat(sdk-py): resumable streams (#4765) 2025-05-22 00:19:43 +02:00
Tat Dat Duong d2875cc576 feat(graph): add push_message method to push manually to messages / message-tuple stream 2025-05-22 00:18:12 +02:00
Tat Dat Duong e77197a00f Here as well 2025-05-22 00:13:22 +02:00
Tat Dat Duong 30e6ea7aed Last uv.lock? 2025-05-22 00:13:10 +02:00
Tat Dat Duong 461afe0aa6 Again? 2025-05-22 00:12:40 +02:00
Tat Dat Duong 92f8dde61e uv.lock? 2025-05-22 00:07:56 +02:00
Tat Dat Duong f4f7a79907 Bump to 0.1.70 2025-05-22 00:03:48 +02:00
Tat Dat Duong 9c1267af1a Import re 2025-05-22 00:03:41 +02:00
Tat Dat Duong e0a4420b8e feat(sdk-py): resumable streams 2025-05-22 00:03:41 +02:00
Andrew NguonlyandGitHub 94a8067c12 docs: Remove outdated docs regarding graph construction (#4779)
Remove outdated docs regarding graph construction.
2025-05-21 12:21:32 -07:00
Lauren Hirata SinghandGitHub 957db60d89 docs: fix (#4778) 2025-05-21 14:48:36 -04:00
Lauren Hirata Singh a17efb1120 fix 2025-05-21 14:47:55 -04:00
Eugene YurtsevandGitHub d4b428de62 docs: improved llms.txt (#4777)
Improved llms.txt
2025-05-21 14:40:01 -04:00
Eugene YurtsevandGitHub fd0b70eb05 docs: improve llms.txt to generate title and description based on content (#4775)
Update llms.txt based on content
2025-05-21 14:39:13 -04:00
Lauren Hirata SinghandGitHub b8daf323ac docs: fix redirect (#4776) 2025-05-21 14:35:04 -04:00
Lauren Hirata Singh 2d3a3de1ce docs: fix redirect 2025-05-21 14:34:02 -04:00
Nuno CamposandGitHub 96e2f68b2d Only emit stream values chunks when the output channels have changed (#4774) 2025-05-21 13:09:42 -04:00
Eugene YurtsevandGitHub 364508ff20 docs: Add script to generate llms-txt links from yaml (#4771)
A first pass at the script to fix the immediate issue. Will follow up with a few additional improvements.
2025-05-21 11:54:23 -04:00
Eugene YurtsevandGitHub fa1af5c364 docs: replace llms.txt with updated links (#4772)
This is a stop gap solution to fix broken links.

This PR will be followed up with a better llms.txt file
2025-05-21 11:53:26 -04:00
le-codeur-rapideandGitHub 8ec29b4df7 docs: fix example pregel reducer (#4740) 2025-05-21 10:38:29 -04:00
Sydney RunkleandGitHub 06607e08ea prebuilts hitl: fix branching logic + add structural snapshot tests (#4767) 2025-05-21 09:29:59 -04:00
Lauren Hirata SinghandGitHub 0a8f54ca4a docs: add redirect (#4762) 2025-05-20 15:06:34 -04:00
Lauren Hirata Singh 9d41d439cc docs: add redirect 2025-05-20 14:52:02 -04:00
Diwakar GuptaandGitHub 364fdf5dfe Merge branch 'main' into fix-examples-link-readme 2025-05-21 00:00:09 +05:30
Leeroy BrunandGitHub ae5c01fbab docs: typo in npx command to install LangGraph CLI (#4761) 2025-05-20 17:08:02 +00:00
Sydney RunkleandGitHub bd52b1faa1 docs: deferred nodes (#4759) 2025-05-20 13:07:11 -04:00
Stefano LottiniandGitHub 4a04ca7268 [docs] Revise pip-install packages for PostgresSaver in "how-to/Persistence" notebook (#4752)
revise pip-install packages for PostgresSaver usage in how-to page
2025-05-20 15:46:39 +00:00
Yazan JianandGitHub 23b868da00 docs: fix async usage example from await .invoke() to `await .ainvo… (#4758)
docs: fix async usage example from `await .invoke()` to `await .ainvoke()`
2025-05-20 15:45:47 +00:00
David DuongandGitHub 51bfd16460 feat(sdk-js): add stream_resumable flag, that marks the stream as resumable (#4757) 2025-05-20 14:16:39 +02:00
Tat Dat Duong 325d9e3134 Bump to 0.0.77 2025-05-20 14:14:48 +02:00
Tat Dat Duong b052ebf984 feat(sdk-js): add stream_resumable flag, that marks the stream as resumable 2025-05-20 14:13:47 +02:00
Sydney RunkleandGitHub 1e938a692f docs: node caching (#4749) 2025-05-19 15:49:31 -04:00
Nuno CamposandGitHub 46a9d3159d Remove local_write utility (#4751)
- The validation isn't worth the cost of having to pass list of nodes to task config
2025-05-19 15:49:17 -04:00
Nuno CamposandGitHub d825e39df9 Print output for cached @task functions (#4750) 2025-05-19 11:42:16 -07:00
Nuno Campos 53a1e7c9de Print output for cached @task functions 2025-05-19 11:35:51 -07:00
Sydney RunkleandGitHub 7bd8616b1e feature: Implement post_model_hook and HumanInterruptNode (#4583) 2025-05-19 14:07:42 -04:00
William FHandGitHub 95f92069a7 sqlite: Add test for search with list filters (#4747) 2025-05-18 23:50:27 -07:00
William FHandGitHub 6b28319796 sqlite: update list_namespaces with max_depth (#4746)
sqlite: update on conflict
2025-05-18 23:27:06 -07:00
Didier DurandandGitHub 2ddf61201c docs: Fixing some typos (#4741) 2025-05-18 22:36:37 -07:00
Didier DurandandGitHub 9453ee08dc docs: Fix a few spelling mistakes (#4742)
Fixing some typos
2025-05-18 22:35:54 -07:00
William Fu-Hinthorn 15bafc54c8 Update lockfile 2025-05-17 21:55:46 -07:00
William FHandGitHub 725dd40fa7 Release sqlite store (#4737) 2025-05-17 21:49:03 -07:00
William FHandGitHub c2a1b3af07 docs: Clean up adjective use in readme (#4734) 2025-05-17 21:43:14 -07:00
William FHandGitHub 025b634d98 SqliteStore (#3608) 2025-05-17 21:40:19 -07:00
Diwakar GuptaandGitHub fe5d303ccd Merge branch 'main' into fix-examples-link-readme 2025-05-17 13:56:41 +05:30
Brace SproulandGitHub 8edb3e7b65 release(sdk-js): 0.0.76 (#4733) 2025-05-16 14:59:50 -07:00
bracesproul c21cf9fc1d release(sdk-js): 0.0.76 2025-05-16 14:56:56 -07:00
David DuongandGitHub cb95393c67 fix: Allow users to config whether or not stream subgraphs (#4732) 2025-05-16 23:51:25 +02:00
bracesproul bb1edb4415 cr 2025-05-16 14:49:57 -07:00
bracesproul 6f1db4c60a fix: Allow users to config whether or not stream subgraphs 2025-05-16 14:49:28 -07:00
Vadym BardaandGitHub 119a03bb00 ci: fix benchmark command (#4729) 2025-05-16 12:53:46 -07:00
Vadym BardaandGitHub 09138048bc docs: document tuples in streaming guides (#4690) 2025-05-16 14:59:51 -04:00
David DuongandGitHub adc89440a6 feat(sdk-js): expose ID for SSE events, update joinStream (#4547) 2025-05-16 20:53:39 +02:00
Tat Dat Duong c65919b3b2 Remove onResponse 2025-05-16 11:52:07 -07:00
Tat Dat Duong 0fa2b6c600 Bump to 0.0.75 2025-05-16 11:50:35 -07:00
Tat Dat Duong 9b2071b103 Fix tests 2025-05-16 11:50:09 -07:00
Tat Dat Duong b3f13ee904 Add onRunCreated callback 2025-05-16 11:43:40 -07:00
Tat Dat Duong bf239a06e1 Add callback for response object to get headers 2025-05-16 11:43:39 -07:00
Tat Dat Duong cc25539018 feat(sdk-js): expose ID for SSE events, update joinStream 2025-05-16 11:43:39 -07:00
Lauren Hirata SinghandGitHub 654096625a docs: add redirect (#4727) 2025-05-16 11:28:45 -07:00
David DuongandGitHub 3ea1141d55 feat(sdk-js): switch from jest to vitest, add useStream FE tests (#4726) 2025-05-16 19:55:30 +02:00
Tat Dat Duong e9d1f5508a package.json 2025-05-16 10:53:06 -07:00
Tat Dat Duong c6157d90dd feat(sdk-js): switch from jest to vitest, add useStream FE tests 2025-05-16 10:48:11 -07:00
Lauren Hirata Singh f37a228b58 add redirect 2025-05-16 10:28:51 -07:00
Sydney RunkleandGitHub d34299ac39 ci: fix issue with cache in integration tests (#4725) 2025-05-16 16:49:29 +00:00
Diwakar GuptaandGitHub c9fa11ae7d Merge branch 'langchain-ai:main' into fix-examples-link-readme 2025-05-16 16:32:53 +05:30
Sydney RunkleandGitHub 228a08b966 ci: migrate to uv! (#4698)
* Migrate to `uv`
* Format `pyproject.toml` files properly
* Remove upper bounds on dependencies, and bounds on dev dependencies
(we should be using latest)
* Move to hatch for packaing

In the future we should:
* Set up dependabot / automate lockfile updates and tests
* Add tests for min compatible versions (I'll do this right after merge)
* Use dynamic versioning
* Bump `pydantic` to v2.11.4 in the lockfile, we have some tests failing
2025-05-15 17:39:14 -07:00
Lauren Hirata SinghandGitHub 217795eb72 docs: fix broken img (#4716) 2025-05-15 13:37:40 -07:00
Lauren Hirata Singh e873df678b fix broken img 2025-05-15 13:33:36 -07:00
Hussein AkbarzadehandGitHub 2b603a6ab0 Update sql-agent.ipynb (#4702)
On line 586, the check_query function should use
check_query_system_prompt. Instead, small mistake it is using the
generate_query_system_prompt prompt which is obviously incorrect.
2025-05-15 20:26:36 +00:00
Lauren Hirata SinghandGitHub f60a06441b docs: fix nit (#4714) 2025-05-15 12:50:32 -07:00
Lauren Hirata Singh db5e956dc6 docs: fix nit 2025-05-15 12:48:49 -07:00
Yagnesh M. BhadiyadraandGitHub cacae7bd1f fix(docs): Correctify the Pass or Fail condition in the Graph API example. (#4712) 2025-05-15 19:37:36 +00:00
Vadym BardaandGitHub 60df867872 docs: update MCP example (#4713) 2025-05-15 14:59:35 -04:00
Diw 988805d60b fix link to examples page in readme.md 2025-05-15 23:11:17 +05:30
Vadym BardaandGitHub 6fb2a93212 langgraph: release 0.4.5 (#4709) 2025-05-15 13:33:02 -04:00
Vadym BardaandGitHub 3f8944c1fc checkpoint: release 2.0.26 (#4708) 2025-05-15 13:28:10 -04:00
Nuno CamposandGitHub e79f3ceedc Improve how we match cached writes for async imperative tasks (#4691)
- remove match_cached_writes from PregelRunner args (now called by
PregelLoop internally)
- this will be helpful when implementing distributed runner classes
2025-05-15 10:21:27 -07:00
Vadym BardaandGitHub a64414c87c langgraph: release 0.4.4 (#4704) 2025-05-15 11:20:59 -04:00
Nuno CamposandGitHub c9d85a22ec langgraph: fix drawing graph with __root__ channel (#4695) 2025-05-15 07:55:45 -07:00
PabloandGitHub 983243333c Missing space in langgraph_server.md (#4697)
Missing space
2025-05-15 08:39:01 -04:00
vbarda 3a1c02ff33 update for consistency 2025-05-15 08:38:25 -04:00
vbarda 5ab2aa79bb lint again 2025-05-14 22:11:09 -04:00
vbarda c33e64daa6 use list 2025-05-14 22:03:40 -04:00
vbarda 4ffae6065f lint + update 2025-05-14 22:01:54 -04:00
vbarda 54ddde9d4c update 2025-05-14 21:30:22 -04:00
vbarda 60c41ce69e update 2025-05-14 21:14:49 -04:00
vbarda efd33d860f update 2025-05-14 21:03:47 -04:00
vbarda 254a38560e langgraph: fix drawing graph with __root__ channel 2025-05-14 20:42:30 -04:00
Nuno CamposandGitHub 3487f4eba5 langgraph: fix graph drawing for self-loops (#4688)
Fixes #4685
2025-05-14 11:44:44 -07:00
Nuno Campos 3bdb7d09be Lint 2025-05-14 11:30:49 -07:00
Nuno Campos 3acf63a918 Lint 2025-05-14 11:29:26 -07:00
Nuno Campos f51e5e2bd7 Improve how we match cached writes for async imperative tasks
- remove match_cached_writes from PregelRunner args (now called by PregelLoop internally)
- this will be helpful when implementing distributed runner classes
2025-05-14 11:25:49 -07:00
lc-arjunandGitHub c1a4d77bd4 fix: update langgraph cli to include js and update template app description (#4687) 2025-05-14 07:04:04 -07:00
6e3eb6370e Update docs/docs/tutorials/langgraph-platform/local-server.md
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-05-14 06:56:36 -07:00
Arjun Natarajan ab0fa9dc77 use npx to install cli instead 2025-05-14 09:49:42 -04:00
vbarda b20130d4e4 langgraph: fix graph drawing for self-loops 2025-05-14 09:46:32 -04:00
Arjun Natarajan 5f821cf584 fix: update langgraph cli to include js and update template app description 2025-05-14 09:41:37 -04:00
lc-arjunandGitHub c7691081d1 fix(docs): template app names (#4682) 2025-05-13 15:25:39 -07:00
Arjun Natarajan 2ff2972b67 oops js is js not python 2025-05-13 18:21:20 -04:00
Arjun Natarajan 873873e640 fix(docs): template app names 2025-05-13 18:17:42 -04:00
lc-arjunandGitHub fba0d6f96c chore(docs): reformat troubleshooting section and remove faqs page (#4681) 2025-05-13 15:04:19 -07:00
Arjun Natarajan 8bc509578b fix formatting 2025-05-13 17:59:51 -04:00
Arjun Natarajan 72d085d9f8 reformat troubleshooting section and remove faqs page 2025-05-13 17:54:51 -04:00
ccurmeandGitHub 940c2b0e74 docs: add chat model tabs to models guide (#4679) 2025-05-13 17:50:26 -04:00
lc-arjunandGitHub e705ea1961 feat(docs): studio nits (#4680) 2025-05-13 13:53:02 -07:00
Arjun Natarajan 18e8d334ed nits to threads 2025-05-13 16:48:07 -04:00
Arjun Natarajan 392606f5f7 feat(docs): studio nits 2025-05-13 16:29:10 -04:00
lc-arjunandGitHub cff2be48c9 feat(docs): further improvements for studio guides docs (#4677) 2025-05-13 12:59:47 -07:00
Arjun Natarajan c63cc173b2 added page for running application 2025-05-13 15:54:46 -04:00
Lauren Hirata SinghandGitHub 2b8c295898 docs: Simplify LGP quickstarts (#4678)
- Change quickstarts to use `new-langgraph-project`, which doesn't
require API keys for Anthropic, Tavily, etc.
2025-05-13 11:47:48 -07:00
Arjun Natarajan 03c5547e34 update dataset page 2025-05-13 14:46:26 -04:00
Lauren Hirata Singh a7faae6b54 nit 2025-05-13 11:40:30 -07:00
Lauren Hirata Singh 1d3f19763d add js sample code back 2025-05-13 11:36:45 -07:00
Lauren Hirata Singh 16d5ce364c nit 2025-05-13 11:24:19 -07:00
Lauren Hirata Singh ce235d0eb1 edits based on feedback 2025-05-13 11:20:19 -07:00
Arjun Natarajan 2e17857ca7 verb tense 2025-05-13 13:57:18 -04:00
Arjun Natarajan 304a59a1c9 feat(docs): further improvements for studio guides docs 2025-05-13 13:52:14 -04:00
Lauren Hirata Singh 063a0e027b docs: Simplify LGP quickstarts 2025-05-13 10:51:48 -07:00
ccurmeandGitHub 4534d174f4 docs: move async guide into graph-api (#4676) 2025-05-13 13:30:23 -04:00
Lauren Hirata SinghandGitHub 8d9a99bb99 docs: address feedback (#4674) 2025-05-13 10:08:42 -07:00
Lauren Hirata Singh ee528f7d49 nit 2025-05-13 10:04:33 -07:00
Lauren Hirata Singh 9d3ea6fd7e docs: address feedback 2025-05-13 09:51:50 -07:00
Vadym BardaandGitHub d256469f37 docs: fix warnings in links (#4672) 2025-05-13 11:38:54 -04:00
William Fu-Hinthorn 138f0eb003 fix: (docs) Rm unused api keys 2025-05-13 08:07:13 -07:00
Lauren Hirata SinghandGitHub 1acad37bee docs: LGP nits (#4670) 2025-05-12 20:59:59 -07:00
Lauren Hirata Singh 0a7a7fb71f docs: LGP nits 2025-05-12 20:57:29 -07:00
lc-arjunandGitHub b6f3e25ef7 fix: use absolute links for sdk reference (#4669) 2025-05-12 19:44:36 -07:00
Arjun Natarajan 70a10b0b57 fix: use absolute links for sdk reference 2025-05-12 22:39:05 -04:00
William FHandGitHub bed5f80e2c Optionally use loop-safe asgi transport (#4668) 2025-05-12 19:31:44 -07:00
Vadym BardaandGitHub 8057efc80a docs: update cassettes & notebook runner processing (#4667) 2025-05-12 21:54:42 -04:00
ce4caa3ac8 docs: mcp adapters example for deployed graph (#4666)
Example to connect to the MCP server of a deployed graph in langgraph
platform (langchain-mcp-adapters).
The graph can be used as a MCP tool.


![image](https://github.com/user-attachments/assets/fb5c36d4-0f04-4814-b0b7-bf7fcf6f8381)

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2025-05-12 17:55:38 -07:00
Vadym BardaandGitHub ad315bb5e0 docs: update HITL platform docs (#4664) 2025-05-12 17:56:27 -04:00
Lauren Hirata SinghandGitHub 5b9c9057a2 docs: General clean up (#4665)
- Change LG Cloud > Platform
- Misc. cleanup
2025-05-12 17:41:49 -04:00
Lauren Hirata SinghandGitHub 280d612b2d Merge branch 'main' into clean 2025-05-12 17:26:17 -04:00
Lauren Hirata Singh ceee65c93c Fix headings 2025-05-12 14:25:34 -07:00
William Fu-Hinthorn a16176c5bf fix: (docs) Update openapi.json 2025-05-12 14:23:20 -07:00
lc-arjunandGitHub 5537adc16a feat(docs): threads (#4662) 2025-05-12 14:19:48 -07:00
Ido SalomonandGitHub 9fce01f884 [Proposal] add gitmcp badge for simple LLM-accessible documentation (#4502)
[gitmcp.io](https://gitmcp.io/) provides easy access to the latest
langgraph docs through a remote, free, open-source MCP. It's supported
by all major clients (including the new claude.ai web client). It
enables two access points -
- Empower AI agents (e.g., Cursor) with live documentation context to
prevent hallucinations.
- Chat with the documentation in the browser via the embedded chat

This PR proposes adding a new badge to help users make the most of
Langgraph's documentation with GitMCP. The badge is
[customizable](https://github.com/idosal/git-mcp?tab=readme-ov-file#-gitmcp-badge).
The count is a live count of users accessing Langgraph's documentation
through GitMCP.

Example:

[![GitMCP](https://img.shields.io/endpoint?url=https://gitmcp.io/badge/langchain-ai/langgraph)](https://gitmcp.io/langchain-ai/langgraph)

You can see a demo with Langgraph's GitHub pages at gitmcp.io.

Please let us know what you think :)
2025-05-12 17:08:47 -04:00
Arjun Natarajan e1ea8c9538 pr feedback 2025-05-12 16:55:03 -04:00
Lauren Hirata Singh 7ea406648f Simplify assistants 2025-05-12 13:37:25 -07:00
Lauren Hirata Singh f5423783f7 Change LG Cloud > Platform 2025-05-12 12:44:50 -07:00
Arjun Natarajan 04a42c014b rm accidental change 2025-05-12 15:22:26 -04:00
Arjun Natarajan 1e405274ba feat(docs): threads 2025-05-12 15:18:41 -04:00
Vadym BardaandGitHub ae5b4e834e docs: replace state_modifier w/ prompt in func how-tos (#4659) 2025-05-12 13:46:50 +00:00
André MenezesandGitHub 3d394740ce Fix AsyncPostgresStore._cursor row type (#4623)
`AsyncPostgresStore._cursor` is expected to yield
`AsyncCursor[DictRow]`. In the `else` branch the `row_factory` was not
defined, meaning that it would yield `AsyncCursor[TupleRow]` (default).
This resulted in an error in
[langgraph/store/postgres/aio.py#L249](https://github.com/langchain-ai/langgraph/blob/main/libs/checkpoint-postgres/langgraph/store/postgres/aio.py#L249)
(`TypeError: tuple indices must be integers or slices, not str`).
2025-05-12 13:34:56 +00:00
Emmanuel FerdmanandGitHub 5ab6f77982 Fix invalid channels error message (#4357)
# PR Summary
This small PR resolves the error formatting in
`libs/langgraph/langgraph/pregel/algo.py` so the `proc.channels` will be
evaluated in the message.

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-05-12 09:29:49 -04:00
Hamza KyamanywaandGitHub fe11a71d28 docs: update link in agentic concepts tutorial for map-reduce implementation (#4650)
## PR for:
- Fix broken link in agentic concepts tutorial for map-reduce
implementation
2025-05-12 07:46:30 -04:00
Sydney RunkleandGitHub 347fbf1625 docs: remove unused annotation comments in readmes (#4656) 2025-05-12 07:45:22 -04:00
Sydney RunkleandGitHub 0b5529108f docs: fix broken API reference link (#4657) 2025-05-12 07:45:07 -04:00
Lauren Hirata SinghandGitHub daf20b610b docs: General language cleanup (#4649)
- README updates based on feedback
- Auth tutorial cleanup
2025-05-12 06:11:08 +00:00
William FHandGitHub f7c4f96e61 Ref index (#4644) 2025-05-11 16:46:03 -07:00
Andrew NguonlyandGitHub 4bdbebb3e4 docs: Update beta labels for deployment options (#4643)
@lnhsingh, let me know if you're ok with this copy and messaging
placement.
2025-05-11 10:33:38 -07:00
ce5d3c9c5a docs: Remove self-hosted lite deployment option (#4645)
### Summary
Self-Hosted Lite is a server version, not a deployment option.

---------

Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-05-11 10:29:01 -07:00
Eugene YurtsevandGitHub dda4b02095 docs: remove customer support bot example (#4641)
Hide example temporarily until we bring it up to date
2025-05-09 21:19:35 -04:00
lc-arjunandGitHub 0c57f2ab7e fix(docs): update footer color (#4646) 2025-05-09 18:09:44 -07:00
Arjun Natarajan 6f6ae8edce update footer color 2025-05-09 21:05:43 -04:00
lc-arjunandGitHub ee11294351 feat(docs): assistants and threads and faqs (#4642) 2025-05-09 15:35:11 -07:00
Arjun Natarajan 6d3dae6fd1 assistants and threads and faqs 2025-05-09 18:11:44 -04:00
Eugene YurtsevandGitHub 200c09b662 docs: re-enable strict mode (#4638)
- Turn on strict mode to fail docs build if there are any internal
broken anchor links.
- Fix broken anchor links.
- Delete storm tutorial that has fake markdown inside it (we'll figure
out how to deal with it later)
2025-05-09 17:25:11 -04:00
Eugene YurtsevandGitHub af80d6b339 docs: re-org side bar (#4640) 2025-05-09 17:21:15 -04:00
Eugene YurtsevandGitHub 220f9aaaab docs: fix formatting in overview for getting started tutorial (#4639) 2025-05-09 16:48:13 -04:00
William FHandGitHub bb416eb39a feat: CLI: Add __main__.py (#4637) 2025-05-09 13:14:45 -07:00
+2 3055c4b9cc [docs] LangGraph / LangGraph Platform docs updates (#4479)
Main changes made:
- Add top level horizontal tabs
- Reorganize the sidenav
- Build out README/index page
- Consolidate how-tos under each section
- Remove duplicate content

---------

Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
Co-authored-by: Tat Dat Duong <david@duong.cz>
Co-authored-by: Sydney Runkle <sydneymarierunkle@gmail.com>
Co-authored-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
Co-authored-by: Vadym Barda <vadym@langchain.dev>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: ccurme <chester.curme@gmail.com>
Co-authored-by: Andrew Nguonly <andrewnguonly@users.noreply.github.com>
Co-authored-by: David Asamu <david.asamu@langchain.dev>
Co-authored-by: infra <mukil@langchain.dev>
Co-authored-by: Arjun Natarajan <arjun@langchain.dev>
2025-05-09 16:09:43 -04:00
Nuno CamposandGitHub 909a4591a8 Port checkpointer/store fixtures in langgraph-prebuilt to idiomatic pattern (#4629) 2025-05-09 19:42:44 +00:00
Nuno CamposandGitHub fc1ef29df7 Extend all tests using InMemorySaver to use all available checkpointers (#4627) 2025-05-09 12:34:59 -07:00
Nuno CamposandGitHub 30a72ced06 Implement update_state for functional api (#4626) 2025-05-09 12:34:45 -07:00
Nuno CamposandGitHub 302ae69e60 More idiomatic sync/async checkpointer fixtures in pytest (#4624) 2025-05-09 12:34:34 -07:00
Nuno CamposandGitHub 6777b5274c More idiomatic sync/async store fixtures in pytest (#4617)
- Use a single fixture that returns the store, instead of list of names
2025-05-09 12:34:16 -07:00
Nuno CamposandGitHub c5283cac09 Cache nodes/tasks (#4486)
- BaseCache interface defines the base class for cache storage adapters
- FileCache implements BaseCache with filesystem-backed storage
- Provide default cache key implementation which hashes args with pickle
- Update PregelExecutableTask with cache_key property for tasks that
opt-in to caching
- Update PregelLoop, PregelRunner to get/set from cache as appropriate

TODO
- [x]  Call match_cached_writes in async PregelRunner
- [ ]  Implement RedisCache to use in LGP
- [x]  Add more tests
2025-05-09 12:34:04 -07:00
Nuno Campos 562d64bbb7 Lint 2025-05-09 12:07:59 -07:00
Nuno Campos 898f266f72 Overload clear method to delete all when called without args 2025-05-09 12:05:26 -07:00
Nuno Campos 331d5b07ce Limit depth 2025-05-09 12:00:08 -07:00
William FHandGitHub 62069439fc feat: support --base-image in langgraph dockerfile command (#4628) 2025-05-09 18:35:33 +00:00
Nuno Campos 0d9b664360 Extend all tests using InMemorySaver to use all available checkpointers 2025-05-09 11:11:04 -07:00
Nuno Campos e8cea06e7e Implement update_state for functional api 2025-05-09 10:54:26 -07:00
Nuno Campos ed7f038a19 Fix 2025-05-09 10:54:12 -07:00
William FHandGitHub e507f0b991 feat: Customize timeouts in get_client (#4622) 2025-05-09 10:07:35 -07:00
Nuno Campos af961e279b More idiomatic sync/async checkpointer fixtures in pytest 2025-05-09 09:59:43 -07:00
Nuno Campos dd55e5097b Move to sep file 2025-05-09 09:01:25 -07:00
Nuno Campos 92cc3f0e0e More idiomatic sync/async store fixtures in pytest
- Use a single fixture that returns the store, instead of list of names
2025-05-09 08:38:31 -07:00
Eugene YurtsevandGitHub 4210188ade docs: remove giscus comments (#4616) 2025-05-09 11:22:43 -04:00
Nuno Campos 6fc1df9013 Lint 2025-05-08 17:12:22 -07:00
Nuno Campos 7850c8d799 Lint 2025-05-08 17:08:47 -07:00
Nuno Campos 83d2f93566 Lint 2025-05-08 16:57:21 -07:00
Nuno Campos c937d5f048 Lint 2025-05-08 16:54:06 -07:00
Nuno Campos 1a6395fd07 Move FileCache to sqlite package, add InMemoryCache 2025-05-08 16:50:36 -07:00
Nuno Campos 6e0041529e Add clear cache methods 2025-05-08 16:50:24 -07:00
Nuno Campos d5d6fc0fee Remove refresh 2025-05-08 16:50:24 -07:00
Nuno Campos 31b135f75d Add namespace to cache keys 2025-05-08 16:50:24 -07:00
Nuno Campos bebb0e8164 Lint 2025-05-08 16:50:24 -07:00
Nuno Campos 4761eb7696 Lint 2025-05-08 16:50:24 -07:00
Nuno Campos f1c1eaf229 Lint 2025-05-08 16:50:24 -07:00
Nuno Campos 0211886bf5 Lint 2025-05-08 16:50:24 -07:00
Nuno Campos 0dd9fba0af Lint 2025-05-08 16:50:24 -07:00
Nuno Campos f5bf77b3eb Lint 2025-05-08 16:50:09 -07:00
Nuno Campos 7c9f9aa89d Lint 2025-05-08 16:49:38 -07:00
Nuno Campos d38303494c Lint 2025-05-08 16:49:38 -07:00
Nuno Campos c4deb2c621 Finish implementation, add tests 2025-05-08 16:49:38 -07:00
Nuno Campos 42d88a769a Lint 2025-05-08 16:49:38 -07:00
Nuno Campos 14b07d06fa Re-implement using sqlite 2025-05-08 16:49:38 -07:00
Nuno Campos d04570f178 Lint 2025-05-08 16:49:38 -07:00
Nuno Campos 6c155f87c3 Lint 2025-05-08 16:49:38 -07:00
Nuno Campos 0264363083 Lint 2025-05-08 16:49:38 -07:00
Nuno Campos 1edf5cee89 Accept default cache_policy for graph/entrypoint/pregel 2025-05-08 16:49:38 -07:00
Nuno Campos 0e81699fec Lint 2025-05-08 16:49:01 -07:00
Nuno Campos a2a1a42c75 Fix 2025-05-08 16:49:01 -07:00
Nuno Campos 6b78bcd857 Implement ttl in FileCache 2025-05-08 16:49:01 -07:00
Nuno Campos d33c5a20e4 Fix 2025-05-08 16:49:01 -07:00
Nuno Campos 09fdc14d0a Output cached writes 2025-05-08 16:49:01 -07:00
Nuno Campos 64491a2b29 Lint 2025-05-08 16:49:01 -07:00
Nuno Campos 057da43cd0 Lint 2025-05-08 16:49:01 -07:00
Nuno Campos a11a62e68f Thread-safe delete 2025-05-08 16:49:01 -07:00
Nuno Campos 1d977f1c09 Rename 2025-05-08 16:49:01 -07:00
Nuno Campos 5cff35d1c3 Fix type annotation 2025-05-08 16:49:01 -07:00
Nuno Campos ed3f05260a Secure! 2025-05-08 16:49:01 -07:00
Nuno Campos b3ea406e81 Add pickle_fallback for json plus serializer 2025-05-08 16:49:01 -07:00
Nuno Campos 2a1c63ff9c Fixes 2025-05-08 16:49:01 -07:00
Nuno Campos 1aecde3cd8 Re-do with separate cache interface 2025-05-08 16:49:01 -07:00
Nuno Campos a446f34ed9 WIP 2025-05-08 16:48:46 -07:00
Nuno CamposandGitHub c2776449fd Deferred Node (#4269) 2025-05-08 23:03:57 +00:00
William FHandGitHub 88fd6b1e80 Start dev server externally (#4604)
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-05-08 15:20:51 -07:00
William FHandGitHub 10b1676d0b Update python SDK docstrings (#4602) 2025-05-08 14:37:26 -07:00
William FHandGitHub c1bf678ed1 Update openapi spec (#4599)
Incorporate new arguments added to the API, including the `/mcp` paths
2025-05-08 09:14:18 -07:00
William FHandGitHub 9938b51d31 release: 0.4.3 (#4592) 2025-05-07 20:28:40 -07:00
b84ae660b8 langgraph: use tuples for streamed message events in RemoteGraph (#4589)
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-05-08 03:20:23 +00:00
William FHandGitHub e3146d8050 Fix remote streaming of subgraphs (#4590)
Because we were propagating the task ID config key, the stream mode was
always overridden as "values", meaning the token, etc. callback handlers
were never added within the remote graphs.

---------

Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-05-07 20:10:31 -07:00
Lauren Hirata SinghandGitHub d56c3b0f26 Update banner (#4588) 2025-05-07 20:12:35 -04:00
Lauren Hirata Singh cf89499507 Update banner 2025-05-07 20:07:31 -04:00
Vadym BardaandGitHub 79dffe20b2 docs: update multi agent multi-turn howto (#4582)
Fixes #4554
2025-05-07 16:06:28 -04:00
a9ea0cd28a Add a limit to Pregel.draw (#4575)
Co-authored-by: vbarda <vadym@langchain.dev>
2025-05-07 16:12:12 +00:00
GustafandGitHub ffaddab110 docs: Fixed incorrect tool in 'Write from tools' documentation (#4572)
I was having trouble following this section of the docs and I realized
it is because the incorrect tools is included in the tools list.
`update_user_info` was defined earlier in the file but never used.
2025-05-07 11:06:44 -04:00
William FHandGitHub 4aeaffef4e 0.4.2 (#4570)
Release
2025-05-06 18:28:37 -07:00
Lauren Hirata SinghandGitHub b44be763fb Fix typos (#4567) 2025-05-06 13:41:32 -07:00
langchain-infraandGitHub 00d2a1abd4 docs: update ingress requirement for self hosted control plane (#4564) 2025-05-06 14:51:37 -04:00
infra 2e8e9e4531 docs: update ingress requirement for self hosted control plane 2025-05-06 11:46:31 -07:00
William FHandGitHub 0e2471b401 Add LANGGRAPH_POSTGRES_POOL_MAX_SIZE env var (#4562) 2025-05-06 18:23:55 +00:00
Nuno CamposandGitHub e401ad7c75 langgraph: decouple name from assistant ID in RemoteGraph (#4550) 2025-05-05 18:22:54 -07:00
vbarda f1bfd6051a update 2025-05-05 21:02:10 -04:00
vbarda 998be75f34 langgraph: decouple name from assistant ID in RemoteGraph 2025-05-05 20:47:22 -04:00
Nuno CamposandGitHub e51442279a sdk-py: Prefix private functions in sdk with _ (#4542) 2025-05-05 15:19:24 -07:00
Nuno Campos 365dd5f459 sdk-py: Prefix private functions in sdk with _ 2025-05-05 14:43:34 -07:00
Jacob LeeandGitHub 8837f8452c docs: Fix JS example in custom auth how-tos (#4536)
Should be `defaultHeaders`:
https://github.com/langchain-ai/langgraph/blob/main/libs/sdk-js/src/client.ts#L76
2025-05-05 12:35:00 -07:00
Vadym BardaandGitHub 306915690c docs(concepts): update HITL Command section (#4533) 2025-05-05 18:44:32 +00:00
Vadym BardaandGitHub 0e61cc2cf6 prebuilt: remove state_modifier (#4439)
Removes support for `state_modifier` param in `create_react_agent`. To
specify system prompt / instructions use `prompt` parameter.
2025-05-05 09:49:28 -04:00
Sydney RunkleandGitHub a0a302dec5 prebuilt: switch to executing parallel tool calls via Send by default (#4438) 2025-05-05 09:49:09 -04:00
Vadym BardaandGitHub b19405b296 docs: hide old RAG tutorials (#4525) 2025-05-04 21:03:05 +00:00
Vadym BardaandGitHub 101ad12292 docs: update agentic rag tutorial (#4513) 2025-05-04 20:59:08 +00:00
Vadym BardaandGitHub df58a71567 docs: update api ref test (#4516) 2025-05-02 13:58:29 -04:00
Vadym BardaandGitHub ee04c32bb3 docs: update api ref links to be smaller / italicized (#4514) 2025-05-02 12:50:21 -04:00
William FHandGitHub 4e05db8537 Release checkpoint-sqlite (#4509) 2025-05-01 22:42:07 -07:00
William FHandGitHub d6e20e6d09 Add missing 'running' RunStatus (#4508) 2025-05-02 05:36:58 +00:00
Eugene YurtsevandGitHub dd4ad48864 docs: add /mcp endpoint concept for LangGraph Server (#4151)
Documents the /mcp endpoint for LangGraph Server
2025-05-01 22:14:22 -04:00
Vadym BardaandGitHub f79c8487d9 docs: remove nonexistent pages from nav (#4504) 2025-05-01 21:34:24 -04:00
Vadym BardaandGitHub 284e9a2cb4 docs: hide hierarchical tutorial from nav (#4503) 2025-05-01 21:24:12 -04:00
Vadym BardaandGitHub 9216e949e9 docs: update multi-agent supervisor tutorial to use handoffs (#4491) 2025-05-01 21:22:14 -04:00
gyudozaandGitHub a6e2d9e197 docs(rag): fix many typo of generate at RAG section (#4490)
While I was studying about RAG by using langgraph, I found these typos.
2025-05-02 01:19:24 +00:00
Eugene YurtsevandGitHub abae398a3a fix(docs): fix indent typo in code snippet in human-in-the-loop.md (#4501) 2025-05-01 21:18:15 -04:00
William FHandGitHub fcd06acd33 Add support for specifying a custom base image in docker commands (#4500)
build & dockerfile commands

can be specified via CLI  > langgraph.json
2025-05-01 23:13:49 +00:00
c687daa867 docs: update sql tutorial (#4494)
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-05-01 20:18:00 +00:00
Sydney RunkleandGitHub a9f02efab2 docs: remove type in parens from docstrings + use tables for args (#4497)
Adhering to google style format so that mkdocs can pick up + format
args. Also, these types easily get out of date, so nice to remove from
that perspective as well.

Before:

<img width="710" alt="Screenshot 2025-05-01 at 2 01 55 PM"
src="https://github.com/user-attachments/assets/9ad0b33e-5d2c-43c2-9e7c-bf3fc6a6dffe"
/>

After:

<img width="729" alt="Screenshot 2025-05-01 at 2 01 24 PM"
src="https://github.com/user-attachments/assets/97e94d54-41f0-4946-9677-0c5d6400d62b"
/>
2025-05-01 14:08:52 -04:00
Sydney Runkle 2288ef110c use table format 2025-05-01 14:01:14 -04:00
Sydney Runkle ceac510054 meaningless change to docs/ to get vercel going 2025-05-01 13:52:33 -04:00
Sydney Runkle 94994a8d99 meaningless commit to get vercel going sigh 2025-05-01 13:50:55 -04:00
Sydney Runkle f35caf3401 fix for langgraph 2025-05-01 13:41:18 -04:00
Sydney Runkle 3cf2291354 docstrings for prebuilt 2025-05-01 13:40:58 -04:00
Sydney Runkle 0f96441a7c docstrings for sdk-py 2025-05-01 13:40:39 -04:00
Sydney Runkle 6c6bfbc63a docstrings for checkpoint-sqlite 2025-05-01 13:40:21 -04:00
Sydney Runkle 8ce33b948c docstrings for checkpoint-postgres 2025-05-01 13:40:05 -04:00
Sydney Runkle cc698b4f2b docstrings for checkpoint 2025-05-01 13:29:51 -04:00
Sydney Runkle 5916dc333e docstring fixes for cli 2025-05-01 13:23:54 -04:00
Sydney Runkle 7b749f05bd docstring fixes for libs/langgraph 2025-05-01 13:22:49 -04:00
Vadym BardaandGitHub cc4d2d26c7 docs: update add_messages API ref (#4495) 2025-05-01 12:33:27 -04:00
Vadym BardaandGitHub 3c7861c70a docs: fix a link in the agents page (#4492) 2025-05-01 11:39:37 -04:00
William FHandGitHub a2035eeb11 Update CLI (#4488)
Remove maxbound for langgraph-api and runtime inmem.

Update min-bound.

Add server log level flag for dev
2025-04-30 18:23:41 -07:00
William FHandGitHub 9a5b602287 Add checkpoint_during for the SDKs (#4487) 2025-04-30 15:56:29 -07:00
lc-arjunandGitHub 03c34bf2cf feat: assistants sorting sdk spec (#4484) 2025-04-30 17:05:37 -04:00
Vadym BardaandGitHub 536c1c2bba docs: remove prebuilt how-tos and add redirects to agents tab (#4485) 2025-04-30 15:55:55 -04:00
c5de8f4e50 docs(agents): update manage message history section (#4482)
Co-authored-by: Lauren Hirata Singh <lauren@langchain.dev>
2025-04-30 19:11:45 +00:00
Vadym BardaandGitHub d08ed5f42e docs(agents): add store semantic search link (#4483) 2025-04-30 15:08:18 -04:00
David DuongandGitHub 0269dd8818 release(langgraph): 0.4.1 (#4480) 2025-04-30 20:24:48 +02:00
David DuongandGitHub aa722ac084 release(sdk-js): 0.0.72 (#4481) 2025-04-30 20:22:01 +02:00
Tat Dat Duong 91e9f12b54 release(sdk-js): 0.0.72 2025-04-30 20:19:30 +02:00
Tat Dat Duong 5779d9079f release(langgraph): 0.4.1 2025-04-30 20:18:25 +02:00
David DuongandGitHub e02c4b06db feat(ui): add merge option to UI messages (#4473)
- Add docs about (partial) streaming UI components from LLMs
- Add missing support for "nostream" in LangGraph
2025-04-30 20:15:57 +02:00
Vadym BardaandGitHub 5b44886da0 docs(agents): add disable_streaming (#4475) 2025-04-30 14:07:19 -04:00
Tat Dat Duong be1af772f5 Fix lint 2025-04-30 20:04:48 +02:00
Vadym BardaandGitHub 33e409e12b docs(agents): add model fallbacks (#4478) 2025-04-30 17:56:58 +00:00
Vadym BardaandGitHub ce2ba47aff docs: cross link working w/ memory in tools (#4464) 2025-04-30 13:52:10 -04:00
Tat Dat Duong b3371a1d63 Add missing "nostream" support 2025-04-30 19:50:14 +02:00
Tat Dat Duong 5804e788d8 Add docs 2025-04-30 19:46:14 +02:00
Vadym BardaandGitHub aa9651910c docs: set package-mode to false for pyproject (#4477) 2025-04-30 12:09:18 -04:00
Sydney RunkleandGitHub 49c10a9188 packaging: removing pydantic v1 support (#4448)
Also moving over any logic from `langchain-core` to here as we slowly
drop `langchain-core` dependency.

Pydantic v1 is no longer undergoing active maintenance and v2 has been
out for almost 2 years, so it seems like an appropriate time to drop v1
scar tissue.
2025-04-30 09:10:47 -04:00
Tat Dat Duong 1b6e12ef14 feat(ui): add merge option to UI messages 2025-04-30 11:52:47 +02:00
David DuongandGitHub a7090ef983 release(sdk): Python 0.1.64 & JS (0.0.71) (#4471) 2025-04-30 10:40:29 +02:00
Tat Dat Duong 20b9b8b1d7 release(sdk): Python 0.1.64 & JS (0.0.71) 2025-04-30 10:33:52 +02:00
William Fu-Hinthorn 91de85a8e6 fix test 2025-04-29 15:55:54 -07:00
David DuongandGitHub 1ec6efab52 fix(sdk-js): avoid sending run metadata in UI messages (#4467) 2025-04-30 00:41:12 +02:00
Tat Dat Duong d0a70a15a8 fix(sdk-js): avoid sending run metadata in UI messages 2025-04-30 00:34:22 +02:00
Sydney Runkle ef1e1659c6 conditional for config 2025-04-29 18:22:18 -04:00
Sydney Runkle c712e09fbc conditional for config 2025-04-29 18:17:33 -04:00
Vadym BardaandGitHub e25dde1df0 docs(reference): filter class methods and add missing docstrings (#4463) 2025-04-29 21:31:57 +00:00
Eugene YurtsevandGitHub 0bfb818e87 docs: process cell magics (#4462)
Handle a small thing that can be fairly confusing to new python users.

Before:


![image](https://github.com/user-attachments/assets/39011f0c-0a7e-4f32-94d7-a40f0b14f2ab)


After:


![image](https://github.com/user-attachments/assets/16aa4429-eb4e-44b5-8714-29279d93c7ea)
2025-04-29 17:13:46 -04:00
d86d0a9311 fix(langgraph): missing conditional edge on get_graph() (#4458)
Co-authored-by: Nuno Campos <nuno@langchain.dev>
2025-04-29 19:49:48 +00:00
Eugene YurtsevandGitHub dbceb3c2e6 docs: remove non directive to stop indexing output code blocks (it doesn't work) (#4461)
This directive seems to have no effect on code blocks: `{
mkdocs-exclude-search }`. Removing it for now.
2025-04-29 15:46:29 -04:00
Sydney Runkle 80dca9b9a5 removing remaining v1 logic 2025-04-29 15:11:37 -04:00
Vadym BardaandGitHub ea55c2d468 docs: simplify docstring / API reference for create_react_agent (#4457) 2025-04-29 18:52:43 +00:00
Eugene YurtsevandGitHub 8dd95a450b docs: strip ansi and exclude outputs from search (#4460)
# Changes

* Strip ANSI codes from outputs
* Exclude outputs from search (relies on an insiders feature, so can't
test locally)

## ANSI Changes

Before


![image](https://github.com/user-attachments/assets/6ca626f3-143b-4f7a-ab4a-0866f0bbf52f)


After


![image](https://github.com/user-attachments/assets/3d2fdb4f-79a0-42d5-9956-e2aa44e3fea2)
2025-04-29 14:50:07 -04:00
Sydney Runkle da0994b741 removing langchain-core pydantic utilities 2025-04-29 14:31:28 -04:00
Vadym BardaandGitHub 80a74a879c docs: expose supervisor, swarm & MCP in the API reference (#4446) 2025-04-29 17:59:42 +00:00
Eugene YurtsevandGitHub 7170a9f0f4 docs: apply boosts and tag a few things (#4455)
Manual pass to apply a few heuristics:

* Boost conceptual pages
* Deboost (is that a word?) index pages that list all content
* Prefer Agents pages if search query contains the word "agent"
* Add tags for a few selected pages
2025-04-29 13:56:57 -04:00
Sydney Runkle 64cfbb0d02 remove v1 test 2025-04-29 13:51:45 -04:00
langchain-infraandGitHub 11b472e876 chore: update eu ips for new cluster (#4454) 2025-04-29 10:54:48 -04:00
infra 5d831726a3 chore: update eu ips for new cluster 2025-04-29 10:50:31 -04:00
David DuongandGitHub 9ffa6371e0 feat(sdk-js): add onLangChainEvent and onDebugEvent to useStream (#4453) 2025-04-29 15:40:09 +02:00
David DuongandGitHub 4d1e5ab71f feat(sdk-js): pass the client instead of apiKey/apiUrl (#4452) 2025-04-29 15:38:47 +02:00
Sydney RunkleandGitHub c0d6524ec7 release: v0.4.0 (#4447) 2025-04-29 09:35:04 -04:00
Tat Dat Duong 8ad5331c89 feat(sdk-js): add onLangChainEvent and onDebugEvent to useStream 2025-04-29 15:34:03 +02:00
Tat Dat Duong cc62a9fa33 feat(sdk-js): pass the client instead of apiKey/apiUrl 2025-04-29 15:17:55 +02:00
David DuongandGitHub b7482a6f6a fix(docs): Studio troubleshooting docs (#4449) 2025-04-29 11:59:39 +02:00
Tat Dat Duong d4df2bd807 fix(docs): Studio troubleshooting docs 2025-04-29 11:58:52 +02:00
Sydney Runkle e99028cfc6 what would it look like to remove pydantic v1 support? 2025-04-28 21:44:17 -04:00
Sydney Runkle 6250b364f7 version bumps and locks 2025-04-28 17:39:20 -04:00
William FHandGitHub 062253fe48 Add examples of configurable headers (#4445) 2025-04-28 12:52:06 -07:00
Sydney RunkleandGitHub fc0d08328d langgraph: fix bug + add test for multi resume (#4444)
Fine if command is "empty" as we don't add writes for mapped resumes.
2025-04-28 15:48:33 -04:00
Sydney Runkle 2bf8e690b0 test + bug fix 2025-04-28 15:41:37 -04:00
Vadym BardaandGitHub 11c6a54de9 docs: small update in the manage message history how to (#4442) 2025-04-28 13:22:52 -04:00
Nuno CamposandGitHub 78581b80c2 Support multiple resume values with Command.resume (#4406)
* Adding support for mapping interrupt ids -> resume values with the
`Command.resume_map` argument, like:

```py
resume_map = {
    i.interrupt_id: f"human input for prompt {i.value}" 
    for i in parent_graph.get_state(thread_config).interrupts 
}

parent_graph.invoke(Command(resume=resume_map), config=thread_config)
```

* Adds an `interrupts` attribute on `StateSnapshot` so that we can
access that directly rather than having to do
`get_state(thread_config).tasks` and then iterate over tasks to find
interrupts

* Deprecates undocumented feature where (if interrupting a graph from
the level of an interrupt), you could pass a dict mapping task ids ->
resume values. Now we recommend and endorse the `interrupt_id` approach
above.

I'll note, from an internal perspective, I would love if we didn't have
to pass around this map, but it seems like the best way right now to
make the necessary resume information necessary at different levels in a
graph with subgraphs.

Fix https://github.com/langchain-ai/langgraph/issues/4028

Slotted to be included in our v0.4.0 release early next week!
2025-04-28 09:06:58 -07:00
vbarda 78f809bc52 update other tests 2025-04-28 12:02:23 -04:00
Sydney Runkle 5fee0d9d66 skip yielding interrupt if input was a map 2025-04-28 11:47:51 -04:00
William FHandGitHub 68e3d70967 Add section in how-to on exclusions (#4441) 2025-04-28 08:42:32 -07:00
William FHandGitHub dc9f2b1109 Add how-to on headers (#4440)
and their configurability for configurability
2025-04-28 15:31:48 +00:00
William FHandGitHub 67aeba6210 Add schema updates for the configurable headers (#4437) 2025-04-28 15:10:07 +00:00
vbarda 4b7ec256e9 prebuilt: switch to executing parallel tool calls via Send by default 2025-04-28 11:07:27 -04:00
Sydney Runkle dbf1c28ccd lint 2025-04-28 10:22:30 -04:00
Sydney Runkle cb25ef985d update loop to append mapped tasks to task specific values 2025-04-28 10:18:39 -04:00
Sydney RunkleandGitHub 2f49ebfd53 packaging: Remove Python Upper Bounds (#4416)
A few notes:
* We shouldn't be using `tool.poetry.dependencies`, that's deprecated -
waiting for a future PR to address this big change though.
* We should remove upper bounds for all deps unless strictly necessary.
2025-04-28 10:03:43 -04:00
David DuongandGitHub d9c781cc7d feat(js): add message-specific fallback UI components (#4430) 2025-04-28 12:17:07 +02:00
David DuongandGitHub 66af72acb3 fix(sdk-js): remove client-only bootstrapping warning (#4428) 2025-04-28 12:05:43 +02:00
Tat Dat Duong a44d822cd3 feat(js): add message-specific fallback UI components 2025-04-28 12:03:58 +02:00
Tat Dat Duong 28d884b37a fix(sdk-js): remove client-only bootstrapping warning 2025-04-28 11:52:26 +02:00
William FHandGitHub d7a0da8f06 checkpointer: Enter stack for blobs dict in InMemorySaver (#4419) 2025-04-26 13:57:36 -07:00
Vadym BardaandGitHub 2d9347ec33 docs(cloud): update human-in-the-loop guides to use interrupt() (#4418) 2025-04-26 13:37:06 -04:00
Sydney Runkle 5e9bea5134 no upper bounds for python 2025-04-25 17:45:54 -07:00
Sydney RunkleandGitHub 5ddc24ba85 Merge branch 'main' into multi-resumes 2025-04-25 17:05:35 -07:00
Sydney Runkle 0362840d0b revert debugging note"
"
2025-04-25 17:00:26 -07:00
Sydney Runkle 44099d27c8 fixing tests 2025-04-25 16:53:37 -07:00
Nuno CamposandGitHub 8951d162f0 Improve logic for drawing virtual end node (#4409)
- Don't draw unexpected edges to END node
- If a conditional edge has a custom label for END node then draw it
2025-04-25 15:45:12 -07:00
Nuno Campos d90126b34e Fix 2025-04-25 15:38:41 -07:00
Nuno CamposandGitHub adc4569daf build(deps): bump h11 from 0.14.0 to 0.16.0 in /libs/checkpoint-sqlite (#4403)
Bumps [h11](https://github.com/python-hyper/h11) from 0.14.0 to 0.16.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/python-hyper/h11/commit/1c5b07581f058886c8bdd87adababd7d959dc7ca"><code>1c5b075</code></a>
this time for surer</li>
<li><a
href="https://github.com/python-hyper/h11/commit/d9c369935e853a7ee1aeb7e481f6dddf9b9c9b8a"><code>d9c3699</code></a>
this time for sure...</li>
<li><a
href="https://github.com/python-hyper/h11/commit/d91b9dd2290a25c8c3f5ec15feb57de5873e6e39"><code>d91b9dd</code></a>
blacken</li>
<li><a
href="https://github.com/python-hyper/h11/commit/5a4683ca466b59bbab9b19cfea20ee157b31cee0"><code>5a4683c</code></a>
Soothe mypy</li>
<li><a
href="https://github.com/python-hyper/h11/commit/9c9567f0a92d13a83a8d8ebdbc757c8c2d384536"><code>9c9567f</code></a>
Bump version to 0.16.0</li>
<li><a
href="https://github.com/python-hyper/h11/commit/114803a29ce50116dc47951c690ad4892b1a36ed"><code>114803a</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/python-hyper/h11/commit/9462006f6ce4941661888228cbd4ac1ea80689b0"><code>9462006</code></a>
Bump version to 0.15.0</li>
<li><a
href="https://github.com/python-hyper/h11/commit/70a96bea8e55403e5d92db14c111432c6d7a8685"><code>70a96be</code></a>
Merge pull request <a
href="https://redirect.github.com/python-hyper/h11/issues/181">#181</a>
from Julien00859/Julien00859/get_int_max_str_digits</li>
<li><a
href="https://github.com/python-hyper/h11/commit/60782ad107e538b9312aac7e1c119c8358bf797c"><code>60782ad</code></a>
Reject Content-Length longer 1 billion TB</li>
<li><a
href="https://github.com/python-hyper/h11/commit/dff7cc397a26ed4acdedd92d1bda6c8f18a6ed9f"><code>dff7cc3</code></a>
Validate Chunked-Encoding chunk footer</li>
<li>Additional commits viewable in <a
href="https://github.com/python-hyper/h11/compare/v0.14.0...v0.16.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=h11&package-manager=pip&previous-version=0.14.0&new-version=0.16.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>
2025-04-25 15:23:46 -07:00
Nuno Campos 6d70559618 Upgrade 2025-04-25 15:17:06 -07:00
Nuno Campos 70afd2dc2c Update all 2025-04-25 15:11:32 -07:00
ccurmeandGitHub 14e7215090 docs: use langchain-tavily in quickstart (#4412)
We want to deprecate `TavilySearchResults` in langchain-community in
favor of `TavilySearch` in langchain-tavily.

Also update quickstart to use `init_chat_model`.
2025-04-25 17:54:37 -04:00
Nuno Campos 460edde3a7 Lint 2025-04-25 14:37:53 -07:00
Nuno Campos 34d591dedf Improve logic for drawing virtual end node
- Don't draw unexpected edges to END node
- If a conditional edge has a custom label for END node then draw it
2025-04-25 14:37:53 -07:00
Daehwi KimandGitHub 746b5f0730 fix(docs): fix typo (#4411) 2025-04-25 17:10:47 -04:00
Vadym BardaandGitHub 64448404de ci: don't try to render mermaid images when testing notebooks (#4414) 2025-04-25 17:09:18 -04:00
Andrew NguonlyandGitHub 9637f3b1be docs: Document API endpoint for creating new project (#4413) 2025-04-25 10:42:20 -07:00
Sydney Runkle 50449af1a9 add convenient interrupt access to StateSnapshot 2025-04-24 14:52:54 -07:00
Sydney Runkle c2fa33e055 linting etc 2025-04-24 13:28:29 -07:00
Sydney Runkle 644a6c3b63 use resume instead of resume_map and deprecate old mapping task_id -> resume logic 2025-04-24 13:26:01 -07:00
Jacob LeeandGitHub c7fe85585b docs: Adds additional Google Analytics tag to docs (#4402)
CC @danielrlambert3
2025-04-24 13:17:52 -07:00
Sydney Runkle 847b9c13ac adding docs example 2025-04-24 12:36:35 -07:00
Sydney Runkle b6963d35aa multi hitl with new hash pattern 2025-04-24 11:21:25 -07:00
dependabot[bot]andGitHub c6971c6a58 build(deps): bump h11 from 0.14.0 to 0.16.0 in /libs/checkpoint-sqlite
Bumps [h11](https://github.com/python-hyper/h11) from 0.14.0 to 0.16.0.
- [Commits](https://github.com/python-hyper/h11/compare/v0.14.0...v0.16.0)

---
updated-dependencies:
- dependency-name: h11
  dependency-version: 0.16.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-24 17:46:01 +00:00
Sydney RunkleandGitHub 2327f8619f docs: fix xlinks (api and general) (#4391)
Mostly focusing on the API docs xrefs now working, for example:

<img width="728" alt="Screenshot 2025-04-23 at 6 43 40 PM"
src="https://github.com/user-attachments/assets/e0939edb-2088-4b4e-92b0-8009aac6a86e"
/>

--> 

<img width="737" alt="Screenshot 2025-04-23 at 7 57 28 PM"
src="https://github.com/user-attachments/assets/d05e28b5-cf4f-41e0-96f8-9910d19f4657"
/>

Also fixed some other broken links / references.

There are lots of broken links related to langgraph plans / deployment
options, I think our new docs writer was going to work on those.
2025-04-24 08:47:08 -07:00
Sydney RunkleandGitHub 4eb124e83d [breaking]: Improve interrupt behavior when stream_mode='values' (#4374)
This PR does a few things:
1. Surfaces interrupts when `stream_mode='values'` (particularly
relevant for `invoke`, where this is the default behavior)
2. Adds an `interrupt_id` property to the `Interrupt` dataclass so that
interrupts can effectively be mapped to resumes
3. Minor docs updates to reflect the new pattern (no need for a special
section on interrupts with `invoke` and `ainvoke`)

* In a different PR (the one with the multiple resume values), as it's
more relevant there: add an `interrupts` property to `StateSnapshot` so
that `interrupts` can easily be iterated over if users are attempting to
map interrupts to resumes.

I **don't** recommend we release this until we have multi-resumes
working.

## Example

We have the following setup where we're sending multiple prompts to the
child graph, which uses `interrupt`:

```py
def child_graph(state):
    human_input = interrupt(state["prompt"])

    return {
        "human_inputs": [human_input],
    }
```

<img width="142" alt="Screenshot 2025-04-23 at 10 01 12 AM"
src="https://github.com/user-attachments/assets/c6238bf1-54ad-4e48-ab0b-60a0bfc18485"
/>

Old behavior:

```py
initial_input = {"prompts": ["a", "b"]}

print(parent_graph.invoke(input=initial_input,config=thread_config,stream_mode="values"))
#> {'prompts': ['a', 'b'], 'human_inputs': []}

print(parent_graph.invoke(Command(resume="hello 1"),config=thread_config,stream_mode="values"))
#> {'prompts': ['a', 'b'], 'human_inputs': ['hello 1']}

print(parent_graph.invoke(Command(resume="hello 2"),config=thread_config,stream_mode="values"))
#> {'prompts': ['a', 'b'], 'human_inputs': ['hello 1', 'hello 2']}
```

New behavior:

```py
initial_input = {"prompts": ["a", "b"]}

print(parent_graph.invoke(input=initial_input,config=thread_config,stream_mode="values"))
"""
{
  "prompts": ["a", "b"],
  "human_inputs": [],
  "__interrupt__": [
    Interrupt(
      value="a",
      resumable=True,
      ns=["child_graph:38d43a18-a5e7-8ab2-ca83-9d80f6e9ca83"]
    ),
    Interrupt(
      value="b",
      resumable=True,
      ns=["child_graph:dad810e8-738e-9f90-41cd-30c0091eb79b"]
    )
  ]
}
"""

print(parent_graph.invoke(Command(resume="hello 1"),config=thread_config,stream_mode="values"))
"""
{
  "prompts": ["a", "b"],
  "human_inputs": ["hello 1"],
  "__interrupt__": [
    Interrupt(
      value="b",
      resumable=True,
      ns=["child_graph:dad810e8-738e-9f90-41cd-30c0091eb79b"]
    )
  ]
}
"""

print(parent_graph.invoke(Command(resume="hello 2"),config=thread_config,stream_mode="values"))
#> {'prompts': ['a', 'b'], 'human_inputs': ['hello 1', 'hello 2']}
```
2025-04-24 08:21:28 -07:00
Sydney Runkle 84e9ebda91 add back auto gen content 2025-04-24 08:16:03 -07:00
Sydney Runkle 48e8576fcf remove auto gen file 2025-04-24 08:15:06 -07:00
William FHandGitHub 6263c2f710 Copy with cached property (#4399) 2025-04-24 07:16:37 -07:00
David DuongandGitHub 17bc55028e docs(js): update semver constraints (#4401) 2025-04-24 15:48:17 +02:00
Tat Dat Duong cd8443f5ce docs(js): update semver constraints 2025-04-24 15:47:38 +02:00
David DuongandGitHub 7e3f31f97c docs(js): update required semver ranges (#4396) 2025-04-24 12:41:12 +02:00
Tat Dat Duong 3db9bf325c docs(js): update required semver ranges 2025-04-24 12:37:26 +02:00
Sydney Runkle 97337355a2 formatting 2025-04-23 21:21:02 -07:00
Sydney Runkle d6c12133ad fixing links 2025-04-23 21:15:55 -07:00
Sydney Runkle d67abdd112 fix docs build 2025-04-23 20:07:16 -07:00
Sydney Runkle 8dec77e129 remove bounds on mkdocs deps 2025-04-23 18:42:42 -07:00
Sydney Runkle b81c21f311 docs updates 2025-04-23 17:48:47 -07:00
Sydney Runkle cd6b086374 await 2025-04-23 16:36:37 -07:00
Sydney Runkle 5929b0b08d more test fixes 2025-04-23 16:19:46 -07:00
Sydney Runkle 9f33b4e529 fix test to reflect bug fix 2025-04-23 16:03:08 -07:00
Sydney RunkleandGitHub f0fb8d9187 Merge branch 'main' into sr/better-interrupts 2025-04-23 15:58:57 -07:00
Sydney RunkleandGitHub 0ff913c50b Fix double interrupt return caused by dynamic tasks (#4389)
Fix issue found in
https://github.com/langchain-ai/langgraph/pull/4374#discussion_r2056701206
2025-04-23 15:56:47 -07:00
Sydney RunkleandGitHub 67075bfb7f Update libs/langgraph/tests/test_pregel_async.py 2025-04-23 15:50:22 -07:00
Sydney Runkle 37b2956758 helpful comments + test 2025-04-23 14:24:57 -07:00
Sydney Runkle f42fc971e3 fix double interrupt raise with task path bool flag 2025-04-23 14:16:35 -07:00
Vadym BardaandGitHub 6bcab08f55 langgraph: release 0.3.33 (#4388) 2025-04-23 16:28:12 -04:00
Sydney Runkle 8fe7c8101f more explicit tests 2025-04-23 11:49:26 -07:00
Vadym BardaandGitHub 6bca615e6a langgraph: allow nested lists/dicts of primitives in RemoteGraph config (#4387) 2025-04-23 14:04:54 -04:00
Vadym BardaandGitHub 0147790937 langgraph: release 0.3.32 (#4386) 2025-04-23 11:51:29 -04:00
Vadym BardaandGitHub 364c572f0f langgraph: fix messages streaming for list of Commands (#4379)
Fixes #4372
2025-04-23 11:46:57 -04:00
langchain-infraandGitHub 8af4b63c69 docs: Add docs for REDIS_KEY_PREFIX, REDIS_CLUSTER env vars (#4334)
# Description 

Add documentation for using the REDIS_KEY_PREFIX, REDIS_CLUSTER env
vars.
2025-04-23 11:17:03 -04:00
Asamu DavidandGitHub 941b4b1287 Merge branch 'main' into da/4-17/add-redis-prefix-support 2025-04-23 15:52:30 +01:00
Asamu DavidandGitHub 24f04fba37 Update REDIS_CLUSTER env doc.md 2025-04-23 15:52:07 +01:00
William FHandGitHub 05f21a384b Add image arg to up command (#4385)
Using this argument, you can get more customization since you can do
`langgraph build` or directly `docker build` your image and then re-use
the `langgraph up --image my-image` and have it also spin up redis &
postgres for you.

Easier then writing your own compose file
2025-04-23 07:48:01 -07:00
Vadym BardaandGitHub 29e9ee2d7b docs(agents): use list of messages format (#4378) 2025-04-23 01:25:00 +00:00
Sydney Runkle d6b4ee348f goodness, last test fix 2025-04-22 17:32:13 -07:00
Sydney Runkle 9e89b68596 fixing prebuilt tests 2025-04-22 17:24:54 -07:00
Sydney Runkle 1251eeaa48 final test fixes, hopefully 2025-04-22 17:21:56 -07:00
Sydney Runkle 85e73653f9 linting and test fixes 2025-04-22 17:10:54 -07:00
Sydney RunkleandGitHub a8b70cb23c Merge branch 'main' into sr/better-interrupts 2025-04-22 13:48:03 -07:00
Sydney RunkleandGitHub 173627a94c langgraph[lint]: Upgrade to Python 3.9+ syntax (#4368)
Also added "UP" (pyupgrade) rule to `pyproject.toml`
2025-04-22 13:47:18 -07:00
Sydney Runkle edd7d608cd final linting 2025-04-22 13:40:53 -07:00
Sydney Runkle 8977a35060 linting post merge 2025-04-22 13:01:40 -07:00
Sydney RunkleandGitHub 0a6e5a18bb Merge branch 'main' into pyupgrade-39 2025-04-22 12:30:53 -07:00
Sydney Runkle abc6323c6c Merge branch 'sr/better-interrupts' of https://github.com/langchain-ai/langgraph into sr/better-interrupts 2025-04-22 11:39:24 -07:00
Sydney Runkle d5a1bb05f5 revert changes to lockfile 2025-04-22 11:35:56 -07:00
Sydney Runkle 8506c6655b more linting 2025-04-22 11:34:38 -07:00
Sydney RunkleandGitHub 44af4d8e3e Merge branch 'main' into sr/better-interrupts 2025-04-22 11:31:46 -07:00
Sydney Runkle 8e6c0be48a try linting + maybe test fix 2025-04-22 11:28:09 -07:00
Sydney Runkle 35523f4081 linting 2025-04-22 10:34:24 -07:00
Sydney Runkle 9a7b1fa12a initial pass - surfacing interrupts for stream_mode='values' 2025-04-22 10:15:19 -07:00
Nuno CamposandGitHub 71bf2f9e85 Rewrite graph drawing logic (#4354)
- It now executes the same pregel algo as when the graph is executed
(without running any user code in nodes or conditional edges) to
discover all the edges
- This means we now support drawing the graph for all Pregel instances,
not just StateGraph
- This is done in preparation for new edge/node type coming in separate
PR
- Known changes
  - custom labels on conditional edges to END are no longer displayed
2025-04-22 09:31:13 -07:00
Nuno Campos b03c647677 Lint 2025-04-22 08:45:50 -07:00
Nuno Campos 5d49188d3e Lint 2025-04-22 08:41:51 -07:00
Nuno Campos deeb2d6e92 Fix 2025-04-22 08:36:42 -07:00
Nuno Campos 0db67d4196 Fix 2025-04-22 08:36:42 -07:00
Nuno Campos 56c9c210c3 Fix 2025-04-22 08:36:42 -07:00
Nuno Campos 3398715258 Rewrite graph drawing logic
- It now executes the same pregel algo as when the graph is executed (without running any user code in nodes or conditional edges) to discover all the edges
- This means we now support drawing the graph for all Pregel instances, not just StateGraph
2025-04-22 08:36:41 -07:00
William Fu-Hinthorn 38d806733d Update site_description
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-22 08:18:10 -07:00
William FHandGitHub 86ddd8da10 Add docs on tunneling (#4371)
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-22 15:04:04 +00:00
William FHandGitHub a5f5d0c4df Expose --tunnel flag to dev command (#4370)
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-22 14:23:09 +00:00
Sydney Runkle cba7d21732 fix tests? 2025-04-21 21:14:14 -07:00
Sydney Runkle b6ea73ff24 linting for 3.12 2025-04-21 21:01:27 -07:00
Sydney Runkle 1a477e57ff upgrade to py39 standards 2025-04-21 20:43:40 -07:00
lc-arjunandGitHub 7486adabdf fix: threads search sorting defaults (#4365)
Removes default from https://github.com/langchain-ai/langgraph/pull/4362
2025-04-21 20:49:16 -04:00
William FHandGitHub 12ad47e4e8 Use model_validate if needed (#4363)
If the state schema uses validators, skip the model construct
optimization.

For context, pydantic state can be significantly slower to run than
typed dict and dataclass states due to the full recursive validation.

We have some optimizations to reduce the impact of this (using cached
validators with model_construct), but this doesn't handle things like
field_validator.

We prefer correctness over performance, obviously.

Resolves: https://github.com/langchain-ai/langgraph/issues/4074

Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-21 21:53:58 +00:00
lc-arjunandGitHub 90f7f776cf feat: threads sorting sdk spec (#4362) 2025-04-21 14:42:43 -07:00
William FHandGitHub c7306f7aed Add log json env var (#4348) 2025-04-18 20:44:50 +00:00
William FHandGitHub 20bd71e289 Bump lockfile (#4346) 2025-04-18 08:43:58 -07:00
William Fu-Hinthorn 283485753f Format notebook 2025-04-18 08:35:31 -07:00
ba7f9975fa Fix text fields naming (#4345)
The configuration expects the key "fields", not "text_fields": I had
failed to update across all implementations in the original PR

Thank you to Vincent Min for the fix!
---------

Co-authored-by: Vincent Min <93780551+VMinB12@users.noreply.github.com>
2025-04-18 08:21:46 -07:00
David DuongandGitHub 8c4904bee9 fix(sdk-js): make sure to wrap client component in UseStreamContext (#4338) 2025-04-18 01:08:38 +02:00
Tat Dat Duong 6bb06b8702 fix(sdk-js): make sure to wrap client component in UseStreamContext 2025-04-18 01:07:13 +02:00
Vadym BardaandGitHub 7a16e33833 docs: fix notebook runner (#4337) 2025-04-17 22:43:41 +00:00
David Asamu f94eeabebd add doc for REDIS_CLUSTER env var 2025-04-17 23:20:53 +01:00
Asamu DavidandGitHub 9e22a75423 Merge branch 'main' into da/4-17/add-redis-prefix-support 2025-04-17 22:30:10 +01:00
Vadym BardaandGitHub 3da5c73a04 checkpoint-postgres: release 2.0.20 (#4335) 2025-04-17 17:08:18 -04:00
David Asamu e0da491fe6 docs: Add docs for REDIS_KEY_PREFIX env var 2025-04-17 21:38:41 +01:00
David DuongandGitHub e818f83a92 feat(cli): add internal docker tag support (#4333) 2025-04-17 22:32:31 +02:00
Tat Dat Duong e478a8deb9 Update schema 2025-04-17 22:25:47 +02:00
Tat Dat Duong 4bbdfbf381 Cleanup 2025-04-17 22:23:44 +02:00
Tat Dat Duong db1fbe74cc Revert args 2025-04-17 22:22:43 +02:00
Tat Dat Duong 01ce86ad9b Bump to 0.2.5 2025-04-17 22:21:42 +02:00
Tat Dat Duong d5f73fe37b Add tests 2025-04-17 22:21:23 +02:00
Tat Dat Duong 5a200cd89e feat(cli): add internal docker tag support 2025-04-17 22:15:10 +02:00
Nuno Campos 6082bcf8d3 0.3.31 2025-04-17 10:01:29 -07:00
18a9ae45f3 Add delete_thread method to Checkpointer class (#4328)
- Deletes all data associated with a thread_id
- Implemented in InMemory, Sqlite and Postgres checkpointers

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-04-17 16:38:58 +00:00
Vadym BardaandGitHub 83bf004ad7 docs: remove old prebuilt file (#4330) 2025-04-17 12:10:32 -04:00
Vadym BardaandGitHub 72114c6c33 docs: add missing prebuilt file (#4329) 2025-04-17 12:01:32 -04:00
88b57df15b docs: add agents section (#4189)
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-04-17 11:53:05 -04:00
Daehwi KimandGitHub abfb88e5d7 fix(docs): fix typo (#4320)
Correct a typo in documentation: 'thedocker' changed to 'the docker'
2025-04-17 11:19:58 -04:00
Vadym BardaandGitHub 49f063e076 langgraph: update min bound for prebuilt (#4319) 2025-04-17 13:19:31 +00:00
William FHandGitHub 30f9bcd8de Make docstring even less ambiguous (#4308) 2025-04-16 23:39:04 +00:00
David DuongandGitHub 6ee112851c fix(cli): only render progress when in TTY (#4299)
Prevents logging terminal clear commands in non-TTY environments
(LangSmith / CI)
2025-04-16 23:41:35 +02:00
Tat Dat Duong 960f612dd7 Bump to 0.2.4 2025-04-16 23:34:54 +02:00
Tat Dat Duong 43af618bb5 Remove negation 2025-04-16 23:28:07 +02:00
Tat Dat Duong 9b87b45322 retrigger checks 2025-04-16 22:33:58 +02:00
David DuongandGitHub 39adc05357 fix(docs): fix typo (#4301) 2025-04-16 22:29:00 +02:00
Tat Dat Duong c5ac80d2f0 fix(docs): fix typo 2025-04-16 22:28:27 +02:00
Tat Dat Duong 2fc941c1df fix(cli): only render progress when in TTY
Prevents logging terminal clear commands in non-TTY environments (LangSmith / CI)
2025-04-16 21:25:21 +02:00
Vadym BardaandGitHub 7bafc5dd36 docs: add more prominent workflows link (#4297) 2025-04-16 18:29:54 +00:00
David DuongandGitHub c78588b995 feat(sdk-js): export more useStream types, allow loopback clients using globals (#4295) 2025-04-16 17:14:25 +02:00
Tat Dat Duong ecb15acb80 feat(sdk-js): export more useStream types, allow loopback clients using globals 2025-04-16 17:10:44 +02:00
Nuno CamposandGitHub 07ba931105 Stringify thread_id when of a different type (#4281) 2025-04-15 17:07:26 -07:00
Nuno Campos 88ccde6274 Same in get/update state/history 2025-04-15 17:01:01 -07:00
Nuno Campos 5cca153b72 Fix 2025-04-15 16:52:52 -07:00
HeardACatandGitHub 63ebb3a846 docs: rename parallel_workflow --> prompt_chaining_workflow (#4283)
Make the docs clearer within the prompt chaining section
2025-04-15 17:38:39 -04:00
Nuno Campos 48c08421fa Stringify thread_id when of a different type 2025-04-15 12:51:33 -07:00
William FHandGitHub cd967c40ac Add function templates (#4270) 2025-04-15 11:51:20 -07:00
Andrew NguonlyandGitHub 854b76addd docs: Update LangGraph Platform autoscaling docs (#4268) 2025-04-14 15:55:07 -07:00
Vadym BardaandGitHub 73b3535c4d langgraph: release 0.3.30 (#4267) 2025-04-14 17:05:10 -04:00
Nuno CamposandGitHub 3e0629c56c langgraph: support streaming messages from Command.update (#4250) 2025-04-14 12:25:20 -07:00
vbarda 04dd69b1cd simplify 2025-04-14 14:53:08 -04:00
Nuno CamposandGitHub ff22eb6495 langgraph: handle pydantic updates consistently in Command (#4255)
Fixes https://github.com/langchain-ai/langgraph/issues/3950
2025-04-14 11:47:22 -07:00
vbarda 07ca03ff15 lower depth 2025-04-14 14:12:40 -04:00
William FHandGitHub 6eea15ec3b Add store in platform (#4266) 2025-04-14 17:52:14 +00:00
vbarda 0e111b2f44 3.9 2025-04-14 13:23:26 -04:00
vbarda b526fe0a4b set max recursion depth 2025-04-14 13:21:00 -04:00
vbarda 062bf4d717 Merge branch 'vb/fix-command-messages' of github.com:langchain-ai/langgraph into vb/fix-command-messages 2025-04-14 13:20:48 -04:00
vbarda 173f4f6ccf Merge branch 'main' into vb/fix-command-messages 2025-04-14 13:13:49 -04:00
Vadym BardaandGitHub 9a45a5b0f2 Merge branch 'main' into vb/pydantic-command 2025-04-14 13:06:22 -04:00
vbarda 2c557e9e46 move to fields 2025-04-14 13:00:03 -04:00
William FHandGitHub 6c34e599ab Re-warn for omitted nav (#4265) 2025-04-14 09:56:41 -07:00
vbarda d4224a7abb Merge branch 'main' into vb/pydantic-command 2025-04-14 12:56:22 -04:00
Andrew NguonlyandGitHub c700dab97c docs: Add docs for LANGSMITH_TRACING env var (#4257) 2025-04-13 15:33:44 -07:00
vbarda 704b78b8fe tests 2025-04-12 10:45:10 -04:00
vbarda 2ed453debe factor out util 2025-04-12 10:34:02 -04:00
Nuno Campos 62b2580ad5 0.3.29 2025-04-11 16:21:09 -07:00
Nuno Campos dfbf0ddbcb Don't run branch reader in bg thread 2025-04-11 16:20:45 -07:00
Nuno CamposandGitHub 41bb20ee5e Reduce perf impact of set_context (#4256)
- call it less often
- find the run from the run manager at callsite
2025-04-11 15:32:42 -07:00
Nuno Campos 560d6a1f65 Reduce perf impact of set_context
- call it less often
- find the run from the run manager at callsite
2025-04-11 15:01:17 -07:00
vbarda dc6fa9ed30 langgraph: handle pydantic updates consistently in Command 2025-04-11 17:51:56 -04:00
Andrew NguonlyandGitHub a9be75f745 docs: Add Data Plane features sections for custom Postgres/Redis, tracing, telemetry, and licensing (#4254) 2025-04-11 14:48:20 -07:00
Nuno CamposandGitHub 20e3469296 Merge branch 'main' into vb/fix-command-messages 2025-04-11 14:27:26 -07:00
233cca1357 Update langgraph_platform.md (#4251)
Co-authored-by: Catherine <catherine@langchain.dev>
2025-04-11 15:29:11 -04:00
Andrew NguonlyandGitHub d1ac0a0e13 docs: Add alpha and beta labels for respective LangGraph Platform deployment options (#4249)
### Summary
Examples:

![image](https://github.com/user-attachments/assets/2a36a262-5373-498d-9907-19d5447fbb6a)


![image](https://github.com/user-attachments/assets/70671e08-34b6-40ed-964d-9d195ea8308d)


![image](https://github.com/user-attachments/assets/fcb877a6-475c-47a4-b8af-91cbdc00f89b)
2025-04-11 12:01:43 -07:00
vbarda 5071a6cd97 langgraph: support streaming messages from Command.update 2025-04-11 14:05:13 -04:00
Nuno CamposandGitHub 72d7b23638 Use tuple entry for control branch (#4248) 2025-04-11 10:29:44 -07:00
Nuno Campos 64aa1e6cd8 Use tuple entry for control branch 2025-04-11 09:53:54 -07:00
Nuno CamposandGitHub d6f2f0c90d Simplify path for control branch attached to every node (#4247)
- attached to every node to handle command/send return values
- used to be a full blown conditional edge, can be simpler by doing all
of it in a single function
2025-04-11 09:44:18 -07:00
Nuno Campos 5a7edead8c Lint 2025-04-11 09:20:10 -07:00
Nuno Campos 8ff5c43cf0 Avoid creating contexts for control branches 2025-04-11 09:10:58 -07:00
Nuno CamposandGitHub 0eb32a4251 Avoid validating node input more than once per superstep (#4242) 2025-04-11 09:06:07 -07:00
Nuno Campos 3d12a2df59 Simplify path for control branch attached to every node
- attached to every node to handle command/send return values
- used to be a full blown conditional edge, can be simpler by doing all of it in a single function
2025-04-11 09:00:16 -07:00
Nuno Campos 04d3c9d30f Use cache in attach_branch too 2025-04-11 08:38:14 -07:00
David DuongandGitHub cddcf35c09 fix(cli): invert assumed python_version / js_version check (#4245) 2025-04-11 16:49:46 +02:00
Tat Dat Duong 5eefc1d55d fix(cli): invert assumed python_version / js_version check 2025-04-11 16:38:26 +02:00
Vadym BardaandGitHub c9d4f1d77d langgraph: release 0.3.28 (#4243) 2025-04-10 21:17:25 -04:00
Vadym BardaandGitHub 1e2888ce39 langgraph: allow passing a list of retry policies (#4240)
* support passing `retry=(RetryPolicy(...), RetryPolicy())`
* fix bugs with `default_retry_on` and backoff calculation
* add tests
2025-04-10 21:16:27 -04:00
Nuno Campos 4d1b3370df Lint 2025-04-10 17:38:25 -07:00
Nuno Campos bf5017f6e0 Lint 2025-04-10 17:29:36 -07:00
Nuno Campos 64086aa814 Avoid validating node input more than once per superstep 2025-04-10 17:28:00 -07:00
David DuongandGitHub 2a7d48582f release(cli): 0.2.2 (#4241) 2025-04-11 01:40:35 +02:00
Tat Dat Duong b7bd87a063 release(cli): 0.2.2 2025-04-11 01:34:08 +02:00
David DuongandGitHub 2a825cc0e0 feat(cli): add multiplatform support (#4239)
- Uses new `install-node.sh` script already used for Python Gen UI
- Add default `node_version` / `python_version` based on provided
`graphs`

Closes #4115
2025-04-11 01:32:27 +02:00
Tat Dat Duong 436902e5a3 Consolidate node_version and python_version fix 2025-04-11 01:04:26 +02:00
Tat Dat Duong 0ac6a96c6e Fix up 2025-04-11 00:41:16 +02:00
Tat Dat Duong d9856d92af Another 3.9 fix 2025-04-11 00:09:34 +02:00
Tat Dat Duong b3487cbc49 Fix Python 3.9 2025-04-11 00:06:31 +02:00
Tat Dat Duong d06075cbcf Fix new style config 2025-04-11 00:04:44 +02:00
Tat Dat Duong e0be9ae2ef feat(cli): add multiplatform support
Uses new `install-node.sh` script already used for Python Gen UI, add default `node_version` / `python_version` based on provided `graphs`
2025-04-10 23:52:49 +02:00
Vadym BardaandGitHub 19cfe3a0a9 docs: fix title (#4238) 2025-04-10 17:17:36 -04:00
David DuongandGitHub 99a87abaa5 feat(docs): update typedoc references for auth (#4236) 2025-04-10 21:29:19 +02:00
William FHandGitHub a03cb0b16d CLI: Ensure correct api version is used (#4237)
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-10 15:56:07 +00:00
Tat Dat Duong 4be86b2a51 feat(docs): update typedoc references for auth 2025-04-10 17:03:03 +02:00
David DuongandGitHub 06e660a845 chore(docs,cli): remove python-only label for custom auth, add test for custom auth in CLI (#4233) 2025-04-10 16:02:12 +02:00
Tat Dat Duong 794dc1ae92 docs(api): add custom auth docs 2025-04-10 15:06:55 +02:00
Tat Dat Duong 6e7bfecbbc chore(docs,cli): remove python-only label for custom auth, add test for custom auth in CLI 2025-04-10 14:34:52 +02:00
fa080ea689 updates prereq banner (#4220)
<img width="796" alt="Screenshot 2025-04-09 at 1 20 14 PM"
src="https://github.com/user-attachments/assets/fe7409ed-c4cb-42d1-9e34-5adf4ca237e7"
/>

---------

Co-authored-by: Vadym Barda <vadim.barda@gmail.com>
2025-04-09 20:22:36 -04:00
David DuongandGitHub 9fb06fc5af feat(sdk-js): use event key instead of action, prevent retrying on HTTP 409 (#4223) 2025-04-10 01:54:54 +02:00
Tat Dat Duong 5debbb23ca feat(sdk-js): use event key instead of action, clean up interfaces 2025-04-10 01:52:44 +02:00
Nuno CamposandGitHub 7dcc760fd8 Validate other types in model_construct (#4200)
Resolves:
https://github.com/langchain-ai/langgraph/issues/4184
https://github.com/langchain-ai/langgraph/issues/4198 <- tested on
python 3.9 and 3.10
2025-04-09 15:58:11 -07:00
Vadym BardaandGitHub fdb9b9b8e0 checkpoint-postgres: add deprecation warning for ShallowPostgresSaver (#4219) 2025-04-09 11:31:33 -04:00
William FHandGitHub 2f51a15064 Update CLI (#4213) 2025-04-08 19:23:59 -07:00
Nuno CamposandGitHub d2acacfc8f Merge branch 'main' into wfh/_validate_more 2025-04-08 18:03:19 -07:00
Nuno CamposandGitHub 622a15b89e Remove pip from image (#4208)
After user installs, removes pip, setuptools, and wheel from the
resulting image.
2025-04-08 18:01:24 -07:00
Nuno CamposandGitHub bf50938de5 Update poetry version used in ci (#4212) 2025-04-08 18:00:28 -07:00
Nuno Campos d67a500cd9 Fix 2025-04-08 17:57:09 -07:00
Nuno Campos c6f5e561ec Update poetry version used in ci 2025-04-08 17:52:24 -07:00
William FHandGitHub 288fe12933 docs: Fix link (#4211) 2025-04-08 17:31:00 -07:00
William Fu-Hinthorn 5b58efc8d7 Update tests 2025-04-08 17:08:24 -07:00
David DuongandGitHub 2e1e582991 feat(sdk-js): add support for registering multiple events at once (#4209) 2025-04-09 01:58:49 +02:00
Tat Dat Duong 72260e64d5 Prevent casting 2025-04-09 01:57:50 +02:00
Tat Dat Duong 3193f5d063 feat(sdk-js): add support for registering multiple events at once 2025-04-09 01:56:32 +02:00
William Fu-Hinthorn 1b9093459c Remove pip from image
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-08 15:52:58 -07:00
Nuno Campos 392805938e 0.3.27 2025-04-08 15:04:46 -07:00
Nuno CamposandGitHub 4fb2aeacc7 Add checkpoint_during arg (#4169)
- This provides a new mode of execution where only the last checkpoint
is saved
- We save the last checkpoint no matter how the agent run is terminated
(success, error, interrupt, etc)
- This cuts down on cpu time spent on checkpointing, while not losing
any resilience benefits, given individual task writes are still saved
- If an error occurs and the run is retried, any tasks that completed
successfully before will be skipped (as currently)
- checkpoint_during=True is useful when you want to time-travel to inner
steps of a run
- The default value will remain the current behavior, ie.
checkpoint_during=True
2025-04-08 15:03:06 -07:00
David DuongandGitHub 8252668bcc release(sdk-js): 0.0.64 (#4207) 2025-04-08 23:46:23 +02:00
Tat Dat Duong 27e4b0fcfe release(sdk-js): 0.0.64 2025-04-08 23:45:03 +02:00
David DuongandGitHub ba388e25b3 feat(sdk-js): add auth types (#4199) 2025-04-08 23:44:33 +02:00
Nuno Campos 947a233fc5 Fix 2025-04-08 14:20:29 -07:00
Nuno Campos b76dc8ae0a Fix 2025-04-08 14:15:13 -07:00
Nuno Campos cbbfaba1fd Add comments 2025-04-08 14:07:08 -07:00
Nuno Campos e9aec77893 Add more tests 2025-04-08 14:07:02 -07:00
William FH 44691b69a3 Merge branch 'main' into wfh/_validate_more
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-08 13:57:37 -07:00
Nuno CamposandGitHub 067c4dd246 Implement simpler filtering of config keys in RemoteGraph (#4205) 2025-04-08 13:51:11 -07:00
Nuno Campos ccc21974e0 Implement simpler filtering of config keys in RemoteGraph 2025-04-08 13:44:31 -07:00
Nuno CamposandGitHub a6e66746f7 Make compatible with langchain-core 0.1 by conditionally importing _StreamingCallbackHandler (#4203) 2025-04-08 13:28:01 -07:00
Vadym BardaandGitHub 3a17df6106 langgraph: release 0.3.26 (#4204) 2025-04-08 14:53:10 -04:00
William Fu-Hinthorn 52c2837e42 Lint & handle arb types
Test on pydantic < 2

Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-08 11:49:37 -07:00
Nuno Campos cee6a450dc Lint 2025-04-08 10:52:28 -07:00
Nuno Campos 0b3bf37a55 Fix the rest 2025-04-08 10:47:55 -07:00
Nuno CamposandGitHub 305a676675 langgraph: raise GraphInterrupt only if used as a subgraph (#4202) 2025-04-08 10:45:45 -07:00
Nuno Campos 5b73e38c38 Make compatible with langchain-core 0.1 by conditionally importing _StreamingCallbackHandler 2025-04-08 10:44:12 -07:00
vbarda 41fb5ec77c Revert "add warning"
This reverts commit cff349e22e.
2025-04-08 13:38:49 -04:00
vbarda cff349e22e add warning 2025-04-08 13:34:47 -04:00
vbarda 8f32fc4819 update tests 2025-04-08 13:28:35 -04:00
vbarda 5690555394 langgraph: raise GraphInterrupt only if used as a subgraph 2025-04-08 12:51:36 -04:00
William Fu-Hinthorn 933d6aa8f5 Validate types.
My be too slow though. V1 handling is ugly.
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-08 09:31:54 -07:00
Tat Dat Duong 7d5621a84f Default type for TExtra 2025-04-08 17:10:43 +02:00
Tat Dat Duong 5f1213a1c7 Remove extra 2025-04-08 17:07:04 +02:00
Tat Dat Duong a98f9542fa Add unused extra generic for future typing of metadata 2025-04-08 17:06:51 +02:00
William Fu-Hinthorn d2e854b04f Merge branch 'main' into wfh/_validate_more 2025-04-08 06:34:38 -07:00
William FHandGitHub c5b118a672 Add admonitions about managed checkpointers (#4197)
If you're deploying with langgraph API, you don't need to manually
define a checkpointer. For folks who already know they'll be developing
with the api server, I'd like to save everyone time by making this more
clear in the docs on checkpointing.
2025-04-08 12:16:24 +00:00
Tat Dat Duong aee39605e0 Add missing types 2025-04-08 14:13:59 +02:00
lc-arjunandGitHub 72bec9161a Release js sdk 0.0.63 (#4192) 2025-04-07 18:40:59 -07:00
Nuno CamposandGitHub ae17e77522 feat: add assistant description to js sdk (#4191) 2025-04-07 18:37:49 -07:00
Arjun Natarajan a96fc75c55 add assistant description to js sdk 2025-04-07 21:06:34 -04:00
Nuno Campos d541ed90d5 Save Sends unconditionally 2025-04-07 16:45:26 -07:00
William Fu-Hinthorn 7d7708fe42 Validate more 2025-04-07 11:29:32 -07:00
Tat Dat Duong c757247858 feat(sdk-js): add auth types 2025-04-07 20:29:14 +02:00
Nuno Campos 5a0228cb13 Add test 2025-04-04 16:00:28 -07:00
Nuno Campos 4abfc7702d Subgraphs inherit checkpoint mode 2025-04-04 16:00:22 -07:00
Nuno Campos a5495e84c8 Add another test 2025-04-04 15:42:11 -07:00
Nuno Campos 4f353dac31 Fix assignment of pending writes 2025-04-04 14:41:10 -07:00
Nuno CamposandGitHub 4c89bb39d4 Add benchmark script for typed dict version of existing wide state benchmark (#4174)
- to easily compare perf impact of using pydantic, data class, or typed
dict for same workload
2025-04-04 18:37:57 +00:00
Eugene YurtsevandGitHub 05a4fcc8bb cli: release 0.1.89 (#4173)
Release to pick up this: https://github.com/langchain-ai/langgraph/pull/4164
2025-04-04 13:46:47 -04:00
Nuno Campos 7ebd6f5e1f Better test 2025-04-04 10:01:35 -07:00
Eugene YurtsevandGitHub adac016e33 cli: support dict format for graph specification in langgraph.json (#4164)
Allow the CLI to work with dict format for the graph specification.

```json
{
  "dependencies": ["./my_agent"],
  "graphs": {
    "agent": {
      "path": "./my_agent/agent.py:graph",
      "description": "this is my agent description"
    }
  },
  "env": ".env"
}
```

And backwards compatible with:

```json
{
  "dependencies": ["./my_agent"],
  "graphs": {
    "agent": "./my_agent/agent.py:graph",
  },
  "env": ".env"
}
```
2025-04-04 10:16:20 -04:00
Nuno Campos 0a1dd7a01a Do same thing for writes 2025-04-03 17:31:34 -07:00
Nuno Campos 7e08339335 mypy is dumb 2025-04-03 16:55:23 -07:00
Nuno Campos e1d4b5552d Add checkpoint_during arg
- This provides a new mode of execution where only the last checkpoint is saved
- We save the last checkpoint no matter how the agent run is terminated (success, error, interrupt, etc)
- This cuts down on cpu time spent on checkpointing, while not losing any resilience benefits, given individual task writes are still saved
- If an error occurs and the run is retried, any tasks that completed successfully before will be skipped (as currently)
- checkpoint_during=True is useful when you want to time-travel to inner steps of a run
- The default value will remain the current behavior, ie. checkpoint_during=True
2025-04-03 16:51:53 -07:00
David DuongandGitHub 2d13904abf release(langgraph): 0.3.25 (#4167) 2025-04-03 22:20:03 +02:00
Tat Dat Duong dfeb9d3b46 release(langgraph): 0.3.25 2025-04-03 22:12:16 +02:00
David DuongandGitHub 81935a73d8 feat(langgraph): Add UI messages API (#4157)
Sample usage:

```python
from typing import Annotated, Sequence, TypedDict

from langchain_core.messages import BaseMessage
from langchain_openai import ChatOpenAI
from langgraph.graph import StateGraph
from langgraph.graph.message import add_messages

from langgraph.graph.ui import AnyUIMessage, ui_message_reducer, push_ui_message


class AgentState(TypedDict):  # noqa: D101
    messages: Annotated[Sequence[BaseMessage], add_messages]
    ui: Annotated[Sequence[AnyUIMessage], ui_message_reducer]


async def agent(state: AgentState):  # noqa: D103
    message = await ChatOpenAI(model="gpt-4o-mini", temperature=0).ainvoke(
        state["messages"]
    )

    # Also directly writes the message to `ui`
    push_ui_message("simple", {"hello": "123"}, message=message, state_key="ui")

    return {"messages": [message]}

```
2025-04-03 22:10:18 +02:00
Tat Dat Duong 615fc8b4ae Update naming 2025-04-03 21:58:16 +02:00
William FHandGitHub 13e6f6cbde Add algolia site verification (#4165) 2025-04-03 12:53:40 -07:00
Vadym BardaandGitHub e89633f30b prebuilt: release 0.1.8 (#4161) 2025-04-03 12:01:18 -04:00
Vadym BardaandGitHub 0bbf5829e8 docs: add a how-to guide for managing message history in create_react_agent (#4149) 2025-04-03 16:00:11 +00:00
David DuongandGitHub 7ed5288f8f release(cli): 0.1.84 (#4158) 2025-04-03 15:25:12 +02:00
Tat Dat Duong cba240e70e release(cli): 0.1.84 2025-04-03 15:15:52 +02:00
Tat Dat Duong e9b5046076 Update docs to include Python API 2025-04-03 14:39:45 +02:00
Tat Dat Duong af6552a17e Move to langgraph/graph 2025-04-03 14:13:26 +02:00
Tat Dat Duong e38c30a434 Other docstring changes 2025-04-03 14:13:26 +02:00
Tat Dat Duong e41dea4cf9 Remove unnecessary return value 2025-04-03 14:13:26 +02:00
Tat Dat Duong f9f8c19ec4 Update docstrings 2025-04-03 14:13:26 +02:00
Tat Dat Duong 64ab3217f6 Add UI messages API 2025-04-03 14:13:26 +02:00
David DuongandGitHub 9af243d138 feat(cli): pass ui and ui config to inmem server, handle Docker setup for UI (#4100) 2025-04-03 14:11:30 +02:00
David DuongandGitHub 3f1d440aee fix(sdk-js): send accepts any input (#4099) 2025-04-03 14:00:31 +02:00
Tat Dat Duong 78901599e6 Add test for UI config 2025-04-03 13:48:14 +02:00
Tat Dat Duong 958c0df2d7 Install Node.js runtime and run the build process to get the UI 2025-04-03 13:48:14 +02:00
Tat Dat Duong 6919de8b3e feat(cli): pass ui and ui config to inmem server 2025-04-03 13:48:14 +02:00
Nuno CamposandGitHub e9a66cef46 Update jinja2 dev dep (#4150) 2025-04-02 16:02:25 -07:00
Nuno CamposandGitHub 728679e48e Bump langchain-core from 0.3.0 to 0.3.15 in /libs/checkpoint-sqlite (#3978)
Bumps [langchain-core](https://github.com/langchain-ai/langchain) from
0.3.0 to 0.3.15.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/langchain-ai/langchain/commit/25a103187137077d4331e7153fe119e1c0c3ffb6"><code>25a1031</code></a>
community: Fix a validation error for MoonshotChat (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27801">#27801</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/e4e2aa0b78e6662bb5cebb06b15c19ddbe96ae43"><code>e4e2aa0</code></a>
core[patch]: update image util err msg (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27803">#27803</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/181bcd05778ff08688ea22f8dab81a6bd27501fd"><code>181bcd0</code></a>
core[patch]: Release 0.3.15 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27802">#27802</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/c1e742347f9701aadba8920e4d1f79a636e50b68"><code>c1e7423</code></a>
core[patch]: rm image loading (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27797">#27797</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/ad0387ac97e0c8feee4272f4ed98f0d65bd616ba"><code>ad0387a</code></a>
Improvement [docs] Improve api docs (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27787">#27787</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/d9163e7afa0e5e975d36b7482c6a101e5c5dc375"><code>d9163e7</code></a>
community[docs]: Add content for the Lora adapter in the VLLM page. (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27788">#27788</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/0172d938b4bf1e9da9f3b796dbfce64c565ce565"><code>0172d93</code></a>
community: add AzureOpenAIWhisperParser (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27796">#27796</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/b631b0a5964bcdd46cf30fa0e91925d724ec7ae8"><code>b631b0a</code></a>
community[patch]: cap SQLAlchemy and update deps (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27792">#27792</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/8ad7adad8784d01ad1cbbb8b4c5f8102dbf11a63"><code>8ad7ada</code></a>
infra: build api docs from package listing (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27774">#27774</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/3952ee31b8fc95b1ed74b83429002a7b5da630a3"><code>3952ee3</code></a>
ollama: add pydocstyle linting for ollama (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27686">#27686</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langchain/compare/langchain-core==0.3.0...langchain-core==0.3.15">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=langchain-core&package-manager=pip&previous-version=0.3.0&new-version=0.3.15)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>
2025-04-02 15:57:14 -07:00
Nuno CamposandGitHub f90c81f280 Bump langchain-core from 0.2.38 to 0.2.43 in /libs/checkpoint (#3979)
Bumps [langchain-core](https://github.com/langchain-ai/langchain) from
0.2.38 to 0.2.43.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/langchain-ai/langchain/commit/9fdeb74d9965258ad077d535681d9bae84b58e08"><code>9fdeb74</code></a>
core[patch]: Release 0.2.43 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27808">#27808</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/7d481f10102f43559cc57bcad7eba291067939ee"><code>7d481f1</code></a>
core[patch]: remove prompt img loading (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27807">#27807</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/33a53970e1eb9a515d0d38809dd0d7f2e556c4ae"><code>33a5397</code></a>
infra: turn off release attestations (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27766">#27766</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/283cb50ea69d03d082db5607b68f6d13aa4e65a1"><code>283cb50</code></a>
core[patch]: Release 0.2.42 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27763">#27763</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/5e3cee6c98a55d5303847c6f22256e0671caa83f"><code>5e3cee6</code></a>
core[patch]: make get_all_basemodel_annotations public (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27762">#27762</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/807314661dbd8933d18a0289df05bd381ffbbc4f"><code>8073146</code></a>
Added mapping to fix CI for #langchain-aws:227. (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/27114">#27114</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/6cfd1e846a3f7369d33a77c3fb60314e3e60e202"><code>6cfd1e8</code></a>
core[patch]: Release 0.2.41 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/26687">#26687</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/c5eca37262132b7b88d0f68835af5fea49d13494"><code>c5eca37</code></a>
core[patch]: Fixed bedrock chat model load. (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/26643">#26643</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/70c992bd61c48ebb4f60bde0ff9bfd7b54393678"><code>70c992b</code></a>
community: poetry lock for cffi dep (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/26674">#26674</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/51fd70be63afeaecf0eff78c2a6f6d3f34330203"><code>51fd70b</code></a>
infra: 0.2 release checkout ref for release note (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/26604">#26604</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langchain/compare/langchain-core==0.2.38...langchain-core==0.2.43">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=langchain-core&package-manager=pip&previous-version=0.2.38&new-version=0.2.43)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>
2025-04-02 15:56:20 -07:00
Nuno Campos f118a61101 Update jinja2 dev dep 2025-04-02 15:56:00 -07:00
dependabot[bot]andNuno Campos 8963bb2b68 Bump langchain-core from 0.3.0 to 0.3.15 in /libs/checkpoint-sqlite
Bumps [langchain-core](https://github.com/langchain-ai/langchain) from 0.3.0 to 0.3.15.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-core==0.3.0...langchain-core==0.3.15)

---
updated-dependencies:
- dependency-name: langchain-core
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-02 15:50:49 -07:00
dependabot[bot]andNuno Campos 499a1812e8 Bump langchain-core from 0.2.38 to 0.2.43 in /libs/checkpoint
Bumps [langchain-core](https://github.com/langchain-ai/langchain) from 0.2.38 to 0.2.43.
- [Release notes](https://github.com/langchain-ai/langchain/releases)
- [Commits](https://github.com/langchain-ai/langchain/compare/langchain-core==0.2.38...langchain-core==0.2.43)

---
updated-dependencies:
- dependency-name: langchain-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-02 15:49:49 -07:00
Nuno Campos 2cb81201b2 0.3.24 2025-04-02 15:45:06 -07:00
Nuno Campos 494cd4f6ad checkpoint 2.0.24 2025-04-02 15:44:58 -07:00
Nuno CamposandGitHub 9226b42150 Add checkpoint migrations for state graph internal channels (#4125) 2025-04-02 15:42:28 -07:00
Eugene YurtsevandGitHub 5e0a843423 sdk-py: release 0.1.61 (#4148) 2025-04-02 15:34:36 -07:00
6e54f74fa9 sdk-py: Add option to set description via client sdk (#4147)
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-04-02 21:26:14 +00:00
Nuno Campos ffb8400b19 Disable tests in 3.9 2025-04-02 14:05:15 -07:00
Nuno Campos b6b40149a9 Fix 2025-04-02 13:56:29 -07:00
Nuno Campos 5eecd2ac3a Update 2025-04-02 13:31:36 -07:00
Nuno Campos c38f7be89c Migrate quadratic channels too 2025-04-02 13:24:20 -07:00
Nuno Campos 2d406f03a2 Lint 2025-04-02 12:56:09 -07:00
Nuno Campos 1c48ec0aba Lint 2025-04-02 12:48:10 -07:00
Nuno Campos 4dda404da3 Implement checkpoint migration
- Migrate start:{node} channels to branch:to:{node}
- Migrate {node} channels to branch:to:{node}
2025-04-02 12:44:59 -07:00
Mahmut CAVDARandGitHub cce9801a8b docs: fixed indentation (#4078)
"Copy the clipboard" doesn't return valid Python code.
2025-04-02 13:44:45 -04:00
Vadym BardaandGitHub 67e8f8fc11 prebuilt: add optional pre-model hook that runs before calling LLM in create_react_agent (#4059)
Example:

```python
from typing import Any
from langchain_openai import ChatOpenAI
from langchain_community.tools.tavily_search import TavilySearchResults
from langchain_core.messages import AnyMessage
from langchain_core.messages.utils import count_tokens_approximately

from langgraph.graph import MessagesState
from langgraph.prebuilt.chat_agent_executor import create_react_agent, AgentState
from langgraph.checkpoint.memory import InMemorySaver

from langmem.short_term import SummarizationNode, RunningSummary


class State(MessagesState):
    context: dict[str, Any]

search = TavilySearchResults(max_results=3)
tools = [search]

model = ChatOpenAI(model="gpt-4o")
summarization_model = model.bind(max_tokens=256)

summarization_node = SummarizationNode(
    token_counter=count_tokens_approximately,
    model=summarization_model,
    max_tokens=2048,
    max_summary_tokens=256,
    output_messages_key="messages"
    # output_messages_key="llm_input_messages"
)

checkpointer = InMemorySaver()


class State(AgentState):
    user_language: str

    # summarization-related keys
    context: dict[str, Any]


def prompt(state):
    language = state["user_language"]
    system_msg = f"Always respond in {language}"
    return [{"role": "system", "content": system_msg}] + state["messages"]


graph = create_react_agent(
    model,
    tools,
    prompt=prompt,
    pre_model_hook=summarization_node,
    state_schema=State,
    checkpointer=checkpointer
)
```
2025-04-02 15:41:31 +00:00
RohitandGitHub 3a9247728b Fix missing colon in function definition in langchain-ai.github docum… (#4142)
…entation.

This commit fixes a syntax error in the "langchain-ai.github"
documentation. The function called "some_node_inside_alice" was missing
a colon (:) after the function, which is required for valid Python
syntax.
2025-04-02 08:04:22 -07:00
33766eb2ff docs: add missing MemorySaver import for unexpanded example (#4133)
Import `MemorySaver` for the code to run without expanding the example

---------

Co-authored-by: Eugene Yurtsev <eugene@langchain.dev>
2025-04-02 14:37:51 +00:00
Nuno CamposandNuno Campos 6fe319ed1b WIP: Add migrate_checkpoint 2025-04-02 07:24:55 -07:00
Andrew NguonlyandGitHub 3878addbe0 docs: Refactor content for new LangGraph Platform deployment options (#4118)
### Summary
This is a large refactor of the content for the LangGraph Platform
deployment options. Although there are a lot of changes, I do feel
fairly confident that this is safe to merge and won't have any negative
impact related to confusion around deployment options. However, please
review thoroughly (i.e. run the docs locally).

### Goals and Non-Goals
Just wanted to explicitly state goals and non-goals so that we're clear
about what needs to be done now versus what can be done in a smaller
follow-up PR.

Goals
1. Add new content for the new deployment options (Self-Hosted Data
Plane, Self-Hosted Control Plane).
1. Hide old content for deprecated deployment options (BYOC).
1. Create a pair of "conceptual" and "how-to" pages for each deployment
option. As much as possible, the pages should have consistent headings.
1. Introduce the terms "control plane" and "data plane" and define them
plainly without hiding/abstracting information.

Non-Goals
1. Do not change the navigation of the existing deployment options. As
much as possible, update content in-place or add new pages. Changing the
navigation is a bigger task that can be done later.
1. Do not remove old content for deprecated deployment options. We may
need to refer to this later. There are only ~2 pages (I think).

### Next Steps
1. Update the architecture diagrams for each deployment option. Commit
Excalidraw file to source control.
1. Create a "how-to" page for the Control Plane UI. This page pertains
to 3/4 deployment options. Most of the content lives in the "how-to"
page for Cloud SaaS deployment.
1. Document required RBAC permissions for K8s for Self-Hosted Data Plane
and Self-Hosted Control Plane (and update links).
1. Figure out how to consolidate plan information.
1. Figure out where to document licensing, telemetry, custom
Postgres/Redis.
1. Update autoscaling content.
2025-04-02 06:51:14 -07:00
Vadym BardaandGitHub 55f922cf2f langgraph: release 0.3.23 (#4141) 2025-04-02 09:50:18 -04:00
William FHandGitHub 9a5dc5d8f2 Update link (#4131) 2025-04-01 23:18:54 -07:00
William FHandGitHub 90b3da5959 TTL How-to (#4129)
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-01 22:54:31 -07:00
William FHandGitHub d2275a6727 Update cli.md to mention ttl (#4128)
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-01 22:21:55 -07:00
Nuno CamposandGitHub 0c590afb27 Maintain checkpoint LATEST_VERSION constant in langgraph lib (#4126)
- This should be controlled by the langgraph version, not the version of
langgraph-checkpoint installed
2025-04-01 21:53:12 -07:00
Nuno Campos 6efeefe424 Maintain checkpoint LATEST_VERSION constant in langgraph lib
- This should be controlled by the langgraph version, not the version of langgraph-checkpoint installed
2025-04-01 21:46:38 -07:00
William FHandGitHub da8b8c606a Release CLI (#4124)
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-01 21:28:58 -07:00
William FHandGitHub dcda8c24d6 Add checkpointer configuration support in langgraph.json (#4122)
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-01 21:16:12 -07:00
Vadym BardaandGitHub e3d697620b langgraph: support removing all messages with RemoveMessage (#4117) 2025-04-01 17:51:54 -04:00
Nuno Campos 30883729f0 0.3.22 2025-04-01 07:54:24 -07:00
William FHandGitHub 1c403f34c8 Allow blocking in dev (#4109) 2025-04-01 05:52:25 -07:00
William Fu-Hinthorn 9bd78ed483 Allow blocking in dev
Signed-off-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2025-04-01 05:45:47 -07:00
Nuno CamposandGitHub a77db7d73d Avoid creating checkpoint unless we're saving it (#4106)
- When checkpointing is disabled don't call create_checkpoint in
PregelLoop
- In local_read apply writes directly to copies of updated channels
- Add BaseChannel.copy() method to create channel copies with less
overhead
2025-03-31 19:13:36 -07:00
Nuno Campos e85b7e6cd9 Lint 2025-03-31 18:46:51 -07:00
Nuno Campos 94fa46f9fa Avoid creating checkpoint unless we're saving it
- When checkpointing is disabled don't call create_checkpoint in PregelLoop
- In local_read apply writes directly to copies of updated channels
- Add BaseChannel.copy() method to create channel copies with less overhead
2025-03-31 18:37:13 -07:00
Nuno CamposandGitHub e50110ba91 Avoid raise-catch strategy in BaseChannel.checkpoint() (#4105)
- This mirrors the work done earlier on BaseChannel.get()
- Comparing to a sentinel value is significantly faster than raising and
catching an exception
2025-03-31 18:10:15 -07:00
Nuno Campos fd64ada9de Avoid raise-catch strategy in BaseChannel.checkpoint()
- This mirrors the work done earlier on BaseChannel.get()
- Comparing to a sentinel value is significantly faster than raising and catching an exception
2025-03-31 17:48:19 -07:00
Nuno CamposandGitHub b15ec09c3b Add fast path to serialize None values (#4103)
- If the value to serialize is None we can use encode it in the string
type, and skip msgpack encoding
- Use None value for edge/branch channels in StateGraph
2025-03-31 17:42:26 -07:00
Nuno Campos 5e9e7b79fe Lint 2025-03-31 17:36:00 -07:00
Nuno Campos c49a077789 Lint 2025-03-31 17:24:26 -07:00
Nuno Campos 881b07cf7f Lint 2025-03-31 16:36:16 -07:00
Nuno Campos 0425d4e65d Update 2025-03-31 16:29:07 -07:00
Nuno Campos 118016a21c Add fast path to serialize None values 2025-03-31 16:15:56 -07:00
Nuno CamposandGitHub bda3c3add9 Lazily create atomic counters in pregel scratchpad (#4101)
- many times these aren't actually used, so makes sense to delay
creation until needed
2025-03-31 15:44:00 -07:00
Nuno Campos 067b99c789 Lazily create atomic counters in pregel scratchpad
- many times these aren't actually used, so makes sense to delay creation until needed
2025-03-31 15:19:53 -07:00
Tat Dat Duong aef463c633 fix(sdk-js): send accepts any input 2025-04-01 00:15:32 +02:00
Nuno CamposandGitHub 673cc5ad1a Reduce perf impact of pregel scratchpad creation (#4098)
- make scratchpad class frozen now that its members are never reassigned
- replace next(gen expr) with for-loop to avoid allocating generator
objects
2025-03-31 15:13:38 -07:00
Nuno Campos e9e9a96a0d Reduce perf impact of pregel scratchpad creation
- make scratchpad class frozen now that its members are never reassigned
- replace next(gen expr) with for-loop to avoid allocating generator objects
2025-03-31 14:50:10 -07:00
Andrew NguonlyandGitHub cf7136297e docs: Add docs for more environment variables (#4080) 2025-03-28 15:40:16 -07:00
David DuongandGitHub e5aae80e3a feat(cli): add support for gen ui config (#4079) 2025-03-28 23:14:56 +01:00
Tat Dat Duong f629f68ec3 feat(cli): add support for gen ui config 2025-03-28 23:05:04 +01:00
Andrew NguonlyandGitHub 575de221fe docs: Update Cloud SaaS and CLI documentation pages (#4077)
### Summary
1. Update API spec.
2. Clarify how to specify `requirements.txt` in `dependencies` list.
3. Clarify deletion policy for database.
4. Clarify resource allocation for `Production` type deployments.
5. Update supported Python versions.
2025-03-28 14:21:24 -07:00
David DuongandGitHub d2fc5f0a0f feat(sdk-js): run optimistic values mutator before any network request (#4070) 2025-03-28 21:57:33 +01:00
Tat Dat Duong 8e4b8b11ff Add docs about optimistic updates 2025-03-28 21:52:37 +01:00
Tat Dat Duong 2808a7859a Bump to 0.0.62 2025-03-28 21:39:44 +01:00
Tat Dat Duong fb3c61ea4f feat(sdk-js): run optimistic values mutator before any network request 2025-03-28 21:39:35 +01:00
David DuongandGitHub 69cecd872c release(sdk-js): 0.0.61 (#4069) 2025-03-28 15:24:38 +01:00
Tat Dat Duong 9abc1c8174 release(sdk-js): 0.0.61 2025-03-28 15:23:25 +01:00
David DuongandGitHub de90ced29d fix(sdk-js): do not await for client.runs.stream, as it is already async generator (#4068) 2025-03-28 15:22:20 +01:00
Tat Dat Duong b8b973fc0c fix(sdk-js): do not await for client.runs.stream, as it is already async generator 2025-03-28 15:15:54 +01:00
David DuongandGitHub 89e3709a2a feat(docs): cloning traces locally (#4057) 2025-03-28 14:41:00 +01:00
Arjun Natarajan a7f012a19c fix link 2025-03-28 09:37:05 -04:00
Arjun Natarajan 9b05ab6453 mkdocs yaml 2025-03-28 09:27:30 -04:00
David DuongandGitHub 5401d2ea81 feat(sdk-js): add option to manually provide implementation for shared modules (#4042) 2025-03-28 14:04:09 +01:00
Nuno CamposandGitHub 4401612aa6 Reduce the number of channels created for each node by 50% (#4064)
- Used to be 2 channels per node, it is now one per node, which is the
minimum
- Now both hard edges, conditional edges, entrypoint and conditional
entrypoint all use the same channel to trigger a node
2025-03-27 18:05:04 -07:00
Nuno Campos 49bb08a3f9 Update prebuilt test 2025-03-27 17:58:29 -07:00
Nuno Campos 4f2e9b838f Reduce the number of channels created for each node by 50%
- Used to be 2 channels per node, it is now one per node, which is the minimum
- Now both hard edges, conditional edges, entrypoint and conditional entrypoint all use the same channel to trigger a node
2025-03-27 17:47:34 -07:00
Nuno Campos d30da72f6e Reduce the number of channels created for each node by 50%
- Used to be 2 channels per node, it is now one per node, which is the minimum
- Now both hard edges, conditional edges, entrypoint and conditional entrypoint all use the same channel to trigger a node
2025-03-27 17:47:11 -07:00
William FHandGitHub 7f079adfee Update auth user type (#4062) 2025-03-27 16:09:54 -07:00
William Fu-Hinthorn 4c74af606f Update auth user type 2025-03-27 16:03:11 -07:00
Eugene YurtsevandGitHub 900824089b docs: disable link checking on push and workflow dispatch (#4061) 2025-03-27 17:33:36 -04:00
Nuno CamposandGitHub 522caa643f In Python 3.12 or above, use asyncio eager task factory (#4055)
- This is a performance improvement when calling async functions that do
not use await, as they are run immediately and never scheduled in the
loop
2025-03-27 13:36:04 -07:00
Nuno Campos ef71656f05 Fix 2025-03-27 13:14:39 -07:00
Tat Dat Duong 3ba7c7fbed Do not throw error if window is undefined due to Next 2025-03-27 21:03:54 +01:00
Tat Dat Duong 5cdab86d48 Fix object assignment 2025-03-27 20:58:39 +01:00
Nuno CamposandGitHub f5fe7e5195 Remove internal frames from stack traces (#4054)
- For exceptions raised in user code (ie. nodes or edges) remove
internal frames from the stack trace
2025-03-27 12:41:54 -07:00
Arjun Natarajan 2b728410e9 spell check 2025-03-27 14:47:27 -04:00
Arjun Natarajan 30221da4a8 docs for cloning traces locally 2025-03-27 14:38:20 -04:00
Nuno Campos 1c5a354a7d In Python 3.12 or above, use asyncio eager task factory
- This is a performance improvement when calling async functions that do not use await, as they are run immediately and never scheduled in the loop
2025-03-27 11:00:37 -07:00
Nuno Campos bfd271e00e Remove internal frames from stack traces
- For exceptions raised in user code (ie. nodes or edges) remove internal frames from the stack trace
2025-03-27 10:58:13 -07:00
Vadym BardaandGitHub 9647b1e55f langgraph: use correct type for node destination annotations (#4053)
Fixes https://github.com/langchain-ai/langgraph/issues/4051
2025-03-27 16:57:39 +00:00
Eugene YurtsevandGitHub e4aa204110 docs: add langchain llms.txt to the overview (#4047) 2025-03-27 12:33:42 -04:00
Vadym BardaandGitHub 2c29edadec langgraph: release 0.3.21 (#4050) 2025-03-27 11:38:37 -04:00
Vadym BardaandGitHub 96847e644b langgraph: add tests for remote graph interrupts (#4048) 2025-03-27 15:17:29 +00:00
Tat Dat Duong 4b102638c2 feat(sdk-js): add option to manually provide implementation for shared modules 2025-03-26 22:46:59 +01:00
7021ce3742 patch: fix return type of Topic.update (#4029)
This PR fixes the return type annotation of the `update` method from
`None` to `bool`, as the method returns a boolean value indicating
whether self.values has changed

Co-authored-by: kakaogames <kakaogames@Justin-MacBook-Pro.local>
2025-03-26 16:57:35 -04:00
Nuno CamposandGitHub d0c0aa9697 benchmark: remove some benchmarks (#4039)
Remove some benchmarks temporarily so we can fit more stuff into the
annotation
2025-03-26 13:50:53 -07:00
Vadym BardaandGitHub 520de30350 langgraph: fix interrupt deserialization in RemoteGraph (#4040) 2025-03-26 16:42:21 -04:00
Eugene Yurtsev 81c0d47363 x 2025-03-26 15:16:44 -04:00
87603d8a00 docs: add version admonitions for Interrupt and RetryPolicy (#3988)
This pull request includes changes to add version admonitions to the
documentation and update the styling for these admonitions. The most
important changes include the addition of version information to the
documentation, updates to the CSS for version admonitions, and
modifications to the `mkdocs.yml` configuration file to include the new
stylesheets.
this should solve this #3991

---------

Co-authored-by: Eugene Yurtsev <eugene@langchain.dev>
2025-03-26 13:48:54 -04:00
Vadym BardaandGitHub 7ad7329c7d docs: add codeact prebuilt (#4036) 2025-03-26 17:25:17 +00:00
Vadym BardaandGitHub e981d27f84 prebuilt: release 0.1.7 (#4034) 2025-03-26 09:22:09 -04:00
Vadym BardaandGitHub 71db4f2ad5 prebuilt: ignore updates when combining parent commands with Send (#4033) 2025-03-26 09:20:37 -04:00
Nuno CamposandGitHub 4ced277e2d Update adopters.md (#4025) 2025-03-25 18:40:02 -07:00
jessicaouandGitHub 34738fa566 Update adopters.md 2025-03-25 17:27:53 -07:00
Nuno CamposandGitHub 0286c38784 fix(sdk-js): mark schema as nullable to match python (#3928) 2025-03-25 16:11:35 -07:00
David DuongandGitHub fb5a1c4028 feat(cli): add packageManager and devEngines detection (#4024) 2025-03-25 23:43:36 +01:00
Tat Dat Duong 39d85466f8 Bump to 0.1.80 2025-03-25 23:36:33 +01:00
Tat Dat Duong 3c797529bb Avoid frozen lockfile 2025-03-25 23:32:40 +01:00
Tat Dat Duong 0d185d43ed feat(cli): add packageManager and devEngines detection 2025-03-25 23:26:04 +01:00
Eugene YurtsevandGitHub 70b8391a89 ci: use fast benchmark (#4017) 2025-03-25 17:59:18 -04:00
Eugene YurtsevandGitHub 1a37f2d5a2 sdk-py: release 0.1.59 (#4018) 2025-03-25 17:58:51 -04:00
Really HimandGitHub 949af8abe5 docs(pregel): One-line markdown formatting quick-fix (#4023)
## Description

I noticed a very minor issue in the formatting of the Concepts > Pregel
doc:
(https://langchain-ai.github.io/langgraph/concepts/pregel/#high-level-api)
(https://github.com/langchain-ai/langgraph/blob/main/docs/docs/concepts/pregel.md)

You can see in the image below that there is a python codeblock, then a
pycon block, and inside that block there is an extra
triple-backtick/code fence, and then text at the bottom, which it
appears like it is supposed to be a separate python block, like the one
above it. I.e., clearly:

```
```python
print(graph.channels)
```

is intended to be:

```python
print(graph.channels)
```

I'm pretty sure this is due to an extra whitespace character before the preceding closing code fence, which is throwing off the formatting.


![image](https://github.com/user-attachments/assets/616d72d6-652b-4599-be3e-55c47766861d)

My VS-Code/extensions can't really render the Markdown the way it appears on the Website, I think because of the tabs (Graph API vs. Functional API), but I noticed that if I remove the extra whitespace, the highlighting on the python codeblock is corrected:

BEFORE:
<img width="605" alt="Screenshot 2025-03-25 at 5 02 41 PM" src="https://github.com/user-attachments/assets/8474f103-c5ab-4c02-b22f-3d54b3363331" />

AFTER:
<img width="277" alt="Screenshot 2025-03-25 at 5 02 50 PM" src="https://github.com/user-attachments/assets/a311b87b-859c-4aba-a4d8-6b063a155d90" />


## Fix
* Remove one whitespace character that was throwing off markdown rendering
2025-03-25 17:58:37 -04:00
Eugene YurtsevandGitHub 094255c3fe docs: remove langmanus temporarily (#4022)
there's no pypi package
2025-03-25 16:46:07 -04:00
Nuno CamposandGitHub b6055ff3fe Warn when get_graph tries to draw edge that doesn't exist (#4021) 2025-03-25 12:57:31 -07:00
Nuno Campos e082ba4f85 Warn when get_graph tries to draw edge that doesn't exist 2025-03-25 12:50:47 -07:00
Vadym BardaandGitHub f36b7f61fb prebuilt: release 0.1.6 (#4020) 2025-03-25 15:49:02 -04:00
Vadym BardaandGitHub 4095f0a927 prebuilt: only combine Command.PARENT for Send gotos in ToolNode (#4019) 2025-03-25 15:47:46 -04:00
8af09714ff docs: remove unused imports from guide (#4014)
Not included in index page, and currently re-directs:
https://github.com/langchain-ai/langgraph/blob/01fed0fae27a8d71490a7f94a74942af5626da97/docs/_scripts/notebook_hooks.py#L24

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-25 15:35:54 -04:00
Eugene YurtsevandGitHub 5d7e818882 sdk: Add headers to sync client (#4012)
Add ability to pass run time headers to the sync client.
2025-03-25 14:58:33 -04:00
Eugene YurtsevandGitHub 37429ff73b docs: remove old code from workflow (#4016) 2025-03-25 14:20:04 -04:00
Vadym BardaandGitHub af7515c37a prebuilt: release 0.1.5 (#4015) 2025-03-25 13:52:35 -04:00
Vadym BardaandGitHub b97cda4290 prebuilt: add support for multiple Command(graph=Command.PARENT) returned by tools (#4003) 2025-03-25 13:51:05 -04:00
YkohandGitHub 01fed0fae2 Docs fix example docs (#3971) 2025-03-25 11:02:20 -04:00
Nuno Campos 2ac22f8246 0.3.20 2025-03-24 18:09:56 -07:00
William FHandGitHub ae2e8d7e5e Use 128bit hash for task ids (#4005) 2025-03-24 18:09:25 -07:00
Nuno Campos 5526486a0b Use 128bit hash for task ids 2025-03-24 18:04:26 -07:00
William FHandGitHub 0f8fc4fe68 Handle Sends (#4004)
In the json-mode deserializer
2025-03-24 17:17:52 -07:00
William Fu-Hinthorn 10859da99a Handle sneds 2025-03-24 17:12:50 -07:00
Nuno CamposandGitHub b285a118a7 Log and continue for subgraph schema issues (#3997) 2025-03-24 16:31:42 -07:00
William FHandGitHub 6853d045b6 Add HTTP deserialization option (#4002) 2025-03-24 16:28:53 -07:00
William Fu-Hinthorn d8cc9c9680 merge with ormsgpack 2025-03-24 16:21:59 -07:00
William Fu-Hinthorn 723d6f8a84 Add json mode msgpack unpacker 2025-03-24 16:15:48 -07:00
Nuno CamposandGitHub 696a922241 Switch serialization lib to ormsgpack (#3953)
- faster for large states
- supports tuples as dict keys
2025-03-24 16:08:57 -07:00
Eugene YurtsevandGitHub c598fee7d6 sdk-py: Propagate headers in the async client (#4001)
Propagate headers in the async client
2025-03-24 16:30:40 -04:00
William FHandGitHub 6da6c4443a Merge branch 'main' into wfh/log_and_continue 2025-03-24 12:25:47 -07:00
Eugene YurtsevandGitHub addb491cfd sdk: allow specifying run time headers in http client (#4000)
This PR only allows this in the HTTP client. 

I can follow up with a PR to allow throughout the entire API.

The use case is to allow instantiating the client once (w/ a single connection pool), but allowing changing api keys and any other headers at run time
2025-03-24 14:47:35 -04:00
Eugene YurtsevandGitHub c84f35eff5 add langmanus to prebuilt (#3999) 2025-03-24 13:26:53 -04:00
Eugene YurtsevandGitHub f178e4205f docs: add xxhash explicitly to docs pyproject.toml (#3998)
It's not getting picked up from the dev requirements for some reason.
2025-03-24 12:58:33 -04:00
Nuno Campos 3f4d1c66c2 0.3.19 2025-03-24 09:45:54 -07:00
Nuno Campos 2ee5b8e9d1 Bump 2025-03-24 09:03:23 -07:00
Nuno Campos aadbcb443a Bump 2025-03-24 09:03:23 -07:00
Nuno Campos a88794b74e Update ormsgpack 2025-03-24 09:03:23 -07:00
Nuno Campos 556733c77c Bump 2025-03-24 09:01:55 -07:00
Nuno Campos 3d16acf3f5 Switch serialization lib to ormsgpack
- faster for large states
- supports tuples as dict keys
2025-03-24 09:01:55 -07:00
Nuno CamposandGitHub 87cbc4942d Switch task ids to use xxhash3 (#3954)
- much faster / less memory allocations
- backwards compat by applying only to checkpoint versions 2 or above
2025-03-24 08:42:50 -07:00
Nuno CamposandGitHub 6d63300c9a benchmarks: Add 1st event latency (#3909) 2025-03-24 07:58:47 -07:00
Nuno Campos a5dd181138 Update 2025-03-24 07:57:02 -07:00
William Fu-Hinthorn ad63b730b3 Log and continue for subgraph schema issues 2025-03-24 07:50:25 -07:00
Nuno Campos 528d3946c6 Lock 2025-03-24 07:49:24 -07:00
Nuno Campos 037d9d1402 Lock 2025-03-24 07:49:24 -07:00
Nuno Campos 6aee213f3c Switch task ids to use xxhash3
- much faster / less memory allocations
- backwards compat by applying only to checkpoint versions 2 or above
2025-03-24 07:49:24 -07:00
Lance MartinandGitHub f690f4244e Remove failing links (#3994)
Anthropic links for blog post and docs are failing CI -- 

https://github.com/langchain-ai/langgraph/actions/runs/14024926642/job/39261981682

Remove to unblock docs build; we may add back to ignore later.
2025-03-23 19:53:11 -07:00
Lance MartinandGitHub d6856131b6 Fix broken links in ntbks (#3993)
A number of Anthropic links recently changed
2025-03-23 17:59:14 -07:00
Lance MartinandGitHub 7d90440035 Update llms.txt for langgraph (#3987) 2025-03-23 15:39:09 -07:00
alxdr3kandGitHub fed785eabd docs: fix typo in low_level.md (#3968)
- Fix typo
2025-03-21 16:40:41 -04:00
YkohandGitHub 765b04adfd Docs: fix example (#3972) 2025-03-21 16:39:39 -04:00
7085b149e5 fix(docs): Update deprecated methods and add validator (#3920)
- Added a validator to sanitize 'name' fields and prevent
string_pattern_mismatch errors.
- Replaced deprecated `dict` method with `model_dump` in line with
Pydantic v2.0 migration guidelines.
- Updated gen_perspectives_chain and gen_queries_chain to ensure
compatibility with structured output and include raw data where needed.
This allows use of fast_llm across the notebook.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-21 15:51:13 -04:00
11c71fef89 chore(docs): Improve documentation for AsyncSqliteSaver (#3858)
**Description:**
Make AsyncSqliteSaver examples workable.

**Issue:**
For "Usage within StateGraph" example,
SyntaxError: 'async with' outside async function

For "Raw usage" example
KeyError: 'checkpoint_ns' and KeyError: 'id'

**Dependencies:**
N/A

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-21 15:50:51 -04:00
Eugene Yurtsev 8be0fb675a x 2025-03-21 15:25:28 -04:00
William FHandGitHub 1b4f335ffe Add studio URL flag (#3980) 2025-03-21 11:23:05 -07:00
William Fu-Hinthorn 9c36a7de85 Add studio URL flag 2025-03-21 11:20:29 -07:00
Eugene Yurtsev d166dea4f0 Merge branch 'main' into eugene/add_latency 2025-03-21 12:55:37 -04:00
Vadym BardaandGitHub 8e922b859c prebuilt: release 0.1.4 (#3977) 2025-03-21 12:05:15 -04:00
Vadym BardaandGitHub 9a4c30135f prebuilt: pass last message to structured response model in create_react_agent (#3976) 2025-03-21 11:58:27 -04:00
William FHandGitHub bc6651f34c Studio cli command (#3962) 2025-03-20 17:57:56 -07:00
William Fu-Hinthorn 23bb5369b9 Studio cli command 2025-03-20 17:51:08 -07:00
Nuno CamposandGitHub 85b81371f7 Use incremental storage in memory checkpointer (#3960)
- This makes our checkpoint benchmarks more closely resemble the
behavior of our prod checkpointers
- Also found and fixed a bug w multiple subgraphs in same node
accidentally sharing checkpoints
2025-03-20 16:33:47 -07:00
Nuno Campos 54ab833b74 Lint 2025-03-20 16:26:52 -07:00
Nuno Campos 4ea936eaf4 Lint 2025-03-20 16:24:57 -07:00
Nuno Campos 9d81ec9ffd Lint 2025-03-20 16:22:24 -07:00
Nuno Campos 46b652a74c Use incremental storage in memory checkpointer
- This makes our checkpoint benchmarks more closely resemble the behavior of our prod checkpointers
- Also found and fixed a bug w multiple subgraphs in same node accidentally sharing checkpoints
2025-03-20 16:11:36 -07:00
Vadym BardaandGitHub 7013ca9a3f docs: use hosted logo (#3959) 2025-03-20 18:17:22 -04:00
William FHandGitHub 0c04aec664 Include enum in check for pydantic state (#3955) 2025-03-20 12:03:22 -07:00
Eugene YurtsevandGitHub 1650c8508e benchmark: Add compilation only (#3932)
Add compilation benchmark alone
2025-03-20 14:51:31 -04:00
Eugene YurtsevandGitHub e176b98fe7 Add llms-txt resources (#3935) 2025-03-20 14:44:21 -04:00
William Fu-Hinthorn eb1e1aa010 Include enum in check for pydantic state 2025-03-20 10:29:16 -07:00
Nuno CamposandGitHub 77c833e1e5 Use fast path for prepare_next_tasks on input (#3931)
- When there are no values in checkpoint no need to run through all the
PULL candidates
- When there are input writes save updated_channels to use on the next
call to prepare_next_tasks
2025-03-20 08:46:48 -07:00
Nuno Campos 0ac29434a7 Lint 2025-03-20 08:40:05 -07:00
Nuno Campos 43f5a17416 Lint 2025-03-20 08:24:51 -07:00
Nuno Campos 7d0857f263 Lint 2025-03-20 08:24:31 -07:00
Nuno Campos b82d70a66a Lint 2025-03-20 08:22:16 -07:00
Nuno CamposandGitHub 5fb037171d Small perf improvements (#3949)
- RunnableCallable: Skip signature checks for internal callables where
we know the signatures ahead of time
- PregelNode: Avoid redoing subgraphs serarch when copying it
- CompiledStateGraph: Avoid copying PregelNode when attaching writers
2025-03-20 08:19:02 -07:00
Nuno Campos d3bb2b9aa0 Lint 2025-03-20 08:18:17 -07:00
Nuno Campos ea765b4134 More small perf improvements
- RunnableCallable: Skip signature checks for internal callables where we know the signatures ahead of time
- PregelNode: Avoid redoing subgraphs serarch when copying it
- CompiledStateGraph: Avoid copying PregelNode when attaching writers
2025-03-20 08:11:28 -07:00
William FHandGitHub 66ff83dca9 Lock (#3947) 2025-03-20 08:04:53 -07:00
William FHandGitHub 254e398345 Merge branch 'main' into wfh/reloack 2025-03-20 08:04:38 -07:00
Vadym BardaandGitHub c7567ea219 docs: improve search (#3948) 2025-03-20 11:02:59 -04:00
William Fu-Hinthorn 8c0306c3f4 Lock 2025-03-20 07:59:30 -07:00
William FHandGitHub 992b05a196 langgraph-checkpoint-postgres 2.0.19 (#3945) 2025-03-20 07:25:41 -07:00
William Fu-Hinthorn 893a9646d3 langgraph-checkpoint-postgres 2.0.19 2025-03-20 07:25:14 -07:00
William FHandGitHub eaa37a2ce9 Increase pg->checkpoint minbound (#3944) 2025-03-20 07:24:43 -07:00
William Fu-Hinthorn daee8d88bb Increase pg->checkpoint minbound 2025-03-20 07:24:15 -07:00
Nuno Campos eaa18cc2dd Use fast path for prepare_next_tasks on input
- When there are no values in checkpoint no need to run through all the PULL candidates
- When there are input writes save updated_channels to use on the next call to prepare_next_tasks
2025-03-19 18:14:04 -07:00
Nuno CamposandGitHub b2d9a36308 langgraph: incorporate information about previously updated channels to identify which tasks to execute next (#3916)
Leverage information about which channels were updated in the previous
step to determine which tasks should be triggered. This can result in
significant speed up in prepare_next_tasks in some situations.
2025-03-19 16:22:12 -07:00
Tat Dat Duong dd733a3389 fix(sdk-js): mark schema as nullable to match python 2025-03-19 22:40:55 +01:00
William FHandGitHub 03fc695d60 Add refcount test (#3910) 2025-03-19 14:33:43 -07:00
William Fu-Hinthorn 9994b09304 merge 2025-03-19 14:27:19 -07:00
William FHandGitHub 53f8558914 Release 0.3.18 (#3925)
Includes:
- Explicit unsetting of runnable context var
- Weakref for PregelExecutableTask

both to reduce the chance of keeping a reference to an internal object
and preventing garbage collection
2025-03-19 14:11:46 -07:00
William Fu-Hinthorn 4bfcd84cee Cleanup ref count check 2025-03-19 14:10:01 -07:00
David DuongandGitHub cd1d7be05f feat(sdk): add bulk_update_state in SDK (#3923) 2025-03-19 22:09:53 +01:00
Really HimandGitHub 939a426a2e DOCS: Update state-model.ipynb to use "AnyMessage" (#3926)
## Description
The documentation for working with Pydantic and graph State recommends
to use `AnyMessage` when working with LangChain types, but the code
example uses `BaseMessage`.
2025-03-19 21:08:14 +00:00
William Fu-Hinthorn 94c815f226 Release 0.3.18
Includes:
- Explicit unsetting of runnable context var
- Weakref for PregelExecutableTask

both to reduce the chance of keeping a reference to an internal object and preventing
garbage collection
2025-03-19 14:04:01 -07:00
Tat Dat Duong ef345aac5f Fix typo 2025-03-19 22:02:55 +01:00
William FHandGitHub e306258525 Reference to PregelExecutableTask (#3924) 2025-03-19 14:00:43 -07:00
William Fu-Hinthorn 05cd317486 Update snapshots more 2025-03-19 13:54:10 -07:00
Tat Dat Duong 6dfed31a5e Update parameters 2025-03-19 21:39:35 +01:00
ThaparandGitHub ee8374c4c0 docs: Update bad link in libs/cli README.md (#3919)
Fixed reference hyperlink
2025-03-19 16:27:37 -04:00
William Fu-Hinthorn 2066894b5f Update snapshots 2025-03-19 13:25:02 -07:00
William Fu-Hinthorn 6a2d20fd5b Reference to PregelExecutableTask 2025-03-19 13:19:02 -07:00
Eugene Yurtsev 5b8b9f1067 Update doc-string 2025-03-19 16:10:50 -04:00
Eugene Yurtsev c9cb8165d4 x 2025-03-19 16:08:25 -04:00
Tat Dat Duong 1f0348a5ca Fix docstring 2025-03-19 21:07:07 +01:00
Tat Dat Duong 442ef0788e Add graph_id back 2025-03-19 21:05:43 +01:00
Eugene Yurtsev 73f9ef0ef8 add type 2025-03-19 16:00:49 -04:00
Tat Dat Duong 1f7a380548 Fix typo 2025-03-19 20:54:15 +01:00
Eugene Yurtsev 8959f2aec5 lint 2025-03-19 15:54:07 -04:00
Eugene Yurtsev 0e7869eba4 Merge branch 'main' into ey/optimize_triggers 2025-03-19 15:52:29 -04:00
William FHandGitHub d3f8478054 Unset config context after function end (#3922) 2025-03-19 12:51:39 -07:00
Tat Dat Duong 0cb1893475 Update for JS as well 2025-03-19 20:46:22 +01:00
Tat Dat Duong e779c8e0b1 Merge into create 2025-03-19 20:42:48 +01:00
Eugene Yurtsev 18b82cb8e2 x 2025-03-19 15:29:50 -04:00
Tat Dat Duong 972ab1a935 Revert docstring for update_state 2025-03-19 20:22:05 +01:00
William Fu-Hinthorn 9cc2f37cca Unset config context after function end 2025-03-19 12:14:29 -07:00
Tat Dat Duong a2d7631f47 Fix in async client 2025-03-19 20:10:42 +01:00
Tat Dat Duong 1e767c0653 feat(sdk): add bulk_update_state in SDK 2025-03-19 20:05:08 +01:00
David DuongandGitHub d4c569cb7c feat(sdk-js): add bulkUpdateState method (#3878) 2025-03-19 19:25:37 +01:00
David DuongandGitHub a146df7f6a release(langgraph): 0.3.17 (#3918) 2025-03-19 19:10:01 +01:00
Tat Dat Duong c52cc03e4b release(langgraph): 0.3.17 2025-03-19 19:02:51 +01:00
Nuno CamposandGitHub f206cfad8f Store all triggers in task (#3912)
- These are used to update seen version
2025-03-19 09:47:06 -07:00
Nuno Campos d4c8b219c4 Update tests 2025-03-19 09:40:34 -07:00
Tat Dat Duong 00855999d2 Bump to 0.0.59 2025-03-19 17:02:19 +01:00
Tat Dat Duong 24bd0e1c1f Fix formatting 2025-03-19 16:59:53 +01:00
David DuongandGitHub 3b59055192 feat(pregel): add bulk update state method (#3737)
This method is useful for recreating a thread from a list of checkpoint
writes. A new method is needed to clone a checkpoint that has been
created from multiple writes (functional API, map-reduce)

Port of https://github.com/langchain-ai/langgraphjs/pull/969 and
https://github.com/langchain-ai/langgraphjs/pull/1007
2025-03-19 16:59:07 +01:00
Eugene Yurtsev 67a16bec53 more typos 2025-03-19 11:48:31 -04:00
Eugene Yurtsev f97802eed5 x 2025-03-19 11:44:42 -04:00
Eugene Yurtsev bccb796ccc x 2025-03-19 11:38:46 -04:00
Eugene Yurtsev 4068e9d135 x 2025-03-19 11:27:56 -04:00
Eugene Yurtsev a951334f7f qxqx 2025-03-19 11:18:00 -04:00
lc-arjunandGitHub 75a727877f feat: add docs for prompt engineering (#3846) 2025-03-19 10:51:54 -04:00
Tat Dat Duong 1cece3228c Fix indent bug 2025-03-19 15:37:43 +01:00
Tat Dat Duong 7ba48d75c9 Another merge issue 2025-03-19 15:05:22 +01:00
Tat Dat Duong 7fb0628957 Remove duplicated test 2025-03-19 14:44:07 +01:00
Tat Dat Duong 6edf29f043 Fix rebase artifacts 2025-03-19 14:39:59 +01:00
Tat Dat Duong c8a605cbc8 Update PregelProtocol 2025-03-19 14:29:11 +01:00
Tat Dat Duong fbec207446 Apply formatting 2025-03-19 14:29:09 +01:00
Tat Dat Duong 2223c82606 Update to match JS 2025-03-19 14:28:55 +01:00
Tat Dat Duong 06f2eef74c Fix bug with stale task_id 2025-03-19 14:22:25 +01:00
Tat Dat Duong 62aa66cd4b Add better docstrings 2025-03-19 14:22:25 +01:00
Tat Dat Duong 8ffe9634b7 Clearer breakdown 2025-03-19 14:22:25 +01:00
Tat Dat Duong 4b1d6d2aeb Rename to StateUpdate 2025-03-19 14:22:25 +01:00
Tat Dat Duong 199ab46429 Avoid using checkpointer.list in async 2025-03-19 14:22:25 +01:00
Tat Dat Duong c758954519 Use awith_checkpointer instead 2025-03-19 14:22:25 +01:00
Tat Dat Duong 5bfb3bb882 Avoid running with shallow checkpointer 2025-03-19 14:22:24 +01:00
Tat Dat Duong 68a5c3f4c7 Implement batch events for RemotePregel 2025-03-19 14:22:04 +01:00
Tat Dat Duong b7fb8e6afb Fix types 2025-03-19 14:22:04 +01:00
Tat Dat Duong c34c798763 Add tests 2025-03-19 14:22:04 +01:00
Tat Dat Duong 792cd805a7 Fix tests 2025-03-19 14:21:44 +01:00
Tat Dat Duong 764929afd9 Fix lint issues 2025-03-19 14:21:43 +01:00
Tat Dat Duong 1e751a2256 Fix typo 2025-03-19 14:21:43 +01:00
Tat Dat Duong e6726802f7 feat(pregel): add bulk update state method
This method is useful for recreating a thread from a list of checkpoint writes. A new method is needed to clone a checkpoint that has been created from multiple writes (functional API, map-reduce)

Port of https://github.com/langchain-ai/langgraphjs/pull/969
2025-03-19 14:21:43 +01:00
Nuno Campos a541376d10 Store all triggers in task
- These are used to update seen version
2025-03-18 21:17:26 -07:00
William Fu-Hinthorn f9780330a6 Add refcount test 2025-03-18 20:13:40 -07:00
Eugene Yurtsev 347ab0165e x 2025-03-18 22:23:39 -04:00
Eugene Yurtsev cb95821eb0 x 2025-03-18 22:20:18 -04:00
Eugene Yurtsev 4b9cdb4107 add compilation benchmark 2025-03-18 22:16:10 -04:00
Eugene Yurtsev b440b14fa7 x 2025-03-18 21:53:56 -04:00
Nuno CamposandGitHub 24f7d7c439 Add pydantic state benchmark case (#3872) 2025-03-18 18:10:50 -07:00
William FHandGitHub 9533d35a84 0.3.16 (#3908) 2025-03-18 17:37:16 -07:00
William FHandGitHub 48de4a7234 Fix reference cycle btwn PregelLoop and PregelRunner (#3907) 2025-03-18 17:37:01 -07:00
William Fu-Hinthorn 67ac35c5bc 0.3.16 2025-03-18 17:35:53 -07:00
William Fu-Hinthorn 12c7ddf3a3 Update kafka 2025-03-18 17:30:21 -07:00
William Fu-Hinthorn d6caa3b00a lint 2025-03-18 17:18:07 -07:00
William Fu-Hinthorn 3d48526c16 Methods are weak 2025-03-18 17:17:04 -07:00
Nuno Campos 2f3bd69bf5 Add pydantic benchmark 2025-03-18 16:12:34 -07:00
Nuno Campos f10a0c6f32 Simpler runner 2025-03-18 15:15:26 -07:00
2eba27b01f docs: fix typo in hil how to doc (#3850)
Current text in the doc is incorrect:
```
Use the search tool to ask the user where they are, then look up the weather there
```

The search tool is not the one to use. Instead should just tell the
model to ask the user.

In addition, an important step is missing and makes the code seem less
impactful:
```python
location = interrupt("Please provide your location:")
```

The question to ask the human is actually coming from the LLM, there is
no need to hardcode it:
```python
...
location = interrupt(ask.question)
```

Before merging, someone who validates this should push an update to cell
outputs. I cleared it out from my branch because it made too many
updates to the file and would make it harder to review.

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-18 18:00:49 -04:00
c0245a6ee9 docs: fix typo (#3854)
probably > properly

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2025-03-18 18:00:39 -04:00
9e82d23252 docs: fix typos (#3823)
This pull request corrects a couple of typographical errors in the
documentation.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Vadym Barda <vadym@langchain.dev>
2025-03-18 17:58:47 -04:00
460c522902 docs: fix typo (#3856)
Added "a" to make paragraph correct.

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-18 17:58:30 -04:00
298a19b573 docs: add missing word 'in' in the docs related to passing runtime args to tools (#3900)
- Adds missing word 'in'
- Sentence should read -> "The core technique **in** the examples below
is"

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-18 21:56:33 +00:00
d2ec46b927 add ai-data-science-team to third party packages (#3719)
I'd like to add my AI Data Science Team to the LangGraph Prebuilt 3rd
Party Packages.

Repo: https://github.com/business-science/ai-data-science-team

Prebuilt Agent Guidelines:
https://langchain-ai.github.io/langgraph/prebuilt/

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-18 17:55:31 -04:00
Rafayet HabibandGitHub 22e4bf74fc Update importing HumanMessage in add-summary-conversation-history.ipynb (#3751) 2025-03-18 21:30:32 +00:00
khnealandGitHub 96a0536ec4 doc: remove Python max version limit from example pyproject.toml (#3843)
LangGraph officially supported Python 3.13 back in October 2024: 

https://changelog.langchain.com/announcements/langgraph-is-now-compatible-with-python-3-13

But why suggest restricting the version of Python at all? The app/agent
owner will be in control of the runtime version anyway, so don't add
unnecessary restrictions.

Note this example from Poetry:
https://python-poetry.org/docs/pyproject/#requires-python

I did not refactor pyproject.toml to the newer Poetry 2 / uv format, but
I can do that in a future PR if it will help... please don't let that
block approval+merging this PR.
2025-03-18 21:30:06 +00:00
8d33938173 Improve documentation string for SqliteSaver (#3857)
* Document that `check_same_thread` as an option when creating sqlite
connection.
* Document why it's OK to do that.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-18 21:29:05 +00:00
William FHandGitHub 1c73b1e45a Schema coercer should never throw (#3871)
- pydantic will do that for us if needed
2025-03-18 14:17:08 -07:00
William FHandGitHub 465d5d648b libs: pregel: find_subgraph_pregel: Do not cache introspection (#3894)
When searching for subgraphs stop caching inspection for the graph drawing & subgraph inference.

Fixes #3842
2025-03-18 14:09:55 -07:00
William Fu-Hinthorn b751e8bcee _evaluate() forward ref 2025-03-18 14:07:23 -07:00
Nuno CamposandGitHub 8ec3982056 Enable larger cases of sequential bench graph (#3905)
- Now that we're a lot faster on this case, we can enable some larger
test cases
2025-03-18 14:05:27 -07:00
William FHandGitHub f17f264a7a Merge branch 'main' into fix_subgraph_tools 2025-03-18 13:49:30 -07:00
William Fu-Hinthorn 086443472f Drop cache 2025-03-18 13:46:41 -07:00
William Fu-Hinthorn 936e69404e Revert "libs: pregel: find_subgraph_pregel: Do not search via introspection"
This reverts commit 2458f2d2e0.
2025-03-18 13:43:08 -07:00
Tat Dat Duong b1a25abc73 Add command 2025-03-18 21:22:40 +01:00
Nuno Campos 0e70b8d94f Enable larger cases of sequential bench graph
- Now that we're a lot faster on this case, we can enable some larger test cases
2025-03-18 13:13:20 -07:00
Nuno CamposandGitHub e1aa1a4510 0.3.15 2025-03-18 13:11:37 -07:00
Hamza KyamanywaandGitHub ae7dbd1fa5 docs: correct the word "every" (#3902)
- PR fix the word "every" in the sentence "It will be called every time
the LLM is called"
2025-03-18 19:58:28 +00:00
Vadym BardaandGitHub 3ec95153ce ci: don't use real secrets in notebook runner (#3572) 2025-03-18 15:57:40 -04:00
Nuno CamposandGitHub 4836f8b18b Speed up prepare_single_task (#3893)
- sequential(2000) goes from 8.4s to 4.1s
- replace UUID(str).bytes with faster binascii.unhexlify, and do it only
once per step
- find only the first active trigger, instead of the full list
- use a dedicated function for checking active trigger
2025-03-18 10:15:17 -07:00
Vadym BardaandGitHub e7fbdeeb13 docs: fix formatting (#3901) 2025-03-18 13:00:36 -04:00
William Fu-Hinthorn ee650ab85f Only throw if in union 2025-03-18 09:58:07 -07:00
Nuno Campos 7a959f62cc Fix assertion 2025-03-18 09:54:20 -07:00
Yassin NouhandGitHub 82905297fd docs: Add Pydantic usage examples and runtime coercion documentation (#3588)
## Description
This PR enhances the state-model documentation by adding comprehensive
examples for advanced Pydantic usage in LangGraph. It addresses issue
#2745 regarding the need for better documentation of Pydantic schema
behavior.

### Changes
- Added new section on Advanced Pydantic Model Usage
- Added examples for serialization behavior with nested models
- Added section on runtime type coercion with examples
- Added documentation for proper message type handling (BaseMessage vs
AnyMessage)
- Updated Pydantic error URLs to latest version

### Related Issues
Closes #2745

### Testing
- All notebook cells have been executed and outputs verified
- Examples demonstrate proper usage patterns
- Error cases are properly documented

### Documentation
The changes are documentation-focused and include:
- New examples for complex Pydantic models
- Runtime coercion behavior examples
- Message type handling best practices

### Reviewers 
@eyurtsev
2025-03-18 09:47:17 -07:00
Nuno Campos 9b5549f759 Fix flaky assertion 2025-03-18 09:43:56 -07:00
Nuno Campos fa96c0ac76 One more 2025-03-18 09:34:52 -07:00
Nuno Campos 98b8ff904c Update test assertions for triggers 2025-03-18 09:30:29 -07:00
Nuno Campos 951131c8ec Lint 2025-03-18 09:15:43 -07:00
Nuno CamposandNuno Campos 8bcdba822e Reduce to 4.1s 2025-03-18 09:15:28 -07:00
Nuno CamposandNuno Campos 60fc49b448 Speed up prepare_single_task
- sequential(2000) goes from 8.4s to 4.7s
- replace UUID(str).bytes with simpler str.encode()
- find only the first active trigger, instead of the full list
- use a dedicated function for checking active trigger
2025-03-18 09:15:11 -07:00
Nuno CamposandGitHub 1d21b4ba08 Improve prepare_single_task trigger checks to linear complexity (#3891)
- Was O(n^2) due to individual channels created for every conditional
edge, including the default cond edge created for Command
- Now using a single channel per node for all conditional edge / command
triggers, reducing to linear complexity
- Improves run time on sequential(200) from 1.8s to 0.14s
2025-03-18 09:13:54 -07:00
Nuno CamposandGitHub 55ec0d3d2a Speed up task triggers check (#3890)
- Using a sentinel value is faster than raising-catching an exception
2025-03-18 09:10:38 -07:00
Nuno CamposandGitHub c7dd7be030 benchmarks: add sequential graph of a few hundred nodes (#3882)
Performance is poor due to state graph utilizing n^2 entries right now
to accommodate Command. Adding benchmark prior to updating
implementation.
2025-03-18 08:19:52 -07:00
Nuno Campos 47d38a3022 Replace get_catch w is_available 2025-03-18 08:19:22 -07:00
Nuno Campos 8e829f38af Smaller sizes until we merge the fixes 2025-03-18 08:05:25 -07:00
Nuno Campos 3f241d00a3 Fix bench 2025-03-18 06:45:41 -07:00
Hamza KyamanywaandGitHub f0abf582dd docs: make sentence relating to how to navigate between sub graphs clearer in the docs (#3896)
- fix typo / add missing word
- make sentence relating to how to navigate between sub graphs clearer
in the docs
2025-03-18 09:25:32 -04:00
blafab-hg 2458f2d2e0 libs: pregel: find_subgraph_pregel: Do not search via introspection
When searching for subgraphs do not attempt to search function non
locals for RunnableCallables as this captures unwanted reference to
surrounding variables.
2025-03-18 11:19:09 +01:00
Nuno CamposandGitHub 477a43dae0 Update pyproject.toml 2025-03-17 21:58:49 -07:00
Nuno CamposandGitHub fc8e6ec64f When using global resume value, ensure subgraphs consume it (#3889)
- Previously the global resume value was passed to subgraphs without
being consumed
- This would result in two parallel subgraph calls being able to use the
same resume value
- Note this behavior can't be implemented over the wire, that will be
fixed in future PR

Closes #3398
2025-03-17 21:26:33 -07:00
Nuno Campos d6a457ef1d Improve prepare_single_task trigger checks to linear complexity
- Was O(n^2) due to individual channels created for every conditional edge, including the default cond edge created for Command
- Now using a single channel per node for all conditional edge / command triggers, reducing to linear complexity
- Improves run time on sequential(200) from 1.8s to 0.14s
2025-03-17 21:26:26 -07:00
Nuno Campos ce1077da40 Speed up task triggers check
- Using a sentinel value is faster than raising-catching an exception
2025-03-17 21:04:05 -07:00
Nuno Campos 969958695a Add time when running directly 2025-03-17 20:59:10 -07:00
Nuno Campos dd16ae4ba5 When using global resume value, ensure subgraphs consume it
- Previously the global resume value was passed to subgraphs without being consumed
- This would result in two parallel subgraph calls being able to use the same resume value
- Note this behavior can't be implemented over the wire, that will be fixed in future PR
2025-03-17 20:31:54 -07:00
Nuno CamposandGitHub e24e141253 Fix concurrency issue in PregelScratchpad.consume_null_resume (#3888)
- Need to use a single operation to check if present and remove item
from list
- This doesn't fix the separate issue that parallel tasks claiming a
single interrupt value have somewhat undefined behavior (in the sense
that they will race to be the first to take it). That will be fixed in a
future PR

Closes #3875
2025-03-17 20:22:20 -07:00
Nuno Campos eae1faa656 Fix 2025-03-17 20:12:33 -07:00
Nuno Campos 1976d6584c Lint 2025-03-17 20:00:33 -07:00
Nuno Campos 54e18445fc Fix concurrency issue in PregelScratchpad.consume_null_resume
- Need to use a single operation to check if present and remove item from list
- This doesn't fix the separate issue that parallel tasks claiming a single interrupt value have somewhat undefined behavior (in the sense that they will race to be the first to take it). That will be fixed in a future PR
2025-03-17 19:53:03 -07:00
Nuno Campos 69dc29aaf9 0.3.13 2025-03-17 18:52:09 -07:00
Nuno CamposandGitHub aa5ff74845 Fix missing interrupts in stream (#3886)
- When multiple parallel tasks and/or subgraphs emit interrupts some
were missing from stream output
2025-03-17 18:51:42 -07:00
Nuno CamposandGitHub 6049aaa842 Enable xray for remote graphs (#3879) 2025-03-17 18:49:51 -07:00
Nuno Campos 576aa1ca02 Order 2025-03-17 18:41:36 -07:00
Nuno Campos e28e97d5e0 Lint 2025-03-17 18:39:13 -07:00
Nuno Campos 59e7c63c93 Lint 2025-03-17 18:38:37 -07:00
Nuno Campos be7dee1c3b Fix 2025-03-17 18:35:53 -07:00
Nuno Campos 0aafa04bac WIP Fix missing interrupts in stream
- When multiple parallel tasks and/or subgraphs emit interrupts some were missing from stream output
2025-03-17 18:31:15 -07:00
Nuno CamposandGitHub 2e1adaa867 0.3.12 2025-03-17 16:56:34 -07:00
Nuno CamposandGitHub 3f8b165592 Update state.py 2025-03-17 16:56:09 -07:00
William FHandGitHub 9ed0fa196c langgraph-checkpoint 2.0.21 (#3883) 2025-03-17 15:25:26 -07:00
William Fu-Hinthorn 0b9adc28c3 langgraph-checkpoint 2.0.21 2025-03-17 15:15:29 -07:00
William FHandGitHub 3b0255d1ef Check that migrations are idempotent (#3881) 2025-03-17 15:13:59 -07:00
Eugene Yurtsev 80c3ccba7b add benchmark 2025-03-17 16:45:02 -04:00
William FHandGitHub d4255a0645 Merge branch 'main' into wfh/idempotency_test_ 2025-03-17 13:27:12 -07:00
William FHandGitHub 80d61a2600 Make expires_at idempotent (#3880) 2025-03-17 13:26:20 -07:00
William Fu-Hinthorn 424f24720a Make expires_at idempotent 2025-03-17 13:25:22 -07:00
William Fu-Hinthorn 2a71180c1d Add tests for idempotency in migraionts 2025-03-17 12:43:21 -07:00
William Fu-Hinthorn 697f878e36 Make expires_at idempotent 2025-03-17 12:38:43 -07:00
William Fu-Hinthorn 987b9da4ab Merge branch 'main' into nc/16mar/schema-coercer-no-throw 2025-03-17 11:58:20 -07:00
Tat Dat Duong 4bff1df4b0 Bump to 0.0.58 2025-03-17 18:14:51 +01:00
Tat Dat Duong 5104e31e35 feat(sdk-js): add bulkUpdateState method 2025-03-17 18:14:33 +01:00
Tat Dat Duong 7ae4739630 Make options optional 2025-03-17 18:07:14 +01:00
Nuno Campos 5db1949ae3 Fix 2025-03-17 09:55:21 -07:00
Nuno Campos ddb29df667 Fix 2025-03-17 09:39:23 -07:00
Nuno Campos fa467573d7 Enable xray for remote graphs 2025-03-17 09:36:33 -07:00
Tat Dat Duong 1a728a93c6 feat(sdk-js): add bulkUpdateState method 2025-03-17 17:22:03 +01:00
alxdr3kandGitHub def69c59d2 docs: add missing namespace definition in persistence.md (#3859)
- fix typo
- add missing namespace definition for memory store
2025-03-17 09:38:15 -04:00
Nuno Campos aaa0cd6b51 Fix 2025-03-16 11:53:29 -07:00
Nuno Campos a9c831c11b Schema coercer should never throw
- pydantic will do that for us if needed
2025-03-16 11:46:34 -07:00
Nuno Campos bad4d17c34 Remove 'check size' ci job 2025-03-14 21:54:01 -07:00
Nuno Campos 55219b23d8 0.3.11 2025-03-14 16:18:50 -07:00
Nuno CamposandGitHub 8edbd39ad3 Add optional encryption of checkpointer payloads (#3852)
- no dependency on any particular encryption lib (there is no py stdlib
encryption lib)
- works with any modern checkpointer, ie. those which use dumps_typed
and loads_typed methods to serialize data
- uses the default msg pack serializer, but also works with any custom
serializer
- backwards compatible with unencrypted data in same storage (will just
be read unencrypted)
- providing easy constructor to use AES encryption through pycriptodome
library, one single line of code to add it in
- other encryption libraries or algorithms (even assymetric ones) can be
used by implementing the two-method CipherProtocol interface
- cipher name (eg. aes) is stored with encrypted payload for forwards
compatibility

```py
import sqlite3

from langgraph.checkpoint.serde.encrypted import EncryptedSerializer
from langgraph.checkpoint.sqlite import SqliteSaver

# will read AES key from env var LANGGRAPH_AES_KEY
serde = EncryptedSerializer.from_pycryptodome_aes()
# works with any other checkpointer, including custom ones
checkpointer = SqliteSaver(sqlite3.connect('...'), serde=serde)
```
2025-03-14 16:14:29 -07:00
Nuno Campos 4b0fd834d8 Make it possible to implement a cipher that handles multiple protocols 2025-03-14 16:04:28 -07:00
Nuno Campos 0fd2748530 Accept custom serde implementations 2025-03-14 15:43:07 -07:00
Nuno Campos bc0a3419ed Lint 2025-03-14 15:38:22 -07:00
Nuno Campos 5cd47bac49 Add optional encryption of checkpointer payloads
- no dependency on any particular encryption lib (there is no py stdlib encryption lib)
- works with any modern checkpointer, ie. those which use dumps_typed and loads_typed methods to serialize data
- backwards compatible with unencrypted data in same storage (will just be read unencrypted)
- providing easy constructor to use AES encryption through pycriptodome library, one single line of code to add it in
- other encryption libraries or algorithms (even assymetric ones) can be used by implementing the two-method CipherProtocol interface
- cipher name (eg. aes) is stored with encrypted payload for forwards compatibility
2025-03-14 15:32:50 -07:00
William FHandGitHub 4c6d80a67f Add TTL Sweeper (#3849) 2025-03-14 14:29:40 -07:00
William Fu-Hinthorn 18ed044c27 Bump patch version 2025-03-14 14:03:30 -07:00
William Fu-Hinthorn 394a9fa85f Update schema 2025-03-14 13:48:23 -07:00
William Fu-Hinthorn 9741d9bdf0 Add tests for sweeper (sync) 2025-03-14 13:43:53 -07:00
William Fu-Hinthorn 06ca07432d Add sweeper 2025-03-13 18:55:16 -07:00
Nuno Campos e757a80001 0.3.10 2025-03-13 18:14:57 -07:00
William FHandGitHub a204444905 Update handling of updates/inputs passed in as pydantic models (#3839)
- remove usage of require_at_least_one_of, we shouldn't be enforcing
presence of keys in inputs/updates, an empty dict is a valid
input/update
- ensure that values that were explcitly set/assigned in pydantic model
are saved even if equal to default value
2025-03-13 18:14:17 -07:00
Nuno Campos 4cfdf8774a Update 2025-03-13 18:02:31 -07:00
Nuno Campos beb62fc053 Fix types 2025-03-13 17:39:43 -07:00
Nuno Campos 857f3e4a38 Update handling of updates/inputs passed in as pydantic models
- remove usage of require_at_least_one_of, we shouldn't be enforcing presence of keys in inputs/updates, an empty dict is a valid input/update
- ensure that values that were explcitly set/assigned in pydantic model are saved even if equal to default value
2025-03-13 17:31:38 -07:00
6342cd1665 prebuilt: fix typo and simplify functions of examples in chat_agent_executor.py. (#3827)
**Description:**
Fix typo and simplify functions of examples.

**Issue:**
N/A

**Dependencies:**
N/A

**Dependencies:**
N/A

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-13 15:32:25 -04:00
Eugene YurtsevandGitHub baedf91836 docs: fix regexp for base64 images for llms-full (#3834) 2025-03-13 15:32:09 -04:00
ArrayPDandGitHub 190b42850f docs: Enhance get_weather() in create-react-agent-memory.ipynb (#3825)
Since we are demonstrating thread-level memory not human-in-the-loop, a
string is more straightforward and reliable than AssertionError(), when
dealing with 'Unknown Location'.
2025-03-13 18:28:20 +00:00
Eugene YurtsevandGitHub 678b512aed ci: limit downloads from pypi stats to main branch (#3835)
At some point, we can run on a cron schedule
2025-03-13 14:24:55 -04:00
William FHandGitHub c85e246c32 0.3.9 (#3836) 2025-03-13 11:22:10 -07:00
William Fu-Hinthorn 98ebc45f31 0.3.9 2025-03-13 11:21:50 -07:00
David DuongandGitHub 5ca2f358f9 feat(sdk-js): automatically write ui messages (#3833) 2025-03-13 18:22:42 +01:00
William FHandGitHub 86169c1439 Coerce nested pydantic (#3806) 2025-03-13 10:17:53 -07:00
Tat Dat Duong 36d6eed468 feat(sdk-js): automatically write ui messages 2025-03-13 18:16:49 +01:00
William FHandGitHub ef50fed6fe StreamMode in Join [sdk] (#3584) 2025-03-13 10:05:45 -07:00
William Fu-Hinthorn c0abfc7df6 lint? 2025-03-13 09:55:41 -07:00
William Fu-Hinthorn 318889bc6c Merge branch 'main' into wfh/join_stream_mode 2025-03-13 09:46:23 -07:00
William Fu-Hinthorn b9e3fd5f3e Bump js 2025-03-13 09:45:47 -07:00
William Fu-Hinthorn 8729ebc40c Merge 2025-03-13 09:37:47 -07:00
William Fu-Hinthorn 919282fead Move files 2025-03-13 09:35:26 -07:00
David DuongandGitHub cff4784ff8 feat(docs): feedback on gen ui docs (#3831) 2025-03-13 17:31:56 +01:00
Tat Dat Duong 9921e5210a feat(docs): feedback on gen ui docs 2025-03-13 17:08:10 +01:00
Vadym BardaandGitHub 048eff9f11 prebuilt: release 0.1.3 (#3830) 2025-03-13 11:46:58 -04:00
ccurmeandGitHub 8a2765c8f2 prebuilt: update type annotation for tools (#3829) 2025-03-13 15:45:44 +00:00
William Fu-Hinthorn ffbcdd1ecc weakref 2025-03-13 08:04:57 -07:00
David DuongandGitHub 108a041fa7 feat(sdk-js): add docs for generative UI (#3774) 2025-03-13 15:17:54 +01:00
Tat Dat Duong 52e3c59f07 Replace with jpg 2025-03-13 15:09:24 +01:00
David DuongandGitHub 0e17988332 feat(sdk-js): add overridable ui namespacing (#3809) 2025-03-13 15:02:07 +01:00
Tat Dat Duong 5f0d05099d Bump to 0.0.54 2025-03-13 14:50:59 +01:00
Tat Dat Duong a1739d3184 Add a separate section for Frontend and Generative UI 2025-03-13 14:47:49 +01:00
Tat Dat Duong ab38cc2cc0 Further cleanup 2025-03-13 14:36:07 +01:00
Tat Dat Duong 647833dcaa Separate segments 2025-03-13 14:34:23 +01:00
Tat Dat Duong 1f03735b7d Add image 2025-03-13 14:29:35 +01:00
Vadym BardaandGitHub d980cca59b docs: fix link checking (#3826) 2025-03-13 13:28:35 +00:00
William FHandGitHub 944b93bf61 docs: more concise readme (#3815) 2025-03-13 09:03:18 -04:00
Vadym BardaandGitHub 8aa59d002a docs: add logo to readme (#3816) 2025-03-13 09:03:01 -04:00
Tat Dat Duong ed533b32a8 Add example for CSS 2025-03-13 13:47:20 +01:00
William Fu-Hinthorn d88f59eea4 Cache 2025-03-12 18:11:42 -07:00
Nuno CamposandGitHub fc5dde6c55 Rename env var (#3813) 2025-03-12 17:07:52 -07:00
Nuno Campos 4c902d21a3 Rename env var 2025-03-12 16:58:12 -07:00
Nuno CamposandGitHub 54804af06a Make default recursion_limit configurable by env var (#3812) 2025-03-12 16:54:59 -07:00
William Fu-Hinthorn 312f026e9c Add tests 2025-03-12 16:52:23 -07:00
Nuno Campos 6973b19cc7 Make default recursion_limit configurable by env var 2025-03-12 16:45:45 -07:00
Tat Dat Duong 45ed67856f feat(sdk-js): add overridable ui namespacing 2025-03-12 23:56:07 +01:00
Vadym BardaandGitHub 74b2dbe1ea docs: add reflection prebuilt (#3805) 2025-03-12 17:54:59 +00:00
Alexey BondarenkoandGitHub 7f803df586 Add state schemas to __all__ in chat_agent_executor.py (#3798) 2025-03-12 17:54:18 +00:00
Vadym BardaandGitHub a5b43c933a docs: update README (#3799) 2025-03-12 13:43:28 -04:00
Vadym BardaandGitHub aae2fb4b85 langgraph: release 0.3.8 (#3803) 2025-03-12 13:29:21 -04:00
Vadym BardaandGitHub c20a50875d langgraph: handle pydantic state updates better for fields w/ defaults (#3783) 2025-03-12 13:19:56 -04:00
MathieuandGitHub 779553f4aa docs: fix state type in Persistence documentation (#3801)
This PR fixes the type of `foo` in the `State` class in Persistence
documentation. The type was previously defined as `int`, but the code
uses it as a `str`.

Updated the type of `foo` in the documentation to `str` to match its
actual usage in the code.

No changes to the functionality or codebase, only a documentation fix.
2025-03-12 17:14:07 +00:00
ArrayPDandGitHub 537e69608e docs: Correct a typo in create-react-agent-memory.ipynb (#3800)
Fixed a typo in create-react-agent-memory.ipynb
2025-03-12 15:17:11 +00:00
William FHandGitHub 208cd4d70e Add default TTL in store & CLI (#3786) 2025-03-12 06:14:58 -07:00
Ben BurnsandGitHub 1352e58133 chore(langgraph): add functional api test for multiple task interrupts (#3790)
While working on langchain-ai/langgraphjs#984 I ported the test I was
debugging over to python so I could compare behavior. Figured I might as
well add it to this codebase, as I don't think we had this particular
case covered previously.
2025-03-12 18:50:24 +13:00
William Fu-Hinthorn f1162ac898 Bump 2025-03-11 20:22:58 -07:00
William Fu-Hinthorn 4de8443c5c Add default TTL in store & CLI 2025-03-11 20:15:38 -07:00
Nuno CamposandGitHub 96dc39aeab 0.3.7 2025-03-11 19:46:43 -07:00
Nuno CamposandGitHub 316f8410fa Avoid validating pydantic state models when we can (#3782)
- When a pydantic input schema isued but dict input is passed in
validate it once after running hidden START node. If the input is an
instance of the input model we skip validation altogether
- When entering each node we need to create a standalone instance of the
state class, but we can now skip validation, as it's now run once
elsewhere
2025-03-11 18:23:05 -07:00
Nuno Campos 1d3926af27 Fix kafka 2025-03-11 18:13:36 -07:00
Nuno Campos e566ed4b3f Fix py 3.9
- isclass and issubclass disagree on whether something like list[str] is a class
2025-03-11 17:51:13 -07:00
Nuno Campos 14c2241853 Lint 2025-03-11 17:44:24 -07:00
Nuno Campos 2c908f1557 Avoid validating pydantic state models when we can
- When a pydantic input schema isued but dict input is passed in validate it once after running hidden START node. If the input is an instance of the input model we skip validation altogether
- When entering each node we need to create a standalone instance of the state class, but we can now skip validation, as it's now run once elsewhere
2025-03-11 17:32:54 -07:00
William FHandGitHub 5005d1c004 Default store ttl config (#3781) 2025-03-11 17:18:16 -07:00
Vadym BardaandGitHub 02a46c45c8 langgraph: support subgraphs with a single node (#3780) 2025-03-12 00:09:35 +00:00
William Fu-Hinthorn 852a129881 Default store ttl config 2025-03-11 15:58:58 -07:00
Tat Dat Duong 78348d2d9f Improve docs 2025-03-11 21:06:02 +01:00
Tat Dat Duong 44af8d5257 Add a disclaimer 2025-03-11 19:24:11 +01:00
84c956bc8c Add llms.txt (#3765)
Co-authored-by: Lance Martin <lance@langchain.dev>
2025-03-11 18:01:50 +00:00
Eugene YurtsevandGitHub b86e6b82f2 ci: add poetry check --lock to test workflow (#3777) 2025-03-11 17:42:37 +00:00
b1de5be334 docs: Fix version badge by linking it to PyPi instead of shield (#3766)
Currently the version badge showing langgraph version as PyPi shield
image is linking to the shield image. It would be more intuitive to link
it to PyPi.

---------

Co-authored-by: vbarda <vadym@langchain.dev>
2025-03-11 16:21:24 +00:00
David DuongandGitHub 0751428422 feat(sdk-js): cleanup types for ui payloads (#3773) 2025-03-11 17:04:12 +01:00
Tat Dat Duong b16f05405b Bump to 0.0.53 2025-03-11 16:59:56 +01:00
Vadym BardaandGitHub ca8d92421a langgraph: release 0.3.6 (#3775) 2025-03-11 11:34:36 -04:00
7aa9d3fd00 langgraph: use input schema from conditional edge (#2516)
Currently we ignore the input schema in the branch and instead use the
input schema from the previous node (or overall graph schema)

This change makes the input schema to branches respected. This means
that if you try to pass extra keys and they're NOT in the input schema,
you will receive an error. If you don't provide an annotation in the
router, it will fall back to the previous node's input schema / full
graph state schema

Alternative solution is to just ignore the input schema in the router
altogether (including ignoring the schema from previous node / full
graph), but personally I find it more confusing.

---------

Co-authored-by: Nuno Campos <nuno@langchain.dev>
2025-03-11 11:33:28 -04:00
Tat Dat Duong ed69f60f24 Add missing links 2025-03-11 16:18:59 +01:00
Tat Dat Duong c55f1f12bf Update docs 2025-03-11 16:18:58 +01:00
Tat Dat Duong 5d76b1d624 Add docs 2025-03-11 16:18:58 +01:00
Tat Dat Duong 857fd3578f feat(sdk-js): cleanup types for ui payloads 2025-03-11 15:02:42 +01:00
William FHandGitHub 3a4af1e573 chore(deps): bump axios from 1.7.7 to 1.8.2 in /libs/sdk-js (#3740)
Bumps [axios](https://github.com/axios/axios) from 1.7.7 to 1.8.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/axios/axios/releases">axios's
releases</a>.</em></p>
<blockquote>
<h2>Release v1.8.2</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>http-adapter:</strong> add allowAbsoluteUrls to path
building (<a
href="https://redirect.github.com/axios/axios/issues/6810">#6810</a>)
(<a
href="https://github.com/axios/axios/commit/fb8eec214ce7744b5ca787f2c3b8339b2f54b00f">fb8eec2</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a href="https://github.com/lexcorp16"
title="+1/-1 ([#6810](https://github.com/axios/axios/issues/6810)
)">Fasoro-Joseph Alexander</a></li>
</ul>
<h2>Release v1.8.1</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>utils:</strong> move <code>generateString</code> to platform
utils to avoid importing crypto module into client builds; (<a
href="https://redirect.github.com/axios/axios/issues/6789">#6789</a>)
(<a
href="https://github.com/axios/axios/commit/36a5a620bec0b181451927f13ac85b9888b86cec">36a5a62</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a
href="https://github.com/DigitalBrainJS" title="+51/-47
([#6789](https://github.com/axios/axios/issues/6789) )">Dmitriy
Mozgovoy</a></li>
</ul>
<h2>Release v1.8.0</h2>
<h2>Release notes:</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>examples:</strong> application crashed when navigating
examples in browser (<a
href="https://redirect.github.com/axios/axios/issues/5938">#5938</a>)
(<a
href="https://github.com/axios/axios/commit/1260ded634ec101dd5ed05d3b70f8e8f899dba6c">1260ded</a>)</li>
<li>missing word in SUPPORT_QUESTION.yml (<a
href="https://redirect.github.com/axios/axios/issues/6757">#6757</a>)
(<a
href="https://github.com/axios/axios/commit/1f890b13f2c25a016f3c84ae78efb769f244133e">1f890b1</a>)</li>
<li><strong>utils:</strong> replace getRandomValues with crypto module
(<a
href="https://redirect.github.com/axios/axios/issues/6788">#6788</a>)
(<a
href="https://github.com/axios/axios/commit/23a25af0688d1db2c396deb09229d2271cc24f6c">23a25af</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li>Add config for ignoring absolute URLs (<a
href="https://redirect.github.com/axios/axios/issues/5902">#5902</a>)
(<a
href="https://redirect.github.com/axios/axios/issues/6192">#6192</a>)
(<a
href="https://github.com/axios/axios/commit/32c7bcc0f233285ba27dec73a4b1e81fb7a219b3">32c7bcc</a>)</li>
</ul>
<h3>Reverts</h3>
<ul>
<li>Revert &quot;chore: expose fromDataToStream to be consumable (<a
href="https://redirect.github.com/axios/axios/issues/6731">#6731</a>)&quot;
(<a
href="https://redirect.github.com/axios/axios/issues/6732">#6732</a>)
(<a
href="https://github.com/axios/axios/commit/1317261125e9c419fe9f126867f64d28f9c1efda">1317261</a>),
closes <a
href="https://redirect.github.com/axios/axios/issues/6731">#6731</a> <a
href="https://redirect.github.com/axios/axios/issues/6732">#6732</a></li>
</ul>
<h3>BREAKING CHANGES</h3>
<ul>
<li>
<p>code relying on the above will now combine the URLs instead of prefer
request URL</p>
</li>
<li>
<p>feat: add config option for allowing absolute URLs</p>
</li>
<li>
<p>fix: add default value for allowAbsoluteUrls in buildFullPath</p>
</li>
<li>
<p>fix: typo in flow control when setting allowAbsoluteUrls</p>
</li>
</ul>
<h3>Contributors to this release</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/axios/axios/blob/v1.x/CHANGELOG.md">axios's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/axios/axios/compare/v1.8.1...v1.8.2">1.8.2</a>
(2025-03-07)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>http-adapter:</strong> add allowAbsoluteUrls to path
building (<a
href="https://redirect.github.com/axios/axios/issues/6810">#6810</a>)
(<a
href="https://github.com/axios/axios/commit/fb8eec214ce7744b5ca787f2c3b8339b2f54b00f">fb8eec2</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a href="https://github.com/lexcorp16"
title="+1/-1 ([#6810](https://github.com/axios/axios/issues/6810)
)">Fasoro-Joseph Alexander</a></li>
</ul>
<h2><a
href="https://github.com/axios/axios/compare/v1.8.0...v1.8.1">1.8.1</a>
(2025-02-26)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>utils:</strong> move <code>generateString</code> to platform
utils to avoid importing crypto module into client builds; (<a
href="https://redirect.github.com/axios/axios/issues/6789">#6789</a>)
(<a
href="https://github.com/axios/axios/commit/36a5a620bec0b181451927f13ac85b9888b86cec">36a5a62</a>)</li>
</ul>
<h3>Contributors to this release</h3>
<ul>
<li><!-- raw HTML omitted --> <a
href="https://github.com/DigitalBrainJS" title="+51/-47
([#6789](https://github.com/axios/axios/issues/6789) )">Dmitriy
Mozgovoy</a></li>
</ul>
<h1><a
href="https://github.com/axios/axios/compare/v1.7.9...v1.8.0">1.8.0</a>
(2025-02-25)</h1>
<h3>Bug Fixes</h3>
<ul>
<li><strong>examples:</strong> application crashed when navigating
examples in browser (<a
href="https://redirect.github.com/axios/axios/issues/5938">#5938</a>)
(<a
href="https://github.com/axios/axios/commit/1260ded634ec101dd5ed05d3b70f8e8f899dba6c">1260ded</a>)</li>
<li>missing word in SUPPORT_QUESTION.yml (<a
href="https://redirect.github.com/axios/axios/issues/6757">#6757</a>)
(<a
href="https://github.com/axios/axios/commit/1f890b13f2c25a016f3c84ae78efb769f244133e">1f890b1</a>)</li>
<li><strong>utils:</strong> replace getRandomValues with crypto module
(<a
href="https://redirect.github.com/axios/axios/issues/6788">#6788</a>)
(<a
href="https://github.com/axios/axios/commit/23a25af0688d1db2c396deb09229d2271cc24f6c">23a25af</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li>Add config for ignoring absolute URLs (<a
href="https://redirect.github.com/axios/axios/issues/5902">#5902</a>)
(<a
href="https://redirect.github.com/axios/axios/issues/6192">#6192</a>)
(<a
href="https://github.com/axios/axios/commit/32c7bcc0f233285ba27dec73a4b1e81fb7a219b3">32c7bcc</a>)</li>
</ul>
<h3>Reverts</h3>
<ul>
<li>Revert &quot;chore: expose fromDataToStream to be consumable (<a
href="https://redirect.github.com/axios/axios/issues/6731">#6731</a>)&quot;
(<a
href="https://redirect.github.com/axios/axios/issues/6732">#6732</a>)
(<a
href="https://github.com/axios/axios/commit/1317261125e9c419fe9f126867f64d28f9c1efda">1317261</a>),
closes <a
href="https://redirect.github.com/axios/axios/issues/6731">#6731</a> <a
href="https://redirect.github.com/axios/axios/issues/6732">#6732</a></li>
</ul>
<h3>BREAKING CHANGES</h3>
<ul>
<li>
<p>code relying on the above will now combine the URLs instead of prefer
request URL</p>
</li>
<li>
<p>feat: add config option for allowing absolute URLs</p>
</li>
<li>
<p>fix: add default value for allowAbsoluteUrls in buildFullPath</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/axios/axios/commit/a9f7689b0c4b6d68c7f587c3aa376860da509d94"><code>a9f7689</code></a>
chore(release): v1.8.2 (<a
href="https://redirect.github.com/axios/axios/issues/6812">#6812</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/fb8eec214ce7744b5ca787f2c3b8339b2f54b00f"><code>fb8eec2</code></a>
fix(http-adapter): add allowAbsoluteUrls to path building (<a
href="https://redirect.github.com/axios/axios/issues/6810">#6810</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/98120457559e573024862e2925d56295a965ad7e"><code>9812045</code></a>
chore(sponsor): update sponsor block (<a
href="https://redirect.github.com/axios/axios/issues/6804">#6804</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/72acf759373ef4e211d5299818d19e50e08c02f8"><code>72acf75</code></a>
chore(sponsor): update sponsor block (<a
href="https://redirect.github.com/axios/axios/issues/6794">#6794</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/2e64afdff5c41e38284a6fb8312f2745072513a1"><code>2e64afd</code></a>
chore(release): v1.8.1 (<a
href="https://redirect.github.com/axios/axios/issues/6800">#6800</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/36a5a620bec0b181451927f13ac85b9888b86cec"><code>36a5a62</code></a>
fix(utils): move <code>generateString</code> to platform utils to avoid
importing crypto...</li>
<li><a
href="https://github.com/axios/axios/commit/cceb7b1e154fbf294135c93d3f91921643bbe49f"><code>cceb7b1</code></a>
chore(release): v1.8.0 (<a
href="https://redirect.github.com/axios/axios/issues/6795">#6795</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/23a25af0688d1db2c396deb09229d2271cc24f6c"><code>23a25af</code></a>
fix(utils): replace getRandomValues with crypto module (<a
href="https://redirect.github.com/axios/axios/issues/6788">#6788</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/32c7bcc0f233285ba27dec73a4b1e81fb7a219b3"><code>32c7bcc</code></a>
feat: Add config for ignoring absolute URLs (<a
href="https://redirect.github.com/axios/axios/issues/5902">#5902</a>)
(<a
href="https://redirect.github.com/axios/axios/issues/6192">#6192</a>)</li>
<li><a
href="https://github.com/axios/axios/commit/4a3e26cf65bb040b7eb4577d5fd62199b0f3d017"><code>4a3e26c</code></a>
chore(config): adjust rollup config to preserve license header to
minified Ja...</li>
<li>Additional commits viewable in <a
href="https://github.com/axios/axios/compare/v1.7.7...v1.8.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=axios&package-manager=npm_and_yarn&previous-version=1.7.7&new-version=1.8.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>
2025-03-10 17:50:20 -07:00
37344124e1 Fix updated_at timestamp loading (#3767)
Co-authored-by: Mohammad Mohtashim <45242107+keenborder786@users.noreply.github.com>
2025-03-10 22:20:12 +00:00
David DuongandGitHub d0f4db6ddd feat(sdk-js): use fetchClient from client in gen ui (#3761) 2025-03-10 17:48:25 +01:00
Vadym BardaandGitHub a9800aab87 checkpoint-sqlite: release 2.0.6 (#3763) 2025-03-10 11:25:38 -04:00
Vadym BardaandGitHub 9bf3fc2d0f checkpoint-sqlite: commit transactions in AsyncSqliteSaver.aput_writes (#3762) 2025-03-10 15:14:20 +00:00
Tat Dat Duong a6e4bd93ff Bump to 0.0.52 2025-03-10 15:02:06 +01:00
Tat Dat Duong 0e9c41f480 feat(sdk-js): use fetchClient from client in gen ui 2025-03-10 13:59:00 +01:00
David DuongandGitHub d4368cfa97 feat(sdk-js): api improvements for gen ui (#3760)
- merge `typedUi.create` and `typedUi.write` into `typedUi.push`
- Add mutate function in `onCustomEvent`
2025-03-10 13:31:07 +01:00
Tat Dat Duong 3808302309 Bump to 0.0.51 2025-03-10 13:25:55 +01:00
Tat Dat Duong 25019450e2 feat(sdk-js): api improvements for gen ui
- merge `typedUi.create` and `typedUi.write` into `typedUi.push`
- Add mutate function in `onCustomEvent`
2025-03-09 10:26:50 +01:00
William FHandGitHub e4c7db180e Release checkpoint-postgres (#3745) 2025-03-07 13:51:36 -08:00
3183146141 prebuilt: allow pydantic model as state schema in create_react_agent (#3559)
Inherited attributes where not considered.
Pydantic model can inherit from other pydantic models. In those cases,
inherited attributes where not considered in the check and the code
fails.

---------

Co-authored-by: vbarda <vadym@langchain.dev>
2025-03-07 16:49:51 -05:00
Brace SproulandGitHub f070b1c805 feat(sdk-js): bump version (#3743) 2025-03-07 12:44:26 -08:00
Brace SproulandGitHub 141589a7e6 Merge branch 'main' into brace/fix-tool-call-args-type 2025-03-07 12:36:54 -08:00
bracesproul be37631181 bump version 2025-03-07 12:36:22 -08:00
David DuongandGitHub 51ddc792d6 fix(sdk-js): AIMessage tool call args type (#3741) 2025-03-07 21:35:04 +01:00
Vadym BardaandGitHub 52d4f73e39 docs: fix formatting for summarization doc (#3742) 2025-03-07 15:34:48 -05:00
bracesproul 4b25e28e3e fix(sdk-js): AIMessage tool call args type 2025-03-07 12:31:18 -08:00
dependabot[bot]andGitHub 263eab9f76 chore(deps): bump axios from 1.7.7 to 1.8.2 in /libs/sdk-js
Bumps [axios](https://github.com/axios/axios) from 1.7.7 to 1.8.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.7...v1.8.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-07 19:23:09 +00:00
William FHandGitHub c3df8bd500 Ensure key is string (#3739)
Mainly relevenat for the in memory store.
2025-03-07 11:21:32 -08:00
William FHandGitHub d86502421d Add TTL args for SDKs (#3728) 2025-03-06 23:30:48 +00:00
William FHandGitHub cbf26a5d98 Fix indentation in docstring (#3727) 2025-03-06 13:35:20 -08:00
William FHandGitHub 09bd5990d4 Add TTL option for store items (#3704) 2025-03-06 13:20:32 -08:00
Nuno CamposandGitHub 79595d43a5 feat: bump sdk versions js and py (#3725) 2025-03-06 11:16:12 -08:00
Arjun Natarajan 49a6704bdc bump sdk versions js and py 2025-03-06 14:06:03 -05:00
David DuongandGitHub a430b7fcfb feat(cli): allow sending UI args (#3722) 2025-03-06 19:59:05 +01:00
Nuno CamposandGitHub 48c287d107 feat: update assistant version class (#3702) 2025-03-06 10:21:51 -08:00
Tat Dat Duong 0fdc787597 Bump to 0.1.75 2025-03-06 18:04:21 +01:00
Tat Dat Duong 3bd86fc6f5 Update schema 2025-03-06 17:57:51 +01:00
Tat Dat Duong f1024f7341 feat(cli): allow sending UI args 2025-03-06 17:55:42 +01:00
David DuongandGitHub f9ac88012f feat(sdk-js): loading external components (#3689)
- **chore: use prepack hook instead of prepublish**
- **feat(sdk-js): add react-ui implementation**
- **Add apiUrl, assistantId to props**
- **Bump to 0.0.46-experimental.0**
2025-03-06 17:11:50 +01:00
Tat Dat Duong 9d0186b5bf Bump to 0.0.47 2025-03-06 17:05:02 +01:00
Tat Dat Duong 40062c40df Add fallback for components defined at client level 2025-03-06 17:05:02 +01:00
Tat Dat Duong 36bbe059df Bump to 0.0.47-experimental.0 2025-03-06 17:05:01 +01:00
Tat Dat Duong 52627010cb Cache promises 2025-03-06 17:05:01 +01:00
Tat Dat Duong f6781d19ab Undo version experimental bump 2025-03-06 17:05:01 +01:00
Tat Dat Duong fcf134a452 Remove @langchain/langgraph-sdk/react-ui/types entrypoint 2025-03-06 17:05:01 +01:00
Tat Dat Duong 80331b88e0 Remove a nesting level 2025-03-06 17:05:01 +01:00
Tat Dat Duong b37f894f38 Stabilise boostrapping UI context 2025-03-06 17:05:01 +01:00
Tat Dat Duong 79de3dbad3 Fix require symbol 2025-03-06 17:05:00 +01:00
Tat Dat Duong 677fd3ce28 Update entrypoint 2025-03-06 17:05:00 +01:00
Tat Dat Duong 4ee863f30d Reexport as @langchain/langgraph-sdk/react-ui 2025-03-06 17:05:00 +01:00
Tat Dat Duong 7e060f88a2 Introduce useStreamContext 2025-03-06 17:05:00 +01:00
Tat Dat Duong f49856af0b Fix types for collect 2025-03-06 17:05:00 +01:00
Tat Dat Duong 5a7d384e2f Bump to 0.0.46-experimental.0 2025-03-06 17:05:00 +01:00
Tat Dat Duong b73b34ddd5 Add apiUrl, assistantId to props 2025-03-06 17:04:59 +01:00
Tat Dat Duong c9ffd753f5 feat(sdk-js): add react-ui implementation 2025-03-06 17:04:59 +01:00
Tat Dat Duong e85e157e8f chore: use prepack hook instead of prepublish 2025-03-06 17:04:59 +01:00
Vadym BardaandGitHub 88e7868885 prebuilt: release 0.1.2 (#3708) 2025-03-05 21:40:58 -05:00
Vadym BardaandGitHub e8dd682320 prebuilt: allow passing RunnableSequence as a model (#3706) 2025-03-06 02:37:55 +00:00
Nuno CamposandGitHub 75143b966c Make pydntic input test stricter (#3703)
- Now tests a model with inherited fields
2025-03-05 15:30:25 -08:00
Nuno Campos 490e1aab3b Don't enforce stream order 2025-03-05 15:21:16 -08:00
Arjun Natarajan 003226cef4 expose assistantbase 2025-03-05 16:47:18 -05:00
Arjun Natarajan 098a199cb9 update assistant version class 2025-03-05 15:39:34 -05:00
Nuno Campos 97f6f45993 Make pydntic input test stricter
- Now tests a model with inherited fields
2025-03-05 11:15:08 -08:00
Xiangyu YinandGitHub e8631c052a Update packages.yml to propose a new entry (#3629)
Hi, I have built a package `nodeology` that empowers researchers to
rapidly develop, test, adapt, and execute foundation AI-integrated
scientific workflows by leveraging langgraph's state machine framework.
Please take a look and let me know if it can be added into this list.
Thank you :)
2025-03-05 16:00:16 +00:00
David DuongandGitHub 16a86c8b8e feat(sdk-js): bump to 0.0.46 (#3693) 2025-03-05 11:12:50 +01:00
Tat Dat Duong 5fa6bb5f55 feat(sdk-js): bump to 0.0.46 2025-03-05 11:08:59 +01:00
David DuongandGitHub d29e9e22c7 feat(sdk-js): useStream expose callerOptions and defaultHeaders (#3688) 2025-03-05 10:42:57 +01:00
Tat Dat Duong 6990e1fcf5 retrigger checks 2025-03-05 10:36:45 +01:00
David DuongandGitHub 22e60c47cc fix(sdk-js): stream intermediate values with messages-tuple (#3664)
We still need intermediate messages to ensure the client state and
server state is in-sync as quickly as possible.
2025-03-05 10:33:05 +01:00
Nuno CamposandGitHub d9396c38ea chore(langgraph): fix typing of task decorator (#3670)
An async function of the form `def foo(P) -> T` has type `Callable[[P],
Awaitable[T]]`. The old type annotations then converted the function
into a `Callable[[P], SyncAsyncFuture[Awaitable[T]]]` which is
incorrect.

The change introduced in this commit updates the type annotations to
ensure the `Awaitable[T]` is correctly unwrapped.

I've tested it locally and confirmed it work on:

```python
@task 
def sync_fn(a: int) -> int: ...

@task 
def async_fn(a: int) -> int: ...
```

Let me know if you want me to add tests, just let me know how you test
type annotations.
2025-03-04 17:05:35 -08:00
Vadym BardaandGitHub ff60ee8c9a langgraph: release 0.3.5 (#3690) 2025-03-04 19:29:05 -05:00
Vadym BardaandGitHub 8761721fb9 langgraph: do not pass subgraph state on Command.parent updates (#3686) 2025-03-04 19:21:03 -05:00
William FHandGitHub de85e7c246 Add json schema to CLI (#3684)
So you have cute IDE autocomplete / language server checking.
2025-03-04 23:48:27 +00:00
David DuongandGitHub d333f4438f fix(sdk-js): handle threadId: undefined as controlled (#3687) 2025-03-05 00:46:26 +01:00
Tat Dat Duong af14a2abbc feat(sdk-js): useStream expose callerOptions and defaultHeaders 2025-03-05 00:29:25 +01:00
Tat Dat Duong e466c2c90c fix(sdk-js): handle threadId: undefined as controlled 2025-03-05 00:20:59 +01:00
Nuno Campos 815a67ef55 0.3.4 2025-03-04 14:33:27 -08:00
Nuno CamposandGitHub 38f1b415a0 When rehydrating a pydantic module, fallback to returning the kwargs dict (#3685)
- when the class can't be found, or can't be constructed, fallback to
returning the kwargs dict, instead of returning nothing
2025-03-04 14:31:57 -08:00
Nuno Campos ed78174adf Lint 2025-03-04 14:21:18 -08:00
Nuno Campos 5da6971a95 When rehydrating a pydantic module, fallback to returning the kwargs dict
- when the class can't be found, or can't be constructed, fallback to returning the kwargs dict, instead of returning nothing
2025-03-04 14:10:49 -08:00
256e92bfb3 Pregel.config_schema should use config_type directly when present (#3641)
- the previous behavior of re-creating model through config_specs would
lose custom annotations on config_type

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-03-04 16:14:54 -05:00
Vadym BardaandGitHub 3d4e5c0471 sdk-py: fix decode_json in sdk (#3681) 2025-03-04 20:05:16 +00:00
ccurmeandGitHub 013a12334e docs: document langgraph-bigtool (#3682) 2025-03-04 20:03:13 +00:00
ccurmeandGitHub c7211e03e9 docs: fix typo (#3677)
https://platform.openai.com/docs/guides/embeddings#embedding-models
2025-03-04 19:05:56 +00:00
Nuno Campos ffc916e38c 0.3.3 2025-03-04 10:22:01 -08:00
Nuno CamposandGitHub 03bf149ebd Retry condition for resuming flag should apply only to top graphs (#3676) 2025-03-04 10:20:35 -08:00
Nuno Campos 137dcce5b5 Retry condition for resuming flag should apply only to top graphs 2025-03-04 09:51:13 -08:00
JP-EllisandGitHub 48164a95da chore: whitespace cleanup (#3671)
Uncovered while working on #3670. Feel free to close if too minor to
merge.

Signed-off-by: JP-Ellis <josh@jpellis.me>
2025-03-04 23:45:47 +13:00
JP-Ellis 3926e83884 chore(langgraph): fix typing of task decorator
An async function of the form `def foo(P) -> T` has type `Callable[[P],
Awaitable[T]]`. The old type annotations then converted the function
into a `Callable[[P], SyncAsyncFuture[Awaitable[T]]]` which is
incorrect.

The change introduced in this commit updates the type annotations to
ensure the `Awaitable[T]` is correctly unwrapped.

Signed-off-by: JP-Ellis <josh@jpellis.me>
2025-03-04 16:54:53 +11:00
Nuno CamposandGitHub 43709a16bf When retrying a previously attempted run, resume from previous checkpoint (#3668)
- Ignore input if being passed in when a checkpoint already exists for
that run_id
2025-03-03 17:43:11 -08:00
Nuno Campos d98c7248dc Oops 2025-03-03 17:33:27 -08:00
Nuno Campos ac2736f18e When retrying a previously attempted run, resume from previous checkpoint
- Ignore input if being passed in when a checkpoint already exists for that run_id
2025-03-03 17:31:45 -08:00
Tat Dat Duong fc130a52ef fix(sdk-js): stream intermediate values with messages-tuple
We still need intermediate messages to ensure the client state and server state is in-sync as quickly as possible.
2025-03-03 17:19:45 +01:00
Vadym BardaandGitHub 7d025e42ef langgraph: release 0.3.2 (#3649) 2025-02-28 18:13:23 -05:00
Vadym BardaandGitHub 4e9ed36f76 langgraph: unset resuming flag to avoid propagating to subgraphs (#3647) 2025-02-28 23:11:54 +00:00
Vadym BardaandGitHub 5d73df6133 sdk-py: fix docstring for runs.list (#3646)
Fixes #3645
2025-02-28 15:43:49 -05:00
David DuongandGitHub fcc1210945 docs: fix deprecation warning style (#3639)
messed up an indentation that was causing the warning to not render
correctly
2025-02-28 16:34:35 +01:00
Arjun Natarajan da5ee30bef fix deprecation warning style 2025-02-28 10:30:03 -05:00
jessicaouandGitHub 57ff761cff Update Adopters title in menu bar (#3634) 2025-02-28 09:17:14 -05:00
jessicaouandGitHub f0a46bc3e3 Update adopters.md title (#3635) 2025-02-28 09:16:58 -05:00
Vadym BardaandGitHub b1587d24ed docs: update langgraph api constraints (#3633) 2025-02-27 13:59:36 -05:00
Vadym BardaandGitHub a1c676707c cli: update api version (#3632) 2025-02-27 13:57:07 -05:00
Vadym BardaandGitHub 38b19fa99c docs: update README (#3626) 2025-02-27 10:47:20 -05:00
Vadym BardaandGitHub 3c3428da78 docs: update installs in how-tos/tutorials (#3624) 2025-02-27 10:25:31 -05:00
Vadym BardaandGitHub bb0125b4bb ci: re-enable notebook runner on latest version (#3611) 2025-02-27 10:09:57 -05:00
Vadym BardaandGitHub 7580ad6005 langgraph: release 0.3.1 (#3623) 2025-02-27 10:08:02 -05:00
Vadym BardaandGitHub eb8aa6b761 langgraph: add prebuilt dependency (#3622) 2025-02-27 10:07:04 -05:00
Vadym BardaandGitHub fe0de3e07e ci: update release workflow for prebuilt (#3621) 2025-02-27 09:49:15 -05:00
David DuongandGitHub f51831f48e docs: update getting started docs for studio (#3542) 2025-02-27 15:41:52 +01:00
Vadym BardaandGitHub 745eb90a6d prebuilt: remove langgraph dependency (#3620) 2025-02-27 09:41:43 -05:00
Arjun Natarajan f136e40065 fix link 2025-02-26 21:47:32 -05:00
Arjun Natarajan de888b4032 make reference to langsmith a bit cleareR 2025-02-26 21:33:45 -05:00
Arjun Natarajan 7cb0bd52e8 add link to cli 2025-02-26 21:31:33 -05:00
Vadym BardaandGitHub 3778f6113c prebuilt: release 0.1.0 (#3610) 2025-02-26 18:48:03 -05:00
Vadym BardaandGitHub 24c13c211e langgraph: separate prebuilt into a standalone package (#3589) 2025-02-26 18:33:07 -05:00
Vadym BardaandGitHub 2e36189c16 langgraph: release 0.2.76 (#3609) 2025-02-26 16:41:28 -05:00
Arjun Natarajan 302aa8b9cb clean up docs 2025-02-26 15:57:05 -05:00
Vadym BardaandGitHub dac11f875c langgraph: fix get_state(subgraphs=True) for checkpointer=True (#3607) 2025-02-26 20:43:46 +00:00
andrestorres123andGitHub 264be423f9 docs: Add Delve Taxonomy Generator package to the Prebuilt Agents (#3606) 2025-02-26 19:03:51 +00:00
HackHuangandGitHub 9a05600ff9 docs(concepts) : Add a tutorial link for map-reduce (#3577)
Update `low_level.md`: Add a tutorial link for map-reduce, now it's
perfect !!!
2025-02-26 12:23:02 -05:00
Eugene YurtsevandGitHub 56dd728975 docs: remove one more beta (#3601) 2025-02-26 12:22:22 -05:00
Eugene YurtsevandGitHub c157c956f4 docs: prebuilt add github stars (#3603) 2025-02-26 12:22:08 -05:00
Vadym BardaandGitHub dd293dad30 langgraph: release 0.2.75 (#3602) 2025-02-26 11:47:16 -05:00
Vadym BardaandGitHub 30811d7841 langgraph: add py.typed files to modules (#3600) 2025-02-26 16:41:51 +00:00
Vadym BardaandGitHub 28a705b71a docs: update requirements (#3598) 2025-02-26 10:35:16 -05:00
Vadym BardaandGitHub 3b8130b96f docs: add swarm (#3597) 2025-02-26 09:59:29 -05:00
Harrison ChaseandGitHub 94fc0adb05 faq about no langsmith (#3596) 2025-02-26 09:43:28 -05:00
Nuno CamposandGitHub 162e96262f langgraph: stream_mode=messages should not emit input or state messages (#3591)
- any messages seen in inputs in on_chain_start should not be emitted
2025-02-25 19:09:57 -08:00
Nuno Campos 1bb0037450 langgraph: stream_mode=messages should not emit input or state messages
- any messages seen in inputs in on_chain_start should not be emitted
2025-02-25 19:00:33 -08:00
Nuno CamposandGitHub 50c53d3120 checkpoint-sqlite: update aiosqlite bounds (#3540)
aiosqlite 0.21.0 was released on Feb 2

It seems to be a maintenance release:
https://github.com/omnilib/aiosqlite/blob/main/CHANGELOG.md#v0210
2025-02-25 16:56:10 -08:00
Nuno CamposandGitHub 0b7b849633 Update adopters.md to include Cisco Outshift (#3573) 2025-02-25 16:47:52 -08:00
Nuno CamposandGitHub 678eb5cdbe pregel: update validation error messages (#3517)
OK not including as well, but this was useful for troubleshooting as a
new user (especially before there were any examples)
2025-02-25 16:45:57 -08:00
Arjun Natarajan a0969b61a3 add back desktop docs in dedicated section w deprecation warning 2025-02-25 16:08:21 -05:00
Arjun Natarajan e679ab73c4 fix broken docs part 2025-02-25 15:53:23 -05:00
William Fu-Hinthorn b5a981d82d Review 2025-02-25 11:58:01 -08:00
Andrew NguonlyandGitHub bdf1215ced docs: Add docs for DD_API_KEY env var (#3585) 2025-02-25 11:24:59 -08:00
William Fu-Hinthorn f679348327 StreamMode in Join [sdk] 2025-02-25 11:14:38 -08:00
William FHandGitHub cba1852720 Fix typo (#3583) 2025-02-25 18:19:48 +00:00
David DuongandGitHub edf707be51 feat(react): support interrupt_before/after (#3582) 2025-02-25 18:06:25 +01:00
Tat Dat Duong d3b9a96504 feat(react): support interrupt_before/after 2025-02-25 17:57:12 +01:00
David DuongandGitHub 3257e5ae76 fix(docs): remove @langchain/langgraph/web import in branching example (#3580) 2025-02-25 16:18:09 +01:00
Tat Dat Duong bedd0eb286 fix(docs): remove @langchain/langgraph/web import in branching example 2025-02-25 16:11:09 +01:00
David DuongandGitHub 42f0c351fd fix(react): avoid implicitly streaming values if not needed (#3579) 2025-02-25 16:07:41 +01:00
Tat Dat Duong a290984362 fix(react): avoid implicitly streaming values if not needed 2025-02-25 15:58:21 +01:00
David DuongandGitHub f1d6fd184f fix(docs): typo for npm install command (#3578) 2025-02-25 15:53:49 +01:00
Tat Dat Duong 503f716104 fix(docs): typo for npm install command 2025-02-25 15:49:50 +01:00
jessicaouandGitHub b8fafa2795 Update adopters.md to include Cisco Outshift 2025-02-24 18:34:38 -08:00
Nuno Campos 515c34d1ce Fix docs build 2025-02-24 17:14:42 -08:00
Nuno CamposandGitHub 5ea0d49d4d Add docs page on lgp scalability / resilience (#3510) 2025-02-24 16:52:37 -08:00
Andrew NguonlyandGitHub d9f71ef8b3 docs: Add section for Add or Remove GitHub Repositories (#3571) 2025-02-24 16:12:03 -08:00
Eugene YurtsevandGitHub 8658a5dc0b docs: add pregel conceptual doc (#3516)
* Update API Reference for Pregel
* Add conceptual page for Pregel
* The content for the two is very similar at the moment (i.e.,
duplicated content). This is usually a bad sign, but in this case I'm OK
duplicating information along both paths since the underlying algorithm
sets us apart from other implementations.
2025-02-24 17:48:03 -05:00
William FHandGitHub 2afee13d9e Docs on custom routes (#3568) 2025-02-24 11:21:41 -08:00
HackHuangandGitHub f7d9daa4eb docs(multi_agent.md) : Fix some code snippets (#3565)
Hey buddy! You forgot to import the `Command` in some code snippets.
2025-02-24 13:28:56 -05:00
HackHuangandGitHub fb28aa6d4b docs(concepts) : update human_in_the_loop.md (#3558)
Fix the false output result.
2025-02-24 04:52:48 +00:00
jessicaouandGitHub 3488945cdf Update adopters.md to include Klarna (#3560) 2025-02-24 04:39:25 +00:00
Theodore NiandGitHub e6681bc175 Merge branch 'main' into update-aiosqlite-bounds 2025-02-22 06:16:58 -06:00
Sudar Selva Ganesh MandGitHub 57e8081921 chore(docs): make webhooks platform doc more readable (#3551)
1. Provided additional context on webhook usage and setup.
2. Structured supported endpoints into a table for better readability.
2025-02-23 00:17:21 +13:00
Nino RisteskiandGitHub 078b335448 chore(checkpoint): fix typos in README (#3553) 2025-02-22 11:10:09 +00:00
Arjun Natarajan 6615c6bb0d remove other references to desktop
:
2025-02-20 18:16:49 -08:00
Arjun Natarajan 32df0016ee update getting started docs 2025-02-20 18:00:26 -08:00
Vadym BardaandGitHub 39b2bb9c8f update opendeepresearch name (#3541) 2025-02-20 18:16:40 -05:00
5eb793d7d8 Update packages w/ Open Deep Research (#3539)
Here: 
https://github.com/langchain-ai/open_deep_research

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2025-02-20 15:04:11 -08:00
Theodore Ni a9cdb9c948 checkpoint-sqlite: update aiosqlite bounds 2025-02-20 14:51:51 -08:00
David DuongandGitHub 3dac1894cc fix(react): handle non-concatenable messages (#3536) 2025-02-20 21:28:02 +01:00
Tat Dat Duong 1500764b46 fix(react): handle non-concatenable messages 2025-02-20 21:24:00 +01:00
Vadym BardaandGitHub fbb89325f9 langgraph: allow passing config_schema to create_react_agent (#3534) 2025-02-20 19:36:17 +00:00
David DuongandGitHub 187c71a812 feat(react): add interrupt docs (#3533) 2025-02-20 20:10:35 +01:00
Tat Dat Duong b09b33070e feat(docs): add interrupt docs 2025-02-20 20:03:52 +01:00
Vadym BardaandGitHub 31a7bcf750 langgraph: handle non-overlapping subgraph updates in Command.PARENT (#3521) 2025-02-20 13:15:27 -05:00
langchain-infraandGitHub 1a12b0309c docs: add langgraph platform ips (#3528) 2025-02-19 22:52:02 -05:00
infra 660c15d072 docs: add langgraph platform ips 2025-02-19 22:39:54 -05:00
langchain-infraandGitHub 4a59da7cfd docs: add langgraph platform ips (#3527) 2025-02-19 22:27:38 -05:00
infra aacc079eed fmt 2025-02-19 22:23:42 -05:00
langchain-infraandGitHub 3d70a4ed65 Delete libs/cli/langgraph_cli/docker-compose.yaml 2025-02-19 22:16:10 -05:00
infra caad15f7ae docs: add langgraph platform ips 2025-02-19 22:14:29 -05:00
infra 1f4d4e7bfd docs: add langgraph platform ips 2025-02-19 22:14:09 -05:00
David DuongandGitHub 5b0bf861ac feat(react): add interrupts, clean up generic types (#3526) 2025-02-20 03:17:48 +01:00
Tat Dat Duong a69ea47ac2 Bump to 0.0.44 2025-02-20 03:06:11 +01:00
Tat Dat Duong f83d18188f feat(react): add interrupts, clean up generic types 2025-02-20 03:06:10 +01:00
David DuongandGitHub 688efdea3d fix(react): avoid streaming messages if they are not needed (#3525) 2025-02-20 03:05:46 +01:00
David DuongandGitHub 6641dcd3c9 fix(react): output non-abort errors in console, handle bogus message type (#3524) 2025-02-20 02:45:18 +01:00
William FHandGitHub ad14d92f5e [cli] Bump api floor (#3523) 2025-02-20 00:26:15 +00:00
Tat Dat Duong c63fbbfaa6 fix(react): avoid streaming messages if they are not needed 2025-02-20 01:22:08 +01:00
Tat Dat Duong 577b4413a9 fix(react): output non-abort errors in console, handle bogus message type 2025-02-20 01:20:19 +01:00
William FHandGitHub 277c341817 Configure loopback transports (#3522) 2025-02-19 15:58:57 -08:00
mathislindnerandGitHub 88d0f41c55 docs: Update map-reduce-fixed-typo.ipynb (#3509)
fixed a typo:
We will use this an edge in the graph
to 
We will use this as an edge in the graph
2025-02-19 17:28:21 -05:00
Eugene YurtsevandGitHub 0a4953c4bc Update index.md (#3519) 2025-02-19 21:52:17 +00:00
Eugene YurtsevandGitHub 059e16789c docs: fix anchor links (#3518) 2025-02-19 16:48:41 -05:00
Eugene Yurtsev 4dc8f813e7 x 2025-02-19 16:16:14 -05:00
Nuno Campos f613fdfcbc Add sections on postgres and redis 2025-02-19 11:25:56 -08:00
David DuongandGitHub 41b36dcf3f docs: playground studio integration (#3514) 2025-02-19 19:49:37 +01:00
Arjun Natarajan b39dcd7fad pr feedback 2025-02-19 10:43:02 -08:00
Arjun Natarajan c0ad92b6db update title 2025-02-19 10:20:13 -08:00
Eugene YurtsevandGitHub b8d25bc0ed docs build: test api link generation (#3513) 2025-02-19 13:15:53 -05:00
Arjun Natarajan 7884401ec8 docs for playground studio integration 2025-02-19 09:43:21 -08:00
David DuongandGitHub a3bc029344 feat(sdk-js/react): make configurable typed via generics (#3511) 2025-02-19 18:19:51 +01:00
William FHandGitHub 4875973ac5 [CLI] Support http config (#3505)
Right now requires that the file be in one of the local
packages/dependencies.
2025-02-19 08:52:00 -08:00
Tat Dat Duong 15e67fdd57 feat(sdk-js/react): make configurable typed 2025-02-19 17:27:26 +01:00
Nuno Campos 265466184c Add docs page on lgp scalability / resilience 2025-02-19 08:24:36 -08:00
Eugene YurtsevandGitHub 1393270664 concepts: add durable execution to nav (#3508) 2025-02-19 16:04:55 +00:00
Nuno CamposandGitHub 6e0295b4de feat(ci): only run lint/test if files have changed (#3507) 2025-02-19 08:04:42 -08:00
Tat Dat Duong 4aadfccf95 feat(ci): only run lint/test if files have changed 2025-02-19 16:38:35 +01:00
David DuongandGitHub 70b2da1301 fix(docs): add install command for sdk-js/react (#3506) 2025-02-19 16:33:47 +01:00
YkohandGitHub 209864da45 docs: Remove unused imports (#3500)
This PR removes the unused imports Literal and TypedDict from the typing
module.

These imports were not referenced in the code.

```python
from typing import Literal, TypedDict
```
2025-02-19 15:33:13 +00:00
Tat Dat Duong 8b6ef35f0c fix(docs): add install command for sdk-js/react 2025-02-19 16:24:34 +01:00
Eugene YurtsevandGitHub a01537d1a5 docs: concepts durable execution (#3355)
Conceptual page for durable execution
2025-02-19 10:15:26 -05:00
Vadym BardaandGitHub 05b4a30c04 langgraph: optionally add structured_response key to agent state in create_react_agent (#3493) 2025-02-19 15:06:46 +00:00
David DuongandGitHub 93e10fbe15 fix(sdk-js): mark ui-related peer deps as optional (#3503) 2025-02-19 15:53:45 +01:00
Tat Dat Duong f6989f2c7d Bump to 0.0.43 2025-02-19 15:44:03 +01:00
Tat Dat Duong c4f8346479 fix(sdk-js): mark ui-related peer deps as optional 2025-02-19 15:43:36 +01:00
William FHandGitHub 82c9d4b368 Update docstrings for command & send (#3492) 2025-02-19 05:28:45 -08:00
David DuongandGitHub 647f22fdd9 fix(sdk-js): add docs to gitignore path (#3498) 2025-02-19 09:11:19 +01:00
Tat Dat Duong 0aba1b4887 fix(sdk-js): add docs to gitignore path 2025-02-19 09:01:43 +01:00
Eugene YurtsevandGitHub 4c0c52d996 docs: revert changes to api reference generation (#3494)
* Temporarily revert. Need to add unit tests tomorrow and can then
restore
2025-02-19 02:01:03 +00:00
Andrew NguonlyandGitHub 580fe68c8e docs: Update note about LangGraph Deployments view in self-hosted deployment options (#3491) 2025-02-18 17:55:57 -08:00
YkohandGitHub 2f26268ff4 Fix issues in chatbot simulation evaluation tutorial (#3462)
## Description
While following the LangChain tutorial on [chatbot simulation
evaluation](https://langchain-ai.github.io/langgraph/tutorials/chatbot-simulation-evaluation/langsmith-agent-simulation-evaluation/),
I encountered some issues and made the following fixes to ensure proper
functionality:

1. Updated deprecated `run_on_dataset` to `evaluate` to resolve
PydanticUserError
- Following the migration guide:
https://docs.smith.langchain.com/old/evaluation/migration

2. Added missing `langchain_community` import

3. Added required `simulation_utils.py` file to docs directory
- Source:
https://github.com/langchain-ai/langgraph/blob/main/examples/chatbot-simulation-evaluation/simulation_utils.py

## Testing
Successfully ran the `langsmith-agent-simulation-evaluation.ipynb`
notebook without any errors.
2025-02-19 00:26:50 +00:00
Eugene YurtsevandGitHub 84f8a43f6e docs: update measurement id (#3487) 2025-02-19 00:11:34 +00:00
Vadym BardaandGitHub 7ce0e3e15e langgraph: release 0.2.74 (#3489) 2025-02-18 18:56:04 -05:00
Vadym BardaandGitHub 1e6d958434 langgraph: fallback on no-op writer in get_stream_writer (#3488) 2025-02-18 23:53:11 +00:00
Vadym BardaandGitHub 68ba8aa393 docs: add mcp adapters (#3485) 2025-02-18 17:47:55 -05:00
Eugene YurtsevandGitHub e6a0f08561 docs: update prebuilt stub (#3486) 2025-02-18 17:09:33 -05:00
Eugene YurtsevandGitHub f38784a291 ci: remove markddown-exec from docs pipeline (#3482)
This PR removes the following changes:
* notebooks that were converted to markdown
* mkdocs.yml file to reference the ipython notebooks rather than the
markdown files
* Makefile install vercel reverted
* hooks for markdown-exec
* notebook conversion jinja2 templates (for converting notebooks to
markdown exec format)
2025-02-18 16:16:40 -05:00
Nuno CamposandGitHub fc834127fd checkpoint: Fix memory leak in checkpoint serializer (#3481)
- Packer instances can't be kept in memory as they retain memory after
used
2025-02-18 11:56:15 -08:00
Nuno Campos f3a0cbf294 Format 2025-02-18 11:46:48 -08:00
Nuno Campos f4fec76257 checkpoint: Fix memory leak in checkpoint serializer
- Packer instances can't be kept in memory as they retain memory after used
2025-02-18 11:44:26 -08:00
Eugene YurtsevandGitHub 457641f15e docs: remove beta from functional api (#3475) 2025-02-18 13:33:47 -05:00
Eugene YurtsevandGitHub 9f15e15e26 reference: remove incorrect example from pregel class (#3476)
Remove incorrect example from Pregel class. Will follow later this week
with better docs
2025-02-18 13:33:15 -05:00
Yan ZhaoandGitHub cb9989030e Very minor typo in docstring of State -> add_node (#3461)
Hi, I am a student and was going through the tutorial. While trying to
understand the different components by reading the docstring found this
super minor typo 😄 . I hope to contribute more meaningful changes in
future 😸
2025-02-18 13:05:26 -05:00
a008725c06 Ensure remote respects recursion_limit param if it's passed (#3470)
Currently when using RemoteGraph the recursion_limit cannot be set, due
to the sanitize_config.

---------

Co-authored-by: Simon Moxon <simon@together.ly>
Co-authored-by: Vadym Barda <vadim.barda@gmail.com>
2025-02-18 17:49:31 +00:00
a93f17e624 langgraph(prebuilt): allow a PromptTemplate in react agent (#3463)
Currently a ChatPromptTemplate cannot be used as a `prompt` for
`create_react_agent` without complaints from type checkers, although it
is supported by `model` as input.

Add the missing types to remove the warning.

---------

Co-authored-by: vbarda <vadym@langchain.dev>
2025-02-18 17:39:46 +00:00
William FHandGitHub c7eddcc6e3 Add langmem link (#3473) 2025-02-18 08:15:09 -08:00
David DuongandGitHub 4cdad6c206 fix(cli): use '{{json .}}' format instead of 'json' (#3479)
Related to https://github.com/langchain-ai/langgraph/issues/1319
2025-02-18 16:01:38 +01:00
Tat Dat Duong b9fb155d59 Bump to 0.1.52 2025-02-18 15:51:57 +01:00
Tat Dat Duong 8b817a5b16 Fix lint 2025-02-18 15:51:05 +01:00
Tat Dat Duong 3a67f3a3eb fix(cli): use '{{json .}}' format instead of 'json'
Related to https://github.com/langchain-ai/langgraph/issues/1319
2025-02-18 14:58:24 +01:00
Nuno CamposandGitHub 1283539500 Add CONFIG_KEY_RUNNER_SUBMIT (#3474) 2025-02-17 17:42:35 -08:00
Nuno Campos 69ad42cac5 Add CONFIG_KEY_RUNNER_SUBMIT 2025-02-17 17:33:38 -08:00
Nuno CamposandGitHub 264b02e3ad cli: Add support for dependencies in parent directories (#3472)
- Now supporting local dependencies in directories that are not
contained in the docker context (ie. outside the folder containing
langgraph.json)
- This is achieved by passing each parent directorty as an additional
context to docker build
- This makes it a lot easier to build projects contained in monorepos
where you need to include some sibling/parent folder as a dependency
- Also include additional comments in the generated dockerfile to
delimit each section
2025-02-17 17:21:41 -08:00
Nuno Campos b5c659bc9f Resolve 2025-02-17 17:12:06 -08:00
Nuno Campos 4623f7b5da Fix 2025-02-17 17:09:31 -08:00
William Fu-Hinthorn 1641402341 Add sibling dep test 2025-02-17 14:59:13 -08:00
Nuno Campos d03ead2f43 Fix path in assertion 2025-02-17 11:47:38 -08:00
Nuno Campos 5a8624fdfd cli: Add support for dependencies in parent directories
- Now supporting local dependencies in directories that are not contained in the docker context (ie. outside the folder containing langgraph.json)
- This is achieved by passing each parent directorty as an additional context to docker build
- This makes it a lot easier to build projects contained in monorepos where you need to include some sibling/parent folder as a dependency
- Also include additional comments in the generated dockerfile to delimit each section
2025-02-17 11:43:55 -08:00
David DuongandGitHub c44ec55095 fix(docs): broken assistant-ui link (#3467) 2025-02-17 04:50:11 +01:00
Tat Dat Duong 25d682cc9e fix(docs): broken assistant-ui link 2025-02-17 04:38:22 +01:00
Vadym BardaandGitHub 6f37330141 langgraph: release 0.2.73 (#3456) 2025-02-15 16:13:30 -05:00
Vadym BardaandGitHub 1356a0ba42 langgraph: better typing for node functions (#3455) 2025-02-15 21:11:33 +00:00
Nuno Campos 9786be1ff7 Update requirement 2025-02-14 19:01:50 -08:00
Nuno CamposandGitHub c2a129c882 Exclude complex values from checkpoint metadata (#3448) 2025-02-14 18:51:48 -08:00
Nuno Campos 62f004fd28 Lint 2025-02-14 18:42:40 -08:00
Nuno Campos d4b22ac1d4 Fix postgres tests 2025-02-14 18:40:30 -08:00
Nuno Campos 0415c02b40 Fix sqlite tests 2025-02-14 18:34:06 -08:00
Nuno Campos e8665f84e7 Update 2025-02-14 18:31:03 -08:00
Nuno Campos 8ff5e79e70 Lint 2025-02-14 18:27:49 -08:00
Nuno Campos 7f4822931e Update tests 2025-02-14 18:24:48 -08:00
Nuno Campos 9706211aca Exclude complex values from checkpoint metadata 2025-02-14 17:35:14 -08:00
Ben BurnsandGitHub 405da6d507 chore(docs): enable analytics, add consent banner & copyright notice (#3447) 2025-02-15 00:54:31 +00:00
Nuno Campos bf7252cadc checkpoint 2.0.14 2025-02-14 12:28:04 -08:00
Nuno CamposandGitHub e33bac6737 Fix busy loop in AsyncBatchedBaseStore (#3445)
- while loop w asyncio.sleep(0) takes up cpu
2025-02-14 12:12:28 -08:00
Nuno Campos da97d2e1ba Fix 2025-02-14 12:03:03 -08:00
Nuno Campos 6baf320d8e Fix 2025-02-14 10:43:03 -08:00
Nuno Campos a064ccdca1 Lint 2025-02-14 10:40:09 -08:00
Nuno Campos b5479b48bf Lint 2025-02-14 10:39:34 -08:00
Nuno Campos 9dbcb03185 Fix busy loop in AsyncBatchedBaseStore
- while loop w asyncio.sleep(0) takes up cpu
2025-02-14 10:36:02 -08:00
Eugene YurtsevandGitHub f2faa39ca9 add api reference for Pregel (#3437) 2025-02-13 21:07:43 -05:00
Eugene YurtsevandGitHub b4f6cdf01f docs: remove astream events from streaming conceptual guide (#3438) 2025-02-13 21:07:30 -05:00
Vadym BardaandGitHub cd976e779d docs: update stateless runs how-to guide (#3439) 2025-02-13 20:27:02 -05:00
Eugene YurtsevandGitHub c1f337f50b docs: add check code output for result="ansi" (#3435)
* Add ast parsing to determine whether we should include result="ansi".
It's not meant to be perfect, but will hopefully catch the most common
cases. Still requires manual review.
* Ideally we could suppress output in markdown-exec in the future.
2025-02-14 01:07:40 +00:00
David DuongandGitHub 31d3ceaf6d feat(sdk-js): bump to 0.0.42 (#3436) 2025-02-13 16:27:04 -08:00
Tat Dat Duong a48844632d feat(sdk-js): bump to 0.0.42 2025-02-13 16:17:02 -08:00
Eugene YurtsevandGitHub 437891aa4f docs: handle more links (#3434) 2025-02-13 23:43:29 +00:00
Eugene YurtsevandGitHub 3e1bbd3123 docs: cell magic to shell block conversion (#3433)
* add handling for blocks that use magic commands like %pip to convert
them into bash
* Apply new logic to another notebook
2025-02-13 18:23:49 -05:00
Eugene YurtsevandGitHub 9111449ffd docs: handle input() and cell magic for notebook conversion (#3432) 2025-02-13 22:29:32 +00:00
Eugene YurtsevandGitHub 77d7c00ce8 docs: fix up edge cases with links in notebooks (#3414)
* Adds another notebook conversion
* Fix up some edge cases for handling links in notebooks. Notebooks
links were using a different convention than markdown links.

We'll need to push additional logic to use an appropriate suffix (.md or
.ipynb) for cross-references between how-to guides (though these should
be rare).
2025-02-13 15:33:55 -05:00
Eugene YurtsevandGitHub 91725d742d docs: add unit tests to build pipeline (#3427)
* Add testing step to to docs build pipeline
* Requires updating import structure in some place
* Add simple unit test to cover some logic with highlights
2025-02-13 15:32:42 -05:00
David DuongandGitHub d73a4539ec feat(sdk-js): add docs for new useStream hook (#3420)
- **Add basic docs**
- **Add docs**
- **feat(sdk-js): add docs, how-to guide**
2025-02-13 11:32:03 -08:00
Nuno CamposandGitHub 15e2df6da5 Add LGP Arch page (#3428) 2025-02-13 11:22:29 -08:00
Tat Dat Duong ce6b396186 Update index page as well 2025-02-13 11:16:32 -08:00
Tat Dat Duong d2ab02edf1 Add shoutout to CopilotKit and assistant-ui 2025-02-13 11:15:45 -08:00
Nuno Campos 0aef9424a8 Add link 2025-02-13 11:12:49 -08:00
Nuno Campos ed23288e5b Add LGP Arch page 2025-02-13 11:09:31 -08:00
Tat Dat Duong 7ec8a4cb4d Update type definitions 2025-02-13 10:57:00 -08:00
David DuongandGitHub 2d9ca3045e feat(sdk-js): expose branches (#3426) 2025-02-13 10:45:01 -08:00
David DuongandGitHub b065c54871 feat(sdk-js): make "messages" the default key (#3425) 2025-02-13 10:39:17 -08:00
Tat Dat Duong 3c0a677c90 feat(sdk-js): make "messages" the default key 2025-02-13 10:36:22 -08:00
Tat Dat Duong 7e4852373d Fix broken links 2025-02-13 10:23:11 -08:00
Tat Dat Duong 422b2ba7f0 Update docs 2025-02-13 10:18:09 -08:00
Tat Dat Duong 2c66ac869d feat(sdk-js): expose branches 2025-02-13 10:17:42 -08:00
Matt SteadmanandGitHub 1ef7121100 docs: Fix grammar in LangGraph Glossery (#3407) 2025-02-13 13:05:54 -05:00
William FHandGitHub a53287f3d8 Clarify custom auth <-> deployment options (#3423) 2025-02-13 17:38:38 +00:00
Vadym BardaandGitHub da96925ecb ci: install mkdocs-insiders only for internal PRs (#3422) 2025-02-13 12:24:30 -05:00
Tat Dat Duong f3403eab48 Add link ref 2025-02-13 07:55:46 -08:00
Tat Dat Duong 208d9d165d feat(sdk-js): add docs, how-to guide 2025-02-13 07:44:01 -08:00
Tat Dat Duong 49c74dd569 Add docs 2025-02-13 07:12:15 -08:00
Tat Dat Duong 2d97af57f8 Add basic docs 2025-02-13 07:08:35 -08:00
b310ce07bc docs: add scripts for notebook conversion (#3406)
* Update notebook conversion code
* Convert one more file

---------

Co-authored-by: Ben Burns <803016+benjamincburns@users.noreply.github.com>
2025-02-13 06:48:27 +00:00
Vadym BardaandGitHub 65976f311f langgraph: release 0.2.72 (#3413) 2025-02-13 00:14:54 -05:00
Nuno CamposandGitHub 80c9d61fbd langgraph: fix None handling for pydantic state updates (#3411) 2025-02-12 21:05:02 -08:00
ZapironandGitHub a578c7b137 docs: fix grammatical error for navigating node to parent section (#3356)
Add within to better explain moving from one subgraph to another
2025-02-12 23:59:59 -05:00
vbarda 04e8342d97 pydantic v1 2025-02-12 20:46:12 -08:00
vbarda b0e11ae524 update 2025-02-12 20:02:26 -08:00
Vadym BardaandGitHub d45253cee8 checkpoint: release libraries (#3412) 2025-02-12 22:44:44 -05:00
Vadym BardaandGitHub 1377e3b6ba checkpoint: combine metadata when writing checkpoints (#3404) 2025-02-13 03:24:41 +00:00
vbarda c36323cba8 3.9 2025-02-12 19:17:05 -08:00
148cf52981 chore(docs): notebook convert script + 1 conversion (#3390)
* Adds a conversion script from ipython notebook to markdown.
* Replaces one ipython notebook (create react agent) with a markdown file for testing.

---------

Co-authored-by: Ben Burns <803016+benjamincburns@users.noreply.github.com>
2025-02-13 02:38:15 +00:00
Eugene YurtsevandGitHub 9010303245 docs: add update prebuilt on docs deploy (#3410)
logic executed on every PR which involves a network request per package
to download stats from pypi.
2025-02-12 20:59:15 -05:00
vbarda 661476e88d langgraph: fix None handling for pydantic state updates 2025-02-12 17:53:12 -08:00
3397d8908f docs: adding Breeze Agent for third party agent page (#3352)
Adding open source web researcher agent to the third party page

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Eugene Yurtsev <eugene@langchain.dev>
2025-02-12 20:15:22 -05:00
Nuno Campos e005f0472b sdk-js 0.0.40 2025-02-12 16:53:02 -08:00
David DuongandGitHub 18a1d60e45 feat(sdk-js): further 2x improvement when SSE (#3408) 2025-02-12 16:09:18 -08:00
Tat Dat Duong 5091d5e9fe Remove ts-node 2025-02-12 15:56:01 -08:00
Tat Dat Duong da1fae0c72 Cleanup 2025-02-12 15:55:10 -08:00
Tat Dat Duong 7db81d72dc Cleanup 2025-02-12 15:55:10 -08:00
Tat Dat Duong 4ce387ee28 test 2025-02-12 15:55:09 -08:00
Nuno CamposandTat Dat Duong b902db686d Speed up! 2025-02-12 15:55:07 -08:00
Nuno CamposandGitHub 16be48079e fix(sdk-js): improve SSE parsing performance by 10x (#3401) 2025-02-12 10:08:46 -08:00
Eugene YurtsevandGitHub cf3a9ad63e docs: add timeout to docs delpoy workflow (#3402) 2025-02-12 13:04:06 -05:00
David DuongandGitHub 547830ef24 feat(sdk-js): add experimental useStream hook (#3361)
Experimental `useStream` React hook to make streaming as simple as
possible. Supports branching / forking, message-tuple stream mode for
rendering messages.

Usage: https://github.com/langchain-ai/langchain-nextjs-template/pull/62
2025-02-12 09:39:02 -08:00
Tat Dat Duong d333e52fce Simplify types for additional kwargs 2025-02-12 09:16:07 -08:00
Tat Dat Duong 15fe44ddf8 Update deps 2025-02-12 09:13:10 -08:00
Tat Dat Duong b6aff521e5 Make event listeners a callback 2025-02-12 09:11:44 -08:00
Eugene YurtsevandGitHub 35ff9f5211 docs: add script to add typescript translations (#3394)
A script to add typescript translations. We can improve by automatically
adding markdown tabs appropriately and parallelizing the llm calls
2025-02-12 12:07:05 -05:00
Tat Dat Duong d690fc3e00 Bump to 0.0.39 2025-02-12 08:52:25 -08:00
Tat Dat Duong 3325787af7 fix(sdk-js): improve SSE parsing performance by 10x 2025-02-12 08:51:53 -08:00
Tat Dat Duong 77a3cffa7f Allow omitting client 2025-02-12 08:50:01 -08:00
Ben BurnsandGitHub d1f2a6c518 chore(docs): update markdown-exec to end sessions after each page (#3391) 2025-02-11 21:28:30 +00:00
Eugene YurtsevandGitHub b984584851 docs: revert accidental changes to glossary (#3389) 2025-02-11 21:09:03 +00:00
bce4545021 docs: vcr only set up for markdown (#3339)
- PR branch for testing w/ typescript (@benjamincburns )
- implementation needs better cache invalidation for the cassettes
(@eyurtsev)

---------

Co-authored-by: Ben Burns <803016+benjamincburns@users.noreply.github.com>
2025-02-11 15:38:17 -05:00
Vadym BardaandGitHub 29c317887d langgraph: release to 0.2.71 (#3388) 2025-02-11 14:06:04 -05:00
Vadym BardaandGitHub 84a0eca935 langgraph: allow passing destinations to .add_node (#3384) 2025-02-11 19:01:45 +00:00
Tat Dat Duong d9ed1ef52e Branching 2025-02-11 10:10:54 -08:00
Vadym BardaandGitHub fda79e00ce docs: update typo in a tool (#3385)
Fixes #3383
2025-02-11 13:08:33 -05:00
Tat Dat Duong 3163a60466 Fix typo 2025-02-11 09:58:19 -08:00
Tat Dat Duong ac05955222 Update peer dependencies 2025-02-11 09:09:08 -08:00
Tat Dat Duong f3fe30380c Make sure we clear when switching threads 2025-02-11 09:01:53 -08:00
Tat Dat Duong 2c5ddceeb1 Add submit / stop 2025-02-11 09:01:53 -08:00
Tat Dat Duong 98976e016a Prevent double Error: Error 2025-02-11 09:01:52 -08:00
Tat Dat Duong ea8025b719 Add other stream parameters 2025-02-11 09:01:52 -08:00
Tat Dat Duong 735a76a16c Clean up the API 2025-02-11 09:01:52 -08:00
Tat Dat Duong a33437964c Add debugger, that is not exported 2025-02-11 09:01:52 -08:00
Tat Dat Duong cb9405bcee Allow update: null 2025-02-11 09:01:52 -08:00
Tat Dat Duong bd2268404c Update types 2025-02-11 09:01:51 -08:00
Tat Dat Duong 25f88740c1 feat(sdk-js): add experimental useStream hook 2025-02-11 09:01:51 -08:00
David DuongandGitHub e9809ae9c1 feat(sdk-js): strongly-typed messages, state/update-type, stream mode (#3360)
StateType, UpdateType is set on the Client rather than on
`RunsClient.stream` because of lack of partial type arguments
application.

This PR also describes the message serialization format emitted by
LangGraph Server (which may change ie. converting `type` to `role`).
Avoiding direct import of `@langchain/core` for the core LangGraph SDK
client, thus these types were copied from `@langchain/core` (a script is
used to aid with keeping track with core)
2025-02-11 08:56:02 -08:00
Tat Dat Duong 69311a4135 Add feedback stream event 2025-02-11 08:45:15 -08:00
Tat Dat Duong bb3193c83e fix(sdk-js): non-ok response is not throwing anymore 2025-02-11 08:45:15 -08:00
Tat Dat Duong 7a2eb614dc Add ErrorStreamEvent 2025-02-11 08:45:14 -08:00
Tat Dat Duong 7fd6931200 Cleanup types 2025-02-11 08:45:14 -08:00
Tat Dat Duong cbca07e3db Rename to more sane event type 2025-02-11 08:45:14 -08:00
Tat Dat Duong 066525b335 Update content 2025-02-11 08:45:14 -08:00
Tat Dat Duong a1dad43602 feat(sdk-js): strongly-typed messages, state/update-type, stream mode 2025-02-11 08:45:14 -08:00
Vadym BardaandGitHub 1e8f097656 docs: update prebuilt page w/ autogenerated info (#3381) 2025-02-11 09:27:01 -05:00
Brace SproulandGitHub db26c915a9 fix(sdk-js): Export types (#3377) 2025-02-10 18:02:42 -08:00
bracesproul 9b62280fc5 bump dep 2025-02-10 17:47:07 -08:00
bracesproul 515ad8d7a6 fix(sdk-js): Export types 2025-02-10 17:30:19 -08:00
David DuongandGitHub d378f0e06a fix(sdk-js): use type instead of interface to avoid TS errors (#3358)
Allow assigning `threadState?.checkpoint` to the `configurable` object
without TSC throwing "Index signature for type 'string' is missing in
type".
2025-02-10 13:30:25 -08:00
Vadym BardaandGitHub 740870df65 docs: ignore more links in url checker (#3374) 2025-02-10 15:27:58 -05:00
Vadym BardaandGitHub 6e20c9f3f9 docs: update codespell config (#3373) 2025-02-10 14:35:07 -05:00
Vadym BardaandGitHub 530544234a docs: add missing file (#3371) 2025-02-10 12:49:10 -05:00
Vadym BardaandGitHub f11d241482 docs: add adopters page (#3370) 2025-02-10 12:32:14 -05:00
William FHandGitHub e81979827f Support index embed specification via string (#3317)
So you can do

```
from langgraph.store.memory|posgres|etc. import InMemoryStore

InMemoryStore(index={"embed": "openai:text-embedding-3-small"})
```
2025-02-09 02:09:10 +00:00
Tat Dat Duong 2064ea4793 fix(sdk-js): use type instead of interface to avoid TS errors
Allow assigning `threadState?.checkpoint` to the `configurable` object without TSC throwing "Index signature for type 'string' is missing in type".
2025-02-08 10:32:28 -08:00
Brace SproulandGitHub 16cfeff78c release(sdk-js): 0.0.37 (#3354) 2025-02-07 12:44:55 -08:00
bracesproul 4321d337d6 release(sdk-js): 0.0.37 2025-02-07 12:35:51 -08:00
Brace SproulandGitHub d56e2545a6 fix(sdk-js): Remove default fetch timeout (#3353) 2025-02-07 12:34:32 -08:00
bracesproul 9a3f96c459 fix(sdk-js): Remove default fetch timeout 2025-02-07 12:17:34 -08:00
LaelandGitHub cb509ad6a5 Update application_structure.md (#3278)
moved requirements.txt to root of the project in the recommended
structure
2025-02-07 15:14:51 -05:00
Vadym BardaandGitHub e479a2c643 docs: update packages.yml (#3351) 2025-02-07 15:12:00 -05:00
Vadym BardaandGitHub 0caae32a40 docs: expose langgraph-supervisor (#3350) 2025-02-07 14:29:41 -05:00
Vadym BardaandGitHub a6b8098548 cli: release 0.1.71 (#3342) 2025-02-06 17:51:48 -05:00
Vadym BardaandGitHub 0631f19ef9 langgraph: release 0.2.70 (#3341) 2025-02-06 17:50:08 -05:00
Eugene YurtsevandGitHub e9b0bc4d3b cli: patch to convert graphs paths to posix (#3318)
* Convert graph paths to POSIX for docker.
* Will set up windows build in a separate PR (some issue w/ pulling down
the image) https://github.com/langchain-ai/langgraph/pull/3271
* Fix for https://github.com/langchain-ai/langgraph/issues/2061
2025-02-06 17:29:57 -05:00
Vadym BardaandGitHub eb19b80d13 langgraph: add agent name to AI messages in create_react_agent (#3340) 2025-02-06 17:24:53 -05:00
Nuno CamposandGitHub e5ccdd91c2 fix(langgraph): Dedupe input (right-side) messages in add_messages (#3338)
Port: https://github.com/langchain-ai/langgraphjs/pull/846
2025-02-06 13:25:20 -08:00
jacoblee93 871f15a630 Merge branch 'jacob/dedupe' of github.com:langchain-ai/langgraph into jacob/dedupe 2025-02-06 11:52:29 -08:00
jacoblee93 32aa87d4b2 Add test 2025-02-06 11:52:13 -08:00
Nuno Campos 55a3352e9b One more 2025-02-06 11:34:45 -08:00
Nuno Campos 6adaa6cf78 Fix up 2025-02-06 11:33:54 -08:00
Vadym BardaandGitHub 28172a2767 langgraph: allow setting custom names for compiled graph / compiled state graph (#3337) 2025-02-06 19:33:02 +00:00
jacoblee93 028137a51a Format 2025-02-06 11:28:10 -08:00
jacoblee93 c3847fae6c Dedupe input (right-side) messages in add_messages 2025-02-06 11:26:15 -08:00
William FHandGitHub 3daa4ae466 Update name to InMemorySaver (#2044)
(Keep MemorySaver around for backwards compatibility)

"MemorySaver" is ambiguous: is it saving memories? Where is it saving
memories to?

InMemorySaver aligns naming InMemoryStore as well as similar LangChain
objects (InMemoryVectorStore, etc.)
2025-02-05 22:04:25 -08:00
Doros Doru-LucianandGitHub 6a36f4bf91 docs: add forgotten MemorySaver in full code (#3321) 2025-02-05 20:58:17 -05:00
Eugene YurtsevandGitHub 04a0443742 ci: swap order of llms full and site build (#3315) 2025-02-04 22:16:39 +00:00
Eugene YurtsevandGitHub 3b224df566 publish llms text (#3313)
just includes llms-full
2025-02-04 21:56:33 +00:00
Vadym BardaandGitHub 0a2e2b4796 docs: fix typo (#3312) 2025-02-04 16:22:55 -05:00
Eugene YurtsevandGitHub 0e0b3ffac5 Update plans.md (#3311) 2025-02-04 20:45:54 +00:00
Eugene YurtsevandGitHub 75509bd221 docs: generate llms text (#3243)
```shell
python docs/_scripts/generate_llms_text.py llms_text.md
```
2025-02-04 20:30:26 +00:00
William FHandGitHub f997e5eafd Update inv file (#3308)
https://mkdocstrings.github.io/reference/handlers/base/
2025-02-04 11:45:59 -08:00
Eugene YurtsevandGitHub 6337c62dc7 Update prebuilt.md (#3306) 2025-02-04 18:46:57 +00:00
Eugene YurtsevandGitHub 59992fac7c Update create_third_party_page.py (#3307) 2025-02-04 18:44:18 +00:00
Eugene YurtsevandGitHub 28a7ca03a9 docs: publish prebuilt page (#3305)
Publish prebuilt page
2025-02-04 18:26:25 +00:00
TanushreeandGitHub 9fe61a42d2 Adding interrupt banner (#3295) 2025-02-03 18:57:17 -08:00
Marcello MaugeriandGitHub 59ae3b873c Fix typo in quick_start.md (#3297) 2025-02-03 18:51:27 -05:00
Vadym BardaandGitHub 31ba5c41ac docs: use full path for the upload artifact (#3293) 2025-02-03 15:33:50 -05:00
Vadym BardaandGitHub 6ddbdd0638 docs: add vercel build (#3290) 2025-02-03 20:13:58 +00:00
William FHandGitHub 3f7f52ccdc Docs links fix (#3292) 2025-02-03 10:57:38 -08:00
William FHandGitHub ee9a34f726 Update license key troubleshooting (#3157) 2025-02-03 18:09:05 +00:00
Eugene YurtsevandGitHub 72ce34e3e6 docs: add 3rd party packages scaffold (#3263)
* Adds scaffolding for 3rd party packages. Not published yet.
2025-02-03 17:21:30 +00:00
Vadym BardaandGitHub 098d5ec403 langgraph: update RunnableLike to support injected kwargs (#3288)
Fixes #3257
2025-02-03 11:25:20 -05:00
Vadym BardaandGitHub 45ef425d85 docs: update command how-to (#3280) 2025-02-03 09:29:45 -05:00
8c192414a2 docs: Update Hierarchial Multi Agent Example (#3282)
Was trying to learn the Multi Agent Workflow examples and encountered
some errors, which I fixed by editing these:

* Added missing state for Team1, and importing `Command`
* `ValueError: Node `LangGraph` already present.`: Seems to happen we
add the `team_1_graph` node without giving it a name, it will default to
the name `LangGraph`. Solved by giving the sub-graph a name when
building the top-level supervisor.
* Added the edges for the graph to feedback to the top level supervisor
to decide whether it still needs to relegate the task to other nodes or
end from there

---------

Co-authored-by: Vadym Barda <vadim.barda@gmail.com>
2025-02-03 09:29:19 -05:00
Vadym BardaandGitHub c0db7f4d09 docs: revamp streaming how-to guides + update redirects (#3274) 2025-01-31 18:04:51 -05:00
072f2d43eb docs: add graph API basics section (#3228)
![Screenshot 2025-01-30 at 3 53
05 PM](https://github.com/user-attachments/assets/c97018ea-38ff-4b38-96df-55c6d7f926f3)

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2025-01-31 17:41:56 -05:00
Andrew NguonlyandGitHub c02a74e221 docs: Add Excalidraw file for LangGraph Cloud architecture diagram (#3272) 2025-01-31 14:07:12 -08:00
Vadym BardaandGitHub 15af8a9e6c Revert "docs: revamp streaming how-to guides (#3239)" (#3270)
This reverts commit d5b0ad2cf6.
2025-01-31 15:52:58 -05:00
Vadym BardaandGitHub 1b257b4d0a ci: disable autogen notebook in the runner (#3269) 2025-01-31 15:44:03 -05:00
Vadym BardaandGitHub 384814036e docs: update other frameworks how-to (#3264) 2025-01-31 20:23:41 +00:00
Vadym BardaandGitHub d5b0ad2cf6 docs: revamp streaming how-to guides (#3239) 2025-01-31 15:14:26 -05:00
ccurmeandGitHub 8d8e514924 langgraph[patch]: rename parameter (#3268)
Rename `tool_call_parallelism` (has not been released yet).
2025-01-31 19:36:55 +00:00
a37c4d6f49 langgraph[patch]: allow ToolNode to accept ToolCalls (#3126)
Alternative to https://github.com/langchain-ai/langgraph/pull/3124

Currently if a tool interrupts, the entire tool node executes again
after resuming. So tools can get executed twice if parallel tool calls
are generated. Here we allow ToolNode to accept tool calls, so we can
use the `Send` API to distribute the tool calls to multiple instances of
the tool node.

```python
from langchain_anthropic import ChatAnthropic
from langchain_core.tools import tool
from langgraph.checkpoint.memory import MemorySaver
from langgraph.prebuilt import create_react_agent
from langgraph.types import Command, Send, interrupt


@tool
def human_assistance(query: str) -> str:
    """Request assistance from a human."""
    human_response = interrupt({"query": query})
    return human_response["data"]


@tool
def get_weather(location: str) -> str:
    """Use this tool to get the weather."""
    return "It's sunny!"


tools = [get_weather, human_assistance]
llm = ChatAnthropic(model="claude-3-5-sonnet-20240620")

agent = create_react_agent(
    llm,
    tools,
    checkpointer=MemorySaver(),
    tool_call_parallelism="parallel_tool_nodes",
)


user_input = (
    "Could you please (1) request assistance for building an AI agent "
    "from a human, and (2) search for the weather in Boston, MA? "
    "Generate two tool calls at once."
)

config = {"configurable": {"thread_id": "1"}}

for event in agent.stream(
    {"messages": [{"role": "user", "content": user_input}]},
    config,
    stream_mode="values",
):
    event["messages"][-1].pretty_print()
```
```
...
```
```python
human_response = "You should check out LangGraph to build your agent."
human_command = Command(resume={"data": human_response})

for event in agent.stream(human_command, config, stream_mode="values"):
    event["messages"][-1].pretty_print()
```

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2025-01-31 17:20:59 +00:00
Vadym BardaandGitHub 4b3e07b67a langgraph: release 0.2.69 (#3256) 2025-01-30 19:56:20 -05:00
Nuno CamposandGitHub 6ba61cc768 Guard and cache calls to find_subgraph_pregel (#3255)
- The result of these doesnt change once a node is created, and it's
fairly expensive to run, so great thing to cache
- There's a variety of errors that can come from inspecting the source
code of a function (part of what this does) so adding a catch-all
try-except block as this should be best-effort, not crash your graph
2025-01-30 16:37:42 -08:00
Nuno Campos 5a79210904 Lint 2025-01-30 16:28:03 -08:00
Nuno Campos 4a60eaf32f Guard and cache calls to find_subgraph_pregel
- The result of these doesnt change once a node is created, and it's fairly expensive to run, so great thing to cache
- There's a variety of errors that can come from inspecting the source code of a function (part of what this does) so adding a catch-all try-except block as this should be best-effort, not crash your graph
2025-01-30 16:26:23 -08:00
Vadym BardaandGitHub cf7c3e7fd1 docs: update README to include built w/ langgraph (#3254) 2025-01-30 22:13:06 +00:00
Vadym BardaandGitHub 141b53ee6e docs: add reference file for config (#3253) 2025-01-30 16:58:00 -05:00
37e8e00f1f When using Command.PARENT also pass existing subgraph state to parent graph (#3134)
Co-authored-by: Vadym Barda <vadym@langchain.dev>
2025-01-30 15:54:44 -05:00
Vadym BardaandGitHub a0ec9017f2 langgraph: add get_stream_writer() (#3251)
Alternative to #3250
2025-01-30 20:45:44 +00:00
Eugene YurtsevandGitHub 80cef60405 docs: concepts update (#3248) 2025-01-30 16:32:17 +00:00
Vadym BardaandGitHub 46cba763be docs: small README update (#3244) 2025-01-29 17:46:32 -05:00
Vadym BardaandGitHub 830e5f4550 docs: update README (#3242) 2025-01-29 22:33:32 +00:00
Vadym BardaandGitHub 55e9409b6e docs: update multi-agent multi-turn how-to (#3241) 2025-01-29 22:28:03 +00:00
Vadym BardaandGitHub 39e65a1a62 langgraph: expose tags in the metadata for streamed message chunks (#3238) 2025-01-29 20:24:32 +00:00
Vadym BardaandGitHub 82148e9bf2 docs: update streaming docstring for Pregel and expose in api ref (#3229) 2025-01-29 12:07:07 -05:00
Harsh NevseandGitHub ed09a77d9f Update multi-agent-collaboration.ipynb (#3233)
grammar
2025-01-29 11:48:54 -05:00
William FHandGitHub 7e267897c9 Update auth file paths in build/up (#3231) 2025-01-29 05:09:10 -08:00
Andrew NguonlyandGitHub d279902156 docs: Add LangSmith Integration section for Cloud SaaS concepts (#3230) 2025-01-28 13:27:51 -08:00
Eugene YurtsevandGitHub 440158b969 Update functional_api.md (#3227) 2025-01-28 17:57:01 +00:00
0cf3a64d66 Do not inject args in RunnableCallable if arg already exists (#3185)
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-01-28 12:48:33 -05:00
Vadym BardaandGitHub 953e2907d4 docs: remove MessageGraph from concepts doc (#3226) 2025-01-28 10:16:54 -05:00
Vadym BardaandGitHub 0a861815b7 docs: replace 'state_modifier' with 'prompt' (#3190) 2025-01-28 02:51:40 +00:00
Eugene YurtsevandGitHub 928126f2d7 docs: functional api concepts paraphrase (#3223) 2025-01-27 21:26:13 -05:00
Vadym BardaandGitHub 0d8fea847a langgraph: release 0.2.68 (#3224) 2025-01-27 21:08:06 -05:00
Eugene YurtsevandGitHub b4dc3a851f functional api: remove generator support (#3220)
Remove generator support in entrypoint.
2025-01-27 19:42:35 -05:00
Vadym BardaandGitHub 7568862013 langgraph: more unittests for functional API (#3221) 2025-01-28 00:41:15 +00:00
Andrew NguonlyandGitHub 69dc5f326e docs: Add section for Automatic Deletion of LangGraph Cloud SaaS deployments (#3222) 2025-01-27 15:42:36 -08:00
90f1e66748 docs: functional api (#3125)
* Concepts page for the functional API
* How-to guides that show functional API implementations
* API reference for entrypoint, task, entrypoint.final
* Add functional API version to the workflows

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
Co-authored-by: ccurme <chester.curme@gmail.com>
2025-01-27 16:31:43 -05:00
Vadym BardaandGitHub a910a1a341 langgraph: actually fix flaky test (#3219) 2025-01-27 16:06:31 -05:00
Vadym BardaandGitHub 554e763994 langgraph: use 'prompt' param for model input preprocessing in create_react_agent (#3173) 2025-01-27 19:03:01 +00:00
Vadym BardaandGitHub adff1df813 langgraph: fix flaky test (#3218) 2025-01-27 13:11:17 -05:00
Vadym BardaandGitHub 64b828def6 langgraph: handle task naming for reused class methods (#3216) 2025-01-27 17:05:39 +00:00
Jacob LeeandGitHub 9196cc2da8 docs: Fix broken links in README (#3211) 2025-01-27 09:15:17 -05:00
David DuongandGitHub e13a8bc320 fix: missing pgvector in CLI (#3165)
Fixes https://github.com/langchain-ai/langgraph/issues/3164
2025-01-25 04:27:42 +01:00
Tat Dat Duong 4b5b309152 Bump to 0.1.69 2025-01-25 04:18:18 +01:00
Tat Dat Duong 9d5166a0d3 Fix tests 2025-01-25 04:16:52 +01:00
Nuno CamposandGitHub 5b11683f4e Fix type hints for entrypoint decorator (#3198) 2025-01-24 15:07:21 -08:00
Vadym BardaandGitHub 3fae8d47c3 langgraph: handle more callable types in tasks (#3203) 2025-01-24 22:50:42 +00:00
Nuno Campos be9cb03dfa Lint 2025-01-24 13:51:16 -08:00
Vadym BardaandGitHub 6926c4bcc0 langgraph: add names for tasks (#3202) 2025-01-24 21:42:54 +00:00
Nuno Campos c04802a344 Fix type hints for entrypoint decorator 2025-01-24 09:31:27 -08:00
Nuno CamposandGitHub cf7f6691cf Improve typings for task, it now returns a mixed sync/async future protocol (#3186)
- note this type is never instantiated, it is only used for typing (we
cannot make it a protocol as it inherits from concurrent.futures.Future)
2025-01-24 09:19:51 -08:00
Vadym BardaandGitHub e1140f4fad ci: always test notebooks on all library versions (#3191) 2025-01-23 22:26:32 -05:00
Eugene YurtsevandGitHub ae8afb7677 reference: document entrypoint more (#3189)
add more documentation to the entrypoint primitive
2025-01-23 22:17:20 -05:00
Vadym BardaandGitHub 48040d8ea5 ci: run notebooks in 'development' for PRs (#3188) 2025-01-23 21:59:03 -05:00
Vadym BardaandGitHub ad51bfdf71 ci: only test changed notebooks using 'development' version of the library (#3187) 2025-01-23 21:41:47 -05:00
Nuno Campos 996b120613 Undo 2025-01-23 16:59:27 -08:00
Nuno Campos 1093dd55c8 Improve typings for task, it now returns a mixed sync/async future protocol
- note this type is never instantiated, it is only used for typing (we cannot make it a protocol as it inherits from concurrent.futures.Future)
2025-01-23 16:57:34 -08:00
Nuno CamposandGitHub d794875b32 Undo change to test watch mode (#3184) 2025-01-23 16:54:03 -08:00
Nuno Campos 6948cf5eb8 Undo change to test watch mode 2025-01-23 16:18:53 -08:00
Nuno CamposandGitHub bacc2955ae Remove implementation of get_graph for @entrypoint (#3183) 2025-01-23 15:48:22 -08:00
Nuno Campos f014d96d1c Remove implementation of get_graph for @entrypoint 2025-01-23 15:39:36 -08:00
RadiandGitHub 7b552ebf4b Update tool-calling.ipynb (#3178)
Typo fix
2025-01-23 18:02:43 -05:00
Vadym BardaandGitHub 1e61ddfdbe langgraph: release 0.2.67 (#3182) 2025-01-23 18:01:43 -05:00
Vadym BardaandGitHub d34846dc08 docs: fix a hub prompt (#3180) 2025-01-23 17:21:37 -05:00
Vadym BardaandGitHub 06823e327f langgraph: update docstrings/api ref for functional api (#3176) 2025-01-23 16:48:55 -05:00
Vadym BardaandGitHub 1059ef55d1 langgraph: handle node return annotations with unions (#3170) 2025-01-23 14:41:22 -05:00
39552255c8 langgraph: add support for BaseModel updates to Command (#2747)
Simple update that adds support for the `update` attribute of the
`Command` class to support Pydantic `BaseModel` type.

LangGraph already supports [Pydantic models for graph
states](https://langchain-ai.github.io/langgraph/how-tos/state-model/).

Extending support to the `update` attribute allows users to pass custom
BaseModel instances. Additionally, updates defined as `BaseModel` types
are type-validated when created.

https://github.com/langchain-ai/langgraph/issues/2804

---------

Co-authored-by: vbarda <vadym@langchain.dev>
2025-01-23 14:31:44 -05:00
Vadym BardaandGitHub 38bbe67469 langgraph: remove print (#3167) 2025-01-23 11:24:18 -05:00
Nuno CamposandGitHub 6335963674 Make scratchpad counters thread-safe (#3158)
- Same solution as used in python stdlib to name threads and asyncio
tasks
2025-01-23 07:37:04 -08:00
Nuno Campos 8a4c452317 Make test less flaky 2025-01-23 07:27:34 -08:00
Eugene YurtsevandGitHub 5dc5853161 Add entrypoint.final to decouple return value from save value (#3135)
* Introduce `entrypoint.final` that allows decoupling what's returned
from the state update.
* moving decorator to class object w/ call to support defining `final`
as a property on it -- this should play nicely w/ IDE tooling / type
checking.


```python
    previous_ = None

    @entrypoint(checkpointer=MemorySaver())
    def foo(msg: str, *, previous: Any) -> entrypoint.final[int, list[str]]:
        nonlocal previous_
        previous_ = previous
        previous = previous or []
        return entrypoint.final(value=len(previous), save=previous + [msg])

    assert foo.get_output_schema().model_json_schema() == {
        "title": "LangGraphOutput",
        "type": "integer",
    }

    config = {"configurable": {"thread_id": "1"}}
    assert foo.invoke("hello", config) == 0
    assert previous_ is None
    assert foo.invoke("goodbye", config) == 1
    assert previous_ == ["hello"]
    assert foo.invoke("definitely", config) == 2
    assert previous_ == ["hello", "goodbye"]

```
2025-01-23 10:18:23 -05:00
Vadym BardaandGitHub 9e066554ba langgraph: allow async state modifier in create_react_agent (#3161)
Fixes https://github.com/langchain-ai/langgraph/issues/2875
2025-01-23 09:29:25 -05:00
Tat Dat Duong 6ce9354ee4 fix: missing pgvector in CLI
Fixes https://github.com/langchain-ai/langgraph/issues/3164
2025-01-23 15:27:39 +01:00
Nuno Campos 211fd4337d Undo 2025-01-22 16:44:13 -08:00
Nuno Campos 44bf97ac0e Fix 2025-01-22 16:32:59 -08:00
Nuno Campos 23c73ae719 Update tests 2025-01-22 16:30:43 -08:00
Nuno CamposandGitHub 4165d479e9 langgraph: add test for interrupting multiple times from a task (#3148) 2025-01-22 16:25:03 -08:00
Nuno Campos c43a9a4bd0 Make scratchpad counters thread-safe
- Same solution as used in python stdlib to name threads and asyncio tasks
2025-01-22 16:07:59 -08:00
Nuno Campos c9613927dc Lint 2025-01-22 16:05:34 -08:00
Nuno Campos c697c2aa04 Undo 2025-01-22 16:02:09 -08:00
Nuno Campos 3f2557c9c9 Fix 2025-01-22 16:02:09 -08:00
Nuno Campos cbad17fa7d Fix 2025-01-22 16:02:09 -08:00
Nuno Campos 17dacb83a2 Fix 2025-01-22 16:02:09 -08:00
Nuno Campos 3a997be088 Fix 2025-01-22 16:02:09 -08:00
Chester CurmeandNuno Campos 020d10138d add test case 2025-01-22 16:02:09 -08:00
Vadym BardaandGitHub 303587c4ff docs: bring back image for concept doc (#3152) 2025-01-22 16:08:24 -05:00
Andrew NguonlyandGitHub 7d4e636313 docs: Add note about how to share Postgres instance for self-hosted deployments (#3139)
### Screenshot

![image](https://github.com/user-attachments/assets/1caa7581-9dda-4ffc-9fee-ffb0f72487ea)
2025-01-22 12:14:24 -08:00
Lance MartinandGitHub 86913caf89 Add agents and workflows overview (#3040) 2025-01-22 12:07:47 -08:00
Nuno CamposandGitHub 041faefe29 Remove write to RETURN channel for entrypoint func (#3149) 2025-01-22 11:46:14 -08:00
Nuno Campos b704cf30cc Lint 2025-01-22 11:34:30 -08:00
Nuno Campos 3915b44180 Format 2025-01-22 11:32:09 -08:00
Nuno Campos ac1407b23c Remove write to RETURN channel for entrypoint func 2025-01-22 09:44:52 -08:00
Vadym BardaandGitHub 44840aa23f docs: add missing api key to cross-thread persistence howto (#3141) 2025-01-21 21:24:01 -05:00
Vadym BardaandGitHub 51242e2a32 ci: pin codespell (#3140) 2025-01-21 21:22:23 -05:00
Vadym BardaandGitHub b358e2e7cd docs: fix typo in persistence howto (#3138) 2025-01-21 21:03:00 -05:00
Nuno CamposandGitHub 0d91ab1474 Disable recursing on runnables for task/entrypoint decorated funcs (#3136) 2025-01-21 15:47:51 -08:00
Nuno Campos 12ae297194 Disable recursing on runnables for task/entrypoint decorated funcs 2025-01-21 15:36:09 -08:00
Nuno Campos 0177565c6b Spell check 2025-01-21 15:14:00 -08:00
Bhavya DhimanandGitHub c48d495031 fix(requirements.txt): Set requirements path to posix expression so that it can work in windows OS as well. (#3101)
When I cloned langgraph example, I was not able to run the code because
of the requirements.txt file. The path was set to posix expression which
was not working in windows OS.
I have updated the path to posix expression so that it can work in
windows OS as well.

Try running `langgraph-example` in windows using the langgraph-cli in
windows OS. It was working for linux not in windows.
2025-01-21 14:30:13 -05:00
Vadym BardaandGitHub 22e6468af5 langgraph: release 0.2.66 (#3128) 2025-01-21 13:26:29 -05:00
ccurmeandGitHub 24bc0c0630 docs: update readme / docs intro page (#3082) 2025-01-21 13:19:30 -05:00
Nuno CamposandGitHub 802e6df8df Enable async tests that were being skipped (#3109)
- async tests are placed in test_pregel_async, not in test_pregel
- to avoid tests placed in wrong file being accidentally skipped i've
added the auto-async mark to sync test file
2025-01-21 10:16:20 -08:00
Nuno CamposandGitHub 3ec55b008d Fix timing issue where a sync task would finish before the other one was registered in futures dict (#3110)
- this was not possible in async where all done callbacks are called in
next tick
- in sync case this would manifest as the first task done callback
seeing counter == 1 and thus setting event
- the fix is to unset the event whenever a task is scheduled
2025-01-21 10:16:09 -08:00
Nuno CamposandGitHub e10b7c1391 Re-enable support for running sync tasks from async entrypoints (#3108)
- When using an async entrypoint you can now freely mix and match sync
and async tasks with a uniform api (ie all tasks return a sync or async
future depending on context)
- Fix issues with scheduling deeply nested tasks (use threadsafe methods
to schedule coroutines and create futures)
2025-01-21 10:15:49 -08:00
Nuno CamposandGitHub 31cc6b9f1d Fix tracing of args for @task decorated functions (#3107)
- now using same logic as in langsmith sdk, treating as single args
dict, based on function signature
2025-01-21 10:09:13 -08:00
Nuno Campos 2cafb4905b Lint 2025-01-21 10:06:02 -08:00
Nuno Campos fe46576d98 Fix 2025-01-21 09:59:49 -08:00
Nuno Campos 16c86c9de6 Add test 2025-01-21 09:49:46 -08:00
fca0d2d5bb Update libs/langgraph/langgraph/utils/future.py
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2025-01-21 09:43:12 -08:00
Nuno Campos c7c62f5587 Fix 2025-01-21 09:42:25 -08:00
Vadym BardaandGitHub 956c5f68fc docs: add a how-to guide for structured outputs in react agent (#3121) 2025-01-21 17:30:32 +00:00
ccurmeandGitHub 4908caf522 docs: how-to guides nits (#3123) 2025-01-21 12:17:37 -05:00
Chester Curme f926eada24 fix warnings 2025-01-21 12:06:42 -05:00
Chester Curme adc1e47028 nits 2025-01-21 12:00:12 -05:00
Vadym BardaandGitHub 7820b5c765 docs: add docs for Command.PARENT (#3081) 2025-01-21 16:37:39 +00:00
Chester Curme ca6f8e2042 Merge branch 'main' into cc/update_readme 2025-01-21 10:31:29 -05:00
Chester Curme ee61d06f8d add hyperlink 2025-01-21 10:31:27 -05:00
Roy BarberandGitHub 6eeb9de46a DOCS: Incorrect reference to JS/TS SDK as Python SDK (#3103)
Small typo in the Local Server page:
https://langchain-ai.github.io/langgraph/tutorials/langgraph-platform/local-server/
2025-01-21 09:34:57 -05:00
viren-viiandGitHub 19a91f4677 Update persistence_postgres.ipynb to remove typo in markdown cell. (#3119)
Fixed a typo that was interrupting the markdown.
2025-01-21 09:33:31 -05:00
BagaturandGitHub 6087b1969e python[patch]: call create_react_agent model node without is_last_step (#3114)
So that you can call agent.nodes['agent'].invoke({'messages': []})
without needing to specify is_last_step. very helpful for evaluating
just the model node of the agent
2025-01-20 18:28:57 -08:00
Nuno CamposandGitHub 6cbc7e8b67 Add get_store function (#3112) 2025-01-20 16:12:39 -08:00
Nuno Campos b2213e523e Add get_store function 2025-01-20 16:03:27 -08:00
David DuongandGitHub ac64f50383 feat(cli): add detection for bun.lockb (#3111) 2025-01-21 00:30:22 +01:00
Tat Dat Duong 25239891bc feat(cli): add detection for bun.lockb 2025-01-21 00:17:12 +01:00
Nuno Campos b7c3ac4501 Fix tracing output 2025-01-20 13:55:13 -08:00
Nuno Campos 09e8516689 Fix test 2025-01-20 11:57:19 -08:00
Nuno Campos 3ca75d69b8 Lint 2025-01-20 11:57:19 -08:00
Nuno Campos d48dec5452 Enable async tests that were being skipped
- async tests are placed in test_pregel_async, not in test_pregel
- to avoid tests placed in wrong file being accidentally skipped i've added the auto-async mark to sync test file
2025-01-20 11:57:19 -08:00
Nuno Campos d48b25420b Fix timing issue where a sync task would finish before the other one was registered in futures dict
- this was not possible in async where all done callbacks are called in next tick
- in sync case this would manifest as the first task done callback seeing counter == 1 and thus setting event
- the fix is to unset the event whenever a task is scheduled
2025-01-20 11:40:54 -08:00
Nuno Campos 12be3fac33 Lint 2025-01-20 11:13:37 -08:00
Nuno Campos aed1f0ba18 Re-enable support for running sync tasks from async entrypoints
- When using an async entrypoint you can now freely mix and match sync and async tasks with a uniform api (ie all tasks return a sync or async future depending on context)
- Fix issues with scheduling deeply nested tasks (use threadsafe methods to schedule coroutines and create futures)
2025-01-20 11:03:51 -08:00
Nuno Campos 07695f5c5a Lint 2025-01-20 10:53:37 -08:00
Nuno Campos 204c9c83f8 Fix tracing of args for @task decorated functions
- now using same logic as in langsmith sdk, treating as single args dict, based on function signature
2025-01-20 10:49:27 -08:00
David DuongandGitHub 0bdd27ade4 fix(cli): warn users to use the JS cli for JS graphs (#3086) 2025-01-18 02:29:45 +01:00
David DuongandGitHub ab0048981a docs: add mention of JS CLI (#3077) 2025-01-18 01:52:00 +01:00
Tat Dat DuongandNuno Campos e18f2b3795 fix(cli): warn users to use the JS cli for JS graphs 2025-01-17 16:07:31 -08:00
Chester CurmeandNuno Campos 31578cbe0e move code block 2025-01-17 16:07:16 -08:00
Chester CurmeandNuno Campos 44970640d5 cr 2025-01-17 16:07:16 -08:00
Chester CurmeandNuno Campos 0f4e42474f cr 2025-01-17 16:07:16 -08:00
Chester CurmeandNuno Campos 832f9ad64e copy changes to libs/langgraph/README.md 2025-01-17 16:07:16 -08:00
Chester CurmeandNuno Campos 318de5bb81 update readme 2025-01-17 16:07:16 -08:00
William FHandGitHub a11f9b3535 Fix docstring in pg store init (#3094) 2025-01-18 00:03:51 +00:00
Nuno CamposandGitHub 29db5a8672 Implement get_graph for imperative api (#3076) 2025-01-17 15:53:50 -08:00
Nuno CamposandGitHub 444faec6e6 Fix two issues with task/stream timing (#3095)
- both issues are related to the fact that waiters for futures are
notified of completion before "done" callbacks are called
- 1st issue manifested as interrupt stream event being emitted before
the result of a task that logically finished first (it's in the line
above in body of the entrypoint function) -> this is solved by always
returning to use code a fresh future chained on the original future,
because chaining is done via done callbacks (therefore the chained
future will only resolve after done callbacks of the original feature
are called)
- 2nd issue mainfested as sometimes (very rarely) the last stream event
not being printed before stream() finishes. this is solved by ensuring
we only return out of PregelRunner.tick() once all "done" callbacks are
called, previously we were approximating this through use of
asyncio.sleep(0) / time.sleep(0). The new solution instead waits on a
threading/asyncio.Event which will only be set by the last "done"
callback to fire
- this PR also disables incomplete support for calling sync tasks from
async entrypoints
2025-01-17 15:44:52 -08:00
Nuno Campos e4a5c8fd28 Fix two issues with task/stream timing
- both issues are related to the fact that waiters for futures are notified of completion before "done" callbacks are called
- 1st issue manifested as interrupt stream event being emitted before the result of a task that logically finished first (it's in the line above in body of the entrypoint function) -> this is solved by always returning to use code a fresh future chained on the original future, because chaining is done via done callbacks (therefore the chained future will only resolve after done callbacks of the original feature are called)
- 2nd issue mainfested as sometimes (very rarely) the last stream event not being printed before stream() finishes. this is solved by ensuring we only return out of PregelRunner.tick() once all "done" callbacks are called, previously we were approximating this through use of asyncio.sleep(0) / time.sleep(0). The new solution instead waits on a threading/asyncio.Event which will only be set by the last "done" callback to fire
2025-01-17 15:35:08 -08:00
Tat Dat Duong 0f1b0bfba3 typo 2025-01-17 23:40:58 +01:00
Tat Dat Duong 0e79407973 Last pass 2025-01-17 23:40:58 +01:00
Tat Dat Duong efa51fe22c Update README.md 2025-01-17 23:40:58 +01:00
Tat Dat Duong 11f2501c98 docs: add mention of JS CLI 2025-01-17 23:40:58 +01:00
Eugene YurtsevandGitHub 71e6002a3c docs: update broken api reference (#3093) 2025-01-17 17:04:54 -05:00
Andrew NguonlyandGitHub 26e3ded701 docs: Add note about cron jobs not available in LangGraph Platform Self-Hosted Lite (#3091) 2025-01-17 12:52:46 -08:00
Eugene YurtsevandGitHub 4fcd1690f9 docs: expose functional api reference (#3089)
The API reference is marked as experimental right now, so this is OK to expose to make it easier to share w/ beta users.
2025-01-17 15:18:43 -05:00
Vadym BardaandGitHub eb33a873c8 langgraph: release 0.2.64 (#3090) 2025-01-17 15:18:34 -05:00
91aa66f4cf tests: add tests for calling multiple subgraphs in a parent node (#3070)
Co-authored-by: Nuno Campos <nuno@langchain.dev>
2025-01-17 15:16:01 -05:00
Eugene Yurtsev 4476640702 x 2025-01-17 15:08:32 -05:00
Eugene YurtsevandGitHub 727e3f1730 functional api: first pass at api reference (#3083)
First pass at the API reference for the functional API
2025-01-17 14:46:22 -05:00
Vadym BardaandGitHub 943dd28863 docs: update state to include 'next' for supervisor notebooks (#3087) 2025-01-17 14:32:15 -05:00
ccurmeandGitHub aa9d253978 docs: highlight lines in troubleshooting doc (#3084)
![Screenshot 2025-01-17 at 1 44
07 PM](https://github.com/user-attachments/assets/b7009c77-cb2e-43e0-92a7-3978884b7f3e)
2025-01-17 18:53:21 +00:00
Eugene YurtsevandGitHub a11c6cfe6b Update docs/mkdocs.yml 2025-01-17 13:36:44 -05:00
Eugene Yurtsev 15c79dc3c3 x 2025-01-17 13:34:49 -05:00
Eugene Yurtsev a65c9f1e04 x 2025-01-17 13:11:23 -05:00
9912ae1053 docs: add high level example into the readme, make examples collapsible (#3052)
Co-authored-by: Chester Curme <chester.curme@gmail.com>
2025-01-17 17:10:22 +00:00
ccurmeandGitHub 7db29042b4 docs[patch]: update quickstart tutorial to use interrupt() (#3053)
Need to update cassettes
2025-01-17 11:24:40 -05:00
Chester Curme f8033a20c1 update cassettes 2025-01-17 11:15:33 -05:00
Chester Curme 5e3aa495d9 update 2025-01-17 11:05:55 -05:00
Chester Curme a54689affd ruff 2025-01-17 11:02:58 -05:00
Chester Curme 02ea523897 udpate 2025-01-17 11:02:25 -05:00
Chester Curme 18c6637e6c use message dicts instead of tuples 2025-01-17 10:34:21 -05:00
Chester Curme 4c02a4c501 Revert "disable parallel tool use"
This reverts commit 784b6afa11.
2025-01-17 10:19:17 -05:00
Chester Curme 784b6afa11 disable parallel tool use 2025-01-17 10:15:06 -05:00
Chester Curme b35b892d74 Merge branch 'main' into cc/update_quickstart 2025-01-17 10:02:29 -05:00
Chester Curme e7aaf21121 update 2025-01-17 10:02:18 -05:00
Eugene Yurtsev 54115ac796 x 2025-01-17 09:58:06 -05:00
ccurmeandGitHub 76be64adcb docs[patch]: fix builds (#3074) 2025-01-17 02:41:47 +00:00
Nuno Campos 2cf98725c4 Lint 2025-01-16 16:32:39 -08:00
Nuno Campos a33c59626a Lint 2025-01-16 16:01:57 -08:00
Nuno Campos 56d3b759c7 Add one more test 2025-01-16 15:46:25 -08:00
Nuno Campos 32bf81c559 Lint 2025-01-16 14:10:16 -08:00
Eugene Yurtsev de332ec31c x 2025-01-16 17:08:12 -05:00
Eugene YurtsevandGitHub ce30965df4 functional api: Add ability to request previous output (#3025)
1. The inputs into foo do not affect any state behavior
2. `previous` always reflects the previous return value from the
function
3. Anything can be returned and that will be the new state for the
function on the next iteration
4. This API is not meant to support reducers in the inputs/state

```python
  from langgraph.func import entrypoint

  states = []

  # In this version reducers do not work
  @entrypoint(checkpointer=MemorySaver())
  def foo(inputs, *, previous: Any) -> Any:
      states.append(previous)
      return {"previous": previous, "current": inputs}

  config = {"configurable": {"thread_id": "1"}}

  foo.invoke({"a": "1"}, config)
  foo.invoke({"a": "2"}, config)
  foo.invoke({"a": "3"}, config)
  assert states == [
      None,
      {"current": {"a": "1"}, "previous": None},
      {"current": {"a": "2"}, "previous": {"current": {"a": "1"}, "previous": None}},
  ]
```
2025-01-16 17:02:41 -05:00
Nuno Campos b98a7b09a3 Update 2025-01-16 13:44:19 -08:00
Nuno Campos 86b6afc982 Implement get_graph for imperative api 2025-01-16 13:44:18 -08:00
Nuno CamposandGitHub 47122ce88b docs: Add status field to Project object for Control Plane API (#3075) 2025-01-16 13:42:48 -08:00
Andrew Nguonly 002b048674 Add status field to Project object. 2025-01-16 13:27:23 -08:00
Eugene Yurtsev a58f5dacca x 2025-01-16 16:26:54 -05:00
Chester Curme cc397b1629 update cassettes 2025-01-16 16:24:05 -05:00
Eugene Yurtsev 3a48049194 x 2025-01-16 16:19:23 -05:00
Eugene Yurtsev e5f0db0af3 x 2025-01-16 16:09:11 -05:00
Chester Curme 93854ed721 fix link 2025-01-16 15:12:53 -05:00
Eugene Yurtsev 83a7acc57c Merge branch 'main' into eugene/expose_previous_state 2025-01-16 14:56:46 -05:00
Eugene Yurtsev b218cc76a7 type ignore for now 2025-01-16 14:50:40 -05:00
Eugene Yurtsev d021f476db x 2025-01-16 14:23:32 -05:00
Chester Curme d978cb0392 part 7 -> part 6 2025-01-16 14:21:40 -05:00
Chester Curme 605fe4ea11 simplify hitl, condense part 5 2025-01-16 14:20:05 -05:00
Eugene Yurtsev 46907b6cf9 x 2025-01-16 14:04:00 -05:00
Eugene Yurtsev 582856b30c x 2025-01-16 14:00:42 -05:00
Eugene Yurtsev e476897177 fix merge error 2025-01-16 13:58:55 -05:00
Eugene Yurtsev 421f7c0238 x 2025-01-16 13:55:41 -05:00
Eugene Yurtsev 3095bfce9c Merge branch 'main' into eugene/expose_previous_state 2025-01-16 13:54:05 -05:00
Nuno CamposandGitHub 4cfe0b2d4c tests: add a test for interrupt() w/ functional API (#3065) 2025-01-16 10:04:17 -08:00
Nuno Campos a16def5140 Lint 2025-01-16 09:55:04 -08:00
Nuno CamposandGitHub 1e730d124c Make config schema configurable for imperative api (#3067) 2025-01-16 09:52:55 -08:00
ccurmeandGitHub 21a7105655 docs[patch]: enable navigation back to index pages from child pages via sidebar (#3069)
Currently, if you're viewing a how-to guide and you click "How-to
Guides" in the sidebar, you aren't navigated back to the index page (it
will work if you click on a different guides section). To get back to
the index page, you need to scroll up and click the breadcrumbs.

After this change, clicking the link in the sidebar should navigate you
to the index page regardless of the page you are viewing.

Only side-effect from what I can tell is that "Home > Introduction" just
becomes "**Home**", which I think is fine (maybe preferable).

Before:
![Screenshot 2025-01-16 at 11 16
26 AM](https://github.com/user-attachments/assets/e4bdedfc-ed52-4a66-b0b2-194383ce2043)

After:
![Screenshot 2025-01-16 at 11 16
00 AM](https://github.com/user-attachments/assets/4d1d935b-5b11-43ac-8b63-c5aaff871188)
2025-01-16 12:52:16 -05:00
Nuno Campos 8c88e203bc Fix 2025-01-16 09:51:46 -08:00
Nuno CamposandGitHub 2a1224966c Implement input/output schemas for imperative api (#3066) 2025-01-16 08:45:02 -08:00
vbarda c4460e5dd2 add another test 2025-01-16 11:20:09 -05:00
Nuno Campos 46056363b3 Make config schema configurable for imperative api 2025-01-16 08:00:08 -08:00
Nuno Campos ba672604a6 Implement input/output schemas for imperative api 2025-01-16 07:57:00 -08:00
vbarda 8b1597a385 tests: add a test for interrupt() w/ functional API 2025-01-16 10:16:26 -05:00
Vadym BardaandGitHub adff439d4e langgraph: release 0.2.63 (#3064) 2025-01-16 09:19:25 -05:00
Vadym BardaandGitHub 89b0be3a7d checkpoint-postgres: release 2.0.13 (#3063) 2025-01-16 09:17:43 -05:00
Vadym BardaandGitHub 7ecda42b42 checkpoint-postgres: bring back missing migration (#3058) 2025-01-16 03:16:28 +00:00
Nuno CamposandGitHub bd99471705 tests: Add test for catching bunching in streaming (#3057) 2025-01-15 18:57:07 -08:00
Nuno Campos 0e4dbb4c62 Guard 2025-01-15 18:36:49 -08:00
Nuno Campos 145220f2a8 Fix 2025-01-15 18:29:34 -08:00
Eugene Yurtsev f9c25bba07 x 2025-01-15 21:15:38 -05:00
Eugene Yurtsev 7ecad39ecb x 2025-01-15 21:15:05 -05:00
Nuno CamposandGitHub 6bfc6be307 Add support for multiple subgraphs called in a single node (#3056) 2025-01-15 18:01:31 -08:00
Nuno Campos 6b9369876f Fix sync 2025-01-15 17:52:19 -08:00
Nuno Campos c26b0e78b6 Fix kafka lib 2025-01-15 17:15:58 -08:00
Nuno CamposandGitHub 1763dd69a7 Add checkpointer=True mode for subgraphs that want to keep state between turns (#3055) 2025-01-15 16:08:03 -08:00
Nuno Campos f4bd023ab1 Fix 2025-01-15 16:04:14 -08:00
Nuno Campos d402bf7379 Remove flag 2025-01-15 15:36:16 -08:00
Nuno Campos e8a73e1505 Remove flag 2025-01-15 15:36:10 -08:00
Nuno Campos d6492ef048 Add support for multiple subgraphs called in a single node 2025-01-15 15:36:10 -08:00
Nuno Campos 38d9b39f6e Add flag 2025-01-15 15:36:03 -08:00
Nuno Campos be8b4a1d7f Lint 2025-01-15 15:30:29 -08:00
Nuno Campos 71fbd6a8b4 Lint 2025-01-15 15:29:34 -08:00
Nuno Campos 5375af7827 Add checkpointer=True mode for subgraphs that want to keep state betweenn turns 2025-01-15 15:15:44 -08:00
Chester Curme 1654062957 enable navigation.indexes 2025-01-15 18:14:37 -05:00
Eugene Yurtsev 6b707cbfc5 x 2025-01-15 17:15:56 -05:00
Nuno CamposandGitHub dd7ac00953 Fix unexpected re-use of null resume value by subgraphs (#3054)
- Also stop exposing writes in config, in favor of scratchpad
2025-01-15 13:59:13 -08:00
Nuno Campos cd64075928 Lint 2025-01-15 13:49:33 -08:00
Nuno Campos 144ee31546 Lint 2025-01-15 13:43:14 -08:00
Nuno CamposandGitHub 8bb84c7096 Fix ignored goto when a mixed list of command and state updates is returned from a node (#3038) 2025-01-15 13:39:59 -08:00
Nuno Campos e83660885b Lint 2025-01-15 13:39:44 -08:00
Nuno Campos c2a57385c0 Update tests 2025-01-15 13:35:51 -08:00
Nuno Campos 3626478029 Fix unexpected re-use of null resume value by subgraphs
- Also stop exposing writes in config, in favor of scratchpad
2025-01-15 13:31:49 -08:00
Chester Curme 30311f3fb9 ruff 2025-01-15 16:12:01 -05:00
Chester Curme 0f458fbaff update 2025-01-15 16:06:55 -05:00
Brace SproulandGitHub 13c9bfa282 feat(langgraph): Add interrupt schema to library (#2947) 2025-01-15 12:55:47 -08:00
Andrew NguonlyandGitHub b6fe3937fc docs: Add section about Persistence to Cloud SaaS concepts page (#3051) 2025-01-15 12:27:53 -08:00
Chester Curme d7bae594f0 update hitl 2025-01-15 15:04:43 -05:00
Nuno Campos 5805e5709a Fix ignored goto when a mixed list of command and state updates is returned from a node 2025-01-15 11:42:28 -08:00
Nuno CamposandGitHub aab6fdf3f3 Fix Send order after interrupt/resume (#3037)
- order was incorrectly based on task id, instead of the correct task
path
- this requires storing task paths on checkpointers
- addition of task_path to put_writes is made backwards compatible by
checking signature on call, and treating it as an optional arg
2025-01-15 11:42:08 -08:00
Nuno CamposandGitHub be1d035aba tests: add test for multiple interrupts and tasks (#2941) 2025-01-15 11:41:30 -08:00
Nuno Campos 6e228f8a9c Lint 2025-01-15 11:32:42 -08:00
Nuno Campos 0adbd89d9a Bump checkpoint 2025-01-15 11:28:55 -08:00
Nuno Campos 47c37d140f Fix Send order after interrupt/resume
- order was incorrectly based on task id, instead of the correct task path
- this requires storing task paths on checkpointers
- addition of task_path to put_writes is made backwards compatible by checking signature on call, and treating it as an optinal arg
2025-01-15 11:28:26 -08:00
Nuno Campos fc887f7a5d checkpoint-postgres/sqlite 2.0.12/2.0.3 2025-01-15 11:26:51 -08:00
ccurmeandGitHub bbfc2b7370 docs[patch]: add section headers to LangGraph concepts page (#3047)
![Screenshot 2025-01-15 at 1 03
45 PM](https://github.com/user-attachments/assets/c7a6d5b7-cc42-4616-bba0-4352c2f922bc)
2025-01-15 14:15:33 -05:00
Nuno Campos 2c984dfe4e checkpoint 2.0.10 2025-01-15 11:14:03 -08:00
Nuno CamposandGitHub 09c0d9cec3 Add optional task_path arg for put_writes() (#3049)
- Will be used for sorting pending_sends when available
2025-01-15 11:11:10 -08:00
Nuno Campos 31734fb792 Lint 2025-01-15 11:02:10 -08:00
Nuno Campos eed577ee2a Update sqlite signature 2025-01-15 10:58:46 -08:00
Nuno Campos bba00506ea Lint 2025-01-15 10:57:26 -08:00
Nuno Campos fa12538a4e Lint 2025-01-15 10:50:11 -08:00
Nuno Campos c1a7bb8902 Lint 2025-01-15 10:49:47 -08:00
Nuno Campos 14b500d8a8 Fix 2025-01-15 10:47:09 -08:00
Nuno Campos 053a501db3 Add optional task_path arg for put_writes()
- Will be used for sorting pending_sends when available
2025-01-15 10:42:54 -08:00
Andrew NguonlyandGitHub bbe8eacf8d docs: Update Studio FAQ (#3048)
### Screenshot

![image](https://github.com/user-attachments/assets/6da2faa6-1c62-44e4-96f8-3450f94cb15c)
2025-01-15 10:23:43 -08:00
Nuno Campos 931d39124c Fix 2025-01-15 10:23:30 -08:00
Nuno Campos a7bb96da98 Fix 2025-01-15 10:21:40 -08:00
Nuno Campos 1e9a372dd7 Fix multiple interrupt/task test 2025-01-15 10:11:31 -08:00
Chester Curme 5030f1e89c bold -> headers 2025-01-15 13:02:59 -05:00
Nuno CamposandGitHub 50cb387904 Remove duckdb checkpointer and store (#3046)
- duckdb is too buggy to be able to provide reliable checkpointer and
store
2025-01-15 09:23:49 -08:00
Nuno Campos 003b1883c9 Remove duckdb checkpointer and store
- duckdb is too buggy to be able to provide reliable checkpointer and store
2025-01-15 09:15:17 -08:00
Nuno Campos 17aebb6239 Fix flasy return from task 2025-01-15 09:14:36 -08:00
Nuno CamposandGitHub d12830e95c Fix tracing hierarchy for imperative api (#3036) 2025-01-15 09:10:45 -08:00
Eugene YurtsevandNuno Campos 29b70cbf39 x 2025-01-15 09:03:46 -08:00
Eugene YurtsevandNuno Campos 6b86fbb0a8 x 2025-01-15 09:03:46 -08:00
Nuno CamposandGitHub 4426552c26 Fix flaky test output order (#3045) 2025-01-15 09:02:05 -08:00
Nuno Campos 671f268651 Remove duckdb checkpointer and store
- duckdb is too buggy to be able to provide reliable checkpointer and store
2025-01-15 08:56:32 -08:00
Vadym BardaandGitHub e2554c9616 langgraph: fix non-empty value check in ensure_config (#3039)
Fixes https://github.com/langchain-ai/langgraph/issues/2890
2025-01-15 16:54:31 +00:00
Nuno CamposandGitHub f1ee650489 Remove CI job to test against core 0.2.x (#3044) 2025-01-15 08:52:58 -08:00
Nuno Campos b7e4656c91 Fix flaky test output order 2025-01-15 08:45:35 -08:00
Nuno Campos 65a41942ef Remove CI job to test against core 0.2.x 2025-01-15 08:39:09 -08:00
Nuno Campos c767d86c9c Remove ci job for removed flag 2025-01-15 08:37:24 -08:00
Nuno Campos 01331ef858 Lint 2025-01-15 08:33:09 -08:00
Nuno CamposandGitHub 24a4c67c52 Merge branch 'main' into nc/14jan/fix-tracing-hierarchy-imperative 2025-01-15 08:31:38 -08:00
Nuno CamposandGitHub c7e43f86d4 Remove send v2 (#3033) 2025-01-15 08:29:05 -08:00
Vadym BardaandGitHub b18d266f2c langgraph: allow model names as strings in create_react_agent (#3031)
```python
agent = create_react_agent("anthropic:claude-3-5-sonnet-latest", [add])
agent.invoke({"messages": [("user", "what's 3 + 5")]})
```
2025-01-15 09:43:37 -05:00
Eugene YurtsevandGitHub 536ee7b37a docs: document inject kwarg (#3026) 2025-01-14 21:41:27 -05:00
Nuno Campos 901273c0e2 Lint 2025-01-14 17:09:30 -08:00
Nuno Campos 7bdbd62611 Fix tracing hierarchy for imperative api 2025-01-14 17:03:45 -08:00
Nuno Campos 0b74e25f72 Remove send v2 2025-01-14 15:49:57 -08:00
Eugene YurtsevandGitHub ff843ab005 docs: internal doc nits (#2946)
Update internal documentation
2025-01-14 23:16:38 +00:00
Eugene Yurtsev 7603809a9f x 2025-01-14 18:06:09 -05:00
Vadym BardaandGitHub f7fae7e140 langgraph: fix ismethod check in add_node (#3032)
Fixes #2893 #2965
2025-01-14 17:17:50 -05:00
Eugene YurtsevandGitHub 651ee8bd24 Update local-server.md (#3030) 2025-01-14 16:22:26 -05:00
Eugene YurtsevandGitHub 54bdba2da9 Update introduction.ipynb (#3029) 2025-01-14 16:20:54 -05:00
Eugene YurtsevandGitHub 7e5806cb0b Update local-server.md 2025-01-14 16:13:57 -05:00
Eugene YurtsevandGitHub 66f674fead Update introduction.ipynb 2025-01-14 16:12:20 -05:00
Vadym BardaandGitHub f029d615e6 ci: fix docs build (#3028) 2025-01-14 15:58:03 -05:00
Eugene Yurtsev bd76773b31 x 2025-01-14 15:50:20 -05:00
Eugene Yurtsev 311fe3970c x 2025-01-14 15:39:57 -05:00
Eugene Yurtsev 67a800dd98 update 2025-01-14 15:37:10 -05:00
ccurmeandGitHub 9b6e6d67dc layout (#2972)
Some docs layout improvements to help guide user journey.

Currently we have `Home | Tutorials | How-tos | Concepts | Reference` in
top-level horizontal navigation bar.

Here we make these updates:
- Top-level horizontal navigation bar is just `Home | API Reference`
- Add vertical sidebar to `Home` with sections:
  - Introduction
  - Get started
  - Guides
  - Resources

`Get Started` contains quickstarts for LG and LG Platform / deployment.
These are tutorials in Diataxis terms.

`Guides` contains index pages for how-tos, concepts, tutorials.

Advantage of this organization is that users are directed naturally down
the sidebar from Intro -> Get started -> How-tos, which is roughly how
we expect them to proceed.

This also makes deployment info more accessible as it is highlighted in
the "Getting started" section.

![Screenshot 2025-01-14 at 1 37
01 PM](https://github.com/user-attachments/assets/76dcde25-874b-4def-ad71-5313e399b7d7)
2025-01-14 15:29:59 -05:00
ccurmeandGitHub ecfb3e3850 Merge branch 'main' into eugene/langgraph_nav 2025-01-14 15:21:26 -05:00
Chester Curme ec71cd6fc1 update 2025-01-14 15:09:46 -05:00
Vadym BardaandGitHub aab4f0b164 checkpoint-duckdb: release 2.0.2 (#3024) 2025-01-14 15:08:49 -05:00
Chester Curme 2db6d9d7b5 clean up 2025-01-14 15:08:48 -05:00
Vadym BardaandGitHub 5db71a32bf checkpoint-duckdb: handle calling .list on async checkpointer (#3022) 2025-01-14 20:00:58 +00:00
Chester Curme 0f5df797af fix link 2025-01-14 15:00:38 -05:00
Vadym BardaandGitHub 4c0f855329 ci: fix docs runner (#3010) 2025-01-14 14:58:34 -05:00
Chester Curme 5dc3f14e8b populate troubleshootings nav 2025-01-14 14:56:23 -05:00
Chester Curme f25ea9ecaf populate tutorials nav 2025-01-14 14:50:05 -05:00
Chester Curme 9940a9f833 populate how-tos nav 2025-01-14 14:47:42 -05:00
Chester Curme d175d5e4a8 populate concepts nav 2025-01-14 14:42:10 -05:00
Vadym BardaandGitHub 74adbb744b bump checkpoint sqlite, postgres (#3021) 2025-01-14 14:41:22 -05:00
Chester Curme fe63440d98 add deployment landing page 2025-01-14 14:40:45 -05:00
William Fu-Hinthorn 2f47d98b34 Update error message for missing dev command 2025-01-14 11:28:51 -08:00
Vadym BardaandGitHub b989502c24 checkpoint-sqlite/postgres: handle calling .list on async checkpointer (#3019) 2025-01-14 19:06:11 +00:00
Eugene YurtsevandGitHub 8507dc33f0 FIx docs: Update MULTIPLE_SUBGRAPHS.md (#3016) 2025-01-14 13:41:50 -05:00
bracesproul 0d50c62283 cr 2025-01-14 10:39:57 -08:00
vbarda a9073241b2 add css for navbar depth 2025-01-14 13:31:39 -05:00
Chester Curme 0a04262f05 add custom css 2025-01-14 12:46:00 -05:00
Chester Curme 381796c474 hack 2025-01-14 12:39:38 -05:00
Vadym BardaandGitHub a11ba2b38a docs: update replay in the concept docs (#3017) 2025-01-14 11:53:53 -05:00
Chester Curme 09ae5ce05d update 2025-01-14 11:26:49 -05:00
Chester Curme 59e7751a8c update 2025-01-14 10:48:50 -05:00
Cesar William AlvarengaandGitHub a61ea101f6 fix: add missing END constant import (#3011) 2025-01-13 19:40:40 -05:00
Chester Curme b9816e31ff update 2025-01-13 19:12:51 -05:00
Chester Curme 3ea7f9469a update 2025-01-13 18:26:24 -05:00
Chester Curme 24e61fafa9 update 2025-01-13 16:22:58 -05:00
bracesproul b52b32b38e format n lint 2025-01-13 13:14:36 -08:00
Brace SproulandGitHub 5aefa5dc8c Merge branch 'main' into brace/interrupt-schema 2025-01-13 13:08:37 -08:00
Andrew NguonlyandGitHub c86155d3d3 docs: Add note about LangGraph Platform UI not available for self-hosted deployments (#3009)
Example screenshot:

![image](https://github.com/user-attachments/assets/8304b08d-bc9b-4cd3-8ff4-ed2471d3d6c7)
2025-01-13 13:05:18 -08:00
Chester Curme 2b370cf3b7 template applications -> lg plat 2025-01-13 14:21:12 -05:00
Chester Curme 839bea0f33 fixup 2025-01-13 14:16:14 -05:00
William FHandGitHub a03f1f7469 Bullseye (#3008) 2025-01-13 10:01:36 -08:00
Jimmy SambuoandGitHub d7199e5874 docs: use InjectedStore in semantic search guide (#2995)
When I tried to follow the How-to guide for [How to add semantic search
to your agent's
memory](https://langchain-ai.github.io/langgraph/how-tos/memory/semantic-search/#using-in-create_react_agent)
using `create_react_agent`, I got this error message when my agent used
the tool:

```python
1 validation error for upsert_memory
store
  Field required [type=missing, input_value={'content': '@jimmy works...ny.', 'memory_id': None}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.10/v/missingTraceback (most recent call last):

  File "/usr/local/lib/python3.9/site-packages/langchain_core/tools/base.py", line 688, in run
    tool_args, tool_kwargs = self._to_args_and_kwargs(tool_input, tool_call_id)

  File "/usr/local/lib/python3.9/site-packages/langchain_core/tools/base.py", line 611, in _to_args_and_kwargs
    tool_input = self._parse_input(tool_input, tool_call_id)

  File "/usr/local/lib/python3.9/site-packages/langchain_core/tools/base.py", line 532, in _parse_input
    result = input_args.model_validate(tool_input)

  File "/usr/local/lib/python3.9/site-packages/pydantic/main.py", line 627, in model_validate
    return cls.__pydantic_validator__.validate_python(

pydantic_core._pydantic_core.ValidationError: 1 validation error for upsert_memory
store
  Field required [type=missing, input_value={'content': '@jimmy works...ny.', 'memory_id': None}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.10/v/missing
```

I believe it’s because the graph did not inject the store into the tool
if we use `InjectedToolArg`.

When looking at the guide for [How to pass runtime values to
tools](https://langchain-ai.github.io/langgraph/how-tos/pass-run-time-values-to-tools/),
it suggests to use `InjectedStore` with `create_react_agent`. After
changing my code to use `InjectedStore`, my agent was able to save to
the store.
2025-01-13 09:59:46 -05:00
Siddhesh dosiandGitHub 61f2151df7 Update customer-support.ipynb minor spell (#3002)
There was spelling mistake.
2025-01-13 09:52:19 -05:00
William FHandGitHub 713528ffc3 Add admonition regarding dockerfile usage (#3001) 2025-01-12 09:52:13 -08:00
Andrew NguonlyandGitHub 7bd79c2509 docs: Add docs for LANGCHAIN_ENDPOINT for self-hosted deployments (#2988)
@langchain-infra, is this correct? Is this needed or is it
redundant/unnecessary?
2025-01-10 15:24:38 -08:00
Andrew NguonlyandGitHub 9974787df6 docs: Add API docs for POST /v1/projects/{project_id}/revisions/{revision_id}/deploy endpoint (#2994) 2025-01-10 15:16:48 -08:00
William FHandGitHub 638712a73b Add support for custom fetch implementation (#2993) 2025-01-10 23:08:33 +00:00
Vadym BardaandGitHub b8a54f6294 langgraph: release 0.2.62 (#2990) 2025-01-10 14:33:54 -05:00
Brace SproulandGitHub f2913fbcb6 fix(sdk-js): Release 0.0.35 (#2989) 2025-01-10 10:52:32 -08:00
bracesproul cfb121ee8f cr 2025-01-10 10:45:45 -08:00
bracesproul d27beeed18 move to prebuilt 2025-01-10 10:45:22 -08:00
bracesproul 8045e89e09 fix(sdk-js): Release 0.0.35 2025-01-10 10:43:44 -08:00
Brace SproulandGitHub 8355a1720a fix: Cron response types (#2987)
technically a breaking change, however the old response type was
incorrect.
2025-01-10 10:15:03 -08:00
bracesproul c302724394 fix cron create for thread return type 2025-01-10 10:05:57 -08:00
bracesproul c624ff69e1 fix: Cron response types 2025-01-10 10:01:51 -08:00
Vadym BardaandGitHub 10d46acc60 langgraph: add structured output to create_react_agent (#2848)
```python
class WeatherResponse(BaseModel):
    """Respond to the user with this"""

    temperature: float = Field(description="The temperature in fahrenheit")
    wind_direction: str = Field(
        description="The direction of the wind in abbreviated form"
    )
    wind_speed: float = Field(description="The speed of the wind in mph")

@tool
def get_weather(city: Literal["nyc", "sf"]):
    """Use this to get weather information."""
    if city == "nyc":
        return "It is cloudy in NYC, with 5 mph winds in the North-East direction and a temperature of 70 degrees"
    elif city == "sf":
        return "It is 75 degrees and sunny in SF, with 3 mph winds in the South-East direction"
    else:
        raise AssertionError("Unknown city")

model = ChatOpenAI()
tools = [get_weather]
agent_with_structured_output = create_react_agent(model, tools, response_format=WeatherResponse)
agent_with_structured_output.invoke({"messages": [("user", "what's the weather in nyc?")]})
```

```pycon
{
    'messages': [...],
    'structured_response': WeatherResponse(temperature=70.0, wind_directon='NE', wind_speed=5.0)
}
```
2025-01-10 16:06:59 +00:00
Vadym BardaandGitHub 35c3ba0104 docs: update how to for passing config to tools (#2986) 2025-01-10 11:05:15 -05:00
Hongbin MaoandGitHub 0e2cd9e289 Fix typo (#2984) 2025-01-10 10:52:52 -05:00
William FHandGitHub f4bd02da72 Make admonition more admonitiony (#2982) 2025-01-10 01:46:42 +00:00
William FHandGitHub ecfbfa1b90 Update auth docstrings (#2977) 2025-01-09 16:58:19 -08:00
William FHandGitHub e5b5f9510b Fix empty migration (#2978) 2025-01-09 23:14:02 +00:00
Andrew NguonlyandGitHub c6d7c80a99 docs: Add documentation for LANGSMITH_RUNS_ENDPOINTS env var (#2976) 2025-01-09 13:24:41 -08:00
Eugene Yurtsev fba5ca7ab9 x 2025-01-09 12:24:30 -05:00
William FHandGitHub 909190cede Update SDK registration (#2974) 2025-01-09 09:20:54 -08:00
William FHandGitHub 43c8578eef Unify type-naming of search param (#2973) 2025-01-09 08:56:05 -08:00
William Fu-Hinthorn 56f5edb9ba Unify naming of search param 2025-01-09 08:46:17 -08:00
William FHandGitHub 41f0fd504e Add store auth types (#2971) 2025-01-09 08:32:54 -08:00
Eugene Yurtsev f141089811 x 2025-01-09 11:11:04 -05:00
Eugene Yurtsev 38487cb158 x 2025-01-09 11:11:04 -05:00
William FHandGitHub 6357d496af Merge branch 'main' into wfh/auth/store 2025-01-09 08:08:04 -08:00
William Fu-Hinthorn 52bd5b13a7 Add store auth types 2025-01-09 08:03:30 -08:00
Andrew NguonlyandGitHub b633e0a4ed docs: Add docs for POSTGRES_URI_CUSTOM environment variable (#2951) 2025-01-08 15:27:32 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c14bcb6e9f build(deps-dev): bump jinja2 from 3.1.4 to 3.1.5 in /libs/langgraph (#2960)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pallets/jinja/releases">jinja2's
releases</a>.</em></p>
<blockquote>
<h2>3.1.5</h2>
<p>This is the Jinja 3.1.5 security fix release, which fixes security
issues and bugs but does not otherwise change behavior and should not
result in breaking changes compared to the latest feature release.</p>
<p>PyPI: <a
href="https://pypi.org/project/Jinja2/3.1.5/">https://pypi.org/project/Jinja2/3.1.5/</a>
Changes: <a
href="https://jinja.palletsprojects.com/changes/#version-3-1-5">https://jinja.palletsprojects.com/changes/#version-3-1-5</a>
Milestone: <a
href="https://github.com/pallets/jinja/milestone/16?closed=1">https://github.com/pallets/jinja/milestone/16?closed=1</a></p>
<ul>
<li>The sandboxed environment handles indirect calls to
<code>str.format</code>, such as by passing a stored reference to a
filter that calls its argument. <a
href="https://github.com/pallets/jinja/security/advisories/GHSA-q2x7-8rv6-6q7h">GHSA-q2x7-8rv6-6q7h</a></li>
<li>Escape template name before formatting it into error messages, to
avoid issues with names that contain f-string syntax. <a
href="https://redirect.github.com/pallets/jinja/issues/1792">#1792</a>,
<a
href="https://github.com/pallets/jinja/security/advisories/GHSA-gmj6-6f8f-6699">GHSA-gmj6-6f8f-6699</a></li>
<li>Sandbox does not allow <code>clear</code> and <code>pop</code> on
known mutable sequence types. <a
href="https://redirect.github.com/pallets/jinja/issues/2032">#2032</a></li>
<li>Calling sync <code>render</code> for an async template uses
<code>asyncio.run</code>. <a
href="https://redirect.github.com/pallets/jinja/issues/1952">#1952</a></li>
<li>Avoid unclosed <code>auto_aiter</code> warnings. <a
href="https://redirect.github.com/pallets/jinja/issues/1960">#1960</a></li>
<li>Return an <code>aclose</code>-able <code>AsyncGenerator</code> from
<code>Template.generate_async</code>. <a
href="https://redirect.github.com/pallets/jinja/issues/1960">#1960</a></li>
<li>Avoid leaving <code>root_render_func()</code> unclosed in
<code>Template.generate_async</code>. <a
href="https://redirect.github.com/pallets/jinja/issues/1960">#1960</a></li>
<li>Avoid leaving async generators unclosed in blocks, includes and
extends. <a
href="https://redirect.github.com/pallets/jinja/issues/1960">#1960</a></li>
<li>The runtime uses the correct <code>concat</code> function for the
current environment when calling block references. <a
href="https://redirect.github.com/pallets/jinja/issues/1701">#1701</a></li>
<li>Make <code>|unique</code> async-aware, allowing it to be used after
another async-aware filter. <a
href="https://redirect.github.com/pallets/jinja/issues/1781">#1781</a></li>
<li><code>|int</code> filter handles <code>OverflowError</code> from
scientific notation. <a
href="https://redirect.github.com/pallets/jinja/issues/1921">#1921</a></li>
<li>Make compiling deterministic for tuple unpacking in a <code>{% set
... %}</code> call. <a
href="https://redirect.github.com/pallets/jinja/issues/2021">#2021</a></li>
<li>Fix dunder protocol (<code>copy</code>/<code>pickle</code>/etc)
interaction with <code>Undefined</code> objects. <a
href="https://redirect.github.com/pallets/jinja/issues/2025">#2025</a></li>
<li>Fix <code>copy</code>/<code>pickle</code> support for the internal
<code>missing</code> object. <a
href="https://redirect.github.com/pallets/jinja/issues/2027">#2027</a></li>
<li><code>Environment.overlay(enable_async)</code> is applied correctly.
<a
href="https://redirect.github.com/pallets/jinja/issues/2061">#2061</a></li>
<li>The error message from <code>FileSystemLoader</code> includes the
paths that were searched. <a
href="https://redirect.github.com/pallets/jinja/issues/1661">#1661</a></li>
<li><code>PackageLoader</code> shows a clearer error message when the
package does not contain the templates directory. <a
href="https://redirect.github.com/pallets/jinja/issues/1705">#1705</a></li>
<li>Improve annotations for methods returning copies. <a
href="https://redirect.github.com/pallets/jinja/issues/1880">#1880</a></li>
<li><code>urlize</code> does not add <code>mailto:</code> to values like
<code>@a@b</code>. <a
href="https://redirect.github.com/pallets/jinja/issues/1870">#1870</a></li>
<li>Tests decorated with <code>@pass_context</code> can be used with the
<code>|select</code> filter. <a
href="https://redirect.github.com/pallets/jinja/issues/1624">#1624</a></li>
<li>Using <code>set</code> for multiple assignment (<code>a, b = 1,
2</code>) does not fail when the target is a namespace attribute. <a
href="https://redirect.github.com/pallets/jinja/issues/1413">#1413</a></li>
<li>Using <code>set</code> in all branches of <code>{% if %}{% elif %}{%
else %}</code> blocks does not cause the variable to be considered
initially undefined. <a
href="https://redirect.github.com/pallets/jinja/issues/1253">#1253</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pallets/jinja/blob/main/CHANGES.rst">jinja2's
changelog</a>.</em></p>
<blockquote>
<h2>Version 3.1.5</h2>
<p>Released 2024-12-21</p>
<ul>
<li>The sandboxed environment handles indirect calls to
<code>str.format</code>, such as
by passing a stored reference to a filter that calls its argument.
:ghsa:<code>q2x7-8rv6-6q7h</code></li>
<li>Escape template name before formatting it into error messages, to
avoid
issues with names that contain f-string syntax.
:issue:<code>1792</code>, :ghsa:<code>gmj6-6f8f-6699</code></li>
<li>Sandbox does not allow <code>clear</code> and <code>pop</code> on
known mutable sequence
types. :issue:<code>2032</code></li>
<li>Calling sync <code>render</code> for an async template uses
<code>asyncio.run</code>.
:pr:<code>1952</code></li>
<li>Avoid unclosed <code>auto_aiter</code> warnings.
:pr:<code>1960</code></li>
<li>Return an <code>aclose</code>-able <code>AsyncGenerator</code> from
<code>Template.generate_async</code>. :pr:<code>1960</code></li>
<li>Avoid leaving <code>root_render_func()</code> unclosed in
<code>Template.generate_async</code>. :pr:<code>1960</code></li>
<li>Avoid leaving async generators unclosed in blocks, includes and
extends.
:pr:<code>1960</code></li>
<li>The runtime uses the correct <code>concat</code> function for the
current environment
when calling block references. :issue:<code>1701</code></li>
<li>Make <code>|unique</code> async-aware, allowing it to be used after
another
async-aware filter. :issue:<code>1781</code></li>
<li><code>|int</code> filter handles <code>OverflowError</code> from
scientific notation.
:issue:<code>1921</code></li>
<li>Make compiling deterministic for tuple unpacking in a <code>{% set
... %}</code>
call. :issue:<code>2021</code></li>
<li>Fix dunder protocol (<code>copy</code>/<code>pickle</code>/etc)
interaction with <code>Undefined</code>
objects. :issue:<code>2025</code></li>
<li>Fix <code>copy</code>/<code>pickle</code> support for the internal
<code>missing</code> object.
:issue:<code>2027</code></li>
<li><code>Environment.overlay(enable_async)</code> is applied correctly.
:pr:<code>2061</code></li>
<li>The error message from <code>FileSystemLoader</code> includes the
paths that were
searched. :issue:<code>1661</code></li>
<li><code>PackageLoader</code> shows a clearer error message when the
package does not
contain the templates directory. :issue:<code>1705</code></li>
<li>Improve annotations for methods returning copies.
:pr:<code>1880</code></li>
<li><code>urlize</code> does not add <code>mailto:</code> to values like
<code>@a@b</code>. :pr:<code>1870</code></li>
<li>Tests decorated with <code>@pass_context`` can be used with the
``|select`` filter. :issue:</code>1624`</li>
<li>Using <code>set</code> for multiple assignment (<code>a, b = 1,
2</code>) does not fail when the
target is a namespace attribute. :issue:<code>1413</code></li>
<li>Using <code>set</code> in all branches of <code>{% if %}{% elif %}{%
else %}</code> blocks
does not cause the variable to be considered initially undefined.
:issue:<code>1253</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pallets/jinja/commit/877f6e51be8e1765b06d911cfaa9033775f051d1"><code>877f6e5</code></a>
release version 3.1.5</li>
<li><a
href="https://github.com/pallets/jinja/commit/8d588592653b052f957b720e1fc93196e06f207f"><code>8d58859</code></a>
remove test pypi</li>
<li><a
href="https://github.com/pallets/jinja/commit/eda8fe86fd716dfce24910294e9f1fc81fbc740c"><code>eda8fe8</code></a>
update dev dependencies</li>
<li><a
href="https://github.com/pallets/jinja/commit/c8fdce1e0333f1122b244b03a48535fdd7b03d91"><code>c8fdce1</code></a>
Fix bug involving calling set on a template parameter within all
branches of ...</li>
<li><a
href="https://github.com/pallets/jinja/commit/66587ce989e5a478e0bb165371fa2b9d42b7040f"><code>66587ce</code></a>
Fix bug where set would sometimes fail within if</li>
<li><a
href="https://github.com/pallets/jinja/commit/fbc3a696c729d177340cc089531de7e2e5b6f065"><code>fbc3a69</code></a>
Add support for namespaces in tuple parsing (<a
href="https://redirect.github.com/pallets/jinja/issues/1664">#1664</a>)</li>
<li><a
href="https://github.com/pallets/jinja/commit/b8f4831d41e6a7cb5c40d42f074ffd92d2daccfc"><code>b8f4831</code></a>
more comments about nsref assignment</li>
<li><a
href="https://github.com/pallets/jinja/commit/ee832194cd9f55f75e5a51359b709d535efe957f"><code>ee83219</code></a>
Add support for namespaces in tuple assignment</li>
<li><a
href="https://github.com/pallets/jinja/commit/1d55cddbb28e433779511f28f13a2d8c4ec45826"><code>1d55cdd</code></a>
Triple quotes in docs (<a
href="https://redirect.github.com/pallets/jinja/issues/2064">#2064</a>)</li>
<li><a
href="https://github.com/pallets/jinja/commit/8a8eafc6b992ba177f1d3dd483f8465f18a11116"><code>8a8eafc</code></a>
edit block assignment section</li>
<li>Additional commits viewable in <a
href="https://github.com/pallets/jinja/compare/3.1.4...3.1.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jinja2&package-manager=pip&previous-version=3.1.4&new-version=3.1.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-08 17:31:13 -05:00
Vadym BardaandGitHub 8b29dc81e0 sdk-js: release 0.0.34 (#2959) 2025-01-08 10:59:40 -05:00
Vadym BardaandGitHub 1546eddfbe sdk-js: add stream mode and stream subgraphs to runs.create (#2958) 2025-01-08 10:58:07 -05:00
Vadym BardaandGitHub 9680e35beb docs: update tool in customer support tutorial (#2956)
Fixes #2952
2025-01-08 09:33:25 -05:00
Andrew NguonlyandGitHub 837f215857 docs: Rename Deploy Logs to Server Logs (#2922) 2025-01-07 17:13:06 -08:00
Vadym BardaandGitHub e13261ac0a ci: update langsmith and patch urllib3 vcr issues for notebook runner (#2949) 2025-01-07 20:09:57 -05:00
8ab206043c langgraph[patch]: fix create_react_agent inspectability (#2948)
Co-authored-by: vbarda <vadym@langchain.dev>
2025-01-07 18:47:31 +00:00
bracesproul 8534212a25 cr 2025-01-07 10:15:48 -08:00
bracesproul e39255a792 feat: Add interrupt schema to library 2025-01-07 10:00:38 -08:00
BagaturandGitHub 3dbe37041a docs: readme nit (#2899)
When looking at [docs](https://langchain-ai.github.io/langgraph/) this
sentence is confusing, not clear there's two separate links or why one
of them would lead to repo
2025-01-07 11:00:14 -05:00
e00284b386 Clarifying the docstring for the add_edge function (#2782)
Revised docstring for StateGraph's add_edge method to clarify recurring
confusion #2775 #1462

---------

Co-authored-by: ashirgaokar <abhishek.shirgaokar@zee.com>
Co-authored-by: vbarda <vadym@langchain.dev>
2025-01-07 10:04:50 -05:00
merdanandGitHub a36d2ac77d Update langgraph_agentic_rag.ipynb (#2885)
add missing package
2025-01-07 09:51:29 -05:00
tomo-abeandGitHub 2a46534286 Fix typo introduction.ipynb (#2894)
Fixing typo
2025-01-07 09:47:23 -05:00
VItto RivabellaandGitHub 4b06791b8c Update agent_supervisor.ipynb (#2888) 2025-01-07 09:45:41 -05:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
661e20eec4 build(deps-dev): bump jinja2 from 3.1.4 to 3.1.5 (#2914)
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pallets/jinja/releases">jinja2's
releases</a>.</em></p>
<blockquote>
<h2>3.1.5</h2>
<p>This is the Jinja 3.1.5 security fix release, which fixes security
issues and bugs but does not otherwise change behavior and should not
result in breaking changes compared to the latest feature release.</p>
<p>PyPI: <a
href="https://pypi.org/project/Jinja2/3.1.5/">https://pypi.org/project/Jinja2/3.1.5/</a>
Changes: <a
href="https://jinja.palletsprojects.com/changes/#version-3-1-5">https://jinja.palletsprojects.com/changes/#version-3-1-5</a>
Milestone: <a
href="https://github.com/pallets/jinja/milestone/16?closed=1">https://github.com/pallets/jinja/milestone/16?closed=1</a></p>
<ul>
<li>The sandboxed environment handles indirect calls to
<code>str.format</code>, such as by passing a stored reference to a
filter that calls its argument. <a
href="https://github.com/pallets/jinja/security/advisories/GHSA-q2x7-8rv6-6q7h">GHSA-q2x7-8rv6-6q7h</a></li>
<li>Escape template name before formatting it into error messages, to
avoid issues with names that contain f-string syntax. <a
href="https://redirect.github.com/pallets/jinja/issues/1792">#1792</a>,
<a
href="https://github.com/pallets/jinja/security/advisories/GHSA-gmj6-6f8f-6699">GHSA-gmj6-6f8f-6699</a></li>
<li>Sandbox does not allow <code>clear</code> and <code>pop</code> on
known mutable sequence types. <a
href="https://redirect.github.com/pallets/jinja/issues/2032">#2032</a></li>
<li>Calling sync <code>render</code> for an async template uses
<code>asyncio.run</code>. <a
href="https://redirect.github.com/pallets/jinja/issues/1952">#1952</a></li>
<li>Avoid unclosed <code>auto_aiter</code> warnings. <a
href="https://redirect.github.com/pallets/jinja/issues/1960">#1960</a></li>
<li>Return an <code>aclose</code>-able <code>AsyncGenerator</code> from
<code>Template.generate_async</code>. <a
href="https://redirect.github.com/pallets/jinja/issues/1960">#1960</a></li>
<li>Avoid leaving <code>root_render_func()</code> unclosed in
<code>Template.generate_async</code>. <a
href="https://redirect.github.com/pallets/jinja/issues/1960">#1960</a></li>
<li>Avoid leaving async generators unclosed in blocks, includes and
extends. <a
href="https://redirect.github.com/pallets/jinja/issues/1960">#1960</a></li>
<li>The runtime uses the correct <code>concat</code> function for the
current environment when calling block references. <a
href="https://redirect.github.com/pallets/jinja/issues/1701">#1701</a></li>
<li>Make <code>|unique</code> async-aware, allowing it to be used after
another async-aware filter. <a
href="https://redirect.github.com/pallets/jinja/issues/1781">#1781</a></li>
<li><code>|int</code> filter handles <code>OverflowError</code> from
scientific notation. <a
href="https://redirect.github.com/pallets/jinja/issues/1921">#1921</a></li>
<li>Make compiling deterministic for tuple unpacking in a <code>{% set
... %}</code> call. <a
href="https://redirect.github.com/pallets/jinja/issues/2021">#2021</a></li>
<li>Fix dunder protocol (<code>copy</code>/<code>pickle</code>/etc)
interaction with <code>Undefined</code> objects. <a
href="https://redirect.github.com/pallets/jinja/issues/2025">#2025</a></li>
<li>Fix <code>copy</code>/<code>pickle</code> support for the internal
<code>missing</code> object. <a
href="https://redirect.github.com/pallets/jinja/issues/2027">#2027</a></li>
<li><code>Environment.overlay(enable_async)</code> is applied correctly.
<a
href="https://redirect.github.com/pallets/jinja/issues/2061">#2061</a></li>
<li>The error message from <code>FileSystemLoader</code> includes the
paths that were searched. <a
href="https://redirect.github.com/pallets/jinja/issues/1661">#1661</a></li>
<li><code>PackageLoader</code> shows a clearer error message when the
package does not contain the templates directory. <a
href="https://redirect.github.com/pallets/jinja/issues/1705">#1705</a></li>
<li>Improve annotations for methods returning copies. <a
href="https://redirect.github.com/pallets/jinja/issues/1880">#1880</a></li>
<li><code>urlize</code> does not add <code>mailto:</code> to values like
<code>@a@b</code>. <a
href="https://redirect.github.com/pallets/jinja/issues/1870">#1870</a></li>
<li>Tests decorated with <code>@pass_context</code> can be used with the
<code>|select</code> filter. <a
href="https://redirect.github.com/pallets/jinja/issues/1624">#1624</a></li>
<li>Using <code>set</code> for multiple assignment (<code>a, b = 1,
2</code>) does not fail when the target is a namespace attribute. <a
href="https://redirect.github.com/pallets/jinja/issues/1413">#1413</a></li>
<li>Using <code>set</code> in all branches of <code>{% if %}{% elif %}{%
else %}</code> blocks does not cause the variable to be considered
initially undefined. <a
href="https://redirect.github.com/pallets/jinja/issues/1253">#1253</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pallets/jinja/blob/main/CHANGES.rst">jinja2's
changelog</a>.</em></p>
<blockquote>
<h2>Version 3.1.5</h2>
<p>Released 2024-12-21</p>
<ul>
<li>The sandboxed environment handles indirect calls to
<code>str.format</code>, such as
by passing a stored reference to a filter that calls its argument.
:ghsa:<code>q2x7-8rv6-6q7h</code></li>
<li>Escape template name before formatting it into error messages, to
avoid
issues with names that contain f-string syntax.
:issue:<code>1792</code>, :ghsa:<code>gmj6-6f8f-6699</code></li>
<li>Sandbox does not allow <code>clear</code> and <code>pop</code> on
known mutable sequence
types. :issue:<code>2032</code></li>
<li>Calling sync <code>render</code> for an async template uses
<code>asyncio.run</code>.
:pr:<code>1952</code></li>
<li>Avoid unclosed <code>auto_aiter</code> warnings.
:pr:<code>1960</code></li>
<li>Return an <code>aclose</code>-able <code>AsyncGenerator</code> from
<code>Template.generate_async</code>. :pr:<code>1960</code></li>
<li>Avoid leaving <code>root_render_func()</code> unclosed in
<code>Template.generate_async</code>. :pr:<code>1960</code></li>
<li>Avoid leaving async generators unclosed in blocks, includes and
extends.
:pr:<code>1960</code></li>
<li>The runtime uses the correct <code>concat</code> function for the
current environment
when calling block references. :issue:<code>1701</code></li>
<li>Make <code>|unique</code> async-aware, allowing it to be used after
another
async-aware filter. :issue:<code>1781</code></li>
<li><code>|int</code> filter handles <code>OverflowError</code> from
scientific notation.
:issue:<code>1921</code></li>
<li>Make compiling deterministic for tuple unpacking in a <code>{% set
... %}</code>
call. :issue:<code>2021</code></li>
<li>Fix dunder protocol (<code>copy</code>/<code>pickle</code>/etc)
interaction with <code>Undefined</code>
objects. :issue:<code>2025</code></li>
<li>Fix <code>copy</code>/<code>pickle</code> support for the internal
<code>missing</code> object.
:issue:<code>2027</code></li>
<li><code>Environment.overlay(enable_async)</code> is applied correctly.
:pr:<code>2061</code></li>
<li>The error message from <code>FileSystemLoader</code> includes the
paths that were
searched. :issue:<code>1661</code></li>
<li><code>PackageLoader</code> shows a clearer error message when the
package does not
contain the templates directory. :issue:<code>1705</code></li>
<li>Improve annotations for methods returning copies.
:pr:<code>1880</code></li>
<li><code>urlize</code> does not add <code>mailto:</code> to values like
<code>@a@b</code>. :pr:<code>1870</code></li>
<li>Tests decorated with <code>@pass_context`` can be used with the
``|select`` filter. :issue:</code>1624`</li>
<li>Using <code>set</code> for multiple assignment (<code>a, b = 1,
2</code>) does not fail when the
target is a namespace attribute. :issue:<code>1413</code></li>
<li>Using <code>set</code> in all branches of <code>{% if %}{% elif %}{%
else %}</code> blocks
does not cause the variable to be considered initially undefined.
:issue:<code>1253</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pallets/jinja/commit/877f6e51be8e1765b06d911cfaa9033775f051d1"><code>877f6e5</code></a>
release version 3.1.5</li>
<li><a
href="https://github.com/pallets/jinja/commit/8d588592653b052f957b720e1fc93196e06f207f"><code>8d58859</code></a>
remove test pypi</li>
<li><a
href="https://github.com/pallets/jinja/commit/eda8fe86fd716dfce24910294e9f1fc81fbc740c"><code>eda8fe8</code></a>
update dev dependencies</li>
<li><a
href="https://github.com/pallets/jinja/commit/c8fdce1e0333f1122b244b03a48535fdd7b03d91"><code>c8fdce1</code></a>
Fix bug involving calling set on a template parameter within all
branches of ...</li>
<li><a
href="https://github.com/pallets/jinja/commit/66587ce989e5a478e0bb165371fa2b9d42b7040f"><code>66587ce</code></a>
Fix bug where set would sometimes fail within if</li>
<li><a
href="https://github.com/pallets/jinja/commit/fbc3a696c729d177340cc089531de7e2e5b6f065"><code>fbc3a69</code></a>
Add support for namespaces in tuple parsing (<a
href="https://redirect.github.com/pallets/jinja/issues/1664">#1664</a>)</li>
<li><a
href="https://github.com/pallets/jinja/commit/b8f4831d41e6a7cb5c40d42f074ffd92d2daccfc"><code>b8f4831</code></a>
more comments about nsref assignment</li>
<li><a
href="https://github.com/pallets/jinja/commit/ee832194cd9f55f75e5a51359b709d535efe957f"><code>ee83219</code></a>
Add support for namespaces in tuple assignment</li>
<li><a
href="https://github.com/pallets/jinja/commit/1d55cddbb28e433779511f28f13a2d8c4ec45826"><code>1d55cdd</code></a>
Triple quotes in docs (<a
href="https://redirect.github.com/pallets/jinja/issues/2064">#2064</a>)</li>
<li><a
href="https://github.com/pallets/jinja/commit/8a8eafc6b992ba177f1d3dd483f8465f18a11116"><code>8a8eafc</code></a>
edit block assignment section</li>
<li>Additional commits viewable in <a
href="https://github.com/pallets/jinja/compare/3.1.4...3.1.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jinja2&package-manager=pip&previous-version=3.1.4&new-version=3.1.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-07 09:41:37 -05:00
William FHandGitHub a486eb5e75 0.2.61 (#2933) 2025-01-05 14:43:43 -08:00
William Fu-Hinthorn e9d62944d3 0.2.61 2025-01-05 14:42:25 -08:00
William FHandGitHub cbd09abe58 fix formatting (#2880) 2025-01-04 04:59:04 -08:00
William FHandGitHub 4798443e31 Import TypedDict from typing_extensions, add ruff rule (#2910)
Within `libs/langgraph`, change all `TypedDict` imports to come from
`typing_extensions` rather than `typing`, as `pydantic` doesn't like the
latter.

Additionally, add a ruff rule to ban these imports too (so this doesn't
regress).

Solves  #2909.
2025-01-04 04:58:43 -08:00
William FHandGitHub ce900864fa Fix typo in client.py (#2925)
Typo change in function doc
2025-01-04 04:58:23 -08:00
Ramón VargasandGitHub 577f95bd50 Merge branch 'main' into patch-1 2025-01-04 13:26:54 +01:00
William FHandGitHub 59a11c63b0 Support multiple args in @task's (#2923)
Also add support for just `@task` without the ()'s
2025-01-04 04:25:49 -08:00
Andrew NguonlyandGitHub 08098688d4 docs: Update docs for POST /v1/projects/{project_id}/revisions endpoint (#2926) 2025-01-03 10:36:38 -08:00
Ramón VargasandGitHub 687ee02509 Update client.py
Typo change in function doc
2025-01-03 18:40:15 +01:00
William Fu-Hinthorn 451bc038b6 Support multiple args in @task's 2025-01-03 07:56:27 -08:00
Nuno CamposandGitHub c865e8c070 Update README.md 2025-01-02 10:01:35 +00:00
Nuno CamposandGitHub d74ec2c2de Bubble up stack close task (#2913) 2025-01-02 09:54:43 +00:00
Nuno CamposandGitHub f70bfc6d87 Fix stream_mode=updates for cases where one node returns multiple updates for same key (#2903) 2025-01-02 09:54:06 +00:00
David DuongandGitHub c86f0af107 fix(sdk): Fix SDK Command.update type (#2901)
Align typing with JS:


https://github.com/langchain-ai/langgraphjs/blob/main/libs/langgraph/src/constants.ts#L226
2025-01-01 15:55:58 +01:00
William Fu-Hinthorn c6ee807de5 Bubble up stack close task 2025-01-01 05:41:57 -08:00
Johannes Mario Meissner 7256752f48 Import TypedDict from typing_extensions, add ruff rule 2024-12-31 22:14:16 +09:00
Nuno Campos dac84951aa Fix stream_mode=updates for cases where one node returns multiple updates for same key 2024-12-30 20:10:59 +00:00
Nuno CamposandGitHub 3aaa3e38a0 Add more tests for async cancellation (#2902) 2024-12-30 20:10:14 +00:00
Nuno Campos 400d83708a Fix 2024-12-30 20:01:35 +00:00
Nuno Campos 1d9c7ef461 Fix 2024-12-30 19:29:14 +00:00
Nuno Campos 01e5ecedfd Remove assertion of order 2024-12-30 19:26:18 +00:00
Nuno Campos 76199701b0 Add more tests for async cancellation 2024-12-30 18:56:56 +00:00
jacoblee93 2766fccb5b Bump Python version 2024-12-30 10:30:50 -08:00
jacoblee93 6aef3e0117 Update Python types too 2024-12-30 10:29:01 -08:00
jacoblee93 c5023ba147 Modify type 2024-12-30 10:22:06 -08:00
jacoblee93 9a9fe2fdec Update JS SDK command types 2024-12-30 10:14:51 -08:00
Andrew NguonlyandGitHub effddca494 docs: LangGraph Control Plane API (#2881) 2024-12-26 16:15:18 -08:00
Harrison Chase 2ab59840e7 cr 2024-12-26 12:48:08 -08:00
Eugene YurtsevandGitHub 0fb65f6e67 docs: fix accidental nav bar change (#2865) 2024-12-23 21:47:14 -05:00
Eugene Yurtsev 0ecd23eec6 fix accidental commit 2024-12-23 21:38:16 -05:00
Eugene YurtsevandGitHub e137dabf22 docs: memoize class resolution (#2861)
Main purpose is to avoid all the repeated log warnings which make the
builds hare to understand
2024-12-23 14:24:16 -05:00
Eugene YurtsevandGitHub fdc1e47aa1 docs: add edit uri (#2860) 2024-12-23 14:20:17 -05:00
Eugene Yurtsev 866780b477 x 2024-12-23 14:11:38 -05:00
Eugene Yurtsev 18d3fa2e15 x 2024-12-23 14:06:25 -05:00
Eugene YurtsevandGitHub 4b0c53fb5c docs: improve api reference generation in code blocks (#2857)
Generate api references from any markdown -- this will handle markdown
files in notebooks as well as code blocks in plain markdown
2024-12-23 13:35:08 -05:00
Eugene Yurtsev 5183484322 x 2024-12-22 22:10:29 -05:00
Eugene Yurtsev 8213e4719b qx 2024-12-22 22:10:06 -05:00
Eugene Yurtsev f993dfcfcb x 2024-12-22 22:07:59 -05:00
Eugene YurtsevandGitHub 9e31b82d8d docs: Add highlight-next-line (#2850)
Add highlight next line


![image](https://github.com/user-attachments/assets/cda3c9f2-1f98-489a-a487-d1ad9c6a1186)


![image](https://github.com/user-attachments/assets/bfa05f4d-50cc-490a-9598-5076068d8f4b)
2024-12-20 21:10:51 -05:00
Vadym BardaandGitHub a3c5b8fc37 checkpoint-postgres: release 2.0.9 (#2849) 2024-12-20 17:47:20 -05:00
Eugene Yurtsev 1e0aebc3ec x 2024-12-20 17:38:20 -05:00
Eugene Yurtsev 056f581342 x 2024-12-20 17:29:10 -05:00
Eugene Yurtsev a0d7323bec x 2024-12-20 17:14:22 -05:00
Vadym BardaandGitHub 44ee0199fd checkpoint postgres: add a shallow checkpointer (#2826)
This PR adds a "shallow" version of `PostgresSaver` checkpointer that
ONLY stores the most recent checkpoint and does NOT retain any history.
It is meant to be a light-weight drop-in replacement for the
PostgresSaver that supports most of the LangGraph persistence
functionality with the exception of time travel.
2024-12-20 17:51:20 +00:00
1de61f6fce docs: Improve explanation and fix grammar mistakes in agentic concepts guide (#2541)
Made some of the explanations more clear by rephrasing certain parts of
the sentence.

Fixed minor grammar mistakes also.

---------

Co-authored-by: Vadym Barda <vadim.barda@gmail.com>
2024-12-20 11:20:27 -05:00
Vadym BardaandGitHub f33db6cec4 docs: remove langgraph up references (#2847) 2024-12-20 11:00:04 -05:00
Vadym BardaandGitHub c72107177b docs: update custom agent in handoffs doc (#2846) 2024-12-20 14:59:38 +00:00
Yassin NouhandGitHub f520a38d30 docs: missing docstring for aupdate_state method (#2435) 2024-12-20 09:06:29 -05:00
Andrew NguonlyandGitHub d0278f520c docs: Update CPU for Production type deployments (#2845) 2024-12-19 21:04:31 -08:00
Vadym BardaandGitHub 506539ac9d langgraph: actually run test_large_cases_async (#2843) 2024-12-19 22:25:22 +00:00
JasonJandGitHub d6c6516f16 fix: minor modification, syntax error (#1905) 2024-12-19 15:29:10 -05:00
Sarthak GuptaandGitHub 6f5d6d9993 docs: remove Literal as it is not being used (#2149)
This PR removes the use of `from typing import Literal` since it is not
being used in the code implementation
2024-12-19 15:25:27 -05:00
Neeraj GandGitHub 8dcd058404 Formatting inconsistency in low_level.md (#1342) 2024-12-19 15:21:49 -05:00
William FHandGitHub e3050b3a3e [Docs] Show example payloads (#2839) 2024-12-19 10:38:17 -08:00
William Fu-Hinthorn 9e767afad7 Link 2024-12-19 09:09:36 -08:00
William Fu-Hinthorn 62b35277ec Warning more obvious 2024-12-19 09:01:50 -08:00
William Fu-Hinthorn 931419909b rm 2024-12-19 08:59:11 -08:00
William Fu-Hinthorn e849c869cc [Docs] Add example payloads to code 2024-12-19 08:52:31 -08:00
William FHandGitHub 5a580ae5ec [Docs] Add diagrams (#2834) 2024-12-19 06:37:55 -08:00
William Fu-Hinthorn 47a0e09513 Add prereq 2024-12-19 06:28:56 -08:00
William Fu-Hinthorn f37486efe2 Add images 2024-12-19 06:26:52 -08:00
William FHandGitHub fa61be9fbc [Docs] Bullet points (#2830) 2024-12-18 23:10:13 -08:00
William Fu-Hinthorn 08097a78bd [Docs] Bullet points 2024-12-18 23:09:06 -08:00
William FHandGitHub 43f610e9a6 [Doc] Fix env var name (#2828) 2024-12-18 21:32:08 -08:00
William Fu-Hinthorn aa1ddee67e [Doc] Fix env var name 2024-12-18 21:30:12 -08:00
William FHandGitHub 12b46e8a69 [Docs] Make example more illustrative (#2827) 2024-12-18 18:58:26 -08:00
William Fu-Hinthorn d90f69105a missed 2024-12-18 18:49:49 -08:00
William Fu-Hinthorn fbd3b67183 [Docs] Make example more illustrative 2024-12-18 18:47:35 -08:00
William FHandGitHub 6d8be543e7 Update syntax highlighting (#2825) 2024-12-18 17:53:33 -08:00
William Fu-Hinthorn 1c1772f7ec Update syntax highlighting 2024-12-18 17:51:07 -08:00
William FHandGitHub ce239c784a [Docs] Ignore linkcheck localhost on main (#2824) 2024-12-18 16:48:02 -08:00
William Fu-Hinthorn c14c978824 [Docs] Ignore localhost on main 2024-12-18 16:46:34 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Vadym Barda
ebb2823be0 build(deps-dev): bump tornado from 6.4.1 to 6.4.2 in /libs/langgraph (#2814)
Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.4.1 to
6.4.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tornadoweb/tornado/blob/v6.4.2/docs/releases.rst">tornado's
changelog</a>.</em></p>
<blockquote>
<h1>Release notes</h1>
<p>.. toctree::
:maxdepth: 2</p>
<p>releases/v6.4.2
releases/v6.4.1
releases/v6.4.0
releases/v6.3.3
releases/v6.3.2
releases/v6.3.1
releases/v6.3.0
releases/v6.2.0
releases/v6.1.0
releases/v6.0.4
releases/v6.0.3
releases/v6.0.2
releases/v6.0.1
releases/v6.0.0
releases/v5.1.1
releases/v5.1.0
releases/v5.0.2
releases/v5.0.1
releases/v5.0.0
releases/v4.5.3
releases/v4.5.2
releases/v4.5.1
releases/v4.5.0
releases/v4.4.3
releases/v4.4.2
releases/v4.4.1
releases/v4.4.0
releases/v4.3.0
releases/v4.2.1
releases/v4.2.0
releases/v4.1.0
releases/v4.0.2
releases/v4.0.1
releases/v4.0.0
releases/v3.2.2
releases/v3.2.1
releases/v3.2.0
releases/v3.1.1
releases/v3.1.0
releases/v3.0.2
releases/v3.0.1
releases/v3.0.0
releases/v2.4.1
releases/v2.4.0</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/tornadoweb/tornado/commit/a5ecfab15e52202a46d34638aad93cddca86d87b"><code>a5ecfab</code></a>
Bump version to 6.4.2</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/bc7df6bafdec61155e7bf385081feb205463857d"><code>bc7df6b</code></a>
Fix tests with Twisted 24.7.0</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/d5ba4a1695fbf7c6a3e54313262639b198291533"><code>d5ba4a1</code></a>
httputil: Fix quadratic performance of cookie parsing</li>
<li>See full diff in <a
href="https://github.com/tornadoweb/tornado/compare/v6.4.1...v6.4.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tornado&package-manager=pip&previous-version=6.4.1&new-version=6.4.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-12-18 19:36:20 -05:00
William FHandGitHub 25f0224f97 [Docs] Link glob (#2823) 2024-12-18 16:35:09 -08:00
William FHandGitHub fdf9b0ad48 Merge branch 'main' into wfh/expand_link_glob 2024-12-18 16:34:58 -08:00
William FHandGitHub 00ecccfd81 [docs] Remove show source: true in ref docs (#2821) 2024-12-18 16:34:46 -08:00
William Fu-Hinthorn 7d5452d039 [Docs] Link glob 2024-12-18 16:32:02 -08:00
William FHandGitHub 2d8de54e80 [Docs] Ignore 127.0.0 links (#2822) 2024-12-18 16:16:42 -08:00
William Fu-Hinthorn 32abc62bc1 [Docs] Ignore 127.0.0 links 2024-12-18 16:14:54 -08:00
William Fu-Hinthorn e36cf4111d [docs] Remove show source: true in ref docs 2024-12-18 16:04:35 -08:00
William FHandGitHub 53a2c2bdcd [Docs] Fix mkdocs.yml paths (#2820) 2024-12-18 15:58:30 -08:00
William Fu-Hinthorn 2cae9337a7 Fix broken index 2024-12-18 15:56:35 -08:00
William Fu-Hinthorn b056e17b38 Linkcheck 2024-12-18 15:46:45 -08:00
William FHandGitHub 2855caa3eb Fix config cli type from Path -> str (#2771)
Config parameter in `dev` was typed as pathlib.Path, but it is actually
a string. We need to manually create a Path from the string when parsing
the config.

FIxes #2647
2024-12-18 15:25:15 -08:00
William FHandGitHub 140566e662 [Docs] Add auth docs (#2797) 2024-12-18 15:22:26 -08:00
William FH b7f57b1375 Merge branch 'main' into wfh/docs/auth 2024-12-18 15:09:15 -08:00
Vadym BardaandGitHub 121c5863db docs: add a banner for langchain academy (#2818) 2024-12-18 23:08:51 +00:00
William Fu-Hinthorn 1709cd3fb5 concept 2024-12-18 15:08:19 -08:00
William Fu-Hinthorn d4a1fe5a03 concept 2024-12-18 15:03:13 -08:00
William Fu-Hinthorn 06e1e4ed12 Update cross-linking 2024-12-18 14:52:02 -08:00
Vadym BardaandGitHub 1e62b175ba docs: make the studio web UI docs more clear (#2812) 2024-12-18 22:40:22 +00:00
William FHandGitHub f89fe49f99 Merge branch 'main' into wfh/docs/auth 2024-12-18 14:26:39 -08:00
William Fu-Hinthorn 2e1971baf3 Remaining feedback 2024-12-18 14:25:25 -08:00
William Fu-Hinthorn 948027aef2 Notebook style 2024-12-18 14:22:15 -08:00
William Fu-Hinthorn 6954e63671 Numbering 2024-12-18 14:16:35 -08:00
William Fu-Hinthorn 7f0bfdc139 Feedback 2024-12-18 14:15:54 -08:00
William FHandGitHub 0496128e6b [CLI] Bump min-bound for langgraph-api (#2816) 2024-12-18 12:38:37 -08:00
William FHandGitHub d79b1a61e8 Merge branch 'main' into fix-cli-path 2024-12-18 12:34:39 -08:00
William Fu-Hinthorn e227f6ce83 Bump version 2024-12-18 12:30:06 -08:00
William Fu-Hinthorn 8a1a11fde5 [CLI] Update min bound for langgraph-api 2024-12-18 12:29:17 -08:00
Andrew NguonlyandGitHub c47fd171c6 docs(cloud): Add note about GitHub org/acc owner (#2815)
### Summary
Clarifying that in order to install the `hosted-langserve` GitHub app,
the GitHub user must be an owner of the organization or account.
2024-12-18 11:45:30 -08:00
William Fu-Hinthorn 1e07a9ac97 Add admonition 2024-12-18 11:41:52 -08:00
William Fu-Hinthorn d9cc227e75 Unpin install command in doc 2024-12-18 11:41:52 -08:00
6b45a281c1 fix example in docs of state_schema in create_react_agent (#2109)
because in
```python
    def call_model(
        state: AgentState,
        config: RunnableConfig,
    )
...
        if (
            (
                "remaining_steps" not in state
                and state["is_last_step"]
                and has_tool_calls
            )
```

https://github.com/langchain-ai/langgraph/blob/c0b56bf60d84ed435609c35b0691cd0305ceae78/libs/langgraph/langgraph/prebuilt/chat_agent_executor.py#L543
the AgentState requires is_last_step to have a default value, like
`False`, and `IsLastStep` can satisfy it.

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-12-18 11:41:52 -08:00
BagaturandWilliam Fu-Hinthorn 532bc71c11 langgraph[patch]: format messages in state (#2199)
Add `format` flag to `add_messages` which allows you to specify if the
contents of messages in state should be formatted in a particular way.
PR only adds support for OpenAI style contents. Helpful if you're using
different models at different nodes and want a unified messages format
to interact with when you manually update messages.
2024-12-18 11:41:52 -08:00
dependabot[bot]William Fu-Hinthorndependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Vadym Barda
dabd75f1f9 build(deps-dev): bump tornado from 6.4.1 to 6.4.2 (#2519)
Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.4.1 to
6.4.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tornadoweb/tornado/blob/v6.4.2/docs/releases.rst">tornado's
changelog</a>.</em></p>
<blockquote>
<h1>Release notes</h1>
<p>.. toctree::
:maxdepth: 2</p>
<p>releases/v6.4.2
releases/v6.4.1
releases/v6.4.0
releases/v6.3.3
releases/v6.3.2
releases/v6.3.1
releases/v6.3.0
releases/v6.2.0
releases/v6.1.0
releases/v6.0.4
releases/v6.0.3
releases/v6.0.2
releases/v6.0.1
releases/v6.0.0
releases/v5.1.1
releases/v5.1.0
releases/v5.0.2
releases/v5.0.1
releases/v5.0.0
releases/v4.5.3
releases/v4.5.2
releases/v4.5.1
releases/v4.5.0
releases/v4.4.3
releases/v4.4.2
releases/v4.4.1
releases/v4.4.0
releases/v4.3.0
releases/v4.2.1
releases/v4.2.0
releases/v4.1.0
releases/v4.0.2
releases/v4.0.1
releases/v4.0.0
releases/v3.2.2
releases/v3.2.1
releases/v3.2.0
releases/v3.1.1
releases/v3.1.0
releases/v3.0.2
releases/v3.0.1
releases/v3.0.0
releases/v2.4.1
releases/v2.4.0</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/tornadoweb/tornado/commit/a5ecfab15e52202a46d34638aad93cddca86d87b"><code>a5ecfab</code></a>
Bump version to 6.4.2</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/bc7df6bafdec61155e7bf385081feb205463857d"><code>bc7df6b</code></a>
Fix tests with Twisted 24.7.0</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/d5ba4a1695fbf7c6a3e54313262639b198291533"><code>d5ba4a1</code></a>
httputil: Fix quadratic performance of cookie parsing</li>
<li>See full diff in <a
href="https://github.com/tornadoweb/tornado/compare/v6.4.1...v6.4.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tornado&package-manager=pip&previous-version=6.4.1&new-version=6.4.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-12-18 11:41:52 -08:00
Nuno CamposandWilliam Fu-Hinthorn ef88b805a7 0.2.60 2024-12-18 11:41:52 -08:00
Nuno CamposandWilliam Fu-Hinthorn 7e8a68f0f0 Fix 2024-12-18 11:41:52 -08:00
Nuno CamposandWilliam Fu-Hinthorn e20bd15580 lib: Fix incorrect default for Command.update
- this should not default to empty tuple, it should default to None
2024-12-18 11:41:52 -08:00
William Fu-Hinthorn 51c57cc819 [SDK] Add studio user object 2024-12-18 11:41:52 -08:00
William FHandGitHub 09a6450eed [SDK] Add studio user object (#2813) 2024-12-18 11:33:50 -08:00
William FHandGitHub 77fba7a571 Merge branch 'main' into wfh/sdk/studio_user 2024-12-18 11:28:21 -08:00
William Fu-Hinthorn 60232eadc4 [SDK] Add studio user object 2024-12-18 11:21:13 -08:00
83e4e6c4c2 Update docs/docs/tutorials/auth/add_auth_server.md
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-12-18 11:15:38 -08:00
William FHandGitHub a6f0c665af Unpin install command in doc (#2811) 2024-12-18 10:13:29 -08:00
William Fu-Hinthorn f1a2e19144 Add admonition 2024-12-18 10:04:57 -08:00
William Fu-Hinthorn b28e9d0a87 Unpin install command in doc 2024-12-18 10:03:16 -08:00
William Fu-Hinthorn b3230cf6d1 More guidance 2024-12-18 10:01:56 -08:00
1a6c3114f3 fix example in docs of state_schema in create_react_agent (#2109)
because in
```python
    def call_model(
        state: AgentState,
        config: RunnableConfig,
    )
...
        if (
            (
                "remaining_steps" not in state
                and state["is_last_step"]
                and has_tool_calls
            )
```

https://github.com/langchain-ai/langgraph/blob/c0b56bf60d84ed435609c35b0691cd0305ceae78/libs/langgraph/langgraph/prebuilt/chat_agent_executor.py#L543
the AgentState requires is_last_step to have a default value, like
`False`, and `IsLastStep` can satisfy it.

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-12-18 12:46:33 -05:00
BagaturandGitHub 4f1bf4fa7a langgraph[patch]: format messages in state (#2199)
Add `format` flag to `add_messages` which allows you to specify if the
contents of messages in state should be formatted in a particular way.
PR only adds support for OpenAI style contents. Helpful if you're using
different models at different nodes and want a unified messages format
to interact with when you manually update messages.
2024-12-18 17:19:04 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Vadym Barda
22fa673872 build(deps-dev): bump tornado from 6.4.1 to 6.4.2 (#2519)
Bumps [tornado](https://github.com/tornadoweb/tornado) from 6.4.1 to
6.4.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tornadoweb/tornado/blob/v6.4.2/docs/releases.rst">tornado's
changelog</a>.</em></p>
<blockquote>
<h1>Release notes</h1>
<p>.. toctree::
:maxdepth: 2</p>
<p>releases/v6.4.2
releases/v6.4.1
releases/v6.4.0
releases/v6.3.3
releases/v6.3.2
releases/v6.3.1
releases/v6.3.0
releases/v6.2.0
releases/v6.1.0
releases/v6.0.4
releases/v6.0.3
releases/v6.0.2
releases/v6.0.1
releases/v6.0.0
releases/v5.1.1
releases/v5.1.0
releases/v5.0.2
releases/v5.0.1
releases/v5.0.0
releases/v4.5.3
releases/v4.5.2
releases/v4.5.1
releases/v4.5.0
releases/v4.4.3
releases/v4.4.2
releases/v4.4.1
releases/v4.4.0
releases/v4.3.0
releases/v4.2.1
releases/v4.2.0
releases/v4.1.0
releases/v4.0.2
releases/v4.0.1
releases/v4.0.0
releases/v3.2.2
releases/v3.2.1
releases/v3.2.0
releases/v3.1.1
releases/v3.1.0
releases/v3.0.2
releases/v3.0.1
releases/v3.0.0
releases/v2.4.1
releases/v2.4.0</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/tornadoweb/tornado/commit/a5ecfab15e52202a46d34638aad93cddca86d87b"><code>a5ecfab</code></a>
Bump version to 6.4.2</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/bc7df6bafdec61155e7bf385081feb205463857d"><code>bc7df6b</code></a>
Fix tests with Twisted 24.7.0</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/d5ba4a1695fbf7c6a3e54313262639b198291533"><code>d5ba4a1</code></a>
httputil: Fix quadratic performance of cookie parsing</li>
<li>See full diff in <a
href="https://github.com/tornadoweb/tornado/compare/v6.4.1...v6.4.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tornado&package-manager=pip&previous-version=6.4.1&new-version=6.4.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-12-18 10:04:05 -05:00
Nuno Campos 3d85f2296c 0.2.60 2024-12-18 13:45:32 +00:00
Nuno CamposandGitHub 5ad9cfa030 lib: Fix incorrect default for Command.update (#2809)
- this should not default to empty tuple, it should default to None
2024-12-18 13:35:53 +00:00
Nuno Campos 39281c866d Fix 2024-12-18 13:28:22 +00:00
Nuno Campos 4c3a38d324 lib: Fix incorrect default for Command.update
- this should not default to empty tuple, it should default to None
2024-12-18 13:15:38 +00:00
William Fu-Hinthorn 8fc3f204ea Add pt 2 and 3 2024-12-18 01:10:33 -08:00
William FH 2df2f41dc7 Merge branch 'main' into wfh/docs/auth 2024-12-18 01:08:41 -08:00
William Fu-Hinthorn 30e647abce Add links 2024-12-18 01:06:01 -08:00
William Fu-Hinthorn b85c9961d7 Split into 3 2024-12-18 00:50:38 -08:00
William Fu-Hinthorn 1c97bddc14 Fix cross linking 2024-12-17 18:22:56 -08:00
William Fu-Hinthorn 97b3d1b9ac Simplify tutorial 2024-12-17 17:43:09 -08:00
Vadym BardaandGitHub 8b70da6a0f docs: update howtos nav (#2805) 2024-12-17 19:50:00 -05:00
William Fu-Hinthorn 7904fdc928 Update explanations 2024-12-17 16:41:00 -08:00
William Fu-Hinthorn ba56ba1b2a Add langgraph reference 2024-12-17 16:31:13 -08:00
William Fu-Hinthorn 12f2a480cd Add concepts 2024-12-17 16:25:48 -08:00
Vadym BardaandGitHub 532cb0a691 docs: reorg multi-agent howtos (#2784) 2024-12-18 00:01:28 +00:00
William Fu-Hinthorn 23e18e8c1b Add how-tos 2024-12-17 14:50:09 -08:00
William Fu-Hinthorn 6d160a2865 Merge branch 'main' into wfh/docs/auth 2024-12-17 14:04:31 -08:00
e0b4eb6454 doc: fixed typo in interrupt_concurrent.md (#2791)
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-12-17 15:49:44 -05:00
Eugene YurtsevandGitHub 608ff41e78 ci: fix link checker (#2803) 2024-12-17 15:41:10 -05:00
Eugene YurtsevandGitHub 9280e3411b docs: update why langgraph and other typos (#2799) 2024-12-17 15:36:41 -05:00
William FHandGitHub 36fa8e0097 Update ref docs (#2802) 2024-12-17 11:54:32 -08:00
Eugene Yurtsev f63217794d qx 2024-12-17 14:50:26 -05:00
William Fu-Hinthorn bcb11640a5 Update AuthContext 2024-12-17 11:46:30 -08:00
William Fu-Hinthorn b6c3a0d0fd Update wording 2024-12-17 11:37:25 -08:00
Luke JangandGitHub 8b14b6a9f0 docs: removed redundant import from the example (#2794)
there were two same import
"from langchain_openai import ChatOpenAI"
2024-12-17 14:33:35 -05:00
William Fu-Hinthorn 8c63cc1778 Add excption docs 2024-12-17 11:22:54 -08:00
William Fu-Hinthorn 6756e91ffc Authenticate return single type 2024-12-17 11:01:54 -08:00
William Fu-Hinthorn 3dd1e67977 Add mermaid 2024-12-17 10:54:18 -08:00
Eugene YurtsevandGitHub fc5d919aee docs: fix some typos (#2790) 2024-12-17 13:53:57 -05:00
Eugene Yurtsev 0369300160 update 2024-12-17 12:24:15 -05:00
William Fu-Hinthorn 245cf83b20 [Docs] Add auth tutorial 2024-12-17 08:59:04 -08:00
Vadym BardaandGitHub 9bd351b80f docs: small fixes (#2798) 2024-12-17 11:58:38 -05:00
Eugene YurtsevandGitHub 83c3f86159 docs: fix port
Fix port from 8123 (was the default for langgraph up) to 2024 (the default for langgraph dev)
2024-12-17 10:29:12 -05:00
Eugene Yurtsev 3a41a2addc q 2024-12-16 22:04:21 -05:00
Eugene Yurtsev 3eca363c23 x 2024-12-16 22:01:53 -05:00
Eugene Yurtsev 2f1e864570 x 2024-12-16 22:00:41 -05:00
Eugene Yurtsev 79a1ce6804 x 2024-12-16 21:47:32 -05:00
Eugene YurtsevandGitHub deb99a9acb docs: Update langgraph cloud deploy quickstart
docs: update langgraph cloud deploy quickstart
2024-12-16 20:39:58 -05:00
William FHandGitHub 781d0cf27a [CLI] Handle dependencies js up --watch 2024-12-16 16:27:56 -08:00
William Fu-Hinthorn 8a02ddd868 [CLI] Handle dependencies js up --watch 2024-12-16 16:19:23 -08:00
Eugene Yurtsev 5f7dcbb07a x 2024-12-16 17:57:01 -05:00
Eugene Yurtsev 9615580a66 x 2024-12-16 17:55:29 -05:00
Eugene Yurtsev d45eb0f9f2 x 2024-12-16 17:49:38 -05:00
William FHandGitHub 4caa483478 [SDK] relax response typehint
So you can return a dict with extra args
2024-12-16 14:02:46 -08:00
William Fu-Hinthorn 006305f6a8 [SDK] relax response typehint 2024-12-16 11:28:21 -08:00
Vadym BardaandGitHub d9b7aaa5cc langgraph: relax constraints in ToolNode Command validation (#2778) 2024-12-16 14:00:45 -05:00
Vadym BardaandGitHub d2794eda0a langgraph: relax type annotation for Command.update (#2777)
Addresses #2758 , #2747
2024-12-16 14:00:23 -05:00
William FHandGitHub 9cbef9b542 [SDK] Add HTTPException type
To make it easier to raise exceptions with custom status codes in the imported file.
2024-12-16 09:01:15 -08:00
William Fu-Hinthorn 343dc2d37a [SDK] Add HTTPException type 2024-12-16 08:45:44 -08:00
David DuongandGitHub ca0ff1d334 Merge pull request #2774 from langchain-ai/dqbd/studio-datasets-navigation
docs: update studio index to add datasets
2024-12-16 20:14:46 +04:00
Tat Dat Duong f5663ffa49 docs: update studio index to add datasets 2024-12-16 16:44:43 +01:00
David DuongandGitHub e7477a9315 Merge pull request #2680 from langchain-ai/dqbd/add-to-dataset-docs
feat(studio): add Add to Dataset docs
2024-12-16 19:31:49 +04:00
Tat Dat Duong 18c083b60a Use S3 for assets 2024-12-16 16:24:05 +01:00
Vadym BardaandGitHub 2f0e3c66d1 docs: update structured output how-to guide (#2773)
Fixes #2760
2024-12-16 09:51:12 -05:00
ZapironandGitHub d9ec185e72 docs: Update correct ID for initial ToolNode hyperlink (#2767)
Automatically leads to the correct `ToolNode` section instead of the top
2024-12-16 09:15:34 -05:00
Denis Capkovic 721945b5ce Fix config cli type from Path -> str
Config parameter in `dev` was typed as pathlib.Path, but it is actually
a string. We need to manually create a Path from the string when parsing
the config.
2024-12-16 10:52:02 +01:00
William FHandGitHub 87fba0ecd0 [CLI] Add openapi param to config
For langraph api
2024-12-14 07:33:07 -08:00
William FHandGitHub 30e6b5482f Merge branch 'main' into wfh/cli/add_auth_env_var 2024-12-14 07:26:34 -08:00
William Fu-Hinthorn 77b42e0867 [CLI] Add openapi param to config 2024-12-14 07:25:14 -08:00
William FHandGitHub cbe92e3e55 [CLI] Add auth param to langgraph.json
Preliminary for supporting custom auth.
2024-12-13 17:09:09 -08:00
William Fu-Hinthorn 70f2efc9a1 Update dev 2024-12-13 17:01:01 -08:00
William Fu-Hinthorn dbf5b4920e [CLI] Add auth env var 2024-12-13 16:36:35 -08:00
William FHandGitHub 9291ae8646 Merge pull request #2761 from langchain-ai/wfh/auth/types
[SDK] Add auth types
2024-12-13 16:25:41 -08:00
William Fu-Hinthorn 2713082707 [SDK] Add auth types 2024-12-13 16:17:35 -08:00
Eugene YurtsevandGitHub 89eb938b30 docs: fix typo in example
Fix typo in thread config
2024-12-13 12:47:30 -05:00
Eugene Yurtsev 26e97492b7 add missing thread config 2024-12-13 12:39:26 -05:00
Vadym BardaandGitHub 4c3958f0be docs: update custom tool call snippet (#2754) 2024-12-13 09:42:13 -05:00
980b592631 Fixed the code snippet in the Update State From Tools tutorial (#2752)
Hi,

While reading the [update state from
tools](https://langchain-ai.github.io/langgraph/how-tos/update-state-from-tools/)
tutorial. I noticed that this code snippet contains a syntax error:

```python
def call_tools(state):
    ...
    commands = [tools_by_name[call["name"].invoke(call, config={"coerce_tool_content": False}) for tool_call in tool_calls]
    return commands
```

There is a missing closing bracket `]` in the list comprehension.
Additionally, the variable `call` inside the list comprehension is
undefined, it should be `tool_call`.

Here is a corrected version of the code:

```python
def call_tools(state):
    ...
    commands = [tools_by_name[tool_call["name"]].invoke(tool_call, config={"coerce_tool_content": False}) for tool_call in tool_calls]
    return commands
```

---------

Co-authored-by: Vadym Barda <vadim.barda@gmail.com>
2024-12-13 09:40:18 -05:00
Imad SaddikandGitHub e494869c72 Fixed the documentation for the persistence concept (#2750)
Hi,

I was reading the
[persistence](https://langchain-ai.github.io/langgraph/concepts/persistence/#update-state)
concept in LangGraph and found a sentence with a missing verb, so I
fixed it.
2024-12-13 09:38:17 -05:00
da0aac7556 Updating MongoDB checkpointer docs (#2743)
This PR updates the [How-to
guide](https://langchain-ai.github.io/langgraph/how-tos/persistence_mongodb/)
on using the MongoDB checkpointer.

The guide currently explains how to create a custom MongoDB
checkpointer, but we now have a checkpointer implementation available
via the `langgraph-checkpoint-mongodb` library. This PR updates the
current resource to guide users on how to use this implementation.

---------

Co-authored-by: ajosh0504 <apoorva.joshi@mongodb.com>
Co-authored-by: vbarda <vadym@langchain.dev>
2024-12-12 15:31:57 -05:00
Vadym BardaandGitHub a200027cda checkpoint: release 2.0.9 (#2744) 2024-12-12 15:06:54 -05:00
Eugene YurtsevandGitHub 8cd57f7457 Merge pull request #2742 from langchain-ai/eugene/more_info_in_human_in_the_loop
concepts: HIL add more context to interrupt section
2024-12-12 14:55:00 -05:00
Nuno Campos 26c1f1ee7a sdk-py 0.1.44 2024-12-12 11:48:20 -08:00
Eugene Yurtsev 33af251a09 x 2024-12-12 14:01:33 -05:00
Eugene YurtsevandGitHub 17dc588c81 docs: concepts HIL add example w/ subgraph call
Add an example with subgraph call to illustrate the flow
2024-12-12 12:02:36 -05:00
Eugene Yurtsev 258060593b x 2024-12-12 11:54:04 -05:00
Vadym BardaandGitHub fbe513835f docs: update type annotations (#2739) 2024-12-12 11:53:55 -05:00
Eugene Yurtsev f319b1e107 x 2024-12-12 11:50:09 -05:00
Nuno CamposandGitHub cbb7348998 Merge pull request #2736 from langchain-ai/nc/12dec/sdk-command-keys
sdk-py: Strip out unused keys in command parameter
2024-12-12 08:18:19 -08:00
Nuno CamposandGitHub 2d8246e7c4 Merge pull request #2735 from langchain-ai/vb/relax-strict-keys
checkpoint: set strict_map_key=False in serde
2024-12-12 08:15:48 -08:00
Nuno Campos e5ea4f51c7 sdk-py: Strip out unused keys in command parameter 2024-12-12 08:10:43 -08:00
vbarda a031f8294e all lines 2024-12-12 11:06:45 -05:00
vbarda 7d940a4a96 lint 2024-12-12 10:58:50 -05:00
vbarda 6ae0c83c83 checkpoint: set strict_map_key=False in serde 2024-12-12 10:58:07 -05:00
Vadym BardaandGitHub 083a14c2c5 docs: update how-to to remove agent wrapper (#2721) 2024-12-12 08:15:17 -05:00
Nuno CamposandGitHub e4db5c2ca4 Merge pull request #2728 from langchain-ai/nc/11dec/more-tests
lib: Add more tests
2024-12-11 17:41:47 -08:00
Nuno Campos 1d2b50e438 Fix 2024-12-11 17:34:21 -08:00
Nuno Campos 5146c9fcdf Disable for old py 2024-12-11 17:04:58 -08:00
Nuno Campos e8a2f7ef92 lib: Add more tests
- add more unit tests (courtesy of claude)
- move tests with large assertions to separate file
2024-12-11 16:20:53 -08:00
Vadym BardaandGitHub 0400c5236e docs: update redis how-to (#2727)
Fixes #2712
2024-12-11 23:22:47 +00:00
Vadym BardaandGitHub 67f96063e2 docs: update min lib version for howto (#2726) 2024-12-11 17:11:57 -05:00
Vadym BardaandGitHub 44cdbc781f langgraph: release 0.2.59 (#2725) 2024-12-11 16:45:13 -05:00
Vadym BardaandGitHub f642fb6545 langgraph[fix]: pass config to tools (#2724)
Fixes #2723
2024-12-11 21:43:29 +00:00
Andrew NguonlyandGitHub ff3bc2f982 docs: Add details about Cloud SaaS deployment time (#2722) 2024-12-11 13:19:19 -08:00
William FHandGitHub e1925a8dcb Merge pull request #2720 from langchain-ai/wfh/docs/missing_backticks 2024-12-11 12:34:51 -08:00
William FHandGitHub fe83a151bb Merge branch 'main' into wfh/docs/missing_backticks 2024-12-11 12:34:38 -08:00
William Fu-Hinthorn d18c9449ec [docs] Add missing backicks 2024-12-11 12:33:33 -08:00
Eugene YurtsevandGitHub 12a15c3cb4 docs: document interrupt & HIL
- Document interrupt reference
- Update conceptual guides for HIL
- Split time-travel conceptual guide
- Split breakpoints into separate conceptual guide
- Update relevant how-tos
- Update how-to index page for HIL with more information and recommendations
- New how-to for multi turn conversation
2024-12-11 14:00:21 -05:00
Eugene Yurtsev 189358cb91 one more link fix 2024-12-11 13:22:17 -05:00
Eugene YurtsevandGitHub d16004c0b6 Merge branch 'main' into eugene/document_interrupt 2024-12-11 13:14:01 -05:00
Eugene Yurtsev fdf19a5be9 x 2024-12-11 13:12:29 -05:00
Eugene Yurtsev d24ce62c3f x 2024-12-11 13:10:42 -05:00
Eugene Yurtsev 3ffed8d38d x 2024-12-11 13:08:57 -05:00
vbarda 25d4512744 update cassettes 2024-12-11 13:03:27 -05:00
Eugene Yurtsev 630195a108 fix one more link 2024-12-11 12:50:32 -05:00
Eugene YurtsevandGitHub 475e16b8ed Merge pull request #2718 from langchain-ai/eugene/fix_links
fix links
2024-12-11 12:43:19 -05:00
Eugene Yurtsev 32702dea08 x 2024-12-11 12:42:54 -05:00
Eugene Yurtsev 3db266bb93 x 2024-12-11 12:41:03 -05:00
Eugene Yurtsev 11ce54d7e4 x 2024-12-11 12:39:53 -05:00
Eugene Yurtsev 54a5e45d21 x 2024-12-11 12:37:54 -05:00
vbarda 0ad470162c fix links 2024-12-11 11:54:19 -05:00
Eugene YurtsevandGitHub 37436c5cd6 Merge pull request #2717 from langchain-ai/eugene/breakpoints_take_one_hundred
re-org concepts
2024-12-11 11:42:15 -05:00
Eugene Yurtsev 7f48428d16 x 2024-12-11 11:41:00 -05:00
Eugene Yurtsev d9c0a5d827 x 2024-12-11 11:40:09 -05:00
Eugene Yurtsev 6907d1b775 x 2024-12-11 11:32:33 -05:00
Eugene YurtsevandGitHub bec3055561 Merge pull request #2714 from langchain-ai/eugene/add_more_hil_patterns
Beef up concept, remove how to
2024-12-11 11:09:05 -05:00
Eugene YurtsevandGitHub 2f535a803c Merge pull request #2716 from langchain-ai/eugene/document_command
concepts: document command as HIL
2024-12-11 11:08:57 -05:00
Eugene Yurtsev fbb11a6d2e x 2024-12-11 11:08:24 -05:00
Eugene YurtsevandGitHub 3f348e3268 Merge pull request #2715 from langchain-ai/eugene/fix_typo_123
fix typo
2024-12-11 11:05:14 -05:00
Eugene Yurtsev 6b80fa6718 x 2024-12-11 11:02:28 -05:00
Eugene Yurtsev 82fa597e84 x 2024-12-11 10:58:58 -05:00
Eugene Yurtsev f6c44ec154 x 2024-12-11 10:58:10 -05:00
vbarda a03900be7a minor fix 2024-12-11 09:56:20 -05:00
vbarda 7144f7db41 typos 2024-12-11 09:24:48 -05:00
Eugene YurtsevandGitHub 8f1db66c17 Merge pull request #2711 from langchain-ai/eugene/more_changes
more changes
2024-12-10 23:54:57 -05:00
Eugene Yurtsev c2556aa2fe x 2024-12-10 23:54:15 -05:00
Eugene YurtsevandGitHub d468655f62 Merge pull request #2710 from langchain-ai/eugene/more_concept_work
more concepts changes
2024-12-10 23:25:01 -05:00
Eugene Yurtsev 6153c777fb x 2024-12-10 23:24:26 -05:00
Eugene Yurtsev a4d49b4e77 x 2024-12-10 23:23:58 -05:00
Eugene Yurtsev 789c732866 x 2024-12-10 22:52:17 -05:00
Eugene YurtsevandGitHub 51f85ffa84 Merge pull request #2709 from langchain-ai/eugene/update_index_page
langgraph: update index page
2024-12-10 22:21:42 -05:00
Eugene Yurtsev 31dd6c65a9 x 2024-12-10 22:20:55 -05:00
Eugene YurtsevandGitHub cb225dde7f Merge pull request #2708 from langchain-ai/eugene/wait_for_user_input_improve
wait for user input improvements
2024-12-10 21:53:52 -05:00
Eugene Yurtsev 0cb530e588 x 2024-12-10 21:53:19 -05:00
Eugene YurtsevandGitHub f0f3e11b0e Merge pull request #2707 from langchain-ai/eugene/fix_typos
fix typo
2024-12-10 21:39:09 -05:00
Eugene YurtsevandGitHub 55fbff89f4 Merge pull request #2706 from langchain-ai/eugene/update_breakpoints_2
docs: update resume link
2024-12-10 21:38:43 -05:00
Eugene Yurtsev 327bb369d7 x 2024-12-10 21:38:20 -05:00
Eugene YurtsevandGitHub 30eb2d00e2 Merge pull request #2703 from langchain-ai/vb/update-wait-for-input
docs: update wait for user input how-to
2024-12-10 21:34:46 -05:00
Eugene Yurtsev 45d1033092 x 2024-12-10 21:32:31 -05:00
Eugene Yurtsev 5a0ae2157c update resume link 2024-12-10 21:22:00 -05:00
Eugene YurtsevandGitHub e001b7a35f Merge pull request #2702 from langchain-ai/eugene/update_more_docs
eugene/update more docs
2024-12-10 21:18:49 -05:00
Eugene YurtsevandGitHub a41b9bb83c Merge pull request #2704 from langchain-ai/eugene/update_glossary 2024-12-10 21:18:34 -05:00
vbarda 04f6a6ccd1 update 2024-12-10 21:13:38 -05:00
Andrew NguonlyandGitHub ce15790210 docs: Add section about Cloud SaaS autoscaling (#2705) 2024-12-10 16:58:25 -08:00
Eugene Yurtsev 04b76f55a0 x 2024-12-10 18:23:51 -05:00
vbarda f52a8728ff docs: update wait for user input how-to 2024-12-10 18:19:33 -05:00
Eugene Yurtsev 686ee31b75 x 2024-12-10 18:10:55 -05:00
Eugene Yurtsev 47dcb2d105 x 2024-12-10 18:10:14 -05:00
Eugene Yurtsev 3a611fb20d update dynamic breakpoints 2024-12-10 18:09:07 -05:00
Eugene Yurtsev baa88f3c97 x 2024-12-10 17:56:48 -05:00
Vadym BardaandGitHub 79aa88812d docs: update reivew tool calls how-to (#2700) 2024-12-10 17:38:48 -05:00
Eugene Yurtsev 81436ceef8 x 2024-12-10 17:22:22 -05:00
Nuno Campos 2b70dba0e0 0.2.58 2024-12-10 14:09:11 -08:00
Eugene Yurtsev e14a6cf98b Add multi turn conversation input 2024-12-10 17:06:08 -05:00
Nuno CamposandGitHub dc0398efd1 Merge pull request #2661 from langchain-ai/nc/5dec/perf
lib: Performance improvements
2024-12-10 14:04:02 -08:00
David DuongandGitHub 02f1904ba7 Merge pull request #2699 from langchain-ai/dqbd/sdk-js-0.0.32
feat(sdk-js): bump to 0.0.32
2024-12-11 02:00:21 +04:00
Nuno Campos 30f852e7b2 Fix 2024-12-10 13:56:26 -08:00
Tat Dat Duong 7fc6c4b1fa feat(sdk-js): bump to 0.0.32 2024-12-10 22:52:51 +01:00
Nuno Campos 7f8ec2c590 Fix 2024-12-10 13:46:45 -08:00
Vadym BardaandGitHub 611588613d docs: add an FAQ note for command vs cond edge (#2697) 2024-12-10 15:16:02 -05:00
Nuno Campos 11e80210a2 lib: Performance improvements
- don't create contextvars.Context/asyncio.Task in RunnableSeq (not needed as each step creates it if necessary)
- don't run in-memory-saver methods in background threads (no point as they hold the gil)
- avoid calling should_interrupt when no interrupts set
2024-12-10 11:40:24 -08:00
Nuno CamposandGitHub 60d742ea48 Merge pull request #2683 from langchain-ai/nc/9dec/invoke-command-goto
lib: Add support for invoke(Command(goto=<str>))
2024-12-10 11:39:10 -08:00
Nuno Campos a7ac9ffd4e Update test 2024-12-10 11:31:41 -08:00
Vadym BardaandGitHub 3d97b97c86 fix typo (#2696) 2024-12-10 14:19:23 -05:00
Nuno CamposandGitHub a7d1ecbb74 Merge pull request #2693 from langchain-ai/eugene/fix_test
langgraph[patch]: Fix unit test for Command(update)
2024-12-10 11:09:11 -08:00
vbarda 61f362f16e update dynamic breakpoints 2024-12-10 14:07:08 -05:00
Eugene YurtsevandNuno Campos 7cabc0a3dc reformat 2024-12-10 11:04:07 -08:00
Eugene YurtsevandNuno Campos f9cdfd3ac4 x 2024-12-10 11:03:56 -08:00
Eugene YurtsevandNuno Campos dd778f8ed6 qxqx 2024-12-10 11:03:56 -08:00
Nuno Campos df5d08f689 Fix 2024-12-10 11:03:01 -08:00
Nuno Campos a9b94f93ee Update again 2024-12-10 11:03:01 -08:00
Nuno Campos 5f869b9e75 Update test 2024-12-10 11:03:01 -08:00
Nuno Campos 79562f3f37 lib: Add support for invoke(Command(goto=<str>)) 2024-12-10 11:03:01 -08:00
Nuno Campos 081b2cbdcf Fix 2024-12-10 11:01:25 -08:00
Eugene YurtsevandNuno Campos 70eeb2a670 x 2024-12-10 11:00:58 -08:00
Nuno CamposandGitHub 0f287d986b Merge pull request #2695 from langchain-ai/nc/10dec/multistep-plan
lib: Add unit test for multistep planner graph
2024-12-10 10:54:37 -08:00
Nuno CamposandGitHub 1fd9da6718 Merge pull request #2691 from langchain-ai/dqbd/enhanced-config-type-extraction
fix(config): extract default values, description from pydantic models, typeddict and dataclass
2024-12-10 10:44:24 -08:00
Nuno Campos ef6c5b4711 lib: Add unit test for multistep planner graph 2024-12-10 10:40:49 -08:00
Eugene Yurtsev 77fe51fbe4 Merge branch 'main' into eugene/document_interrupt 2024-12-10 13:17:47 -05:00
Vadym BardaandGitHub 70a5ef6713 docs: small updates (#2694) 2024-12-10 12:02:24 -05:00
Tat Dat Duong 17c1a8db46 Fix lint 2024-12-10 17:42:01 +01:00
Vadym BardaandGitHub 97a51014c3 docs: add a how-to on updating state from tools (#2670) 2024-12-10 11:20:50 -05:00
Tat Dat Duong 5a30fc6a87 Handle PydanticUndefined, add tests 2024-12-10 17:06:37 +01:00
Tat Dat Duong 1f68bd0d83 Move to langgraph.utils.fields 2024-12-10 16:49:05 +01:00
vbarda fdfc5d9cda Revert "langgraph: release 0.2.58 (#2692)"
This reverts commit a9f5507006.
2024-12-10 10:35:01 -05:00
Vadym BardaandGitHub 1c3f65c931 docs: add tool use for Command concepts (#2669)
To be merged after #2656
2024-12-10 10:22:17 -05:00
Vadym BardaandGitHub a9f5507006 langgraph: release 0.2.58 (#2692) 2024-12-10 10:19:59 -05:00
Vadym BardaandGitHub 59bfa5d009 langgraph: allow tools to return Command in tool node (#2656) 2024-12-10 10:18:04 -05:00
Tat Dat Duong b4f11929f8 fix(config): extract default values, description from pydantic models, typeddict and dataclass 2024-12-10 15:24:56 +01:00
Vadym BardaandGitHub 038bec2e78 update callout (#2689) 2024-12-09 23:27:44 -05:00
Eugene Yurtsev 01cdb60b5d x 2024-12-09 23:14:19 -05:00
Eugene Yurtsev 5bfb9af5fe x 2024-12-09 22:53:35 -05:00
Eugene Yurtsev ac48612abb x 2024-12-09 22:51:06 -05:00
Eugene Yurtsev 73fb725f0c add pngs 2024-12-09 22:50:33 -05:00
Eugene Yurtsev b98a1337a5 x 2024-12-09 22:50:16 -05:00
Vadym BardaandGitHub c2a41039de docs: remove GraphCommand references (#2688) 2024-12-09 22:44:47 -05:00
33fe467d1f lib: Treat Command as "resuming" signal (#2682)
- so it works w interrupt_before/after

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-12-09 21:22:53 -05:00
Vadym BardaandGitHub 43b6c06f5c docs: update Command concept doc (#2686) 2024-12-09 21:19:16 -05:00
Vadym BardaandGitHub d81dec653d docs: temporarily fix link (#2685) 2024-12-09 21:09:32 -05:00
Vadym BardaandGitHub e1d8c6b113 docs: update multi-agent concept doc (#2684) 2024-12-09 21:01:14 -05:00
Vadym BardaandGitHub a64f9f80c0 docs: add a how to for multi-agent network (#2675) 2024-12-09 20:18:29 -05:00
Eugene Yurtsev a879de51f1 x 2024-12-09 18:13:39 -05:00
Eugene Yurtsev 60ab76c3e9 x 2024-12-09 18:12:17 -05:00
Eugene Yurtsev 09e9117674 x 2024-12-09 17:24:59 -05:00
Eugene Yurtsev acac19b95b x 2024-12-09 16:49:51 -05:00
Eugene Yurtsev 723bcfeaa2 x 2024-12-09 15:27:00 -05:00
Eugene Yurtsev c279421cbf x 2024-12-09 14:46:06 -05:00
Tat Dat Duong df1e48154a feat(studio): add Add to Dataset docs 2024-12-09 19:22:41 +01:00
Eugene Yurtsev d0bf7837bd x 2024-12-09 11:25:21 -05:00
Nuno CamposandGitHub a403e802fa Merge pull request #2679 from langchain-ai/nc/9dec/imperative-generator
lib: imperative api: Generators use yield to publish stream_mode=custom events
2024-12-09 08:22:31 -08:00
Nuno Campos e0a0958a60 lib: imperative api: Generators use yield to publish stream_mode=custom events 2024-12-09 08:14:41 -08:00
William FHandGitHub 3f1bdb9ebf Add sync support for the AsyncPostgresStore (#2673) 2024-12-09 07:12:52 -08:00
Nuno Campos b37c9d8a01 0.2.57 2024-12-07 11:49:10 -08:00
Nuno CamposandGitHub 1af1911aad Merge pull request #2378 from langchain-ai/nc/8nov/send-future
Imperative API
2024-12-07 11:48:45 -08:00
Eugene Yurtsev b4f7e06a1d x 2024-12-06 22:42:41 -05:00
Eugene Yurtsev 1dda28f8fb x 2024-12-06 22:31:28 -05:00
Eugene Yurtsev cc4718c5cb x 2024-12-06 22:31:18 -05:00
Eugene Yurtsev 0d580bdac7 x 2024-12-06 22:31:11 -05:00
Eugene Yurtsev a19d06e18c x 2024-12-06 17:00:18 -05:00
Eugene Yurtsev e16312da3f x 2024-12-06 16:52:33 -05:00
Nuno CamposandGitHub 6784a5a5b1 Merge pull request #2667 from langchain-ai/nc/6dec/support-mixed-list
lib: Support returning mixed list of commands and state updates
2024-12-06 08:31:03 -08:00
Nuno Campos 4e0e9a4eff Fix 2024-12-06 08:20:41 -08:00
Nuno Campos 015bf5e0a6 Add tests, missing return stmt 2024-12-06 08:17:50 -08:00
Nuno Campos 85fc26db43 lib: Support returning mixed list of commands and state updates 2024-12-06 08:03:26 -08:00
Vadym BardaandGitHub 5fa80e2a92 docs: update multi-agent tutorials to use Command (#2643) 2024-12-06 15:18:12 +00:00
Eugene Yurtsev 5e13460604 x 2024-12-05 23:31:54 -05:00
Eugene Yurtsev 750b97349e x 2024-12-05 21:32:10 -05:00
Eugene Yurtsev 6230c46830 x 2024-12-05 21:27:18 -05:00
William FHandGitHub 93e4c8cc1f Create index concurrently (#2659) 2024-12-05 15:56:39 -08:00
Nuno CamposandGitHub b7e441d781 Merge pull request #2658 from langchain-ai/nc/5dec/return-multiple-commands
lib: Add support for returning multiple commands from a node
2024-12-05 15:16:06 -08:00
Nuno Campos ccd8920eef Lint 2024-12-05 15:09:13 -08:00
Vadym BardaandGitHub 0c379d6cc7 fix docstring (#2660) 2024-12-05 17:55:25 -05:00
Eugene Yurtsev 01b1080b6e x 2024-12-05 17:26:55 -05:00
Eugene Yurtsev 62ff2eb32d x 2024-12-05 17:16:34 -05:00
Nuno Campos 1f745ca017 Lint 2024-12-05 13:50:42 -08:00
Nuno Campos aa4fea48dd lib: Add support for returning multiple commands from a node 2024-12-05 13:47:38 -08:00
Eugene Yurtsev 4fd261765a x 2024-12-05 15:46:26 -05:00
William FHandGitHub 0f0e31df24 Nicer item repr (#2655) 2024-12-05 10:52:44 -08:00
Nuno CamposandGitHub a275ab26d3 Merge pull request #2468 from cab938/issue2159
feat: Make CompiledGraph displayable in Jupyter with display()
2024-12-05 10:03:40 -08:00
William FHandGitHub b3bf4dd43c [docs] Update guidance on min bounds for deployment (#2652) 2024-12-05 17:50:36 +00:00
David DuongandGitHub b7fd391811 Merge pull request #2653 from langchain-ai/dqbd/sdk-command
fix(sdk-js): rename Command["send"] to `goto`
2024-12-05 20:49:47 +04:00
Tat Dat Duong cf961a286c fix(sdk-js): rename Command["send"] to goto 2024-12-05 17:14:07 +01:00
Vadym BardaandGitHub 4b83103cf2 docs: relax pinned version in langgraph server tutorial (#2651) 2024-12-05 09:11:00 -05:00
William FHandGitHub 1a46537c3a Codeblock ref rendering (#2649) 2024-12-05 05:48:00 -08:00
Eugene Yurtsev 0a49f3003b x 2024-12-04 22:57:48 -05:00
Eugene Yurtsev e80098e297 x 2024-12-04 22:38:55 -05:00
Eugene Yurtsev 3d3647cd85 x 2024-12-04 22:36:43 -05:00
Eugene Yurtsev 291379dfb9 x 2024-12-04 22:32:11 -05:00
Eugene Yurtsev 9f93e48a67 x 2024-12-04 22:19:32 -05:00
Eugene Yurtsev de123d66a5 Merge branch 'main' into eugene/document_interrupt 2024-12-04 21:30:55 -05:00
Nuno CamposandGitHub 759a712f57 Merge pull request #2502 from langchain-ai/vb/fix-annotation
langgraph: fix issue w/ type annotations in tools_condition
2024-12-04 20:47:21 -05:00
Nuno Campos 9f73dfa8d5 Fix 2024-12-04 17:43:05 -08:00
Nuno CamposandGitHub 4459952e72 Merge branch 'main' into issue2159 2024-12-04 20:42:03 -05:00
Nuno Campos 8ef82f3578 Update 2024-12-04 17:40:27 -08:00
Nuno CamposandGitHub 73e3f5a5b0 Merge pull request #2517 from langchain-ai/eugene/how_to_use_tempalte
docs: Add template quickstart
2024-12-04 20:37:04 -05:00
Nuno Campos a54587cff5 Remove unknown arg 2024-12-04 17:33:54 -08:00
Nuno Campos 63ea71548b sdk-py 0.1.43 2024-12-04 17:27:24 -08:00
Nuno CamposandGitHub f32cf5e984 Merge pull request #2642 from langchain-ai/nc/4dec/fix-stream-params
sdk-py: Handle stream(params=)
2024-12-04 20:26:59 -05:00
Nuno Campos d1aaa9de8c sdk-py: Handle stream(params=) 2024-12-04 17:25:51 -08:00
Nuno Campos f40a2d71ec lib 0.2.56 2024-12-04 17:15:17 -08:00
Nuno CamposandGitHub b5a9e9da55 Merge pull request #2635 from langchain-ai/vb/add-graph-command-docs
docs: add Command docs
2024-12-04 20:14:35 -05:00
vbarda 1eeb90ae0d cr 2024-12-04 19:41:21 -05:00
William FHandGitHub cd875291ad Link to conceptual doc (#2641) 2024-12-05 00:21:01 +00:00
e9cd216887 Update docs/docs/concepts/low_level.md
Co-authored-by: Nuno Campos <nuno@langchain.dev>
2024-12-04 19:18:37 -05:00
7651f1ab1c Update libs/langgraph/langgraph/types.py
Co-authored-by: Nuno Campos <nuno@langchain.dev>
2024-12-04 19:17:22 -05:00
1a492f727c Update libs/langgraph/langgraph/types.py
Co-authored-by: Nuno Campos <nuno@langchain.dev>
2024-12-04 19:16:33 -05:00
6caaa8cea7 Update libs/langgraph/langgraph/types.py
Co-authored-by: Nuno Campos <nuno@langchain.dev>
2024-12-04 19:16:26 -05:00
Vadym BardaandGitHub f028984b2e langgraph: remove print (#2640) 2024-12-04 19:07:50 -05:00
vbarda 085395c824 rename 2024-12-04 19:04:42 -05:00
vbarda 19a6e894eb more updates 2024-12-04 19:02:49 -05:00
vbarda 5570121c83 update 2024-12-04 18:56:46 -05:00
vbarda 257e44ccb4 update 2024-12-04 18:54:57 -05:00
Eugene YurtsevandGitHub dad0f39fa4 concepts: reword network architecture (#2625) 2024-12-04 23:49:17 +00:00
Nuno Campos 7a326ef768 lib 0.2.55 2024-12-04 15:44:24 -08:00
Nuno Campos 2fa2469967 Update 2024-12-04 15:39:16 -08:00
Nuno Campos de86a46b3d Comment 2024-12-04 15:39:16 -08:00
Nuno Campos 9733db03c5 Wait until next tick to start send task 2024-12-04 15:39:16 -08:00
Nuno Campos e1f65012e6 Fix 2024-12-04 15:39:16 -08:00
Nuno Campos eb593d47dd Fix writes for task being saved against next checkpoint id 2024-12-04 15:39:16 -08:00
Nuno Campos 4e8f4ce440 Update 2024-12-04 15:39:16 -08:00
Nuno Campos 007d7e72b1 Add test for cancellation 2024-12-04 15:39:16 -08:00
Nuno Campos 2b77fdabee Lint 2024-12-04 15:39:16 -08:00
Nuno Campos 40d16593c7 Lint 2024-12-04 15:39:16 -08:00
Nuno Campos ec7bbe14b2 Lint 2024-12-04 15:39:16 -08:00
Nuno Campos 4c6323c585 Lint 2024-12-04 15:39:16 -08:00
Nuno Campos 2fe38f3940 Fix get_state 2024-12-04 15:39:16 -08:00
Nuno Campos 09ca964714 Wire up retry policy 2024-12-04 15:39:16 -08:00
Nuno Campos 0663d46c47 Rename 2024-12-04 15:39:16 -08:00
Nuno Campos a91dbf9b70 Lint 2024-12-04 15:38:43 -08:00
Nuno Campos d93be914c7 Fix stream order 2024-12-04 15:38:43 -08:00
Nuno Campos 287c29fbdc Fix async 2024-12-04 15:38:15 -08:00
Nuno Campos 90dd2b01b6 Comment 2024-12-04 15:38:15 -08:00
Nuno Campos a443b3b256 Fix 2024-12-04 15:38:15 -08:00
Nuno Campos 2e9aea6fc8 Lint 2024-12-04 15:38:15 -08:00
Nuno Campos 2895a69678 Lint 2024-12-04 15:38:15 -08:00
Nuno Campos 76a209835f Comments 2024-12-04 15:37:56 -08:00
Nuno Campos 872f54adf1 Get it working with interrupt (sync) 2024-12-04 15:37:56 -08:00
Nuno Campos 01a3c23a29 WIP 2024-12-04 15:37:56 -08:00
Nuno Campos 0461d45d76 Finish impl 2024-12-04 15:37:31 -08:00
Nuno Campos 7d8205633d Add call function to call a node and get a future
- Whereas Send is for fire-and-forget type of calls, new `call` and `acall` functions are for flows where you want to wait for the node to finish before doing something else
- Because we return regular python future objects (concurrent.futures.Future or asyncio.Future) all the python primitives for working with futures work, eg. wait, gather, etc
2024-12-04 15:37:31 -08:00
vbarda 797b919cf9 Merge branch 'main' into vb/add-graph-command-docs 2024-12-04 18:37:20 -05:00
Nuno CamposandGitHub 574ffb02fc Merge pull request #2639 from langchain-ai/nc/4dec/speed-up-tests
Speed up tests
2024-12-04 18:37:03 -05:00
Nuno Campos 771b9b28cd Speed up tests 2024-12-04 15:29:51 -08:00
Nuno CamposandGitHub dcc2617396 Merge pull request #2638 from langchain-ai/nc/4dec/command
lib: Merge GraphCommand and Command
2024-12-04 18:26:11 -05:00
Nuno Campos df70e91dae Lint 2024-12-04 15:13:55 -08:00
Nuno Campos b4b3ac6f57 lib: Merge GraphCommand and Command
- Now we have only Command
- Command(goto=) combines the previous functionality of Command(send=) and Command(goto=)
2024-12-04 15:12:03 -08:00
Nuno CamposandGitHub 78e6b36b1a Merge pull request #2636 from langchain-ai/nc/4dec/interrupt-loop
lib: Add support for multiple interrupts per node
2024-12-04 17:58:26 -05:00
William FHandGitHub d457ad3cc2 Clean up code snippet (#2637) 2024-12-04 14:50:23 -08:00
Nuno Campos 5c7a6689af Update tests 2024-12-04 14:41:30 -08:00
Nuno Campos fb01d65dc0 Lint 2024-12-04 14:31:22 -08:00
Eugene Yurtsev c75bfc1032 x 2024-12-04 17:22:09 -05:00
Eugene Yurtsev 6dc70b703d x 2024-12-04 17:21:47 -05:00
Eugene Yurtsev eb09909c22 x 2024-12-04 17:21:31 -05:00
Nuno Campos ea5ccd7a80 lib: Add support for multiple interrupts per node
- Includes support for interrupt loops
2024-12-04 14:15:30 -08:00
vbarda d52bb911a4 lint 2024-12-04 16:50:56 -05:00
Vadym BardaandGitHub 89a739e12b Merge branch 'main' into vb/add-graph-command-docs 2024-12-04 16:48:05 -05:00
vbarda 0fdf3c9daf cr 2024-12-04 16:47:51 -05:00
vbarda 90eab07ded docs: add Command/GraphCommand docs 2024-12-04 15:46:40 -05:00
William FHandGitHub 962a969fba Update link (#2634) 2024-12-04 12:09:04 -08:00
William FHandGitHub c89e84fb6a nit: Spelling (#2633) 2024-12-04 10:24:35 -08:00
William FHandGitHub 3ff1f81333 Add doc to index (#2632) 2024-12-04 18:19:14 +00:00
Vadym BardaandGitHub 851e6d1d4c issue template: replace langchain w/ langgraph (#2631) 2024-12-04 12:51:00 -05:00
William FHandGitHub e5e659c590 Add langgraph.json snippet to concept doc (#2630) 2024-12-04 17:11:13 +00:00
Eugene YurtsevandGitHub 8db6a78ad9 ci: update bug template (#2626) 2024-12-04 12:08:21 -05:00
Nuno CamposandGitHub 9ab5fbc0f8 Merge pull request #2627 from langchain-ai/nc/4dec/state-ensure-config
lib: Call ensure_config in state crud methods
2024-12-04 11:53:03 -05:00
William FHandGitHub c141f0fdf0 Add memory how-to (#2629) 2024-12-04 08:39:53 -08:00
William FHandGitHub 830557d6b7 Clarify behavior in docstring (#2628) 2024-12-04 16:38:09 +00:00
Nuno Campos e5b00cdd1e Fix 2024-12-04 08:30:10 -08:00
Nuno Campos 8eea7ac401 lib: Call ensure_config in state crud methods
- this ensures that config from context vars is merged in
2024-12-04 08:15:01 -08:00
William FHandGitHub c322f7ffa6 Add Memory Store conceptual doc section (#2624)
On semantic search
2024-12-04 15:19:49 +00:00
William FHandGitHub e6c83abecd Fix ref doc formatting (#2623) 2024-12-04 06:55:15 -08:00
ACMCMCandGitHub a8db511e24 Fix typo (#2620) 2024-12-04 06:30:05 -08:00
湛露先生andGitHub 84d33f9621 Fix typos in langgraph_sdk client. (#2621)
Fix typos in langgraph_sdk client.

Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
2024-12-04 06:29:28 -08:00
William FHandGitHub 9220049b35 Add store langgraph.json config ref (#2622) 2024-12-04 06:28:54 -08:00
William FHandGitHub 879df6b52c [JS] Update SDK version (#2619) 2024-12-03 23:01:19 -08:00
William FHandGitHub 9b8bf70d9e Add link to local studio testing (#2617) 2024-12-04 04:36:59 +00:00
Phoenix LoganandGitHub aca67107c1 fix: make database saver classes inheritance-friendly (#2615)
Replace hardcoded database saver class names with `cls` in
`from_conn_string` factory methods to improve subclassing support

## Changes
* Replaced direct class instantiations with `cls(conn)` in
`from_conn_string` classmethods across all database implementations
* Updated both synchronous and asynchronous variants for DuckDB,
PostgreSQL, and SQLite savers

## Why
This refactor makes the database saver classes more extensible by
following Python's convention of using `cls` in class methods. This
enables proper inheritance patterns where subclasses can reuse the
factory methods without needing to override them. Previously, the
hardcoded class names would always instantiate the parent class, even
when called from a subclass.

## Testing
The change is backward compatible and doesn't alter existing
functionality. All existing tests should continue to pass as this is
purely a structural refactoring that preserves the current behavior
while improving extensibility.

## Notes
This PR addresses follow up on comments from #2518 - AsyncPostgresSaver
didn't need to be fixed but many of the other DB saver classes did.
2024-12-03 20:26:06 -08:00
William FHandGitHub 5fa196ab38 Update docstrings for store classes (#2616) 2024-12-03 19:51:25 -08:00
Nuno CamposandGitHub 584d9271ce Merge pull request #2614 from langchain-ai/nc/3dec/handle-command
Handle Command returned from node (in addition to GraphCommand)
2024-12-03 19:05:05 -05:00
Nuno Campos 1bee33db3a Fix 2024-12-03 15:52:41 -08:00
Nuno Campos a203ddecf7 Handle Command returned from node (in addition to GraphCommand) 2024-12-03 15:48:59 -08:00
Vadym BardaandGitHub 5e3c326424 langgraph: bump sdk, release 0.2.54 (#2613) 2024-12-03 16:38:59 -05:00
Nuno CamposandGitHub 86407aa6e8 Merge pull request #2071 from langchain-ai/brace/doc-nits
fix(docs): Small nits & typo fixes
2024-12-03 16:38:36 -05:00
Vadym BardaandGitHub 7a80d6cb87 sdk-py: release 0.1.42 (#2612) 2024-12-03 16:34:08 -05:00
Nuno Campos 70f323779e Update persistence.md 2024-12-03 16:26:36 -05:00
23d5162945 Update human_in_the_loop.md
Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-12-03 16:26:36 -05:00
bracesproulandNuno Campos 9d755f54e4 fix(docs): Small nits & typo fixes 2024-12-03 16:26:36 -05:00
Nuno CamposandGitHub 75cccc4fc4 Merge pull request #2589 from stneng/main
fix: get correct reducer when type has multiple metadata.
2024-12-03 16:23:33 -05:00
Nuno CamposandGitHub dd010e9230 Merge pull request #2593 from langchain-ai/nc/2dec/sdk-sse
sdk-py: Fix SSE parsing to split lines only \n \r , remove httpx-sse, fix missing decoder flush
2024-12-03 16:23:11 -05:00
Nuno CamposandGitHub 2d87195b59 Merge pull request #2611 from langchain-ai/vb/remote-graph-kwargs
langgraph: allow passing kwargs to SDK methods in RemoteGraph's invoke/stream
2024-12-03 16:21:09 -05:00
vbarda 515242d0ba langgraph: allow passing kwargs to SDK methods in RemoteGraph's invoke/stream 2024-12-03 15:40:18 -05:00
Nuno Campos 3bf92d0b03 Fix 2024-12-03 11:04:28 -08:00
William FHandGitHub 36b6cd1493 fix: Handle empty store similarity (numpy) (#2602) 2024-12-02 18:20:19 -08:00
William FHandGitHub 0361554fcf Bump Checkpoint Postgres (#2601) 2024-12-02 17:56:23 -08:00
4332a9515d Fixup initial provisioning of aio postgres db (#2571) (#2600)
fixes #2570

---------

Co-authored-by: Tai Groot <tai@taigrr.com>
2024-12-03 01:55:26 +00:00
Nuno CamposandGitHub 64b99c187a Merge pull request #2544 from langchain-ai/brace/type-interrupts-py
fix(sdk-py): Add typing for interrupts
2024-12-02 20:52:19 -05:00
Nuno CamposandGitHub afa37d2059 Merge pull request #2552 from langchain-ai/vb/remove-assertion
langgraph: relax graph validation to handle nodes without return typehints
2024-12-02 20:51:50 -05:00
Nuno CamposandGitHub b80933c5fb Merge branch 'main' into main 2024-12-02 20:50:44 -05:00
Nuno CamposandGitHub d70b659adb Merge pull request #2430 from langchain-ai/nc/15nov/command-subgraph
Handle interrupt/resume for subgraphs
2024-12-02 20:45:40 -05:00
William FHandGitHub 15f0765d60 Add IVFFlat and HNSW support (#2598)
It seems that actually once i moved the operators & other things out,
the query planner does do reasonable things and do sequential scanning
if filtered N < some size but the index otherwise, even with namespace
filtering.
2024-12-02 17:42:29 -08:00
fe538d4bcb docs: Use edit mode as default to install template (#2590)
Small change to install the dependencies with `edit` mode so that users
or freshman can see the effect immediately when they change the template
code. As below,
`pip install -e .`

It's very good to evaluate how agent works and easy to test &
re-develop!

---------

Signed-off-by: Mingqi Hu <mingqi.hu@intel.com>
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2024-12-02 17:36:13 -08:00
Nuno CamposandGitHub 4e26a5cf2e Merge pull request #2597 from langchain-ai/nc/2dec/remote-command
lib: Handle Command in RemoteGraph
2024-12-02 20:34:08 -05:00
William FHandGitHub 20f091a277 [postgres] Sort Ascending (#2594)
Adds a few of preliminaries:
1. Makes the returned "score" actually the result of the requested
operation (cosine, inner_product, l2)
2. Sorts asc, etc. so that if you were to add an HNSW index (and not
have any WHERE filters), it would be used
3. Drop the inner WHERE statement if no namespace or other filters are
provided. See (2) for why.
I don't yet add an index to the migrations since I think we need to
agree on the right balance to ensure it's actually used in common query
patterns.
2024-12-03 01:08:24 +00:00
Nuno Campos 0071bd1e1c Lint 2024-12-02 17:01:12 -08:00
Nuno Campos d36e6ceaaf Fix 2024-12-02 16:59:38 -08:00
Nuno Campos a3feaef2eb lib: Handle Command in RemoteGraph 2024-12-02 16:45:07 -08:00
David DuongandGitHub c6fe26510e Merge pull request #2596 from langchain-ai/dqbd/sdk-cancel-on-disconnect
feat(sdk): pass cancel on disconnect when joining stream
2024-12-03 04:45:00 +04:00
Nuno Campos efbd02a27d Implement support for interrupt/resume in subgraphs 2024-12-02 16:43:35 -08:00
Tat Dat Duong a91bf116cb Bump to 0.1.41 2024-12-03 01:31:55 +01:00
Tat Dat Duong 6a6c3ed84c Bump to 0.0.30 2024-12-03 01:31:11 +01:00
Tat Dat Duong 988dd237d2 feat(sdk): pass cancel on disconnect when joining stream 2024-12-03 01:17:15 +01:00
David DuongandGitHub 63f5f15c04 Merge pull request #2592 from langchain-ai/dqbd/sdk-list-runs-by-status
feat(sdk): add ability to search runs via status
2024-12-03 04:03:29 +04:00
Nuno Campos 6fc1c602ab Add one more 2024-12-02 13:53:44 -08:00
Nuno Campos 2b65308508 WIP: Handle commands for subgraphs 2024-12-02 13:53:44 -08:00
Nuno Campos 3cee1d5087 Remove httpx_sse, fix missing flush of sse decoder 2024-12-02 12:03:31 -08:00
Nuno Campos 2ce2021c39 Revert "Revert "sdk-py: Fix SSE parsing to split lines only \n \r \r\n per SSE spec""
This reverts commit 53ec7c41b2.
2024-12-02 11:29:06 -08:00
Tat Dat Duong 46dd424a7e feat(sdk): add ability to search runs via status 2024-12-02 19:53:58 +01:00
stneng 363c6e2e4c fix 2024-12-01 16:07:15 -08:00
Vadym BardaandGitHub 784821705b checkpoint-postgres: pin psycopg >= 3.2.0 (#2580) 2024-11-29 11:30:19 -05:00
William FHandGitHub 65172c2a43 [CLI] Nonblocking debugpy mode (#2573) 2024-11-28 12:24:00 -08:00
William FHandGitHub 1130c3accb [CLI] Add Store config to CLI (#2548) 2024-11-28 01:58:18 -08:00
William FHandGitHub ee8653d1c5 [SDK] Add SearchItem (#2567) 2024-11-27 22:50:52 -08:00
William FHandGitHub 12486d977a Update postgres-checkpoint min bounds (#2564) 2024-11-27 22:31:16 -08:00
William FHandGitHub c87f9ab6b1 Fix sentence fragment (#2566) 2024-11-27 22:31:03 -08:00
William FHandGitHub 855a3d21ff Update Checkpoint Version (#2565) 2024-11-27 20:50:11 -08:00
William FHandGitHub d767af421b feat: Add vector search (#2535)
- Initializing the store with an 'embedding config' -> this contains the
'dims' (used to create the table) and the encoder object (rn langchain
embeddings object, though that is ......)
- Call setup() -> creates the vector table.

Each document has 1 or more vectors associated with it for each json
path in the embedding config.

Would welcome critique and requests! 

Leaving the params as the defaults for pgvector but open to feedback if
you think it's important to be able to more transparently configure that
in setup()

```python
from typing import TypedDict, List, Dict, Any, Optional

from langchain_openai import OpenAIEmbeddings
from langgraph.graph import StateGraph
from langgraph.store.postgres import PostgresStore

emb_config = {
    "dims": 1536,  # OpenAI embedding dimensions
    "embed": OpenAIEmbeddings(model="text-embedding-3-small"),
    "distance_type": "cosine",
}
with PostgresStore.from_conn_string(
    "postgres://postgres:postgres@localhost:5441",
    embedding=emb_config,
) as store:
    store.setup()


# Define the state type for our graph
class State(TypedDict):
    query: str
    results: Optional[List[Dict[str, Any]]]


def put_stuff(state: State) -> State:
    docs = [
        ("doc1", {"text": "red apple in kitchen"}),
        ("doc2", {"text": "blue car in garage"}),
        ("doc3", {"text": "green apple on table"}),
    ]
    for key, value in docs:
        store.put(("docs",), key, value)


def search_stuff(state: State) -> State:
    """Search for documents using vector similarity."""
    results = store.search(("docs",), query=state["query"])

    return {"results": results}


builder = StateGraph(State)
builder.add_node(put_stuff)
builder.add_node(search_stuff)
builder.add_edge("__start__", "put_stuff")
builder.add_edge("put_stuff", "search_stuff")
# Compile
with PostgresStore.from_conn_string(
    "postgres://postgres:postgres@localhost:5441",
    embedding=emb_config,
) as store:
    chain = builder.compile(store=store)

    result = chain.invoke({"query": "sour apple"})

# Print results
for doc in result["results"]:
    print(doc.key)
    print(doc.value)
    print(doc.response_metadata)

```
2024-11-28 04:40:12 +00:00
Nuno CamposandGitHub 07ac016e60 Merge pull request #2562 from langchain-ai/nc/27nov/revert-sdk
Revert "sdk-py: Fix SSE parsing to split lines only \n \r \r\n per SSE spec"
2024-11-27 17:36:07 -08:00
Nuno Campos 4576a259dd sdk-py 0.1.39 2024-11-27 17:32:07 -08:00
Nuno Campos 53ec7c41b2 Revert "sdk-py: Fix SSE parsing to split lines only \n \r \r\n per SSE spec"
This reverts commit dc09b13400.
2024-11-27 17:31:21 -08:00
Nuno Campos 769f6a1925 Fix 2024-11-27 15:59:48 -08:00
William FHandGitHub 62a36befd5 Add in-mem vector search (#2547) 2024-11-27 14:53:24 -08:00
Andrew NguonlyandGitHub dfaff2511b docs: Update API docs and remove unused pages (#2561) 2024-11-27 14:39:12 -08:00
Nuno Campos 1d9a0d1e4e sdk-py 0.1.37 2024-11-27 14:17:15 -08:00
Nuno CamposandGitHub 35c7eb18ee Merge pull request #2560 from langchain-ai/nc/27nov/fix-sse-parser
sdk-py: Fix SSE parsing to split lines only \n \r \r\n per SSE spec
2024-11-27 14:16:43 -08:00
Nuno Campos dc09b13400 sdk-py: Fix SSE parsing to split lines only \n \r \r\n per SSE spec 2024-11-27 14:10:50 -08:00
Nuno CamposandGitHub b2d8acffc4 Merge pull request #2558 from langchain-ai/nc/27nov/exc-note
lib: Add exception note identify node/task
2024-11-27 12:57:03 -08:00
Nuno Campos 1031e54860 lib: Add exception note identify node/task 2024-11-27 12:44:31 -08:00
Jacob LeeandGitHub 7ac365ea84 fix(sdk-js): Avoid retrying 402s (#2554) 2024-11-27 19:33:23 +00:00
Vadym BardaandGitHub 5144b8f374 langgraph: allow create_react_agent to take empty tools (#2553) 2024-11-27 12:54:59 -05:00
Vadym BardaandGitHub f4a9d17d24 Merge branch 'main' into vb/remove-assertion 2024-11-27 10:02:24 -05:00
vbarda f416480e9d nit 2024-11-27 10:01:24 -05:00
vbarda 61e47cb137 langgraph: relax graph validation to handle nodes without return typehints 2024-11-27 09:56:04 -05:00
Brace SproulandGitHub d4bbb66963 Merge branch 'main' into brace/type-interrupts-py 2024-11-26 13:01:41 -08:00
Nuno CamposandGitHub 4b1b3cecb4 Merge pull request #2546 from langchain-ai/jacob/jsenv
fix(js): Adds fallback for fetching environment variables
2024-11-26 12:34:18 -08:00
jacoblee93 c6a953c02a Bump version 2024-11-26 12:31:00 -08:00
jacoblee93 16b955dee2 Adds fallback for fetching environment variables 2024-11-26 12:30:33 -08:00
Brace SproulandGitHub 877124f7df Merge pull request #2545 from langchain-ai/release
release(sdk-js): 0.0.27
2024-11-26 11:54:45 -08:00
bracesproul d3a4865c0e release(sdk-js): 0.0.27 2024-11-26 11:42:20 -08:00
Brace SproulandGitHub 45b5f386e5 Merge branch 'main' into brace/type-interrupts-py 2024-11-26 11:41:07 -08:00
bracesproul a1ec55abc5 fix(sdk-py): Add typing for interrupts 2024-11-26 11:40:47 -08:00
Brace SproulandGitHub a3761ac522 Merge pull request #2543 from langchain-ai/brace/type-interrupts
fix(sdk-js): Add typing for interrupts on threads
2024-11-26 11:40:34 -08:00
bracesproul 376c58ff3b expose interupt type 2024-11-26 11:28:50 -08:00
bracesproul 58b99c899e cr 2024-11-26 11:28:19 -08:00
bracesproul 2ee279a977 fix(sdk-js): Add typing for interrupts on threads 2024-11-26 11:26:18 -08:00
William FHandGitHub f04ce5d1ee [CLI] Add python-dotenv for inmem group (#2540) 2024-11-26 07:56:57 -08:00
William FHandGitHub 8f649abd0a Release PG Checkpointer (#2536) 2024-11-26 01:44:45 +00:00
William FHandGitHub 1febec7c0d Dedup store batch operations (#2534) 2024-11-25 16:31:26 -08:00
Nuno CamposandGitHub a4eb4c6942 Merge pull request #2520 from langchain-ai/nc/22nov/parent-command
lib: Add Command(graph=Command.PARENT, ...)
2024-11-25 15:39:51 -08:00
Nuno Campos 8e1cd0e225 Add test 2024-11-25 14:11:20 -08:00
98935e1ffd fix: Fix race condition in PostgresSaver (#2494)
Signed-off-by: Tyler Ball <tyleraball@gmail.com>
Co-authored-by: Phoenix Logan <plogan@chanzuckerberg.com>
Co-authored-by: Tyler Ball <2481463+tyler-ball@users.noreply.github.com>
2024-11-25 20:19:52 +00:00
William FHandGitHub 328ef609af [CLI] Python path (#2531) 2024-11-25 11:59:49 -08:00
Talha MunirandGitHub 486d5412af docs: Fix grammatical mistake in introduction.ipynb (#2521) 2024-11-23 14:37:55 -05:00
Nuno Campos abc0c8c223 Fix 2024-11-22 16:35:20 -08:00
Nuno Campos 5bbb9dae57 Fix 2024-11-22 16:34:55 -08:00
Nuno Campos fed60e713c lib: Add Command(graph=Command.PARENT, ...)
- This makes the command bubble up out of the current graph and be handled by the calling graph (the immediate parent)
- This could be extended to support eg. ROOT graph, or some other level
2024-11-22 16:28:43 -08:00
Eugene YurtsevandGitHub 4f4e7a6981 docs: more fixes for python version (#2515) 2024-11-22 19:50:31 +00:00
Eugene Yurtsev f08155d60b x 2024-11-22 14:43:28 -05:00
Eugene Yurtsev 24b16908b7 x 2024-11-22 14:43:08 -05:00
Eugene Yurtsev c1c2ce8f1b x 2024-11-22 14:42:36 -05:00
Eugene Yurtsev 3efd4f3406 Merge branch 'main' into eugene/how_to_use_tempalte 2024-11-22 14:21:07 -05:00
Eugene Yurtsev f122ae2eb1 qxqx 2024-11-22 14:20:56 -05:00
3351d4f6c5 docs: fix typo (#2510)
`python-dotenv` not `python-dot-env`

Signed-off-by: Mingqi <mingqi.hu@intel.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-11-22 14:17:59 -05:00
Eugene YurtsevandGitHub b4900341e4 docs: fix broken link (#2514)
We need to check later why CI didn't fail with original PR that broke
the link
2024-11-22 14:07:54 -05:00
Eugene Yurtsev 05791f5dfc qxqx 2024-11-22 13:26:46 -05:00
Eugene Yurtsev 416dfe95da qxqx 2024-11-22 13:16:41 -05:00
Eugene YurtsevandGitHub 65f515e020 docs: add helm chart link (#2512) 2024-11-22 17:17:36 +00:00
Eugene YurtsevandGitHub 0d0665a6e3 docs: Add resource allocation (#2511) 2024-11-22 11:56:16 -05:00
Eugene YurtsevandGitHub 93b8525dc1 docs: fix link checker (#2508)
3rd attempt to fix localhost link
2024-11-21 21:59:43 -05:00
Eugene YurtsevandGitHub aeb6f784e1 docs: fix link checking? (#2506) 2024-11-21 21:21:30 -05:00
Nuno Campos 3eedeac0d4 Not red 2024-11-21 15:31:52 -08:00
Eugene YurtsevandGitHub b09e7b20b0 docs: do not check localhost links (#2505) 2024-11-21 23:28:24 +00:00
Eugene YurtsevandGitHub 26ce731eab docs: update README.md (#2474) 2024-11-21 22:48:12 +00:00
Eugene YurtsevandGitHub 55593446f8 docs: get started with langgraph platform (#2469) 2024-11-21 17:41:03 -05:00
vbarda 2d6ddd0a1d langgraph: fix issue w/ type annotations in tools_condition 2024-11-21 14:31:34 -05:00
William FHandGitHub 7082e2613e [CLI] Dotenv support (#2501) 2024-11-21 16:28:53 +00:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>William FH
ceeb9636ee build(deps-dev): bump notebook from 7.0.7 to 7.2.2 in /libs/langgraph (#2411)
Bumps [notebook](https://github.com/jupyter/notebook) from 7.0.7 to
7.2.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/jupyter/notebook/releases">notebook's
releases</a>.</em></p>
<blockquote>
<h2>v7.2.2</h2>
<h2>7.2.2</h2>
<p>(<a
href="https://github.com/jupyter/notebook/compare/@jupyter-notebook/application-extension@7.2.1...0426a897ad6b5708d73e6e49ea424076de2906a1">Full
Changelog</a>)</p>
<h3>Maintenance and upkeep improvements</h3>
<ul>
<li>Upgrade JupyterLab dependencies to v4.2.5 <a
href="https://redirect.github.com/jupyter/notebook/pull/7447">#7447</a>
(<a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
</ul>
<h3>Contributors to this release</h3>
<p>(<a
href="https://github.com/jupyter/notebook/graphs/contributors?from=2024-06-07&amp;to=2024-08-27&amp;type=c">GitHub
contributors page for this release</a>)</p>
<p><a
href="https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Agithub-actions+updated%3A2024-06-07..2024-08-27&amp;type=Issues"><code>@​github-actions</code></a>
| <a
href="https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Akrassowski+updated%3A2024-06-07..2024-08-27&amp;type=Issues"><code>@​krassowski</code></a>
| <a
href="https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3ARRosio+updated%3A2024-06-07..2024-08-27&amp;type=Issues"><code>@​RRosio</code></a></p>
<h2>v7.2.1</h2>
<h2>7.2.1</h2>
<p>(<a
href="https://github.com/jupyter/notebook/compare/@jupyter-notebook/application-extension@7.2.0...e881745c98ea0a0ea585df78f1ca8950a0edeaa2">Full
Changelog</a>)</p>
<h3>Bugs fixed</h3>
<ul>
<li>Remove pseudoelement obstructing the cell collapser <a
href="https://redirect.github.com/jupyter/notebook/pull/7392">#7392</a>
(<a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
</ul>
<h3>Contributors to this release</h3>
<p>(<a
href="https://github.com/jupyter/notebook/graphs/contributors?from=2024-05-16&amp;to=2024-06-07&amp;type=c">GitHub
contributors page for this release</a>)</p>
<p><a
href="https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Agithub-actions+updated%3A2024-05-16..2024-06-07&amp;type=Issues"><code>@​github-actions</code></a>
| <a
href="https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Ajtpio+updated%3A2024-05-16..2024-06-07&amp;type=Issues"><code>@​jtpio</code></a>
| <a
href="https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Ameeseeksmachine+updated%3A2024-05-16..2024-06-07&amp;type=Issues"><code>@​meeseeksmachine</code></a></p>
<h2>v7.2.0</h2>
<h2>7.2.0</h2>
<p>(<a
href="https://github.com/jupyter/notebook/compare/@jupyter-notebook/application-extension@7.1.2...31bf294e85175bbf39816a90dc8858dedaf73bde">Full
Changelog</a>)</p>
<h3>Enhancements made</h3>
<ul>
<li>Update to JupyterLab 4.2.0 <a
href="https://redirect.github.com/jupyter/notebook/pull/7357">#7357</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
<li>Update to JupyterLab 4.2.0rc0 <a
href="https://redirect.github.com/jupyter/notebook/pull/7333">#7333</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
<li>Add <code>@jupyterlab/theme-dark-high-contrast-extension</code> <a
href="https://redirect.github.com/jupyter/notebook/pull/7331">#7331</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
<li>Update to JupyterLab 4.2.0a2 <a
href="https://redirect.github.com/jupyter/notebook/pull/7307">#7307</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
</ul>
<h3>Bugs fixed</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/jupyter/notebook/blob/@jupyter-notebook/tree@7.2.2/CHANGELOG.md">notebook's
changelog</a>.</em></p>
<blockquote>
<h2>7.2.2</h2>
<p>(<a
href="https://github.com/jupyter/notebook/compare/@jupyter-notebook/application-extension@7.2.1...0426a897ad6b5708d73e6e49ea424076de2906a1">Full
Changelog</a>)</p>
<h3>Maintenance and upkeep improvements</h3>
<ul>
<li>Upgrade JupyterLab dependencies to v4.2.5 <a
href="https://redirect.github.com/jupyter/notebook/pull/7447">#7447</a>
(<a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
</ul>
<h3>Contributors to this release</h3>
<p>(<a
href="https://github.com/jupyter/notebook/graphs/contributors?from=2024-06-07&amp;to=2024-08-27&amp;type=c">GitHub
contributors page for this release</a>)</p>
<p><a
href="https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Agithub-actions+updated%3A2024-06-07..2024-08-27&amp;type=Issues"><code>@​github-actions</code></a>
| <a
href="https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Akrassowski+updated%3A2024-06-07..2024-08-27&amp;type=Issues"><code>@​krassowski</code></a>
| <a
href="https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3ARRosio+updated%3A2024-06-07..2024-08-27&amp;type=Issues"><code>@​RRosio</code></a></p>
<!-- raw HTML omitted -->
<h2>7.2.1</h2>
<p>(<a
href="https://github.com/jupyter/notebook/compare/@jupyter-notebook/application-extension@7.2.0...e881745c98ea0a0ea585df78f1ca8950a0edeaa2">Full
Changelog</a>)</p>
<h3>Bugs fixed</h3>
<ul>
<li>Remove pseudoelement obstructing the cell collapser <a
href="https://redirect.github.com/jupyter/notebook/pull/7392">#7392</a>
(<a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
</ul>
<h3>Contributors to this release</h3>
<p>(<a
href="https://github.com/jupyter/notebook/graphs/contributors?from=2024-05-16&amp;to=2024-06-07&amp;type=c">GitHub
contributors page for this release</a>)</p>
<p><a
href="https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Agithub-actions+updated%3A2024-05-16..2024-06-07&amp;type=Issues"><code>@​github-actions</code></a>
| <a
href="https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Ajtpio+updated%3A2024-05-16..2024-06-07&amp;type=Issues"><code>@​jtpio</code></a>
| <a
href="https://github.com/search?q=repo%3Ajupyter%2Fnotebook+involves%3Ameeseeksmachine+updated%3A2024-05-16..2024-06-07&amp;type=Issues"><code>@​meeseeksmachine</code></a></p>
<h2>7.2.0</h2>
<p>(<a
href="https://github.com/jupyter/notebook/compare/@jupyter-notebook/application-extension@7.1.2...31bf294e85175bbf39816a90dc8858dedaf73bde">Full
Changelog</a>)</p>
<h3>Enhancements made</h3>
<ul>
<li>Update to JupyterLab 4.2.0 <a
href="https://redirect.github.com/jupyter/notebook/pull/7357">#7357</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
<li>Update to JupyterLab 4.2.0rc0 <a
href="https://redirect.github.com/jupyter/notebook/pull/7333">#7333</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
<li>Add <code>@jupyterlab/theme-dark-high-contrast-extension</code> <a
href="https://redirect.github.com/jupyter/notebook/pull/7331">#7331</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
<li>Update to JupyterLab 4.2.0a2 <a
href="https://redirect.github.com/jupyter/notebook/pull/7307">#7307</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
</ul>
<h3>Bugs fixed</h3>
<ul>
<li>Add the <code>@jupyterlab/notebook-extension:copy-output</code>
plugin <a
href="https://redirect.github.com/jupyter/notebook/pull/7353">#7353</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
<li>Fix CSS for <code>full</code> windowing mode <a
href="https://redirect.github.com/jupyter/notebook/pull/7337">#7337</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
<li>Force notebook windowing mode to <code>defer</code> <a
href="https://redirect.github.com/jupyter/notebook/pull/7335">#7335</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
<li>Fix scrollbar always showing up by default <a
href="https://redirect.github.com/jupyter/notebook/pull/7327">#7327</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
<li>Default to the <code>full</code> windowing mode <a
href="https://redirect.github.com/jupyter/notebook/pull/7321">#7321</a>
(<a href="https://github.com/jtpio"><code>@​jtpio</code></a>)</li>
</ul>
<h3>Maintenance and upkeep improvements</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/jupyter/notebook/commit/d1d232b27c5441c4a040dd3ca491a7cf0fa6c528"><code>d1d232b</code></a>
Publish 7.2.2</li>
<li><a
href="https://github.com/jupyter/notebook/commit/0426a897ad6b5708d73e6e49ea424076de2906a1"><code>0426a89</code></a>
Upgrade JupyterLab dependencies to v4.2.5 (<a
href="https://redirect.github.com/jupyter/notebook/issues/7447">#7447</a>)</li>
<li><a
href="https://github.com/jupyter/notebook/commit/3542421de92c91892d8d8c40ebbd023215c39606"><code>3542421</code></a>
Publish 7.2.1</li>
<li><a
href="https://github.com/jupyter/notebook/commit/e881745c98ea0a0ea585df78f1ca8950a0edeaa2"><code>e881745</code></a>
Backport PR <a
href="https://redirect.github.com/jupyter/notebook/issues/7392">#7392</a>:
Remove pseudoelement obstructing the cell collapser (<a
href="https://redirect.github.com/jupyter/notebook/issues/7393">#7393</a>)</li>
<li><a
href="https://github.com/jupyter/notebook/commit/30587b826a0fe7055a02ea96d43e6305d8b5590b"><code>30587b8</code></a>
Publish 7.2.0</li>
<li><a
href="https://github.com/jupyter/notebook/commit/31bf294e85175bbf39816a90dc8858dedaf73bde"><code>31bf294</code></a>
Add user facing changelog for 7.2 (<a
href="https://redirect.github.com/jupyter/notebook/issues/7372">#7372</a>)</li>
<li><a
href="https://github.com/jupyter/notebook/commit/08fe5c5df12182178280bad5d2fbae02b3486146"><code>08fe5c5</code></a>
Update <code>@jupyterlab/galata</code> (<a
href="https://redirect.github.com/jupyter/notebook/issues/7361">#7361</a>)</li>
<li><a
href="https://github.com/jupyter/notebook/commit/7891117aa9f9cb95c8e301875f9bf74d9496a301"><code>7891117</code></a>
Update config.yml (<a
href="https://redirect.github.com/jupyter/notebook/issues/7363">#7363</a>)</li>
<li><a
href="https://github.com/jupyter/notebook/commit/a1e25b92bf10ef13a760353837114db9b498f242"><code>a1e25b9</code></a>
Publish 7.2.0rc1</li>
<li><a
href="https://github.com/jupyter/notebook/commit/f5d8aea3bdc3eea25213792f9d101738f2a1f627"><code>f5d8aea</code></a>
Default to the <code>full</code> windowing mode (<a
href="https://redirect.github.com/jupyter/notebook/issues/7321">#7321</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/jupyter/notebook/compare/@jupyter-notebook/tree@7.0.7...@jupyter-notebook/tree@7.2.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=notebook&package-manager=pip&previous-version=7.0.7&new-version=7.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2024-11-21 08:00:26 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>William FH
f7788abbb6 build(deps-dev): bump starlette from 0.38.6 to 0.40.0 (#2421)
Bumps [starlette](https://github.com/encode/starlette) from 0.38.6 to
0.40.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/encode/starlette/releases">starlette's
releases</a>.</em></p>
<blockquote>
<h2>Version 0.40.0</h2>
<p>This release fixes a Denial of service (DoS) via
<code>multipart/form-data</code> requests.</p>
<p>You can view the full security advisory:
<a
href="https://github.com/encode/starlette/security/advisories/GHSA-f96h-pmfr-66vw">GHSA-f96h-pmfr-66vw</a></p>
<h2>Fixed</h2>
<ul>
<li>Add <code>max_part_size</code> to <code>MultiPartParser</code> to
limit the size of parts in <code>multipart/form-data</code>
requests <a
href="https://github.com/encode/starlette/commit/fd038f3070c302bff17ef7d173dbb0b007617733">fd038f3</a>.</li>
</ul>
<h2>Version 0.39.2</h2>
<h2>Fixed</h2>
<ul>
<li>Allow use of <code>request.url_for</code> when only &quot;app&quot;
scope is available <a
href="https://redirect.github.com/encode/starlette/pull/2672">#2672</a>.</li>
<li>Fix internal type hints to support
<code>python-multipart==0.0.12</code> <a
href="https://redirect.github.com/encode/starlette/pull/2708">#2708</a>.</li>
</ul>
<hr />
<p><strong>Full Changelog</strong>: <a
href="https://github.com/encode/starlette/compare/0.39.1...0.39.2">https://github.com/encode/starlette/compare/0.39.1...0.39.2</a></p>
<h2>Version 0.39.1</h2>
<h2>Fixed</h2>
<ul>
<li>Avoid regex re-compilation in <code>responses.py</code> and
<code>schemas.py</code> <a
href="https://redirect.github.com/encode/starlette/pull/2700">#2700</a>.</li>
<li>Improve performance of <code>get_route_path</code> by removing
regular expression usage <a
href="https://redirect.github.com/encode/starlette/pull/2701">#2701</a>.</li>
<li>Consider <code>FileResponse.chunk_size</code> when handling multiple
ranges <a
href="https://redirect.github.com/encode/starlette/pull/2703">#2703</a>.</li>
<li>Use <code>token_hex</code> for generating multipart boundary strings
<a
href="https://redirect.github.com/encode/starlette/pull/2702">#2702</a>.</li>
</ul>
<hr />
<p><strong>Full Changelog</strong>: <a
href="https://github.com/encode/starlette/compare/0.39.0...0.39.1">https://github.com/encode/starlette/compare/0.39.0...0.39.1</a></p>
<h2>Version 0.39.0</h2>
<h2>Added</h2>
<ul>
<li>Add support for HTTP Range to <code>FileResponse</code> <a
href="https://redirect.github.com/encode/starlette/pull/2697">#2697</a></li>
</ul>
<hr />
<p><strong>Full Changelog</strong>: <a
href="https://github.com/encode/starlette/compare/0.38.6...0.39.0">https://github.com/encode/starlette/compare/0.38.6...0.39.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/encode/starlette/blob/master/docs/release-notes.md">starlette's
changelog</a>.</em></p>
<blockquote>
<h2>0.40.0 (October 15, 2024)</h2>
<p>This release fixes a Denial of service (DoS) via
<code>multipart/form-data</code> requests.</p>
<p>You can view the full security advisory:
<a
href="https://github.com/encode/starlette/security/advisories/GHSA-f96h-pmfr-66vw">GHSA-f96h-pmfr-66vw</a></p>
<h4>Fixed</h4>
<ul>
<li>Add <code>max_part_size</code> to <code>MultiPartParser</code> to
limit the size of parts in <code>multipart/form-data</code>
requests <a
href="https://github.com/encode/starlette/commit/fd038f3070c302bff17ef7d173dbb0b007617733">fd038f3</a>.</li>
</ul>
<h2>0.39.2 (September 29, 2024)</h2>
<h4>Fixed</h4>
<ul>
<li>Allow use of <code>request.url_for</code> when only &quot;app&quot;
scope is available <a
href="https://redirect.github.com/encode/starlette/pull/2672">#2672</a>.</li>
<li>Fix internal type hints to support
<code>python-multipart==0.0.12</code> <a
href="https://redirect.github.com/encode/starlette/pull/2708">#2708</a>.</li>
</ul>
<h2>0.39.1 (September 25, 2024)</h2>
<h4>Fixed</h4>
<ul>
<li>Avoid regex re-compilation in <code>responses.py</code> and
<code>schemas.py</code> <a
href="https://redirect.github.com/encode/starlette/pull/2700">#2700</a>.</li>
<li>Improve performance of <code>get_route_path</code> by removing
regular expression usage
<a
href="https://redirect.github.com/encode/starlette/pull/2701">#2701</a>.</li>
<li>Consider <code>FileResponse.chunk_size</code> when handling multiple
ranges <a
href="https://redirect.github.com/encode/starlette/pull/2703">#2703</a>.</li>
<li>Use <code>token_hex</code> for generating multipart boundary strings
<a
href="https://redirect.github.com/encode/starlette/pull/2702">#2702</a>.</li>
</ul>
<h2>0.39.0 (September 23, 2024)</h2>
<h4>Added</h4>
<ul>
<li>Add support for <a
href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests">HTTP
Range</a> to
<code>FileResponse</code> <a
href="https://redirect.github.com/encode/starlette/pull/2697">#2697</a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/encode/starlette/commit/4ded4b7ac517bd301cee69f5c189b1cb48c069b6"><code>4ded4b7</code></a>
Version 0.40.0 (<a
href="https://redirect.github.com/encode/starlette/issues/2728">#2728</a>)</li>
<li><a
href="https://github.com/encode/starlette/commit/fd038f3070c302bff17ef7d173dbb0b007617733"><code>fd038f3</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/encode/starlette/commit/e11684013fe5ca084f5bd4e54830512a4dff9618"><code>e116840</code></a>
Bump the python-packages group with 6 updates (<a
href="https://redirect.github.com/encode/starlette/issues/2713">#2713</a>)</li>
<li><a
href="https://github.com/encode/starlette/commit/0b50b9c4abd992a39d6e32148cc6f577ac3b1c44"><code>0b50b9c</code></a>
Version 0.39.2 (<a
href="https://redirect.github.com/encode/starlette/issues/2710">#2710</a>)</li>
<li><a
href="https://github.com/encode/starlette/commit/fe46d99d92da17efe1827f96ad29d748aac870d2"><code>fe46d99</code></a>
Support <code>request.url_for</code> when only &quot;app&quot; scope is
avaialable (<a
href="https://redirect.github.com/encode/starlette/issues/2672">#2672</a>)</li>
<li><a
href="https://github.com/encode/starlette/commit/1a6018e08a994c78f5c169b8535408259af0f249"><code>1a6018e</code></a>
Support python-multipart 0.0.12 (<a
href="https://redirect.github.com/encode/starlette/issues/2708">#2708</a>)</li>
<li><a
href="https://github.com/encode/starlette/commit/fa7b382a66cd99e3dc18f3baa44dae5ec68be76b"><code>fa7b382</code></a>
Version 0.39.1 (<a
href="https://redirect.github.com/encode/starlette/issues/2706">#2706</a>)</li>
<li><a
href="https://github.com/encode/starlette/commit/075efd0c5c9f5e49a4416f3b4a24e24efab135f8"><code>075efd0</code></a>
generate boundary with token_hex (<a
href="https://redirect.github.com/encode/starlette/issues/2702">#2702</a>)</li>
<li><a
href="https://github.com/encode/starlette/commit/b8139f9fe3b1acb34ddbe38dc6472a60b621540e"><code>b8139f9</code></a>
Consider <code>FileResponse.chunk_size</code> when handling multiple
ranges (<a
href="https://redirect.github.com/encode/starlette/issues/2703">#2703</a>)</li>
<li><a
href="https://github.com/encode/starlette/commit/4fbf766b3eac4146b86175682cec88d266fd8470"><code>4fbf766</code></a>
test: add tests in <code>test_requests</code> (<a
href="https://redirect.github.com/encode/starlette/issues/2677">#2677</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/encode/starlette/compare/0.38.6...0.40.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=starlette&package-manager=pip&previous-version=0.38.6&new-version=0.40.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2024-11-21 07:58:30 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
9bd430142a build(deps-dev): bump aiohttp from 3.10.6 to 3.10.11 (#2454)
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.10.6 to
3.10.11.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/aio-libs/aiohttp/releases">aiohttp's
releases</a>.</em></p>
<blockquote>
<h2>3.10.11</h2>
<h2>Bug fixes</h2>
<ul>
<li>
<p>Authentication provided by a redirect now takes precedence over
provided <code>auth</code> when making requests with the client -- by
:user:<code>PLPeeters</code>.</p>
<p><em>Related issues and pull requests on GitHub:</em>
<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9436">#9436</a>.</p>
</li>
<li>
<p>Fixed :py:meth:<code>WebSocketResponse.close()
&lt;aiohttp.web.WebSocketResponse.close&gt;</code> to discard non-close
messages within its timeout window after sending close -- by
:user:<code>lenard-mosys</code>.</p>
<p><em>Related issues and pull requests on GitHub:</em>
<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9506">#9506</a>.</p>
</li>
<li>
<p>Fixed a deadlock that could occur while attempting to get a new
connection slot after a timeout -- by :user:<code>bdraco</code>.</p>
<p>The connector was not cancellation-safe.</p>
<p><em>Related issues and pull requests on GitHub:</em>
<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9670">#9670</a>,
<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9671">#9671</a>.</p>
</li>
<li>
<p>Fixed the WebSocket flow control calculation undercounting with
multi-byte data -- by :user:<code>bdraco</code>.</p>
<p><em>Related issues and pull requests on GitHub:</em>
<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9686">#9686</a>.</p>
</li>
<li>
<p>Fixed incorrect parsing of chunk extensions with the pure Python
parser -- by :user:<code>bdraco</code>.</p>
<p><em>Related issues and pull requests on GitHub:</em>
<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9851">#9851</a>.</p>
</li>
<li>
<p>Fixed system routes polluting the middleware cache -- by
:user:<code>bdraco</code>.</p>
<p><em>Related issues and pull requests on GitHub:</em></p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst">aiohttp's
changelog</a>.</em></p>
<blockquote>
<h1>3.10.11 (2024-11-13)</h1>
<h2>Bug fixes</h2>
<ul>
<li>
<p>Authentication provided by a redirect now takes precedence over
provided <code>auth</code> when making requests with the client -- by
:user:<code>PLPeeters</code>.</p>
<p><em>Related issues and pull requests on GitHub:</em>
:issue:<code>9436</code>.</p>
</li>
<li>
<p>Fixed :py:meth:<code>WebSocketResponse.close()
&lt;aiohttp.web.WebSocketResponse.close&gt;</code> to discard non-close
messages within its timeout window after sending close -- by
:user:<code>lenard-mosys</code>.</p>
<p><em>Related issues and pull requests on GitHub:</em>
:issue:<code>9506</code>.</p>
</li>
<li>
<p>Fixed a deadlock that could occur while attempting to get a new
connection slot after a timeout -- by :user:<code>bdraco</code>.</p>
<p>The connector was not cancellation-safe.</p>
<p><em>Related issues and pull requests on GitHub:</em>
:issue:<code>9670</code>, :issue:<code>9671</code>.</p>
</li>
<li>
<p>Fixed the WebSocket flow control calculation undercounting with
multi-byte data -- by :user:<code>bdraco</code>.</p>
<p><em>Related issues and pull requests on GitHub:</em>
:issue:<code>9686</code>.</p>
</li>
<li>
<p>Fixed incorrect parsing of chunk extensions with the pure Python
parser -- by :user:<code>bdraco</code>.</p>
<p><em>Related issues and pull requests on GitHub:</em>
:issue:<code>9851</code>.</p>
</li>
<li>
<p>Fixed system routes polluting the middleware cache -- by
:user:<code>bdraco</code>.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/aio-libs/aiohttp/commit/3e09325e4839117df13fbac301f360edf8d3a0ee"><code>3e09325</code></a>
Remove 3.10.11rc0 from 3.10 changelog (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9858">#9858</a>)</li>
<li><a
href="https://github.com/aio-libs/aiohttp/commit/beb7b740533b81d75706e6615f07d92fcbf1c325"><code>beb7b74</code></a>
Release 3.10.11 (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9857">#9857</a>)</li>
<li><a
href="https://github.com/aio-libs/aiohttp/commit/259edc369075de63e6f3a4eaade058c62af0df71"><code>259edc3</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9851">#9851</a>/541d86d
backport][3.10] Fix incorrect parsing of chunk extensions w...</li>
<li><a
href="https://github.com/aio-libs/aiohttp/commit/bc15db61615079d1b6327ba42c682f758fa96936"><code>bc15db6</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9852">#9852</a>/249855a
backport][3.10] Fix system routes polluting the middleware ...</li>
<li><a
href="https://github.com/aio-libs/aiohttp/commit/158bf304bdd8047eec192540fa5bf7fe3862bffd"><code>158bf30</code></a>
Release 3.10.11rc0 (<a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9848">#9848</a>)</li>
<li><a
href="https://github.com/aio-libs/aiohttp/commit/e5917cd3480b01e7527b6524f9bec954325e1d5f"><code>e5917cd</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9844">#9844</a>/fabf3884
backport][3.10] Fix compressed get request benchmark paylo...</li>
<li><a
href="https://github.com/aio-libs/aiohttp/commit/68a1f42af90a5beae28c8617e0dfc15c3bd5153c"><code>68a1f42</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9840">#9840</a>/cc5fa316
backport][3.10] Add benchmark for sending compressed paylo...</li>
<li><a
href="https://github.com/aio-libs/aiohttp/commit/4f4b90fef082fbb37395c394d68ee0ab3fcbc7e6"><code>4f4b90f</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9835">#9835</a>/32ccfc9a
backport][3.10] Adjust client payload benchmarks to better...</li>
<li><a
href="https://github.com/aio-libs/aiohttp/commit/f3dd0f9fece79dc3cd9d00e2ffddd49c36598361"><code>f3dd0f9</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9832">#9832</a>/006f4070
backport][3.10] Increase allowed import time for Python 3....</li>
<li><a
href="https://github.com/aio-libs/aiohttp/commit/f2aab2e40336848d6a53ea03dc6d072a38c5e7f9"><code>f2aab2e</code></a>
[PR <a
href="https://redirect.github.com/aio-libs/aiohttp/issues/9827">#9827</a>/14fcfd4c
backport][3.10] Adjust client GET read benchmarks to inclu...</li>
<li>Additional commits viewable in <a
href="https://github.com/aio-libs/aiohttp/compare/v3.10.6...v3.10.11">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aiohttp&package-manager=pip&previous-version=3.10.6&new-version=3.10.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-21 07:56:56 -08:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
72dac006f4 build(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /libs/cli/js-examples (#2456)
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from
7.0.3 to 7.0.6.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md">cross-spawn's
changelog</a>.</em></p>
<blockquote>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.5...v7.0.6">7.0.6</a>
(2024-11-18)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>update cross-spawn version to 7.0.5 in package-lock.json (<a
href="https://github.com/moxystudio/node-cross-spawn/commit/f700743918d901eff92960e15a8dd68f87bd4176">f700743</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.4...v7.0.5">7.0.5</a>
(2024-11-07)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>fix escaping bug introduced by backtracking (<a
href="https://github.com/moxystudio/node-cross-spawn/commit/640d391fde65388548601d95abedccc12943374f">640d391</a>)</li>
</ul>
<h3><a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.4">7.0.4</a>
(2024-11-07)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>disable regexp backtracking (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/160">#160</a>)
(<a
href="https://github.com/moxystudio/node-cross-spawn/commit/5ff3a07d9add449021d806e45c4168203aa833ff">5ff3a07</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/77cd97f3ca7b62c904a63a698fc4a79bf41977d0"><code>77cd97f</code></a>
chore(release): 7.0.6</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/6717de49ff1e5de49622488dcb9c33fb25370c85"><code>6717de4</code></a>
chore: upgrade standard-version</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/f700743918d901eff92960e15a8dd68f87bd4176"><code>f700743</code></a>
fix: update cross-spawn version to 7.0.5 in package-lock.json</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/9a7e3b2165917367f74b8365faad9873b30d7263"><code>9a7e3b2</code></a>
chore: fix build status badge</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/085268352dcbcad8064c64c5efb25268b4023184"><code>0852683</code></a>
chore(release): 7.0.5</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/640d391fde65388548601d95abedccc12943374f"><code>640d391</code></a>
fix: fix escaping bug introduced by backtracking</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/bff0c87c8b627c4e6d04ec2449e733048bebb464"><code>bff0c87</code></a>
chore: remove codecov</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/a7c6abc6fee79641d45b452fe6217deaa1bd0973"><code>a7c6abc</code></a>
chore: replace travis with github workflows</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/9b9246e0969e86656d7ccd527716bc3c18842a19"><code>9b9246e</code></a>
chore(release): 7.0.4</li>
<li><a
href="https://github.com/moxystudio/node-cross-spawn/commit/5ff3a07d9add449021d806e45c4168203aa833ff"><code>5ff3a07</code></a>
fix: disable regexp backtracking (<a
href="https://redirect.github.com/moxystudio/node-cross-spawn/issues/160">#160</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/moxystudio/node-cross-spawn/compare/v7.0.3...v7.0.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cross-spawn&package-manager=npm_and_yarn&previous-version=7.0.3&new-version=7.0.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langgraph/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-21 07:56:33 -08:00
William FHandGitHub 54d848913f [CLI] Update Inmem Version (#2500) 2024-11-21 15:49:59 +00:00
Nuno CamposandGitHub 7021e81150 Merge pull request #2496 from langchain-ai/vb/fix-error-message
langgraph: fix error message on invalid update
2024-11-20 18:46:50 -08:00
vbarda b977045679 langgraph: fix error message on invalid update 2024-11-20 21:24:50 -05:00
William FHandGitHub a933776436 [CLI] Validate node version (#2489) 2024-11-20 17:24:34 -08:00
Nuno Campos 588373c2d5 0.2.53 2024-11-20 17:13:42 -08:00
Nuno CamposandGitHub 267962bece Merge pull request #2491 from langchain-ai/nc/20nov/stream-putnowait-loop
lib: For subgraphs / stream modes call stream.put as a callback in the original event loop
2024-11-20 17:11:56 -08:00
Nuno CamposandGitHub 4ae29b6e2a Merge pull request #2492 from langchain-ai/wfh/accept_313
[CLI] Accept 3.13 in build
2024-11-20 17:04:15 -08:00
William Fu-Hinthorn 3c0de26914 Accept 3.13 in build 2024-11-20 16:26:17 -08:00
Nuno Campos a570662773 Lint 2024-11-20 15:43:46 -08:00
Nuno Campos 9766068896 lib: For subgraphs / stream modes call stream.put as a callback in the original event loop
- This is asynchronous, so we shouldn't use for regular writes to the output stream (ie those from PregelLoop)
- For writes from subgraphs / nodes this is fine to use, as we make no guarantees about when those show up anyway
2024-11-20 15:39:30 -08:00
Vadym BardaandGitHub 7e8eef88ca docs: small fix for tutorial (#2487) 2024-11-20 14:36:42 -05:00
Eugene YurtsevandGitHub e3e63c70c9 docs: how-to guide language changes (#2462) 2024-11-19 14:54:08 -05:00
Brace SproulandGitHub 312f0982bc Merge pull request #2476 from langchain-ai/release
(sdk-js): Release 0.0.26
2024-11-19 11:38:11 -08:00
bracesproul 153245145e (sdk-js): Release 0.0.26 2024-11-19 11:32:22 -08:00
Brace SproulandGitHub c95abd88a1 Merge pull request #2117 from langchain-ai/brace/default-assign-api-key
fix(sdk-js): Pass api key in headers by default if in env
2024-11-19 11:26:01 -08:00
Brace SproulandGitHub a2b357bed5 Merge branch 'main' into brace/default-assign-api-key 2024-11-19 11:16:55 -08:00
Nuno Campos 253090f34d lint 2024-11-19 10:29:32 -08:00
Brace SproulandGitHub 7090d7e9a8 Merge pull request #2471 from langchain-ai/brace/drop-trailing-slash
fix(sdk-js): remove trailing slash from url
2024-11-19 09:31:59 -08:00
bracesproul b3fa43e4a6 fix(sdk-js): remove trailing slash from url 2024-11-19 09:23:47 -08:00
Vadym BardaandGitHub b1779cf348 docs: update autogen docs (#2470) 2024-11-19 11:57:26 -05:00
Harrison ChaseandGitHub 26d18d3ca5 add how to guides for autogen integration (#2466) 2024-11-19 08:44:17 -08:00
Christopher BrooksandGitHub 7d80176137 Merge branch 'langchain-ai:main' into issue2159 2024-11-19 11:19:34 -05:00
Christopher Brooks ca7da2fc41 feat: Make CompiledGraph displayable in Juypyter with display() (#2159) 2024-11-19 11:18:53 -05:00
12052d7d26 CLI docs (#2464)
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-11-19 10:57:07 -05:00
Vadym BardaandGitHub e3a30a9b69 docs: fix prompt (#2467) 2024-11-19 09:42:20 -05:00
William FHandGitHub ff1370a9a5 Release CLI (#2465) 2024-11-19 08:41:18 +00:00
William FHandGitHub 679a7365da Add default ns in put_writes (#2404) 2024-11-18 22:55:12 -08:00
b2522ffe19 CLI Dev command (#2463)
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-11-19 05:12:03 +00:00
Eugene YurtsevandGitHub 4212a795a0 docs[minor]: Fix layout issues in available templates (#2452) 2024-11-18 22:53:19 -05:00
Eugene YurtsevandGitHub 517d67aa32 docs: Update to use LANGSMITH_API_KEY throughout (#2461) 2024-11-18 22:51:36 -05:00
Brace SproulandGitHub feaf14765a Merge pull request #2458 from langchain-ai/brace/expose-command-interface
fix(sdk-js): Expose Command interface
2024-11-18 18:54:19 -08:00
Vadym BardaandGitHub cc6063c729 docs: simplify multi-agent tutorials (#2443) 2024-11-19 02:31:12 +00:00
013397042e docs: grammar (#2449)
Co-authored-by: Ian Sullivan <ian@frame.ai>
2024-11-18 21:01:37 -05:00
Nuno Campos 9a775d9c9f 0.2.52 2024-11-18 17:17:40 -08:00
Nuno Campos 2c945ceb68 Copy configurable in ensure_config 2024-11-18 17:17:20 -08:00
Erick FriisandGitHub 39eabd0fb8 Merge pull request #2459 from langchain-ai/erick/docs-self-hosted-plan-links
docs: self-hosted plan links
2024-11-18 16:42:02 -08:00
Erick Friis e5cc2e2044 docs: self-hosted plan links 2024-11-18 16:35:19 -08:00
bracesproul f00c0515e7 add jsdoc 2024-11-18 16:32:32 -08:00
bracesproul d87c0d4d53 fix(sdk-js): Expose Command interface 2024-11-18 16:25:51 -08:00
Nuno Campos fb40a974c8 0.2.51 2024-11-18 16:03:04 -08:00
Nuno Campos d63bfc6879 Add missing property 2024-11-18 16:02:54 -08:00
Nuno CamposandGitHub 97dd30711a Merge pull request #2437 from langchain-ai/nc/16nov/speed-up-find-subgraph
lib: find_subgraph doesn't need to look in both func and afunc
2024-11-18 15:59:58 -08:00
Vadym BardaandGitHub 016a9c1936 checkpoint-postgres: release 2.0.3 (#2455) 2024-11-18 16:55:54 -05:00
Nuno CamposandGitHub a2d6837fba Merge pull request #2413 from langchain-ai/vb/fix-pipeline
checkpoint-postgres: handle cases when conn.pipeline is not supported
2024-11-18 10:39:56 -08:00
Andrew NguonlyandGitHub f5bb2a3b04 docs: Update LangGraph Server API docs (#2451) 2024-11-18 09:38:38 -08:00
vbarda f807b73092 use capabilities 2024-11-18 12:15:18 -05:00
Nuno CamposandGitHub 167405daf2 Merge pull request #2434 from langchain-ai/nc/15nov/update-state-copy-parent
lib: When copying checkpoint, make it a child of the parent
2024-11-18 08:34:34 -08:00
William FHandGitHub c6360e5408 [Checkpoint] 2.0.5 (#2450) 2024-11-18 08:19:17 -08:00
vbarda f0505155a2 cache 2024-11-18 11:12:21 -05:00
886df0fa86 checkpoint: Add option to use persistent dict for in-memory checkpointer (#2439)
- This should only be used in very specific circunstances, sqlite or
postgres adapters much more appropriate in most circunstances

---------

Co-authored-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2024-11-18 16:04:05 +00:00
Kevin MarkhamandGitHub 3f1792d6ba docs: fix typo (#2406) 2024-11-18 09:11:57 -05:00
ZapironandGitHub 9208052a94 docs: Update link to LCEL Concept Guide (#2438)
Updated the link to the LCEL concept guide
2024-11-18 09:09:12 -05:00
Nuno Campos 7866bd2718 lib: find_subgraph doesn't need to look in both func and afunc
- if they both exist they're expected to share the same implementation, so looking in both is redundant
2024-11-16 16:57:32 -08:00
Nuno Campos 7c11325e23 Separate 2024-11-15 17:33:01 -08:00
Nuno Campos d99dc7d81b Fix missing writes 2024-11-15 17:23:00 -08:00
Nuno Campos 973ad76a58 Fix 2024-11-15 17:05:18 -08:00
Nuno Campos 36e49eb190 Add distinct source 2024-11-15 17:04:40 -08:00
Nuno Campos 66b9a7dee7 lib: When copying checkpoint, make it a child of the parent 2024-11-15 16:56:17 -08:00
Nuno Campos 5494855ffa 0.2.50 2024-11-15 15:43:37 -08:00
Nuno Campos 38d93a324c 0.2.49 2024-11-15 15:02:31 -08:00
Nuno CamposandGitHub 07c65321c1 Merge pull request #2432 from langchain-ai/nc/15nov/copy-checkpoint
lib: Restore prev behavior for update_state(None)
2024-11-15 15:00:18 -08:00
Nuno Campos 1dbdd7df2e Lint 2024-11-15 14:54:55 -08:00
Nuno Campos dab29ce094 lib: Restore prev behavior for update_state(None)
- update_state(None) copies checkpoint and keeps current (PUSH) tasks, eg for replay
- update_state(None, as_node=END) clears all tasks (PUSH or PULL)
2024-11-15 14:48:56 -08:00
Vadym BardaandGitHub 0388534b9f docs: update double texting how-tos (#2431) 2024-11-15 22:45:36 +00:00
Nuno CamposandGitHub 81077e7c3a Merge pull request #2429 from langchain-ai/nc/15nov/sdk-js-types
sdk-js: Update types for state.task
2024-11-15 11:54:59 -08:00
Nuno Campos 29a0042149 sdk-js: Update types for state.task 2024-11-15 11:54:00 -08:00
William FHandGitHub e9162e2516 Update CLI pyproject.toml (#2428) 2024-11-15 11:00:32 -08:00
Vadym BardaandGitHub 0f6c001c25 docs: update replay in persistence concepts (#2427) 2024-11-15 18:49:20 +00:00
Eugene YurtsevandGitHub 7f26325c87 cli: minor wording change in new command (#2422) 2024-11-15 03:13:53 +00:00
Nuno CamposandGitHub 3c4ce3f945 Merge pull request #2420 from langchain-ai/nc/14nov/js-sdk-command
Nc/14nov/js sdk command
2024-11-14 18:21:38 -08:00
Nuno Campos 84ef939bf4 sdk-js 0.0.24 2024-11-14 18:17:22 -08:00
Nuno Campos bdc22ea127 sdk-js: Accept command when creating run 2024-11-14 18:17:04 -08:00
Vadym BardaandGitHub 5abbb79e1b Merge branch 'main' into vb/fix-pipeline 2024-11-14 19:08:18 -05:00
vbarda 0a5220aa07 code review 2024-11-14 19:06:41 -05:00
Nuno CamposandGitHub 970e68edcc Merge pull request #2417 from langchain-ai/vb/fix-debug-async
langgraph: add debug to AsyncPregelLoop
2024-11-14 06:53:18 -08:00
vbarda da1a80e86d lint 2024-11-14 09:37:39 -05:00
vbarda c4b240e0c2 langgraph: add debug to AsyncPregelLoop 2024-11-14 09:36:33 -05:00
vbarda c2052d11c2 checkpoint-postgres: remove pipeline flag in cursor 2024-11-13 21:42:51 -05:00
Vadym BardaandGitHub dc0281b99c docs: update rollback in double-texting concepts (#2412) 2024-11-13 21:21:12 -05:00
Nuno Campos 3a860ad537 0.2.48 2024-11-13 17:45:04 -08:00
Nuno Campos 7051bccc30 checkpoint 2.0.4 2024-11-13 17:37:01 -08:00
Nuno Campos 199e41b228 sdk py 0.1.36 2024-11-13 17:07:07 -08:00
Nuno Campos 229a9e19a8 sdk-py: Add command arg for creating runs 2024-11-13 17:06:56 -08:00
Nuno Campos 3c3a1a1f35 0.2.47 2024-11-13 14:02:25 -08:00
Nuno CamposandGitHub f11127648e Merge pull request #2346 from langchain-ai/nc/4nov/send-eager
lib: Execute Sends in the superstep that originated them (feature-flagged)
2024-11-13 13:39:50 -08:00
Nuno CamposandGitHub 29f833b1a7 Merge pull request #2393 from langchain-ai/nc/11nov/command-resume
lib: Add interrupt() function
2024-11-13 13:34:19 -08:00
Nuno CamposandGitHub 7a3ea42743 Merge pull request #2410 from langchain-ai/nc/13nov/command-dataclass
Nc/13nov/command dataclass
2024-11-13 13:28:13 -08:00
Nuno Campos a94902db8a Lint 2024-11-13 13:17:02 -08:00
Nuno Campos 9fd152ef3a format 2024-11-13 13:14:03 -08:00
Nuno Campos 03bc9ba6e6 Make Command a dataclass 2024-11-13 13:11:28 -08:00
Nuno Campos 7fe6f88876 Add resumeable/ns properties to Interrupt 2024-11-13 12:51:55 -08:00
Nuno CamposandGitHub 1d88affd29 Merge pull request #2400 from langchain-ai/nc/12nov/command
Make Command accept generic arg for destinations
2024-11-13 10:03:27 -08:00
Eugene YurtsevandGitHub 6906e12edb cli: add ability to output docker compose file (#2379)
* Add ability to output docker compose file `langgraph dockerfile
Dockerfile --add-docker-compose`
* Add emoji in places
2024-11-13 12:42:58 -05:00
William FHandGitHub 7b4c29a20d [Checkpointers] MemorySaver: refrain from overwriting writes (#2399) 2024-11-13 00:20:38 +00:00
Nuno Campos 16bfa80b58 Make Command accept generic arg for destinations 2024-11-12 16:18:23 -08:00
Eugene YurtsevandGitHub cb10437c3f cli: Add default to interactive flow in new command (#2398) 2024-11-12 16:38:15 -05:00
Eugene YurtsevandGitHub 2bcf1c0a20 cli[minor]: Add langgraph new command (#2369)
Adds a "new" command to create langgraph application from a template.
2024-11-12 14:30:51 -05:00
Nuno Campos 00964b18f6 Undo 2024-11-11 18:12:25 -08:00
Nuno Campos 0d5c6201d3 Disable in py 3.10 or below for async 2024-11-11 18:09:58 -08:00
Nuno Campos 86d2847dab Use neg idx 2024-11-11 17:57:45 -08:00
Nuno Campos b3a4eaa967 Remove print 2024-11-11 17:56:10 -08:00
Nuno Campos 87fc519ce7 Remove print 2024-11-11 17:54:56 -08:00
Nuno Campos ef3a1ee997 Undo 2024-11-11 17:54:04 -08:00
Nuno Campos 311e16dffd Remove prints 2024-11-11 17:52:18 -08:00
Nuno Campos c83b8f6d04 Update 2024-11-11 17:49:58 -08:00
Nuno Campos 62d3a85b07 Add sync test 2024-11-11 17:46:54 -08:00
Nuno Campos 810ae0ef51 lib: Add interrupt() function
- This works similarly to the input() function from stdlib
- calling it in a node interrupts execution
- invoking the graph with Command(resume=...) will set ... as the return value of interrupt() so that the node can access the "answer" to the "question"
- This PR also starts the work to control the graph on invoke/stream with Command() input, to be continued in a future PR
2024-11-11 17:44:03 -08:00
Nuno Campos 2ff49d2200 Update 2024-11-11 15:43:20 -08:00
Nuno Campos d0567dc7be Add feature flag (default off) so we can merge this before releasing
- Add additional ci job to test with FF on
2024-11-11 15:38:48 -08:00
Nuno Campos ea64ac5c07 Update 2024-11-11 14:18:14 -08:00
Nuno Campos 090b53ccc1 Lint 2024-11-11 14:14:23 -08:00
Nuno Campos 0e872e7482 Lin t 2024-11-11 14:12:33 -08:00
Nuno Campos 3ad966e057 Update 2024-11-11 14:08:59 -08:00
Nuno CamposandGitHub a73f9affab Merge pull request #2391 from langchain-ai/nc/11nov/control-to-command
lib: Rename Control to GraphCommand
2024-11-11 14:06:17 -08:00
Nuno Campos 89a0859928 Execute Sends in same super step that triggered them
- Keep old code path for compatibility with existing checkpoints
- Keep a similar order of application of updates, in some cases there will be no visible change
- Update task path for Sends to contain the path of all the parent tasks (multiple parents when a Send task creates another Send)
- That lineage path is used to ensure order of application of updates respects their logical lineage (ie updates from parents always applied before their child tasks)
- Move Interrupt writes to use negative indexes, which allow replacing/shadowing (when task is re-run it may interrupt again, or succeed)
- Runner will now attempt to schedule new Send tasks as soon as the write is received (ie while the originating node is still running)
- Update kafka scheduler to support new Send behavior
2024-11-11 14:01:16 -08:00
Nuno Campos 75c502cd93 Lint 2024-11-11 13:59:18 -08:00
Nuno Campos 0cc45f7a35 Lint 2024-11-11 13:04:23 -08:00
Nuno Campos efb1dd6a10 lib: Rename Control to GraphCommand 2024-11-11 13:01:04 -08:00
Nuno CamposandGitHub 6edb213fe7 Merge pull request #2388 from langchain-ai/nc/11nov/update-none-clear-all-tasks
lib: update_state(values=None) should clear all tasks
2024-11-11 12:07:51 -08:00
Nuno Campos c0513076a2 Lint 2024-11-11 11:07:36 -08:00
Nuno Campos c043f148a6 lib: update_state(values=None) should clear all tasks 2024-11-11 10:48:34 -08:00
David DuongandGitHub 366b5e04c7 Merge pull request #2376 from langchain-ai/dqbd/js-0.0.23-lc_build
fix(sdk-js): move to `@langchain/scripts` for building, bump to 0.0.23
2024-11-11 15:33:53 +01:00
Tat Dat Duong 72239d2228 Bump to 0.0.23, use @langchain/scripts 0.1.4 2024-11-11 15:01:12 +01:00
Vadym BardaandGitHub b7f238975a docs: fix nav sidebar (#2382) 2024-11-10 16:32:14 -05:00
Tat Dat Duong a3c45141ee Make sure we actually build the CJS 2024-11-08 20:52:44 +01:00
Tat Dat Duong f7b899a54d fix(sdk-js): move to @langchain/scripts for building 2024-11-08 20:08:38 +01:00
Vadym BardaandGitHub 95477277a2 docs: improve breadcrumbs behavior (#2375) 2024-11-08 18:39:59 +00:00
Andrew NguonlyandGitHub 64b446f671 Update LangGraph server API docs (#2374) 2024-11-08 10:32:17 -08:00
David DuongandGitHub c2d2e44794 Merge pull request #2372 from langchain-ai/dqbd/0.0.22-sdk-js
feat(sdk-js): bump to 0.0.22
2024-11-08 16:17:45 +01:00
Eugene YurtsevandGitHub f60b9f3b43 cli: add --version option (#2373)
- add version option
- add unit test
2024-11-08 02:49:30 +00:00
Tat Dat Duong e3acfa3435 feat(sdk-js): bump to 0.0.22 2024-11-08 03:19:27 +01:00
Vadym BardaandGitHub 0f92c89529 docs: show nav menu for mobile (#2371) 2024-11-07 20:31:49 -05:00
Andrew NguonlyandGitHub 7cba75ec35 sdk-js: Add custom and messages-tuple stream modes (#2370) 2024-11-07 16:32:08 -08:00
Vadym BardaandGitHub 8408ba3a3e docs: add breadcrumbs (#2363) 2024-11-07 21:33:55 +00:00
Nuno CamposandGitHub c8c58b30d5 Merge pull request #2368 from langchain-ai/nc/7nov/control
lib: Rename args in Control object
2024-11-07 13:19:12 -08:00
Nuno Campos b4bed3329c lib: Rename args in Control object
- update_state -> state
- trigger -> goto
2024-11-07 13:12:19 -08:00
Eugene YurtsevandGitHub 4eec3aa69e docs: fix some typos (#2364) 2024-11-07 14:52:47 -05:00
Vadym BardaandGitHub 35e3276e34 langgraph: add add_sequence to StateGraph (#2352) 2024-11-07 13:16:34 -05:00
Nuno CamposandGitHub b346f4ead8 Merge pull request #2358 from langchain-ai/nc/6nov/kafka-missing-task-id
kafka: Add missing task id for TaskNotFound error
2024-11-06 16:48:25 -08:00
Vadym BardaandGitHub fef748e6cc docs: add another ignore url pattern to link check (#2357) 2024-11-07 00:43:22 +00:00
Nuno Campos 19cc95f7b6 kafka: Add missing task id for TaskNotFound error 2024-11-06 16:41:43 -08:00
Vadym BardaandGitHub eef65d94ac docs: fix numbered list in assistant versioning (#2356) 2024-11-06 22:17:01 +00:00
Nuno Campos 72d497e052 Move code 2024-11-06 09:02:06 -08:00
Nuno CamposandGitHub 32f58258aa Merge pull request #2355 from langchain-ai/nc/6nov/loop-match-writes
lib: Split out _match_writes util in PregelLoop
2024-11-06 08:55:10 -08:00
Nuno Campos 87d57b434a lib: Split out _match_writes util in PregelLoop 2024-11-06 08:48:30 -08:00
Nuno CamposandGitHub 4bbbb7d246 Merge pull request #2354 from langchain-ai/nc/6nov/cached-tasks-output-timing
lib: For cached tasks, emit output events after task events
2024-11-06 08:29:38 -08:00
Nuno Campos c1ce3c6b5f lib: For cached tasks, emit output events after task events 2024-11-06 08:22:54 -08:00
Nuno CamposandGitHub 511de6f5f6 Merge pull request #2353 from langchain-ai/dqbd/runnable-passthrough-test
fix(graph): invalid graph representation if RunnablePassthrough is used
2024-11-06 08:14:19 -08:00
Nuno Campos 4dc08cd724 Fix 2024-11-06 08:07:48 -08:00
Tat Dat Duong d7b9b3b01d fix(graph): invalid graph representation if RunnablePassthrough is used 2024-11-06 16:34:29 +01:00
Vadym BardaandGitHub a82ded65c6 docs: fix install/env cell for customer support tutorial (#2350) 2024-11-05 19:50:05 -05:00
Brace SproulandGitHub 1ca49fa568 Merge pull request #2348 from langchain-ai/brace/filter-status-js
feat(js-sdk): Add status field in search args
2024-11-05 16:40:23 -08:00
bracesproul 4eb3cd32fa cr 2024-11-05 16:04:52 -08:00
Brace SproulandGitHub 80d2a315aa Merge branch 'main' into brace/filter-status-js 2024-11-05 16:03:58 -08:00
bracesproul 82c9aa8485 feat(js-sdk): Add status field in search args 2024-11-05 16:03:24 -08:00
Nuno CamposandGitHub 8ecfafefbf Merge pull request #2347 from langchain-ai/nc/5nov/control-serializable
lib: Make Control object serializable
2024-11-05 15:34:13 -08:00
Nuno Campos 010564cbb3 lib: Make Control object serializable 2024-11-05 15:24:20 -08:00
Nuno Campos 18a3fa4a00 Ignore unknown tasks 2024-11-05 14:22:23 -08:00
Nuno Campos de8e487ff1 Add todo 2024-11-05 10:53:42 -08:00
Nuno CamposandGitHub e5ebdff4d8 Merge pull request #2342 from langchain-ai/nc/5nov/send-test-interrupt-before
Add two more test cases for Send + interrupt
2024-11-05 09:34:04 -08:00
Nuno Campos f283dac325 Add one more test for send-react-interrupt flow with replacing tool call 2024-11-05 09:27:02 -08:00
Nuno Campos 639501809c api: Add one more test case for send + interrupt before
- Testing same exact behavior as send + interrupt after
2024-11-05 09:15:46 -08:00
Nuno CamposandGitHub 36e6b89081 Merge pull request #2333 from langchain-ai/nc/apply-writes-order
lib: Enforce write application order in apply_writes
2024-11-05 09:07:23 -08:00
Nuno CamposandGitHub 90639e6cd7 Merge pull request #2332 from langchain-ai/nc/4nov/update-state-latest
lib: When updating state from latest, apply pending writes first
2024-11-04 16:59:51 -08:00
Nuno Campos dec0b7f439 Lint 2024-11-04 16:43:07 -08:00
Nuno Campos 04657408f8 lib: Enforce write application order in apply_writes
- Previously order was enforced in prepare_next_tasks, but that's not a good fit for future features
- This changes order between PULL and PUSH tasks, updates from PUSH tasks will now be applied after updates from PULL tasks
2024-11-04 16:39:04 -08:00
Nuno Campos 971d746061 Lint 2024-11-04 16:33:20 -08:00
Nuno Campos 9a2ba8c8cd lib: When updating state from latest, apply pending writes first
- This picks a default value for as_node which matches the node which last acted, even if the step didnt finish (due to an interrupt)
2024-11-04 16:20:21 -08:00
Nuno CamposandGitHub b50d41bbf3 Merge pull request #2331 from langchain-ai/nc/4nov/get-state-latest-next
lib: When getting latest state, alst make `next` reflect pending writes
2024-11-04 16:16:53 -08:00
Nuno Campos b71fd5092b lib: When getting latest state, alst make next reflect pending writes
- ie. tasks already executed should not show up in `next` list
2024-11-04 16:03:34 -08:00
Nuno CamposandGitHub f9b151b67f Merge pull request #2330 from langchain-ai/nc/4nov/test-react-send
lib: Add test for react architecture using Send + interrupt_before
2024-11-04 15:58:27 -08:00
William FHandGitHub 7ba9a66301 [Docs] Clarify checkpointer options (#2328) 2024-11-04 15:43:00 -08:00
Nuno CamposandGitHub 1b85764bf6 Merge pull request #2329 from langchain-ai/nc/4nov/get-state-apply-pending-writes
lib: In calls to get_state apply pending writes
2024-11-04 15:42:23 -08:00
Nuno CamposandGitHub 5e4c928948 Merge pull request #2327 from langchain-ai/nc/4nov/send-tests
lib: Add two more tests for Send
2024-11-04 15:42:08 -08:00
Nuno Campos ae282e3ae1 lib: Add test for react architecture using Send + interrupt_before
- Both for cond edge and edgeless graphs
2024-11-04 15:41:02 -08:00
Nuno Campos de3b654735 Add one more assertion 2024-11-04 15:14:29 -08:00
Nuno Campos d28734f287 Lint 2024-11-04 15:12:34 -08:00
Nuno Campos f9409022ed lib: In calls to get_state apply pending writes
- When calling get_state without a checkpoint id (ie to get the latest state) apply any pending writes for current checkpoint
2024-11-04 15:10:12 -08:00
Nuno Campos 8138c88b41 Add async versions 2024-11-04 11:56:31 -08:00
Nuno Campos 38332fd3c6 Lint 2024-11-04 11:55:14 -08:00
Nuno Campos 5606bef3dd lib: Add two more tests for Send 2024-11-04 11:52:39 -08:00
Vadym BardaandGitHub 895079bbdc langgraph: release 0.2.45 (#2326) 2024-11-04 14:34:07 -05:00
Nuno CamposandGitHub 6aaf80f2fd Merge pull request #2325 from langchain-ai/nc/4nov/unset-skip-done-tasks
lib: Unset skip_done_tasks after each tick of the loop
2024-11-04 11:30:08 -08:00
Vadym BardaandGitHub 2e656d9145 langgraph: add config metadata to pregel loop (#2323) 2024-11-04 19:26:34 +00:00
Nuno CamposandGitHub 1fb8e013f7 Merge pull request #2303 from langchain-ai/nc/1nov/test-send-order
Test order of update application after Send
2024-11-04 11:26:04 -08:00
Nuno CamposandGitHub f8fe2041d9 Merge pull request #2144 from langchain-ai/nc/19oct/graph-control
lib: Add support for graphs without edges
2024-11-04 11:25:40 -08:00
Nuno Campos 014f8485a6 lib: Unset skip_done_tasks after each tick of the loop 2024-11-04 11:23:53 -08:00
David DuongandGitHub 58d7eb9b17 Merge pull request #2322 from langchain-ai/dqbd/cli-prebuild-js
feat(cli): add JS prebuild script
2024-11-04 18:13:25 +01:00
Tat Dat Duong 44ff5f1a5a Update tests 2024-11-04 14:00:02 +01:00
David DuongandGitHub 46f25cf926 Merge pull request #2307 from langchain-ai/dqbd/cli-js-other-pkg-managers
feat(cli): add support for other JS package managers based off package lock
2024-11-04 13:59:28 +01:00
Tat Dat Duong e1467c27cb Remove newline 2024-11-04 13:52:40 +01:00
Tat Dat Duong 5deedfe548 Bump to 0.1.53 2024-11-04 13:51:46 +01:00
Tat Dat Duong 30937d0406 feat(cli): add JS prebuild script 2024-11-04 13:50:41 +01:00
David DuongandGitHub 6eb8130419 Merge pull request #2310 from langchain-ai/dqbd/sdk-js-types
feat(sdk-js): improve types for drawable graph, interrupts and metadata
2024-11-04 13:26:58 +01:00
Tat Dat Duong 8455771eb9 Bump to 0.0.21 2024-11-04 13:20:36 +01:00
Tat Dat Duong 39dcafcdea feat(sdk-js): improve types for drawable graph, interrupts and metadata 2024-11-02 02:48:47 +01:00
Tat Dat Duong 7854a19dac Update test 2024-11-02 02:05:42 +01:00
AllenandGitHub 18cea39090 fix(docs): function call in partial (#2297)
Docs use prompts with partial + function call, which would result in a
static datetime as opposed to a dynamic datetime being rendered on use.
2024-11-02 00:37:16 +00:00
Vadym BardaandGitHub 46ffa0e8d4 langgraph: release 0.2.44 (#2308) 2024-11-01 20:27:17 -04:00
Tat Dat Duong bf3098a075 feat(cli): add support for other JS package managers based off package lock 2024-11-02 00:44:08 +01:00
Andrew NguonlyandGitHub cdd7899564 RemoteGraph: If node name is not present, fallback to node id as the node name (#2304) 2024-11-01 15:21:39 -07:00
Vadym BardaandGitHub eeebd44a87 docs: add subgraph streaming example for remote graph (#2306) 2024-11-01 22:16:09 +00:00
Vadym BardaandGitHub 805f437534 docs: fix link in the tutorial (#2305) 2024-11-01 17:52:09 -04:00
Vadym BardaandGitHub 782b9a7903 langgraph: add message list validation to create_react_agent + a troubleshooting guide (#2182) 2024-11-01 17:40:53 -04:00
Andrew NguonlyandGitHub ecb584cbe0 sdk: Add action query param to cancel Run methods (#2284) 2024-11-01 13:32:49 -07:00
Nuno Campos 1e3953d1e0 Test order of update application after Send
- updates from inside Send tasks are applied in the order the Sends were created, if when you fan out, and have each task write results to a list with reducer, the final list is in the order you used when triggering
2024-11-01 13:23:10 -07:00
William FHandGitHub 509291fc1a Bump CLI (#2302) 2024-11-01 19:53:48 +00:00
Vadym BardaandGitHub dbb1958be5 docs: add more redirects & remove unused cloud pages (#2301) 2024-11-01 19:40:21 +00:00
Vadym BardaandGitHub d261d43b39 docs: update the docs for streaming messages (#2299) 2024-11-01 14:38:41 -04:00
Andrew NguonlyandGitHub 6986a50711 Update LangGraph Server API docs (#2300) 2024-11-01 11:38:12 -07:00
Nuno CamposandGitHub e9fe3e8bd9 Merge pull request #2298 from langchain-ai/dqbd/cli-debugger-rename
chore(cli): rename Debugger to LangGraph Studio
2024-11-01 11:11:07 -07:00
ccurmeandGitHub bdca2f590a Merge pull request #2294 from langchain-ai/cc/webhooks
docs: add some detail on webhooks
2024-11-01 14:01:42 -04:00
Tat Dat Duong f4801ae9ae chore(cli): rename Debugger to LangGraph Studio 2024-11-01 18:47:35 +01:00
Nuno CamposandGitHub 47ea264b46 Merge pull request #2296 from langchain-ai/vb/remap
langgraph: handle messages-tuple stream mode in RemoteGraph
2024-11-01 09:50:51 -07:00
vbarda 84e023e10b langgraph: handle messages-tuple stream mode in RemoteGraph 2024-11-01 12:43:59 -04:00
Chester Curme 52f0953786 add detail 2024-11-01 11:23:16 -04:00
Vadym BardaandGitHub d9743f684e docs: update annotation in tutorial (#2293) 2024-11-01 13:57:16 +00:00
Vadym BardaandGitHub 4aebb461e9 docs: update core in docs dependencies (#2291) 2024-11-01 09:51:34 -04:00
Vadym BardaandGitHub c2cc1e2e5e docs: remove token-by-token streaming from stream events (#2292) 2024-11-01 13:27:06 +00:00
William FHandGitHub 66cf2e6779 Add Tree of Thoughts (#1128) 2024-10-31 21:27:13 -07:00
Vadym BardaandGitHub 7bacb8c984 langgraph: release 0.2.43 (#2286) 2024-10-31 17:57:21 -04:00
BagaturandGitHub e2de59c6fb langgraph[patch]: bump core ^0.3.15 || ^ 0.2.43 (#2285) 2024-10-31 17:53:03 -04:00
Vadym BardaandGitHub c28dc26356 docs: fix typo (#2283) 2024-10-31 16:27:07 -04:00
Eugene YurtsevandGitHub ea012fb7dc docs: reorder reference (#2282) 2024-10-31 20:25:58 +00:00
Nuno Campos 18e71469e1 Lint 2024-10-31 12:57:00 -07:00
Eugene YurtsevandGitHub 4b1d30906e ci: update deploy docs workflow to check external links on langchain.com (#2280)
Reverts temporary change that was made yesterday to accommodate a link
that was only available on the staging version of langchain.com
2024-10-31 14:48:32 -04:00
Eugene YurtsevandGitHub 8b36013a03 Fix bad tab in how-to guide (#2278) 2024-10-31 14:48:21 -04:00
Vadym BardaandGitHub ed91572ceb docs: expose how-to on rebuilding graph at runtime (#2281) 2024-10-31 18:34:16 +00:00
Eugene YurtsevandGitHub 4150abf18c docs: update reference layout (#2279)
![image](https://github.com/user-attachments/assets/62f1588c-d08d-474c-b512-a558759e7627)
2024-10-31 18:23:27 +00:00
Vadym BardaandGitHub e132dfc955 docs: update FAQ (#2277)
Sync with https://www.langchain.com/langgraph
2024-10-31 13:43:08 -04:00
Nuno Campos 2624fc43dd Fix 2024-10-31 09:40:24 -07:00
Nuno Campos 0c5c2e6370 lib: Add support for graphs without edges
- Return Control(update_state=, trigger=, send=) from your nodes instead
- Annotate nodes with Control[Literal["destination"]] to see your graph connections drawn
2024-10-31 09:38:43 -07:00
Harrison ChaseandGitHub f7a93f99ef cp readme over (#2274) 2024-10-31 15:17:26 +00:00
Vadym BardaandGitHub 9f29bbfce8 docs: add flags to self-hosted (#2272) 2024-10-31 11:11:26 -04:00
Vadym BardaandGitHub 0075080827 docs: update quick start (#2273) 2024-10-31 11:11:07 -04:00
Harrison ChaseandGitHub 63318e5690 Harrison/update readme 1 (#2262) 2024-10-31 10:02:40 -05:00
Harrison ChaseandGitHub d0c12b1b7f Harrison/update language (#2271) 2024-10-31 10:01:22 -05:00
Vadym BardaandGitHub 194b4e0d9b langgraph: release 0.2.42 (#2270) 2024-10-31 10:32:13 -04:00
Nuno CamposandGitHub c6c7f400ae Merge pull request #2256 from langchain-ai/nc/30oct/fix-messages-subgraphs
Fix stream_mode=messages used together with subgraphs=True
2024-10-31 07:27:04 -07:00
Vadym BardaandGitHub c91e6bcc46 Merge branch 'main' into nc/30oct/fix-messages-subgraphs 2024-10-31 10:14:04 -04:00
vbarda ca69566d67 remove events 2024-10-31 10:13:24 -04:00
Jacob LeeandGitHub 0bedfa3628 docs: Fix typos (#2266) 2024-10-31 10:00:37 -04:00
Vadym BardaandGitHub fd82f037c6 docs: update remote graph how-to (#2269) 2024-10-31 09:58:11 -04:00
Vadym BardaandGitHub 2bacc42e01 docs: fix typo in remote graph how-to (#2268) 2024-10-31 09:29:10 -04:00
Eugene YurtsevandGitHub b527b785fd disable more link checking (#2265) 2024-10-31 04:10:10 +00:00
Eugene YurtsevandGitHub c3622cb0fe docs: disable link check for link that doesn't exist yet (#2263) 2024-10-31 03:51:44 +00:00
d0e59f406b docs: concepts for cloud and doc-reorg (#2196)
Update langgraph documentation

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Nuno Campos <nuno@langchain.dev>
Co-authored-by: Chester Curme <chester.curme@gmail.com>
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2024-10-30 23:34:02 -04:00
Nuno Campos 4cc6d789ed Fix stream_mode=messages used together with subgraphs=True 2024-10-30 19:35:28 -07:00
BagaturandGitHub d6d6ab9b73 langgraph[patch]: fix core dep specification (#2253) 2024-10-30 21:50:46 -04:00
Vadym BardaandGitHub e7816eb197 ci: turn off release attestations (#2252) 2024-10-30 21:28:34 -04:00
Vadym BardaandGitHub 4f8b69360c langgraph: release 0.2.41 (#2251) 2024-10-30 21:22:54 -04:00
Vadym BardaandGitHub 0718d0a660 langgraph: fix caller_ns in remote graph (#2250) 2024-10-31 01:20:36 +00:00
BagaturandGitHub 3641e65cac langgraph[patch]: fix annotations in inherited tool schemas (#2236)
fix #2220
2024-10-30 21:19:02 -04:00
Nuno CamposandGitHub b17141604d Merge pull request #2247 from langchain-ai/jacob/nit
fix: Fix typo in remote graph astream
2024-10-30 14:59:27 -07:00
Nuno Campos 5fece1cbfc langgraph 0.2.40 2024-10-30 14:58:27 -07:00
Nuno CamposandGitHub a85b7fca15 Merge pull request #2246 from langchain-ai/nc/30oct/node-callback
Add "node finished" callback
2024-10-30 14:57:51 -07:00
jacoblee93 af9a09b182 Fix typo in remote graph astream 2024-10-30 14:52:59 -07:00
Nuno Campos 75c8f99d3c Add "node finished" callback 2024-10-30 14:45:09 -07:00
Nuno CamposandGitHub 46892855c5 Merge pull request #2242 from langchain-ai/nc/30oct/remote-subgraphs
fix: RemoteGraph should propagate subgraphs streaming
2024-10-30 14:23:45 -07:00
Nuno Campos 59e8d59b7c Fix 2024-10-30 14:17:50 -07:00
Nuno Campos 5cb6ff79ca Prepend ns 2024-10-30 14:09:43 -07:00
Nuno Campos 9c41ce0b1c Lint 2024-10-30 14:07:27 -07:00
Nuno Campos 61abee4bd4 Lint 2024-10-30 13:59:31 -07:00
Nuno Campos 43d9567c5d fix: RemoteGraph should propagate subgraphs streaming 2024-10-30 13:47:27 -07:00
Nuno CamposandGitHub 3923979479 Merge pull request #2235 from langchain-ai/nc/30oct/remote-invoke
lib: Ensure RemoteGraph.invoke emits all subgraph events as expected
2024-10-30 13:26:56 -07:00
Nuno Campos 5312fbd7f4 Fix 2024-10-30 13:20:55 -07:00
David DuongandGitHub ae412bbede Merge pull request #2237 from langchain-ai/jacob/sdk
feat(sdk-js): Support if_not_exists in SDK runs
2024-10-30 19:16:22 +01:00
jacoblee93 69c8d21ba6 Support if_not_exists 2024-10-30 11:10:08 -07:00
Nuno Campos 2dfc4e3cc0 lib: Ensure RemoteGraph.invoke emits all subgraph events as expected
- Just delegate to stream
2024-10-30 10:40:14 -07:00
74c8589045 Add support for Docker arg passthrough in langgraph CLI (#2206)
Added a js-example to show it builds
Adapted integration tests after removing the test CLI command

---------

Co-authored-by: Nuno Campos <nuno@langchain.dev>
2024-10-29 22:33:40 -07:00
Vadym BardaandGitHub 4717632ce7 sdk-py: more docstring updates (#2225) 2024-10-30 01:22:29 +00:00
Andrew NguonlyandGitHub 726a85f26b Add docstring to RemoteGraph (#2217) 2024-10-29 15:31:21 -07:00
Vadym BardaandGitHub 8a0650a46b sdk-py: update docstrings (#2221) 2024-10-29 20:31:12 +00:00
Vadym BardaandGitHub e7dc43b7ca langgraph: validate sync/async clients initialized correctly in RemoteGraph (#2214) 2024-10-29 13:21:10 -04:00
Nuno Campos 90195af1d8 sdk-py 0.1.35 2024-10-28 15:22:05 -07:00
Nuno Campos da707343dc sdk-js 0.0.19 2024-10-28 15:21:57 -07:00
Nuno CamposandGitHub 1f5fc505c6 Merge pull request #2204 from langchain-ai/nc/28oct/sdk-wait-raise-error
sdk: By default raise errors in /wait endpoint
2024-10-28 14:46:14 -07:00
Nuno Campos 4c655f841e Lint 2024-10-28 14:40:25 -07:00
Nuno Campos be27c96f3c sdk: By default raise errors in /wait endpoint 2024-10-28 14:27:13 -07:00
eric-langchainandGitHub 5090e30f71 Merge pull request #2185 from langchain-ai/update-docs-for-homepage-redesign
home page redesign docs
2024-10-28 11:47:34 -05:00
Lance MartinandGitHub 688de89864 Fix link that is causing docs build to fail (#2194) 2024-10-25 23:34:08 +00:00
Lance MartinandGitHub 62444d4c63 Update memory concept doc (#2181)
Add content on [memory
types](https://blog.langchain.dev/memory-for-agents/).
2024-10-25 14:08:04 -07:00
Eugene YurtsevandGitHub 4a970cca8b docs: update main site layout (#2191)
* Remove land hand sidebar on most pages
* Cleans up some headings
* Adds error reference information to index (it was already on the
sidebar for the how-to page) -- should probably be its own tab?
* Adds an index page for the reference (so it's easier to link to a main
reference page), alternatively we can set up a redirect from index to
graph
2024-10-25 16:49:31 -04:00
Eugene YurtsevandGitHub 18b9135770 docs: update tutorials index page (#2190)
Minor formatting update -- since this section stands right now looks
quite bad
2024-10-25 18:08:21 +00:00
David DuongandGitHub d266ddb312 Merge pull request #2167 from langchain-ai/dqbd/sdk-js-timeout
feat(sdk-js): implement abort signal timeout, make default timeout for runs 5 minutes
2024-10-25 15:40:30 +02:00
Tat Dat Duong 7a348ac19c Don't enforce timeouts for run stream / block endpoints 2024-10-25 15:34:36 +02:00
Eric han 123d93539a some more spots 2024-10-24 17:14:02 -05:00
Eric han 785e7dab3a home page redesign docs 2024-10-24 17:04:20 -05:00
Vadym BardaandGitHub 582fb11dd4 checkpoint-sqlite: release 2.0.1 (#2184) 2024-10-24 17:08:25 -04:00
Vadym BardaandGitHub 39d9cdbef0 checkpoint-postgres: release 2.0.2 (#2183) 2024-10-24 17:06:36 -04:00
Vadym BardaandGitHub 6dacd1aabe langgraph: always raise NodeInterrupt in ToolNode if raised from a tool (#2175) 2024-10-24 18:21:18 +00:00
Vadym BardaandGitHub 91ad8b803b checkpoint-duckdb: release 2.0.1 (#2180) 2024-10-24 13:58:48 -04:00
Vadym BardaandGitHub a0e99f704f checkpoint: release 2.0.2 (#2179) 2024-10-24 13:52:02 -04:00
Vadym BardaandGitHub def3e06b4a move py.typed to submodules for namespace packages (#2177) 2024-10-24 13:43:43 -04:00
David DuongandGitHub a4fab2a867 Merge pull request #2178 from langchain-ai/dqbd/sdk-bump-24oct
feat(sdk): bump SDK to js@0.0.18 and py@0.1.34
2024-10-24 18:58:07 +02:00
Tat Dat Duong cf1c7f3673 feat(sdk): bump SDK to js@0.0.18 and py@0.1.34 2024-10-24 18:51:56 +02:00
Nuno CamposandGitHub 6c05b66c7c Merge pull request #2176 from langchain-ai/dqbd/error-thread-state
fix(sdk): add error thread state
2024-10-24 09:23:20 -07:00
Tat Dat Duong 5c44dcef81 fix(sdk): add error thread state 2024-10-24 18:16:21 +02:00
Nuno Campos 7fd6b1b4be Fix 2024-10-24 08:48:46 -07:00
Vadym BardaandGitHub 6202e0f1d9 docs: update branching how-to notebook (#2174) 2024-10-24 14:56:19 +00:00
Tat Dat Duong ccfeafa975 feat(sdk-js): implement abort signal timeout, make default timeout for runs 5 minutes 2024-10-24 09:38:42 +02:00
Nuno CamposandGitHub 83238f51d8 Merge pull request #2166 from langchain-ai/nc/23oct/remote-graph-interop
Interop of RemoteGraph w core lib
2024-10-23 20:36:38 -07:00
Nuno Campos 05f008cbfb Lint 2024-10-23 20:30:32 -07:00
Nuno Campos a8ae2a52a3 Lint 2024-10-23 20:27:18 -07:00
Nuno Campos aa245a8e71 Fix up 2024-10-23 20:22:04 -07:00
bdc75a22d5 langgraph: expand handle_tool_errors in ToolNode (#1667)
This change expands error-handling functionality of the `ToolNode` by
introducing more options for `handle_tool_errors`. Default behavior of
the `ToolNode` is unchanged -- all errors are handled and wrapped in a
`ToolMessage` to be sent back to LLM.

With this change, users have flexibility to only handle the exceptions
that they need to pass back to the LLM:

* they can specify exceptions to handle by passing a tuple of exceptions
in `handle_tool_errors`
* specify `handle_tool_errors=True/str/callable`
* when `handle_tool_errors` is a callable, the signature will be
inspected and exceptions from the signature will be handled

---------

Co-authored-by: vbarda <vadym@langchain.dev>
2024-10-24 00:58:05 +00:00
Nuno Campos 69227daff3 Lint 2024-10-23 17:01:58 -07:00
Nuno Campos dc8260bb72 Interop of RemoteGraph w core lib 2024-10-23 15:37:17 -07:00
Vadym BardaandGitHub 62a5ec509d checkpoint: add DuckDB store (#2154) 2024-10-23 22:20:10 +00:00
Vadym BardaandGitHub d32386f849 checkpoint: add DuckDB checkpointer (#2145) 2024-10-23 21:11:03 +00:00
Nuno CamposandGitHub 08a1ed38f1 Merge pull request #2092 from langchain-ai/an/11oct/remote-graph-interrupt
Update `stream()` and `astream()` methods in `RemoteGraph` to process `updates` event types
2024-10-23 13:48:43 -07:00
Nuno Campos 037a95ff60 Update tests 2024-10-23 13:43:48 -07:00
Nuno Campos e294720ec5 Lint 2024-10-23 13:29:59 -07:00
Nuno Campos f8a0b7a464 Use if_not_exists 2024-10-23 13:24:19 -07:00
Nuno Campos 1121806ba4 Add if_not_exists 2024-10-23 13:23:49 -07:00
Nuno Campos dca200d6c4 Finish 2024-10-23 13:23:42 -07:00
Vadym BardaandGitHub 6f236b5f2c docs: update multi-agent concept examples (#2151) 2024-10-23 13:40:24 -04:00
Vadym BardaandGitHub 916affa1b5 langgraph: add 'messages_key' param to ToolNode / tools_condition (#2049) 2024-10-22 17:32:05 -04:00
Nuno Campos 58cf0c6a6e chore: Switch s3 client utils from httpx client to curl client 2024-10-22 10:46:37 -07:00
gbaian10andGitHub 0042889c31 Support read type hints from the method in add_node (#2014)
Add function to read type hints from the `__call__` method to resolve issue #1950.
2024-10-22 17:11:59 +00:00
nikhildigdeandGitHub 2be012d8ed docs: fix typo in concept docs 2024-10-21 21:40:47 +00:00
Yuki OshimaandGitHub 780285ef91 Fix(docs): InMemoryStore example error (#2148) 2024-10-21 18:39:43 +00:00
Nuno CamposandGitHub 47c7b76aa1 Merge pull request #2152 from langchain-ai/nc/21oct/skip-docker-login-for-forks
ci: Skip docker login for PRs from forks
2024-10-21 10:09:54 -07:00
Nuno Campos 9931f61525 ci: Skip docker login for PRs from forks 2024-10-21 10:04:40 -07:00
Nuno CamposandGitHub 0d81ad92f0 Merge pull request #2143 from langchain-ai/nc/19oct/async-max-concurrency
lib: Add max_concurrency for async executions
2024-10-19 15:16:15 -07:00
Nuno Campos 7d3f2ca3ed Lint 2024-10-19 15:11:18 -07:00
Nuno Campos 42648c88dd lib: Add max_concurrency for async executions 2024-10-19 12:45:01 -07:00
Vadym BardaandGitHub 1aab758634 langgraph: release 0.2.39 (#2139) 2024-10-18 14:47:50 -04:00
Vadym BardaandGitHub b5fbc7a7b8 docs: temporarily disable some link checks (#2138) 2024-10-18 14:37:19 -04:00
b647dcb0f2 feat: Add LangGraph error pages (#2136)
Co-authored-by: Erick Friis <erick@langchain.dev>
Co-authored-by: vbarda <vadym@langchain.dev>
2024-10-18 18:20:22 +00:00
Nuno CamposandGitHub 4df5680732 Merge pull request #2132 from langchain-ai/nc/17oct/stream-messages-nostream-tag
For stream_mode=messages skip any nodes/llms with tag nostream
2024-10-17 15:57:09 -07:00
Nuno Campos 74a17a6d4c Update tests 2024-10-17 15:52:17 -07:00
Nuno Campos e2a3698250 For stream_mode=messages skip any nodes/llms with tag nostream 2024-10-17 15:28:14 -07:00
Vadym BardaandGitHub 4dfdb9a83e docs: update tags for store endpoints in API docs (#2127) 2024-10-16 16:34:54 +00:00
Vadym BardaandGitHub 583d8c9499 docs: update tutorial names/links (#2126) 2024-10-16 15:17:28 +00:00
vbarda 15bbede7bc update image in multi-agent concepts 2024-10-16 10:59:07 -04:00
Vadym BardaandGitHub 3ffdf4bb3f docs: update image in concepts (#2125) 2024-10-16 13:59:17 +00:00
Nuno CamposandGitHub 6578698414 Merge pull request #2124 from langchain-ai/dqbd/js-bump-0.0.17
feat(sdk-js): bump to 0.0.17
2024-10-16 06:21:22 -07:00
Tat Dat Duong 048ae6c17b feat(sdk-js): bump to 0.0.17 2024-10-16 15:19:39 +02:00
Nuno CamposandGitHub 0e2c2eb13a Merge pull request #2120 from langchain-ai/nc/15oct/executor-dict
fix: Avoid errors from executor modifying tasks dict during exit routine
2024-10-15 16:15:55 -07:00
Nuno Campos 515c4ffebe Fix 2024-10-15 16:11:08 -07:00
Nuno Campos eefe057a47 fix: Avoid errors from executor modifying tasks dict during exit routine
- This could happen if a task happened to finish while the exit routine is running
2024-10-15 15:13:46 -07:00
18f34c30d8 docs: update subgraph how-to (#2079)
Co-authored-by: vbarda <vadym@langchain.dev>
2024-10-15 17:30:34 -04:00
2670bcf330 docs: add concepts for subgraphs and multi-agent (#2069)
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
Co-authored-by: Nuno Campos <nuno@langchain.dev>
2024-10-15 17:17:22 -04:00
bracesproul 433c382280 cr 2024-10-15 11:37:20 -07:00
bracesproul 7352ab14a2 cr 2024-10-15 11:36:37 -07:00
bracesproul 85a76912d3 fix(sdk-js): Pass api key in headers by default if in env 2024-10-15 11:33:40 -07:00
Nuno Campos f6fb2ef5ca langgraph 0.2.38 2024-10-15 11:04:22 -07:00
Vadym BardaandGitHub 2fb7e92879 docs: update recursion notebook to use RemainingSteps (#2114) 2024-10-15 12:05:46 -04:00
Nuno CamposandGitHub 46b2d08a8a Merge pull request #2115 from langchain-ai/nc/15oct/update-is-last-step
Return IsLastStep to previous definition
2024-10-15 08:41:30 -07:00
Nuno Campos 649b742e0a Update types for RemainingSteps, return IsLastStep to previous definition 2024-10-15 08:35:31 -07:00
Nuno CamposandGitHub fd4629e778 Merge pull request #2112 from langchain-ai/vb/fix-type
langgraph: fix type for RemainingSteps
2024-10-15 08:34:50 -07:00
vbarda d14f98f01b langgraph: fix type for RemainingSteps 2024-10-15 09:07:00 -04:00
Nuno Campos c0b56bf60d langgraph 0.2.37 2024-10-14 17:29:11 -07:00
Nuno CamposandGitHub e8b875906f Merge pull request #2105 from langchain-ai/nc/14oct/is-last-step-fix
Fix IsLastStep counter for runs with checkpointers
2024-10-14 17:21:31 -07:00
Nuno Campos d48faecd42 Fix 2024-10-14 17:16:32 -07:00
Nuno Campos 5e175e098b Update kafka 2024-10-14 17:10:10 -07:00
Nuno Campos bcf335651e Fix is_last_step 2024-10-14 17:05:16 -07:00
Nuno Campos 965849823a Fix 2024-10-14 17:03:53 -07:00
Nuno Campos 45e7101457 Backwards compat 2024-10-14 16:57:25 -07:00
Nuno Campos ecd75a8c4d Fix IsLastStep counter for runs with checkpointers
- Share step/stop logic with PregelLoop
- Add RemainingSteps value which contains the number of remaining steps
- Switch create_react_agent to use RemainingSteps, so that it behave correctly for return_direct tools
2024-10-14 16:54:16 -07:00
Nuno CamposandGitHub edec5c055e Merge pull request #2065 from langchain-ai/dqbd/debug-stream-checkpoint-map
fix(debug): send checkpoint_map as well
2024-10-14 15:50:39 -07:00
Nuno Campos ff310cc8d6 One more 2024-10-14 15:45:12 -07:00
Nuno Campos 233bd78ee4 Add checkpoint_map to parent_config 2024-10-14 15:44:18 -07:00
Nuno Campos b818bf2fba Fix up 2024-10-14 15:32:41 -07:00
Tat Dat DuongandNuno Campos c5ec568cfb Patch config before entering map_debug_checkpoint 2024-10-14 15:16:24 -07:00
Tat Dat DuongandNuno Campos 29548b2e27 fix(debug): add failing tests 2024-10-14 15:16:03 -07:00
Nuno Campos f2dc537696 langgraph 0.2.36 2024-10-14 12:28:43 -07:00
Nuno Campos 31d21c8d24 sdk-py 0.1.33 2024-10-14 12:28:22 -07:00
Nuno CamposandGitHub 4a03ed5915 Merge pull request #2091 from langchain-ai/nc/11oct/checkpoint-task-result
lib: Add result for each task in a checkpoint
2024-10-14 11:37:28 -07:00
Nuno Campos dc083c6563 Fix 2024-10-14 11:31:03 -07:00
Nuno Campos bfe005fef0 Lint 2024-10-14 10:30:59 -07:00
vbarda 5388b7c74f install dev sdk 2024-10-14 13:23:18 -04:00
vbarda 0d4617817d Merge branch 'nc/11oct/checkpoint-task-result' of github.com:langchain-ai/langgraph into nc/11oct/checkpoint-task-result 2024-10-14 13:20:25 -04:00
Nuno Campos 5046ec4f43 Lint 2024-10-14 10:16:14 -07:00
Nuno Campos c26bb9e156 lib: Add result for each task in a checkpoint
- Note this requires disabling the optimization that avoids saving writes for the last task in a step
2024-10-14 10:16:14 -07:00
Nuno CamposandGitHub 3982090c6d Merge pull request #2088 from langchain-ai/nc/11oct/stream-interrupt
lib: Add interrupts to stream_mode=updates
2024-10-14 10:15:53 -07:00
Nuno CamposandGitHub 6d3a2c59da Merge pull request #2102 from langchain-ai/vb/ci-update
ci: run core 0.2.x for a single python version
2024-10-14 10:15:38 -07:00
vbardaandNuno Campos 79444dee9c ci: run core 0.2.x for a single python version 2024-10-14 10:10:42 -07:00
Nuno CamposandGitHub 07f8f87780 Merge pull request #2103 from langchain-ai/nc/14oct/docker-ro-token
Add read-only token for pulling public images from dockerhub
2024-10-14 10:07:45 -07:00
Nuno Campos 99bde8774e Add read-only token for pulling public images from dockerhub 2024-10-14 09:56:24 -07:00
Nuno CamposandGitHub 5946f4ff2b Merge pull request #2100 from langchain-ai/vb/copy
langgraph: support copy without update in Pregel
2024-10-14 09:12:36 -07:00
vbarda b99734d157 langgraph: support copy without update in Pregel 2024-10-14 10:14:41 -04:00
Vadym BardaandGitHub d1c29fc8be docs: remove example with missing link (#2099) 2024-10-14 14:05:48 +00:00
Andrew Nguonly 19ccb0c6af Update astream_events() to process interrupt. 2024-10-11 19:06:52 -07:00
Andrew Nguonly a277b86fcb Fix unit test. 2024-10-11 18:53:45 -07:00
Andrew Nguonly 2f819a6a9b Update stream() and astream() to process 'updates' event types. 2024-10-11 18:40:40 -07:00
Nuno Campos dc47c7b357 lib: Add result for each task in a checkpoint
- Note this requires disabling the optimization that avoids saving writes for the last task in a step
2024-10-11 16:08:00 -07:00
Nuno Campos 561aa3080e Lint 2024-10-11 14:28:16 -07:00
Nuno Campos c6a450b857 lib: Add interrupts to stream_mode=updates 2024-10-11 14:28:16 -07:00
Nuno Campos 0557fb03a4 format 2024-10-11 14:28:08 -07:00
Nuno CamposandGitHub c9adf995c2 Merge pull request #2087 from langchain-ai/nc/11oct/o-flag
fix: Work w python's O flag
2024-10-11 12:03:21 -07:00
Nuno Campos fc20de5bba Fix 2024-10-11 11:39:19 -07:00
Nuno Campos 0822a287e3 fix: Work w python's O flag
- assert statements are skipped in that case, so we need to move calls to apply_writes to outside assert statements
2024-10-11 11:24:56 -07:00
Andrew NguonlyandGitHub 66741ba071 Rename RemotePregel to RemoteGraph (#2085) 2024-10-11 10:55:04 -07:00
Andrew NguonlyandGitHub e72c25873f Implement PregelProtocol and RemotePregel class (attempt 2) (#2078)
### Summary
Redo of [this PR](https://github.com/langchain-ai/langgraph/pull/2034)
(branched from clean branch).
2024-10-11 09:23:12 -07:00
Vadym BardaandGitHub 739336516d docs: remove empty cells for admonitions (#2082) 2024-10-11 13:36:24 +00:00
Nuno CamposandGitHub ae6c793bdf Merge pull request #2077 from langchain-ai/nc/10oct/313
Test w Python 3.13 in CI
2024-10-10 16:35:53 -07:00
Nuno Campos d8954963b4 Update snapshots 2024-10-10 16:27:43 -07:00
Nuno Campos ea38ba9e29 Update uvloop 2024-10-10 16:22:34 -07:00
Nuno Campos 76229ade66 Update psycopg 2024-10-10 16:17:19 -07:00
Nuno Campos 4aad36947e Upgrade pydantic 2024-10-10 16:13:05 -07:00
Nuno Campos cb7b667e6f Update psycopg 2024-10-10 16:09:24 -07:00
Nuno Campos 822ddb5f48 Test aux libs 2024-10-10 16:06:05 -07:00
Nuno Campos de355ee2d2 Update rpds-py 2024-10-10 16:05:43 -07:00
Nuno Campos 9ca270d62d Test w Python 3.13 in CI 2024-10-10 15:58:59 -07:00
David DuongandGitHub 28b5105913 Merge pull request #2070 from langchain-ai/dqbd/debug-self-referencing-checkpoint
fix(debug): self-referencing checkpoints when resuming streaming mid-thread
2024-10-10 12:44:45 +02:00
Tat Dat Duong be47752f0e Initialise to None 2024-10-10 11:15:54 +02:00
Isaac FranciscoandGitHub aa83f4a33e adding support for more notebooks in CI (#2060) 2024-10-10 01:48:13 +00:00
Tat Dat Duong 4d69331a52 Add async tests 2024-10-10 02:29:28 +02:00
Tat Dat Duong fb8c386958 fix(debug): address self-referencing 2024-10-10 02:21:32 +02:00
Tat Dat Duong ac8b51f1f2 fix(debug): add failing test for self-referencing 2024-10-10 02:21:17 +02:00
Vadym BardaandGitHub db0f508269 docs: add custom hooks for rendering jupyter notebooks (#2067) 2024-10-09 18:49:54 -04:00
Vadym BardaandGitHub fe110ae145 docs: fix intro in supervisor tutorial (#2068) 2024-10-09 20:59:49 +00:00
David DuongandGitHub fc276c5ac0 Merge pull request #2066 from langchain-ai/dqbd/checkpoint-sdk-js
fix(sdk-js): pass checkpoint when creating run
2024-10-09 20:50:54 +02:00
Tat Dat Duong 9360545659 Remove deprecated message 2024-10-09 20:41:18 +02:00
Tat Dat Duong 26e30ad6af Remove error warning 2024-10-09 20:40:24 +02:00
Tat Dat Duong 8df533b489 fix(sdk-js): allow passing checkpoint when creating a run 2024-10-09 20:34:19 +02:00
Vadym BardaandGitHub f9df0f4700 docs: update many tools how-to chart (#2059) 2024-10-09 13:46:59 +00:00
David DuongandGitHub 5d0afa3888 Merge pull request #2048 from langchain-ai/dqbd/debug-tasks-state
feat(debug): send tasks info
2024-10-09 14:38:26 +02:00
Tat Dat Duong a53a566730 Bump to 0.2.35 2024-10-09 14:33:14 +02:00
Andrew NguonlyandTat Dat Duong d2c359f7c9 docs: Update LangGraph API docs (#2056)
### Summary
Adding endpoints for `/subgraphs` and `/store`.
2024-10-09 14:33:14 +02:00
Andrew NguonlyandTat Dat Duong c4d251b05c sdk-py: Add Sequence[dict] type to values param type for update_state() (#2054)
### Summary
The LangGraph API supports a list of `dict` for the `values` field for
the `POST /threads/<thread_id>/state` endpoint.

Reference:
https://github.com/langchain-ai/langgraph-api/blob/main/api/openapi.json#L3005-L3021
2024-10-09 14:33:14 +02:00
Andrew NguonlyandTat Dat Duong 9a752e1563 sdk-py: Add "*" literal to interrupt_before and interrupt_after types (#2053)
### Summary
The LangGraph API supports the literal string `"*"` for
`interrupt_before` and `interrupt_after`.

Reference:
https://github.com/langchain-ai/langgraph-api/blob/main/api/openapi.json#L2425
2024-10-09 14:33:14 +02:00
Andrew NguonlyandTat Dat Duong 6d4a426059 sdk-py: Add custom stream mode to StreamMode type (#2051)
### Summary
The LangGraph API supports `custom` stream mode type.

Reference:
https://github.com/langchain-ai/langgraph/blob/main/docs/docs/cloud/reference/api/openapi.json#L2403
2024-10-09 14:33:14 +02:00
Andrew NguonlyandTat Dat Duong 598bb5a641 sdk-py: Update return type annotation for Thread.update_state() methods. (#2050)
### Summary
The response body of the endpoint `POST /threads/{thread_id}/state`
looks like this:
```
{
    "checkpoint": {
        "thread_id": "e2496803-ecd5-4e0c-a779-3226296181c2",
        "checkpoint_ns": "",
        "checkpoint_id": "1ef4a9b8-e6fb-67b1-8001-abd5184439d1",
        "checkpoint_map": {}
    }
}
```
2024-10-09 14:33:14 +02:00
Andrew NguonlyandGitHub 28ff7fd7ba docs: Update LangGraph API docs (#2056)
### Summary
Adding endpoints for `/subgraphs` and `/store`.
2024-10-08 16:44:01 -07:00
Tat Dat Duong 0628c6402f Fix typo 2024-10-09 01:00:36 +02:00
Tat Dat Duong db61d294a6 Code review 2024-10-09 01:00:06 +02:00
Andrew NguonlyandGitHub 7883ceae64 sdk-py: Add Sequence[dict] type to values param type for update_state() (#2054)
### Summary
The LangGraph API supports a list of `dict` for the `values` field for
the `POST /threads/<thread_id>/state` endpoint.

Reference:
https://github.com/langchain-ai/langgraph-api/blob/main/api/openapi.json#L3005-L3021
2024-10-08 13:49:27 -07:00
Andrew NguonlyandGitHub 6698e25a04 sdk-py: Add "*" literal to interrupt_before and interrupt_after types (#2053)
### Summary
The LangGraph API supports the literal string `"*"` for
`interrupt_before` and `interrupt_after`.

Reference:
https://github.com/langchain-ai/langgraph-api/blob/main/api/openapi.json#L2425
2024-10-08 13:29:11 -07:00
Andrew NguonlyandGitHub fd1a9e4da3 sdk-py: Add custom stream mode to StreamMode type (#2051)
### Summary
The LangGraph API supports `custom` stream mode type.

Reference:
https://github.com/langchain-ai/langgraph/blob/main/docs/docs/cloud/reference/api/openapi.json#L2403
2024-10-08 12:44:37 -07:00
Andrew NguonlyandGitHub 82c316b3f7 sdk-py: Update return type annotation for Thread.update_state() methods. (#2050)
### Summary
The response body of the endpoint `POST /threads/{thread_id}/state`
looks like this:
```
{
    "checkpoint": {
        "thread_id": "e2496803-ecd5-4e0c-a779-3226296181c2",
        "checkpoint_ns": "",
        "checkpoint_id": "1ef4a9b8-e6fb-67b1-8001-abd5184439d1",
        "checkpoint_map": {}
    }
}
```
2024-10-08 12:04:26 -07:00
Tat Dat Duong 7a282f82dc Tests? 2024-10-08 20:55:49 +02:00
Tat Dat Duong 45a12c938b Add more nested tests for nested subgraphs 2024-10-08 20:49:16 +02:00
Tat Dat Duong b51f5d6345 Fix optional types 2024-10-08 20:09:51 +02:00
Tat Dat Duong f9e900f39a Fix 3.9 2024-10-08 19:58:42 +02:00
Tat Dat Duong e564902753 Add async tests 2024-10-08 19:57:39 +02:00
Tat Dat Duong e3bee7d843 Add tests 2024-10-08 19:52:05 +02:00
Tat Dat Duong 4f61dd1aa6 Fix tests 2024-10-08 19:18:52 +02:00
Tat Dat Duong 7e9cf02922 Use casting instead 2024-10-08 17:08:08 +02:00
Tat Dat Duong 50b1a1e230 Cleanup, move instanceof checks to an util 2024-10-08 17:01:40 +02:00
Tat Dat Duong c1081af6bc Fix lint 2024-10-08 16:41:48 +02:00
Tat Dat Duong dfb265f296 feat(debug): send tasks info 2024-10-08 16:21:38 +02:00
William FHandGitHub 254b12a62d Use AsyncBatch for postgres store (#2020) 2024-10-08 06:58:26 +00:00
7c2a89dbc8 docs memory concept: Suggestion batch 1 (#2040)
Co-authored-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2024-10-08 02:55:51 +00:00
Eugene YurtsevandGitHub 34b23fce06 docs: batch 2 Update memory.md (#2041) 2024-10-07 19:53:50 -07:00
Vadym BardaandGitHub 4633364e8e docs: small edits to memory concepts (#2039) 2024-10-07 18:31:48 -07:00
William FHandGitHub 23c1957812 Update glossary (#2038) 2024-10-08 01:03:11 +00:00
William FHandGitHub 90b8b4d745 Fixup Grammar (#2037) 2024-10-07 16:56:13 -07:00
William FHandGitHub 45957cc72a Docs Nits Pass 2 (#2036) 2024-10-07 16:48:22 -07:00
d5da547850 Shared state conceptual docs (#1958)
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
Co-authored-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2024-10-07 23:16:34 +00:00
Riya SinhaandGitHub 61798d09d2 checkpoint: set CheckpointNS ConfigurableFieldSpec model default to empty string (#2019) 2024-10-07 18:38:18 +00:00
Nuno CamposandGitHub 4685dc103a Merge pull request #2032 from langchain-ai/nc/7oct/kafka-loop-arg
scheduler-kafka: Pass loop arg to default async consumer and producer
2024-10-07 10:22:31 -07:00
Nuno Campos e5b4cd2701 scheduler-kafka: Pass loop arg to default async consumer and producer
- Some forks of aiokafka make this a required arg
2024-10-07 10:16:36 -07:00
David DuongandGitHub debfd85ff8 Merge pull request #2031 from langchain-ai/dqbd/js-0.0.16
feat(sdk-js): bump to 0.0.16
2024-10-07 18:15:46 +02:00
Tat Dat Duong 24f21a0ad8 feat(sdk-js): bump to 0.0.16 2024-10-07 18:10:32 +02:00
David DuongandGitHub b5138cd8f9 Merge pull request #2029 from langchain-ai/dqbd/js-get-history-checkpoint
feat(sdk-js): add `checkpoint` arg in `getHistory`
2024-10-07 17:52:27 +02:00
Tat Dat Duong 05f645b87c Make types more explicit 2024-10-07 17:47:36 +02:00
Tat Dat Duong 9ff5715961 feat(sdk-js): add checkpoint arg in getHistory 2024-10-07 17:24:29 +02:00
William FHandGitHub b42a31fdae Rm dup END (#2022) 2024-10-06 21:24:11 -07:00
William FHandGitHub 57727be9db Checkpoint 2.0.1 (#2018) 2024-10-06 14:10:48 -07:00
William FHandGitHub 05dbc1d498 Validate in async batched store (#2017) 2024-10-06 14:09:35 -07:00
b35fe5864d docs: update how-to for passing runtime values (#1984)
Co-authored-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2024-10-05 01:23:55 +00:00
Andrew NguonlyandGitHub db3271ace5 docs: Update field descriptions for API spec (#2013) 2024-10-04 22:32:20 +00:00
bacf92c441 langgraph: add support for passing store via state_modifier (#1992)
Co-authored-by: William Fu-Hinthorn <13333726+hinthornw@users.noreply.github.com>
2024-10-04 15:28:56 -07:00
Andrew NguonlyandGitHub c847f7df4e docs: Updates to API spec (#2012) 2024-10-04 22:12:13 +00:00
Vadym BardaandGitHub c2dc498b1c docs: clean up memory docs (#2000) 2024-10-04 16:58:22 -04:00
Andrew NguonlyandGitHub c2171f4a20 docs: Create API spec (#2009) 2024-10-04 20:40:01 +00:00
William FHandGitHub d8d4714a73 Update JS sdk version (#2008) 2024-10-04 11:04:10 -07:00
William FHandGitHub 018e9ac42e Check is string in store namespace validation (on put) (#2007) 2024-10-04 17:55:30 +00:00
Brace SproulandGitHub f9afd3c215 Merge pull request #1993 from langchain-ai/brace/after-seconds-js
fix(js): Add afterSeconds run arg
2024-10-03 11:18:02 -07:00
Eugene YurtsevandGitHub ac7903b3dc docs: how to guide batch 4 (#1991)
Updated the following guides:

docs/docs/how-tos/streaming-content.ipynb

docs/docs/how-tos/streaming-events-from-within-tools-without-langchain.ipynb
docs/docs/how-tos/streaming-events-from-within-tools.ipynb
docs/docs/how-tos/streaming-tokens-without-langchain.ipynb
2024-10-03 14:11:53 -04:00
Eugene YurtsevandGitHub 4a8510b690 docs: minor formatting change for how to docs 2024-10-03 13:47:59 -04:00
bracesproul 92e75aac17 cr 2024-10-03 09:40:37 -07:00
bracesproul 3e8be7fd79 fix(js): Add afterSeconds run arg 2024-10-03 09:40:10 -07:00
Vadym BardaandGitHub 99fd0eedbd docs: clean up and standardize more how-tos (#1959) 2024-10-03 13:40:34 +00:00
f55586ea23 [Docs] Drop memory doc (#1986)
---------

Co-authored-by: vbarda <vadym@langchain.dev>
2024-10-03 03:05:49 +00:00
Vadym BardaandGitHub 055b2ae74f ci: filter to added/modified for notebooks (#1987) 2024-10-03 02:27:57 +00:00
Isaac FranciscoandGitHub c39e08ec8e export checkpoint type from js-sdk (#1973) 2024-10-02 18:47:34 -07:00
William FHandGitHub c74aba8cc5 [Docs] Storage ref docs (#1985) 2024-10-02 16:53:39 -07:00
Eugene YurtsevandGitHub d683630094 docs: how-to fix some issues (#1983)
Fixes some issues introduced while updating how-to docs
2024-10-02 22:06:03 +00:00
Vadym BardaandGitHub 86edf631e3 langgraph: release 0.2.34 (#1982) 2024-10-02 17:42:14 -04:00
Vadym BardaandGitHub 93c22fbdde langgraph: add store to the prebuilt agent (#1981) 2024-10-02 21:38:15 +00:00
Eugene YurtsevandGitHub 7f95d7de42 docs: how to guide batch 2 (#1956)
Updates the following how to guides

docs/docs/how-tos/disable-streaming.ipynb
docs/docs/how-tos/input_output_schema.ipynb
docs/docs/how-tos/many-tools.ipynb
docs/docs/how-tos/map-reduce.ipynb
docs/docs/how-tos/node-retries.ipynb
docs/docs/how-tos/pass-config-to-tools.ipynb
docs/docs/how-tos/pass_private_state.ipynb
2024-10-02 17:29:21 -04:00
Eugene YurtsevandGitHub 1a4f375226 docs: how-to guides batch 3 (#1979)
Updates the following how to guides:

docs/docs/how-tos/persistence.ipynb
docs/docs/how-tos/persistence_mongodb.ipynb
docs/docs/how-tos/persistence_postgres.ipynb
docs/docs/how-tos/persistence_redis.ipynb
docs/docs/how-tos/react-agent-from-scratch.ipynb
docs/docs/how-tos/react-agent-structured-output.ipynb
docs/docs/how-tos/recursion-limit.ipynb
docs/docs/how-tos/return-when-recursion-limit-hits.ipynb
docs/docs/how-tos/run-id-langsmith.ipynb
docs/docs/how-tos/state-model.ipynb
2024-10-02 17:29:01 -04:00
William FHandGitHub 6c0da426c6 [PostGres Checkpointer] Run CI on PG15 as well (#1953) 2024-10-02 19:16:58 +00:00
William FHandGitHub 7ede237508 [Docs] Add SDK ref docs for the Store client (#1974) 2024-10-02 19:16:36 +00:00
Jacob LeeandGitHub fb382c20f7 fix: Fix for drawing subgraphs with multiple sinks (#1962)
* Fix for drawing subgraphs with multiple sinks

* Expand error message
2024-10-02 12:03:30 -07:00
Vadym BardaandGitHub 9821638965 docs: add InjectedStore to reference (#1976) 2024-10-02 18:54:25 +00:00
Vadym BardaandGitHub e48d9d3c38 docs: add a note for shared memory to persistence how-to (#1975) 2024-10-02 18:41:23 +00:00
Vadym BardaandGitHub 7ecc672e61 langgraph: release 0.2.33 (#1972) 2024-10-02 13:43:17 -04:00
Vadym BardaandGitHub 7efd3c726e langgraph: add support for store in ToolNode (#1968) 2024-10-02 17:39:25 +00:00
Eugene YurtsevandGitHub 74b36adb18 docs: update how-to guides batch 1 (#1918)
Add links to the following how-to guides:

docs/docs/how-tos/async.ipynb
docs/docs/how-tos/branching.ipynb
docs/docs/how-tos/configuration.ipynb
docs/docs/how-tos/create-react-agent-hitl.ipynb
docs/docs/how-tos/create-react-agent-memory.ipynb
docs/docs/how-tos/create-react-agent-system-prompt.ipynb
docs/docs/how-tos/create-react-agent.ipynb

Identified two missing concepts:
1) RunnableConfig in LangChain
2) Unclear where ReAct should link in langgraph
2024-10-02 15:09:11 +00:00
Eugene YurtsevandGitHub 2f7da90a38 docs: check for format violations with ruff (#1967) 2024-10-02 14:40:33 +00:00
William FHandGitHub a3cb9c1a94 Validate no empty namespace is added (#1961)
Also check the root label isn't "langgraph"
2024-10-01 18:43:45 -07:00
Vadym BardaandGitHub e0fd95b22a docs: update tutorial for long-term memory (#1955) 2024-10-01 17:56:43 -07:00
William FHandGitHub db87642a10 Revert "Validate not empty (#1957)" (#1960)
This reverts commit cf67acb699.
2024-10-01 17:44:08 -07:00
William FHandGitHub cf67acb699 Validate not empty (#1957) 2024-10-01 17:23:44 -07:00
Lance MartinandGitHub 36be928791 Fix link (#1954) 2024-10-01 20:47:30 +00:00
Brace SproulandGitHub 702b5949d9 fix(sdk-js): Release 0.0.14 2024-10-01 13:18:02 -07:00
Brace SproulandGitHub 267485f3e6 Merge branch 'main' into rc 2024-10-01 13:13:01 -07:00
William FHandGitHub 5c3ac5d16d Update PG Implementation (#1948) 2024-10-01 13:11:19 -07:00
Vadym BardaandGitHub db6f8a53b6 docs: add shared memory how to (#1920) 2024-10-01 19:54:59 +00:00
98d1f27471 Add memory conceptual doc (#1868)
* Add memory conceptual doc

* update

* typo

* v1 conceptual doc

* Update per feedback

* Capture feedback

* Update based on feedback

* Remove memory service

* Address comments

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
2024-10-01 12:54:23 -07:00
bracesproul 79cded748d fix(sdk-js): Release 0.0.14 2024-10-01 12:45:57 -07:00
Brace SproulandGitHub c08dd2f71c Merge pull request #1949 from langchain-ai/brace/update-rc
fix: Update rc branch
2024-10-01 12:44:02 -07:00
bracesproul 7dbb5ce98f Merge branch 'main' of https://github.com/langchain-ai/langgraph into rc 2024-10-01 12:37:22 -07:00
Brace SproulandGitHub 813aadeb47 Merge pull request #1947 from langchain-ai/brace/fix-null-obj-err
fix(sdk-js): Fix null item error
2024-10-01 12:36:57 -07:00
Vadym BardaandGitHub 4a45f6c99a langgraph, sqlite, postgres: update to use langgraph-checkpoint==2.0.0 (#1946) 2024-10-01 15:28:06 -04:00
bracesproul 38a3e11c9f cr 2024-10-01 11:32:07 -07:00
bracesproul 8486c9d413 fix(sdk-js): Fix null item error 2024-10-01 11:31:29 -07:00
Vadym BardaandGitHub 00662ab557 ci: update the check for changed notebooks (#1945) 2024-10-01 18:14:32 +00:00
Brace SproulandGitHub db4191b89e Merge pull request #1943 from langchain-ai/release
Release 0.0.14-rc.0
2024-10-01 10:48:36 -07:00
bracesproul 45bf27bafe Release 0.0.14-rc.0 2024-10-01 10:45:49 -07:00
Brace SproulandGitHub 11d636ff83 Merge pull request #1910 from langchain-ai/wfh/js_store_client
Add JS SDK Store Client
2024-10-01 10:44:06 -07:00
Vadym BardaandGitHub 78c9c15b14 langgraph, checkpoint: update versions (#1942) 2024-10-01 13:43:07 -04:00
Vadym BardaandGitHub 46b52b2426 ci: run notebook checks for changed notebooks (#1941) 2024-10-01 16:50:24 +00:00
Eugene YurtsevandGitHub 674180ad0c docs: Add linting check as part of docs deploy (#1939)
We'll need to add the same thing as part of CI testing, but a second check
during deployment wont hurt in case CI is by passed for whatever reason.
2024-10-01 10:50:39 -04:00
Vadym BardaandGitHub 71efff7cee ci: add a script to check sync and async methods in SDK (#1938) 2024-10-01 09:50:26 -04:00
William FHandGitHub dd88ac6224 Bump SDK Py (#1935) 2024-10-01 08:17:51 +00:00
Nuno CamposandGitHub 53c2e4d8c2 Merge pull request #1932 from langchain-ai/eugene/format_docs
docs: format with ruff
2024-09-30 19:13:47 -07:00
Eugene Yurtsev 70b0032191 format docs 2024-09-30 22:08:27 -04:00
William FHandGitHub 445b795037 [Docs] update min bounds from API (#1929) 2024-09-30 17:06:34 -07:00
William FHandGitHub 29f58fd9e5 Custom loads support in postgres checkpointer (#1930) 2024-09-30 16:42:23 -07:00
Vadym BardaandGitHub 716d23e269 langgraph: release 0.2.31 (#1928) 2024-09-30 18:33:34 -04:00
Vadym BardaandGitHub a9df3a3515 langgraph: use correct logic for binding tools in prebuilt agent (#1927) 2024-09-30 22:22:48 +00:00
Vadym BardaandGitHub da935e7805 langgraph: fix edge case with string enums as node names (#1926) 2024-09-30 18:00:33 -04:00
Andrew NguonlyandGitHub 6d1d705b84 Update API docs. (#1925) 2024-09-30 14:23:32 -07:00
William FHandGitHub 97f79fc66b Add Postgres Store Implementation (#1906) 2024-09-30 21:18:58 +00:00
Isaac FranciscoandGitHub 17dc1108a3 docs: __start__/__end__ consistency (#1874)
* changes

* skip mermaid

* retries fix

* viz error

* changes
2024-09-30 13:55:53 -07:00
Eugene YurtsevandGitHub d29747906d docs: Add ruff commands to Makefile and pyproject (#1921) 2024-09-30 16:19:17 -04:00
Vadym BardaandGitHub cb8db211c2 langgraph: bump checkpoint (#1922) 2024-09-30 15:56:46 -04:00
Isaac FranciscoandGitHub 865436529e simple -> simply (#1919) 2024-09-30 19:30:29 +00:00
Vadym BardaandGitHub 3c9441c039 checkpoint: release 1.0.14 (#1917) 2024-09-30 14:54:00 -04:00
Vadym BardaandGitHub 7071817155 checkpoint: fix namespace issues (#1915) 2024-09-30 14:52:57 -04:00
William Fu-Hinthorn 4fca814d3a Merge branch 'main' into wfh/js_store_client 2024-09-30 10:49:09 -07:00
William Fu-Hinthorn d309c36388 Review 2024-09-30 10:48:49 -07:00
William FHandGitHub 9ad617bb7a [Release] 1.0.13 (#1903) 2024-09-30 10:16:50 -07:00
Vadym BardaandGitHub 78f3ee9cae langgraph: check if model passed as runnable binding with tools in create_react_agent (#1647) 2024-09-30 13:01:47 -04:00
William FHandGitHub e332869a0c Ensure configurable (#1912) 2024-09-30 09:54:47 -07:00
William Fu-Hinthorn f064a5969d Add JS SDK Store Client 2024-09-30 09:08:37 -07:00
David DuongandGitHub f6f3f85d03 Merge pull request #1900 from langchain-ai/dqbd/xray-int
feat(sdk): add int xray parameter support
2024-09-30 17:08:15 +02:00
David DuongandGitHub a69c58bfe9 Merge pull request #1894 from langchain-ai/dqbd/xray-bool
fix(graph): xray=True should be distinct from xray=1
2024-09-30 17:06:52 +02:00
Tat Dat Duong d69bc78a25 Update docs 2024-09-30 17:03:11 +02:00
Nuno CamposandGitHub 904904c419 Merge pull request #1904 from langchain-ai/nc/29sep/thread-history-subgraph
sdk-py: Add arg to get history for subgraphs
2024-09-29 19:32:23 -07:00
Nuno Campos 7fba675e8a sdk-py: Add arg to get history for subgraphs 2024-09-29 19:28:52 -07:00
Nuno CamposandGitHub 620cffd62d Merge pull request #1902 from langchain-ai/dqbd/debug-parent-config
fix(debug): send parent_config in debug checkpoint events
2024-09-29 18:30:24 -07:00
Tat Dat Duong 005a9a33cb Fix tests 2024-09-30 03:14:34 +02:00
Tat Dat Duong a8556bf2b8 Uncomment back the conftest checkpointers 2024-09-30 03:06:48 +02:00
Tat Dat Duong a8a99688bf fix(api): send parent_config in debug checkpoint events 2024-09-30 03:01:44 +02:00
Nuno CamposandGitHub b1a4243055 Implement new Store interface (#1834) 2024-09-29 17:06:42 -07:00
David DuongandGitHub ab47768bfd Merge pull request #1901 from langchain-ai/dqbd/sdk-js-0.0.13
chore: bump JS SDK to 0.0.13
2024-09-30 00:44:02 +02:00
Tat Dat Duong 53525141a2 chore: bump JS SDK to 0.0.13 2024-09-30 00:39:01 +02:00
Tat Dat Duong 10b6227304 feat(api): add int xray parameter support 2024-09-30 00:18:07 +02:00
Dan SiwiecandGitHub 748c92e59c docs: remove duplicated statements (#1863) 2024-09-29 15:33:51 +00:00
Tat Dat Duong 358603b31d fix(graph): xray=True should be distinct from xray=1 2024-09-28 02:09:05 +02:00
Nuno CamposandGitHub 946e2a831e Merge pull request #1879 from langchain-ai/dqbd/sdk-js-subgraphs
feat(sdk-js): add support for subgraphs, match schema
2024-09-27 15:59:46 -07:00
Andrew NguonlyandGitHub b0b7b681ba Fix typo. (#1893) 2024-09-27 22:59:32 +00:00
Vadym BardaandGitHub 03be3b6567 docs: reorganize API refs (#1884) 2024-09-27 18:12:12 -04:00
98f5df4f6f ci: fix notebook runner & VCR cassette recorder (#1849)
Co-authored-by: vbarda <vadym@langchain.dev>
2024-09-27 17:56:55 -04:00
Vadym BardaandGitHub ea0418334b checkpoint-postgres: release 1.0.9 (#1890) 2024-09-27 16:12:06 -04:00
Andrew NguonlyandGitHub ec55fc2147 docs: Update Cloud deployment docs (#1853)
* Update Cloud deployment docs.

* Update docs.
2024-09-27 12:53:54 -07:00
Vadym BardaandGitHub a319727a9e checkpoint: release 1.0.12 (#1888) 2024-09-27 14:19:00 -04:00
Isaac FranciscoandGitHub a2db3879cd add back graph.update_line, update output (#1887) 2024-09-27 12:51:28 -04:00
Vadym BardaandGitHub bf19dc7d08 checkpoint-postgres: handle null chars in metadata (#1885) 2024-09-27 16:02:03 +00:00
David DuongandGitHub 75d309a52f Merge pull request #1880 from langchain-ai/dqbd/sdk-xray
feat(sdk): expose xray kwarg to get_graph/getGraph
2024-09-27 16:59:51 +02:00
Tat Dat Duong 80f12c8f5c Update sync client 2024-09-27 16:43:41 +02:00
Tat Dat Duong be44d0cfb6 feat(sdk): expose xray kwarg to get_graph/getGraph 2024-09-27 15:15:56 +02:00
947c74c10d docs: add long-term memory tutorial (#1850)
Co-authored-by: ccurme <chester.curme@gmail.com>
2024-09-27 08:26:57 -04:00
Tat Dat Duong e4a4889b6d Add .prettierrc file to make vscode prettier work 2024-09-27 13:30:47 +02:00
Tat Dat Duong f1c6e13e96 Ignore tgz and tar files 2024-09-27 13:26:58 +02:00
Tat Dat Duong 51be5b6ac3 feat(sdk-js): add support for subgraphs, match schema 2024-09-27 13:24:46 +02:00
Nuno CamposandGitHub 509e2d2207 Merge pull request #1873 from langchain-ai/vb/secret-str
checkpoint: support serde for SecretStr
2024-09-26 19:10:45 -07:00
vbarda 4271afeb42 checkpoint: support serde for SecretStr 2024-09-26 21:09:07 -04:00
Vadym BardaandGitHub 29a03309c9 docs: update typing -> typing_extensions for TypedDict (#1871) 2024-09-26 18:06:45 -04:00
William FHandGitHub fe7e7b9121 Use typing_extensions typeddict (#1869) 2024-09-26 13:41:40 -07:00
Vadym BardaandGitHub 72c5bc35cd checkpoint: update note in MemorySaver (#1862) 2024-09-26 15:07:36 +00:00
Lance MartinandGitHub c5b9845216 Update RAG agent w/ llama3.2 (#1852)
* Update RAG agent llama3.2

* Move to doc

* Rename
2024-09-25 21:43:45 -07:00
Vadym BardaandGitHub 942dfa841e docs: remove shared state how-to (#1851) 2024-09-25 22:44:03 +00:00
Andrew NguonlyandGitHub c3cbf2eb0d Update Deploy to Cloud docs. (#1847) 2024-09-25 15:22:54 -07:00
David DuongandGitHub f337d5d9f8 Merge pull request #1844 from langchain-ai:dqbd/js-sdk-0.0.12-types
fix(sdk-js): match schema types, bump to 0.0.12
2024-09-25 23:42:37 +02:00
Nuno Campos f05b546299 langgraph 0.2.28 2024-09-25 11:12:38 -07:00
Nuno CamposandGitHub f1711a127a Merge pull request #1845 from langchain-ai/nc/25sep/fix-stream-time
Fix stream_mode=messages/custom buffering for sync calls with single node
2024-09-25 11:12:05 -07:00
Nuno Campos 72edec5be2 Add test 2024-09-25 11:00:27 -07:00
Nuno Campos 67d907eb1c Fix stream_mode=messages/custom buffering for sync calls with single node 2024-09-25 10:38:06 -07:00
042653207f docs: add docs for assistant versioning (#1828)
* draft of conceptual docs

* Improve the conceptual docs

* adding how-to

* add diagram, make callout to conceptual guide

* updated image

* updated screenshots to new UI

* add link, typo

---------

Co-authored-by: Lance Martin <lance@langchain.dev>
2024-09-25 16:13:08 +00:00
Tat Dat Duong 68fb04bb0c fix(sdk-js): match schema types, bump to 0.0.12 2024-09-25 17:33:13 +02:00
Vadym BardaandGitHub 6c171e2838 docs: update streaming content how-to (#1841) 2024-09-25 11:23:31 -04:00
Vadym BardaandGitHub 6136eb7471 docs: fix redis pending_writes (#1842) 2024-09-25 14:54:40 +00:00
David DuongandGitHub 206420d4cc Merge pull request #1830 from langchain-ai/dqbd/bump-js-0.0.11
feat(js): bump JS sdk to 0.0.11
2024-09-24 21:45:56 +02:00
Tat Dat Duong a3be376453 feat(js): bump JS sdk to 0.0.11 2024-09-24 21:40:48 +02:00
Nuno CamposandGitHub 44afec9da7 Merge pull request #1829 from langchain-ai/vb/combine-sdk-into-single-file
sdk-py: combine sync & async into a single file
2024-09-24 11:35:51 -07:00
vbarda cc8ea9e608 sdk-py: combine sync & async into a single file 2024-09-24 14:24:14 -04:00
Lance MartinandGitHub 88335ea405 Update conceptual docs on dynamic breakpoints (#1816)
* Update conceptual docs in dynamic breakpoints

* Improve explaination

* Add skipping logic to dynamic breakpoints
2024-09-24 11:18:01 -07:00
Nuno CamposandGitHub 15823c78eb Merge pull request #1827 from langchain-ai/nc/24sep/sdk-subgraphs
sdk: Add subgraphs method
2024-09-24 11:07:45 -07:00
Nuno Campos 30ed61479e Fix 2024-09-24 11:06:07 -07:00
Yuxuan1998andGitHub e909cb6815 fix TypeError (#1820) 2024-09-24 14:05:03 -04:00
Nuno Campos dfa874aaf6 sdk: Add subgraphs method 2024-09-24 11:02:50 -07:00
Nuno CamposandGitHub 247e2bae8d Merge pull request #1401 from langchain-ai/vb/add-sync-client
sdk-py: add sync client
2024-09-24 10:46:06 -07:00
Nuno Campos 26eca4a42f langgraph 0.2.27 2024-09-24 10:42:02 -07:00
Nuno CamposandGitHub 2f7826ed79 Merge pull request #1826 from langchain-ai/nc/24sep/get-subgraphs-namespace
Add namesapce filter to get_subgraphs
2024-09-24 10:41:36 -07:00
Nuno Campos 8205c85383 Add namesapce filter to get_subgraphs
- If passed it returns a single subgraph, mathching that namespace, if found
2024-09-24 09:38:24 -07:00
Vadym BardaandGitHub 5235ad08ec docs: remove context channel (#1824) 2024-09-24 10:51:22 -04:00
Vadym BardaandGitHub 37948b3348 docs: update pydantic comments -> callouts in tutorials (#1825) 2024-09-24 13:09:59 +00:00
Nuno Campos bb5ff42bcd langgraph 0.2.26 2024-09-23 17:50:16 -07:00
Nuno CamposandGitHub beea3beb48 Merge pull request #1818 from langchain-ai/nc/23sep/stream-messages-fix
Fix edge cases with stream_mode=messages
2024-09-23 17:43:27 -07:00
Nuno Campos 58aaffb6bf Fix edge cases with stream_mode=messages
- running callback handler in background thread could potentially lead to ordering issues
- deduping on `id()` could lead to messages being dropped if they reused memory address of a previous chunk
2024-09-23 17:34:04 -07:00
Vadym BardaandGitHub ae2185a431 Merge branch 'main' into vb/add-sync-client 2024-09-23 19:42:13 -04:00
vbarda 985f1b1e26 code review 2024-09-23 19:41:08 -04:00
Lance MartinandGitHub e1a33360e0 Update HIL conceptual docs (#1774)
* Update HIL conceptual docs

* Update images

* Update figures and text per feedback

* Update links for how-tos

* Embed img directly in ntbks

* Add dynamic breakpoints

* Update figure in ntbk

* Fix link to dynamic breakpoints
2024-09-23 15:46:33 -07:00
Vadym BardaandGitHub 659d127d2b checkpoint postgres,sqlite: update langgraph-checkpoint to 1.0.11 (#1815) 2024-09-23 22:09:28 +00:00
Isaac FranciscoandGitHub d2d5e9f655 docs: add docs on disabling streaming (#1775) 2024-09-23 18:01:19 -04:00
Vadym BardaandGitHub 434e7519bc checkpoint: release 1.0.11 (#1814) 2024-09-23 17:58:25 -04:00
Vadym BardaandGitHub 7d513bcde2 checkpoint postgres,sqlite: update langgraph-checkpoint (#1813) 2024-09-23 21:47:26 +00:00
Vadym BardaandGitHub c8265a21cd Merge branch 'main' into vb/add-sync-client 2024-09-23 17:39:54 -04:00
Vadym BardaandGitHub 515c619bc2 checkpoint postgres,sqlite: update version (#1812) 2024-09-23 17:33:19 -04:00
Vadym BardaandGitHub 342aee7945 langgraph: release 0.2.25 (#1811) 2024-09-23 17:31:23 -04:00
BagaturandGitHub ee638fdbf8 langgraph[patch]: remove stringify of tool msg contnt (#1810) 2024-09-23 17:29:38 -04:00
vbarda 2d741c7cbf update 2024-09-23 17:28:02 -04:00
William FHandGitHub 3c672abc1b Reword how-to (#1808) 2024-09-23 14:08:08 -07:00
vbarda 81c10a5f8e Merge branch 'main' into vb/add-sync-client 2024-09-23 16:56:12 -04:00
Nuno CamposandGitHub 68c1fa8280 Merge pull request #1803 from langchain-ai/nc/23sep/exc-async-checkpointer-block
Raise exception if sync method on async checkpointer is called from event loop thread
2024-09-23 13:05:02 -07:00
Vadym BardaandGitHub 9e42977273 sdk-py: release 0.1.31 (#1809) 2024-09-23 15:12:43 -04:00
Brace SproulandGitHub e333889c19 Merge pull request #1807 from langchain-ai/brace/drop-annoncements-bar
fix(docs): Drop announcement bar
2024-09-23 10:56:02 -07:00
bracesproul 81e05ffb69 fix(docs): Drop announcement bar 2024-09-23 10:50:15 -07:00
Isaac FranciscoandGitHub f9431d1bec remove error (#1806) 2024-09-23 13:45:08 -04:00
William FHandGitHub 1601c3a47d Fix mobile nav nesting (#1804) 2024-09-23 16:08:10 +00:00
Nuno Campos e71c24ea9b Raise exception if sync method on async checkpointer is called from main thread
- The thread running the event loop can block waiting for a coro to run, only background threads can
2024-09-23 08:41:57 -07:00
Nuno Campos 68d378def5 langgraph 0.2.24 2024-09-23 08:26:55 -07:00
Nuno CamposandGitHub 0b0b6e17d3 Merge pull request #1797 from langchain-ai/nc/22sep/perf-intern-strings
perf: Intern string constants
2024-09-23 07:40:59 -07:00
Nuno CamposandGitHub d5a1152064 Merge pull request #1794 from langchain-ai/nc/21sep/remove-runtime-value-substitution
Remove runtime value substitution
2024-09-23 07:03:44 -07:00
Nuno CamposandGitHub 00290c8e06 Merge pull request #1792 from langchain-ai/nc/21sep/docstrings-comments
Add more comments and docstrings
2024-09-23 07:03:05 -07:00
Nuno Campos 47fe321e31 Lint 2024-09-22 12:51:06 -07:00
Nuno Campos 1f347ed48e perf: Intern string constants 2024-09-22 12:45:47 -07:00
Nuno Campos d6015e7bf9 Remove runtime value substitution
- doesn't work as expected
2024-09-22 12:44:48 -07:00
Nuno Campos 84a45d186c Fix 2024-09-22 12:42:34 -07:00
Nuno Campos e76f49c7f0 Fix flaky test 2024-09-22 12:37:24 -07:00
Nuno CamposandGitHub 33d18593bf Merge pull request #1793 from langchain-ai/nc/21sep/detect-multi-subgraphs-in-node
Detect multiple subgraphs in single node
2024-09-22 12:18:35 -07:00
Nuno Campos 74f34db9e4 Fix sync kafka 2024-09-22 12:04:43 -07:00
Nuno Campos 644f14991e Fix kfka 2024-09-22 12:04:17 -07:00
Isaac FranciscoandGitHub 94433eb790 docs: thread_ts -> checkpoint_id (#1791) 2024-09-22 09:17:18 -04:00
Nuno Campos 81a9a2f903 Use a different strategy, add test 2024-09-21 18:48:23 -07:00
Nuno Campos 2fccd09585 Fix 2024-09-21 17:52:17 -07:00
Nuno Campos 89bb7fe178 Skip test for now 2024-09-21 17:47:36 -07:00
Nuno Campos beeb2aa8ba Detect multiple subgraphs in single node 2024-09-21 17:44:11 -07:00
Nuno Campos 30b631aaff Rewrite imports 2024-09-21 17:41:05 -07:00
Nuno Campos d9854b36eb Move to langgraph.types 2024-09-21 17:37:17 -07:00
Nuno Campos 3cbd70ffc9 Fix docs 2024-09-21 17:30:04 -07:00
Nuno Campos 313e3eed3e Fix circular import 2024-09-21 17:26:29 -07:00
Nuno Campos 9f8d71c65b Lint 2024-09-21 17:23:12 -07:00
Nuno Campos 89fb8d506f Add more comments and docstrings 2024-09-21 17:21:18 -07:00
Nuno Campos 41537c583a sdk: Add support for resuming from checkpoint 2024-09-20 17:20:04 -07:00
David DuongandGitHub d42bdd0153 Merge pull request #1785 from langchain-ai/isaac/changeendpoint
set_latest -> latest
2024-09-21 02:07:20 +02:00
isaac hershenson 75ef1e790e fmt 2024-09-20 17:02:15 -07:00
isaac hershenson 4eaa1bb8ca set_latest -> latest 2024-09-20 16:57:43 -07:00
Nuno Campos e3d2f233a7 sdk: Update thread state methods for subgraphs 2024-09-20 16:52:41 -07:00
Isaac FranciscoandGitHub 8b95adb1bd sdk-py: add versioning for assistants (#1665)
* add get_versions to python sdk

* fml

* add change_version to sdk

* add assistant name to create

* document assistant name

* change method

* version in payload

* fml

* add js methods and types

* name -> assistant_name

* export onconflictbehavior

* add assistant name to create

* add metadata/limit/offset to sdk

* add assistant_name to update

* assistantversion schema

* export assistnatversion

* add metadata/limit/offset to sdk

* assistantversion schema

* fmt

* fmt

* change version -> set version

* fmt

* assistant_name -> name

* naming
2024-09-20 16:48:19 -07:00
Nuno Campos 41cb54722d Add stream_subgraphs param 2024-09-20 16:13:44 -07:00
Isaac FranciscoandGitHub eadcec7304 fixed some (#1784) 2024-09-20 15:12:35 -07:00
Nuno Campos 265003dda0 langgraph 0.2.23 2024-09-20 14:40:46 -07:00
Nuno CamposandGitHub fcff81d10e Merge pull request #1782 from langchain-ai/nc/20sep/sdk-py-after-seconds
sdk: Add support for scheduled runs
2024-09-20 12:53:27 -07:00
Nuno Campos 9121a1e14f sdk: Add support for scheduled runs
- after_seconds param to Runs.wait/stream/create
2024-09-20 12:45:13 -07:00
Isaac FranciscoandGitHub 662eae4359 adding tutorials to notebook checks (#1747)
* wip

* actually catch errors

* fixing tool-calling-errors and persistence-redis

* poetry changes

* poetry update

* run tutorials

* only tutorials (testing)

* print errors

* rewoo fixes

* remove customer support because of user input

* skip notebooks programatically

* add back how-tos

* remove redundant if

* add cassetes for tutorials

* remove no execution since it is generated by CI,

* remove multi-agent/usaco

* try to run in parallel

* skip notebooks fix

* remove magic/non-magic cells

* msgpack instead of yaml

* prepare_notebooks change

* ignore msgpack for spelling

* use compression for cassettes

* update spell check

* reset poetry changes

* upgrade packages for latest

* no update

* poetry changes
2024-09-20 12:11:23 -07:00
William FHandGitHub 10a66acc44 Add return_direct support (#1780) 2024-09-20 18:59:37 +00:00
Nuno CamposandGitHub 7b94f1e326 Update __init__.py 2024-09-20 10:50:40 -07:00
Nuno CamposandGitHub bf289dbee4 Merge pull request #1772 from langchain-ai/jacob/nit
fix: Use imported constant for namespace end
2024-09-20 09:21:18 -07:00
Nuno CamposandGitHub b03d9ae52c Merge pull request #1776 from langchain-ai/nc/19sep/stream-mode-custom
Add stream_mode=custom
2024-09-20 09:18:51 -07:00
Nuno CamposandGitHub 531890e35a Update types.py 2024-09-20 08:49:00 -07:00
Nuno Campos 1cf117ed9d Lint 2024-09-19 17:09:04 -07:00
Nuno Campos 3b0f27c777 Add stream_mode=custom
- adds the ability for nodes (including in subgraphs) to emit chunks directly to the output stream, emitted chunks can have any type
- when stream_mode=custom isnt requested by the caller emitted chunks are ignored
2024-09-19 17:03:30 -07:00
Nuno CamposandGitHub b9fe38469f Merge pull request #1773 from langchain-ai/nc/19sep/return-self
Allow chaning add_node/add_edge/etc calls
2024-09-19 17:02:27 -07:00
Nuno Campos 94e64f87b1 Allow chaning add_node/add_edge/etc calls 2024-09-19 16:54:00 -07:00
Nuno CamposandGitHub 0bbe461785 Merge pull request #1771 from langchain-ai/nc/19sep/mypy-langgraph-partial
Enable mypy for langgraph lib
2024-09-19 16:53:42 -07:00
Nuno Campos 7643c1171f Lint 2024-09-19 16:49:05 -07:00
Nuno CamposandGitHub ed27e54761 Update graph.py 2024-09-19 16:41:46 -07:00
Jacob LeeandGitHub ec1f425632 Update algo.py 2024-09-19 15:53:50 -07:00
jacoblee93 093af1a893 Use imported constant for namespace end 2024-09-19 15:07:30 -07:00
Nuno CamposandGitHub e96934533e Update graph.py 2024-09-19 15:06:39 -07:00
a47dc2b634 Apply suggestions from code review
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2024-09-19 14:37:32 -07:00
Nuno Campos 95c1ca3adc Fix 2024-09-19 13:20:45 -07:00
Lance MartinandGitHub 0cf1a13dab Update conceptual docs for multiple schema (#1770)
* Update conceptual docs for multiple schema

* Link to conceptual docs from How-To
2024-09-19 13:20:20 -07:00
Nuno Campos 5de9b35416 Finish 2024-09-19 13:01:54 -07:00
Nuno Campos 4f767cd2ca Fix 2024-09-19 11:46:21 -07:00
Nuno Campos cc318b1156 Fix 2024-09-19 11:43:30 -07:00
Nuno Campos 9a8cc75ea2 Fix some typing issues in langgraph lib 2024-09-19 11:38:41 -07:00
Isaac FranciscoandGitHub 96f9d29a43 stop before recursion limit callout (#1769) 2024-09-19 18:00:31 +00:00
Isaac FranciscoandGitHub c44f10c05e docs: return state before recursion limit is hit (#1736)
* recursion limit return state

* links

* spelling

* remove bad link
2024-09-19 10:40:35 -07:00
Nuno CamposandGitHub 4065ac33d3 Merge pull request #1768 from langchain-ai/nc/19sep/mypy-sqlite
ci: Enable mypy checks for checkpoint-sqlite lib
2024-09-19 10:38:34 -07:00
Isaac FranciscoandGitHub 55f8bb5227 docs: replaying from subgraph node (#1759)
* edits

* extra comment
2024-09-19 09:58:14 -07:00
Nuno CamposandGitHub dc360fd342 Merge pull request #1767 from langchain-ai/nc/19sep/mypy-postgres
ci: Enable mypy checks for checkpoint-postgres lib
2024-09-19 09:27:38 -07:00
Nuno Campos b529365f5b Remove ignore for 3.9 2024-09-19 09:19:26 -07:00
Nuno Campos fdf7bad988 Remove ignore for 3.9 2024-09-19 09:19:00 -07:00
Nuno Campos faa652cbf4 Only lint on 3.12 2024-09-19 09:18:36 -07:00
Nuno Campos 95304d658a Fix 3.9 2024-09-19 08:51:15 -07:00
Nuno Campos 495d258322 Fix 3.9 2024-09-19 08:50:17 -07:00
Nuno CamposandGitHub bc95a797a9 Merge pull request #1766 from langchain-ai/nc/18sep/mypy-checkpoint
ci: Enable mypy checks for checkpoint lib
2024-09-19 08:47:05 -07:00
Nuno Campos 6c0339ca4b ci: Enable mypy checks for checkpoint-sqlite lib 2024-09-19 08:46:44 -07:00
Nuno Campos b8a8651c23 ci: Enable mypy checks for checkpoint-postgres lib 2024-09-19 08:40:31 -07:00
Nuno Campos c793a9e36d Use type var default 2024-09-19 08:28:59 -07:00
Nuno Campos 333c5f5501 Fix type issues in tests 2024-09-18 18:16:51 -07:00
Nuno Campos 4d26c3599f ci: Enable mypy checks for checkpoint lib 2024-09-18 18:12:11 -07:00
Andrew NguonlyandGitHub d4ba315ae2 Add section for LANGCHAIN_TRACING_SAMPLING_RATE to env vars page. (#1760) 2024-09-18 15:08:00 -07:00
Nuno CamposandGitHub 4ba803b415 Merge pull request #1751 from langchain-ai/nc/17sep/stream-messages
Add stream_mode=messages
2024-09-18 14:01:12 -07:00
Nuno Campos 9235178c88 Finish 2024-09-18 13:56:04 -07:00
22c78050dd docs: Clarify default_retry_on retry behavior for exceptions (#1754)
* docs: Clarify exceptions retried by default_retry_on in retry policy tutorial

- Added a remark in the tutorial explaining that the `default_retry_on` function retries on any exception except for the following:
  - ValueError
  - TypeError
  - ArithmeticError
  - ImportError
  - LookupError
  - NameError
  - SyntaxError
  - RuntimeError
  - ReferenceError
  - StopIteration
  - StopAsyncIteration
  - OSError

* http status codes

---------

Co-authored-by: Itay Etelis <itay.etelis@ibm.com>
Co-authored-by: isaac hershenson <ihershenson@hmc.edu>
2024-09-18 20:48:10 +00:00
Nuno CamposandGitHub babcf10c1c Merge pull request #1688 from langchain-ai/wfh/tracing_interops_norebase
Add tracing propagation test
2024-09-18 13:43:58 -07:00
William Fu-HinthornandNuno Campos 2d98024487 Assert invariants 2024-09-18 13:37:38 -07:00
William Fu-HinthornandNuno Campos f7d440ec5f Add tracing propagation test 2024-09-18 13:37:33 -07:00
Nuno Campos efb572f15b Add missing branch 2024-09-18 13:18:37 -07:00
William FHandGitHub b062b2462f [Docs] Add add message ref (#1758) 2024-09-18 13:13:39 -07:00
Nuno CamposandGitHub d46fd258bf Merge pull request #1753 from Etelis/bugfix-retry-nodes-exception-handling
[Bug Fix] retry_on handling and add support for lists in RetryPolicy
2024-09-18 13:01:38 -07:00
Nuno CamposandGitHub e40aabb1c1 Update retry.py 2024-09-18 10:36:40 -07:00
Nuno CamposandGitHub 0bfeb7f4e1 Update types.py 2024-09-18 10:24:28 -07:00
Nuno CamposandGitHub fd0b52f4ff Update retry.py 2024-09-18 10:23:52 -07:00
Nuno CamposandGitHub f4962479d8 Merge pull request #1757 from langchain-ai/nc/18sep/unit-test-cancelled
Add one more unit test for exception propagation
2024-09-18 09:01:31 -07:00
Nuno CamposandGitHub 94fa06e5f7 Merge pull request #1749 from langchain-ai/nc/17sep/stream-subgraph-sync
Stream output from subgraphs while in-progress for sync stream
2024-09-18 09:01:15 -07:00
Nuno Campos 680fa3c226 Add one more unit test for exception propagation
- we already have plenty of tests for this, but adding one more with a slight variation
2024-09-18 08:53:47 -07:00
Isaac FranciscoandGitHub 0498ca346b docs: remove warnings/update diagrams (#1746)
* remove warnings/udpate diagrams

* replace get_relevant_documents with invoke
2024-09-18 08:53:28 -07:00
Itay Etelis adf5cb0ff1 Fix retry_on handling in run_with_retry
- Correctly distinguish between exception classes, lists/tuples of exception classes, and callables.
- Add support for lists in `retry_on`, alongside tuples.
- Prevent exception classes from being incorrectly treated as callables.
- Raise a `TypeError` if `retry_on` is of an unsupported type.
2024-09-18 13:41:22 +03:00
Itay Etelis 6873229bbf Support lists in retry_on for RetryPolicy
Previously, `retry_on` in `RetryPolicy` accepted only exception classes, tuples of exception classes, or callables.
Update the `retry_on` type annotation to include `List[Type[Exception]]`

Changes:
- Updated `retry_on` in `RetryPolicy` to accept `List[Type[Exception]]`.
2024-09-18 13:39:04 +03:00
Nuno Campos 2a769fb39e Less fun 2024-09-17 17:51:18 -07:00
Nuno Campos c0d8493db5 Only look at chain runs which are nodes 2024-09-17 17:32:14 -07:00
Nuno Campos 01bb6cbd4d Add stream_mode=messages
- yields messages token-by-token from LLMs, and any messages returned from a node
2024-09-17 17:27:37 -07:00
Isaac FranciscoandGitHub 7d3389b6f1 docs: fix links (#1748)
* fix links

* branching link

* readme compatibility
2024-09-17 13:05:37 -07:00
Nuno Campos 3a2a4e44b2 Stream output from subgraphs while in-progress for sync stream
- previously implemented only for async stream
2024-09-17 12:50:29 -07:00
Eugene YurtsevandGitHub b11552a10a Update all URLs to langchain docunotebooks (#1745) 2024-09-17 15:01:22 -04:00
Nuno CamposandGitHub 36c757e758 Merge pull request #1740 from langchain-ai/nc/17sep/deprecation-warnings
Fix some deprecation warnings in tests
2024-09-17 11:57:22 -07:00
Nuno CamposandGitHub a520dc6106 Merge pull request #1744 from langchain-ai/nc/17sep/sync-benchmarks
Add sync benchmarks
2024-09-17 11:57:14 -07:00
Nuno Campos da901b01d8 Fix flaky test 2024-09-17 10:52:39 -07:00
Nuno CamposandGitHub f03dc2f006 Merge pull request #1743 from langchain-ai/nc/17sep/runner-fast-path
perf: Implement fast path in Runner for single-task steps
2024-09-17 10:44:35 -07:00
Nuno Campos 21d60b0d9c Add sync benchmarks 2024-09-17 10:38:49 -07:00
Jacob LeeandGitHub 47a68c16d5 feat(js-sdk): Support CJS (#1742)
* feat(js-sdk): Support CJS

* Bump version
2024-09-17 10:28:23 -07:00
Nuno Campos 9644525b59 Fix some deprecation warnings in tests 2024-09-17 10:19:28 -07:00
Nuno Campos 76ff7c3f1a perf: Implement fast path in Runner for single-task steps
- if the current step has a single task then we can execute it inline, instead of moving it to asyncio task / bg thread
2024-09-17 10:19:19 -07:00
Nuno CamposandGitHub c4d4d61a43 Merge pull request #1735 from langchain-ai/nc/16sep/stream-subgraph-in-progress
Stream subgraph output while it executes
2024-09-17 10:14:26 -07:00
Nuno Campos f59435a892 Add more comments 2024-09-17 09:31:48 -07:00
Nuno Campos bd2ecba622 Fix for py 3.9 2024-09-17 09:29:16 -07:00
Isaac FranciscoandGitHub bfd18f76dd docs: Tutorials up to date (#1734)
* edits

* add js code to web voyager
2024-09-17 08:11:41 -07:00
Nuno CamposandGitHub 0bf4bf8b6b Merge pull request #1732 from langchain-ai/nc/16sep/stream-selected
perf: In PregelLoop, only emit stream values requested by caller
2024-09-16 21:26:30 -07:00
Nuno Campos c30119824c Add comment 2024-09-16 18:06:06 -07:00
Nuno Campos 54207f4d89 Add test 2024-09-16 18:02:57 -07:00
Nuno Campos d163938a59 Stream subgraph output while it executes 2024-09-16 17:36:53 -07:00
f8ba4c3b7d (wip) docs: revamp conceptual docs (#1663)
* docs: revamp conceptual docs

* multi-agent draft

* typo

* Update Why LangGraph page

* update multi-agent

* Update persistence page

* update

* Clarification of graph re-playing

* update persistence

* more updates

* more updates

* Add multiple schemas section to glossary

* more updates

* Clarify I/O schema

* dynamic breakpoints

* Update agentic concepts

* Fix comments

* Update figureds

* cr

* cr

* cr

---------

Co-authored-by: Lance Martin <lance@langchain.dev>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-09-16 17:35:01 -07:00
William FHandGitHub 182dcea526 Docstring type (#1733) 2024-09-16 15:49:49 -07:00
Andrew NguonlyandGitHub 7934b67afa Update API docs (openapi.json). (#1731) 2024-09-16 15:49:35 -07:00
Nuno Campos f505afe066 perf: In PregelLoop, only emit stream values requested by caller
- this avoids creating stream values that will be ignored
2024-09-16 15:47:17 -07:00
Nuno Campos 4d0c12117b postgres 1.0.7 2024-09-16 14:10:19 -07:00
Nuno Campos 70af3bc3cb checkpoint 1.0.10 2024-09-16 14:10:03 -07:00
Nuno CamposandGitHub 3b05279e32 Implement serialization with msgpack library (#1716)
* Implement serialization with msgpack library

- encode custom python objects with a msgpack extension type, with constructor path string, and args encoded as nested msgpack doc

* Smaller msgpack extension types

* Update lock files

* lock

* Don't delegate to pydantic json

* Fix kafka serde

- should use our serializer to load, as inputs to subgraphs are serialized using it
2024-09-16 14:06:42 -07:00
Nuno Campos afc64c4f62 langgraph 0.2.22 2024-09-16 13:45:14 -07:00
BagaturandGitHub 29932bb59b docs: clarify course free (#1730)
* docs: clarify course free

* sync
2024-09-16 20:07:16 +00:00
0b1d0eb40d Retry subgraph starting at failing node (#1695)
* Failing test

* Ensure retried subgraphs resume from current point (if any)

* Lint

* Cleanup Test

---------

Co-authored-by: Nuno Campos <nuno@boringbits.io>
2024-09-16 12:53:43 -07:00
fa792e9f74 Update core in poetry lock (#1717)
* Update core in poetry lock

* ci: update langgraph test job for core 0.3 release (#1715)

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-09-16 12:36:14 -07:00
Vadym BardaandGitHub 301a2c8c82 docs: remove mentions of pydantic_v1 in tutorials (#1709) 2024-09-16 10:53:21 -07:00
Vadym BardaandGitHub d14b3aeef0 docs: remove pydantic v1 fallback from how-tos (#1711)
* docs: remove pydantic v1 fallback from how-tos

* sample callout

* update to use callout
2024-09-16 10:52:52 -07:00
Vadym BardaandGitHub ab8aeea129 langgraph: use create_model_v2 and fallback on create_model (#1708)
* langgraph: use create_model_v2 and fallback on create_model

* fix

* code review

* fix
2024-09-16 10:44:33 -07:00
Nuno Campos 289e72b75f Remove debug code 2024-09-16 10:44:20 -07:00
Nuno Campos 1943413d60 Debug again 2024-09-16 10:43:05 -07:00
Nuno Campos 5ec91445ac Debug baseline job 2024-09-16 10:42:24 -07:00
Isaac FranciscoandGitHub b4e62492a7 add deprecation warning for no overall state (#1698)
* deprecation warning for no overall state

* lance comments
2024-09-16 15:09:23 +00:00
Eran HirschandGitHub 6b861d6c64 Fix LATS select to choose the best child at each level until reaching leaf child (#1723) 2024-09-16 03:16:27 +00:00
Nuno Campos 55d79b1507 Use unique cache keys 2024-09-13 16:42:59 -07:00
Nuno CamposandGitHub e8cb6565ee langgraph 0.2.21 2024-09-13 12:18:04 -07:00
Nuno Campos 4cd9540427 Remove grandalf from dev deps
- this was never included in published package, given it's a dev dep, but some people get confused, so easier to remove
2024-09-13 11:13:10 -07:00
Vadym BardaandGitHub e87d3adb4c docs: add a README for updating notebooks/cassettes (#1705) 2024-09-13 12:56:23 -04:00
Vadym BardaandGitHub 33f9ec6c04 langgraph: release 0.2.20 (#1714) 2024-09-13 10:36:05 -04:00
c3b4acf3f1 checkpoint postgres: allow passing custom serde (#1699)
* Use correct serde in postgres checkpoint

* Revert metadata serde

* Revert

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-09-12 21:09:23 -07:00
Nuno CamposandGitHub 66fc7c96aa More performance improvements in checkpointing and channels (#1685)
* Performance improvements in checkpointer libs

- Use sha1 instead of md5 for hashing (faster in python 3.x)
- Use orjson instead of json for json dumping (sadly can't use for json loading)

* Update tests

* Update

* Use random number instead of hash for get_version_number

* Avoid saving writes for the last task to complete in each step

- only when possible, exceptions for ERROR, INTERRUPT, SEND

* Make Channel.from_checkpoint a regular function

- context manager no longer needed since Context became a managed value

* Use __slots__ for Channels

* Fix for kafka
2024-09-12 21:08:30 -07:00
Nuno CamposandGitHub 8a80b1d3b1 Add 2 more benchmark graphs (#1707) 2024-09-12 16:31:16 -07:00
Andrew NguonlyandGitHub 11319ae48b Update API docs. (#1706) 2024-09-12 15:32:48 -07:00
Vadym BardaandGitHub 0b40c83fa8 ci: add VCR caching to the notebooks (#1704) 2024-09-12 16:07:41 -04:00
Nuno CamposandGitHub 95b97d69ec Nc/12sep/perf (#1702)
* Remove unused fil;e

* Add benchmark-fast command for running locally

* Small improvements to jsonplus serializer

* Don't use PregelNode.mapper when schema is a typed dict

- All it would do is create a new copy of same dict

* Avoid copying checkpoint when fetching at beginning of loop

* Fix needs array

* Update tests
2024-09-12 12:50:53 -07:00
Nuno Campos 8e578a0f78 Add workflow dispatch 2024-09-12 11:07:39 -07:00
Nuno CamposandGitHub dd0c17dda9 ci: Cache baseline benchmark results (#1701) 2024-09-12 11:06:31 -07:00
Nuno CamposandGitHub 8f87cd1c91 Performance improvements in core library (#1683)
* Performance improvements in core library

- Avoid creating new callback manager when received one as arg
- Avoid looking for config when already received one as arg
- Avoid copies of values in ensure_config/merge_configs
- Implement version of ensure_config that accepts multiple configs (avoids calling merge_configs first)
- Avoid calling merge_configs when we only need to attach extra tags/metadata

* Fix

* Fix

* Try again

* Debug ci job

* Fix

* Try again

* Try again

* Try again

* Some more variations

* Attach annotation to first changed file

* Fix

* Re-enable benchmarks
2024-09-12 11:01:37 -07:00
Vadym BardaandGitHub 2ef551fac7 ci: add more dependencies for dev notebook testing (#1700) 2024-09-12 16:59:03 +00:00
vbarda fc4243ae67 ci: call -> dispatch for notebooks 2024-09-12 12:21:32 -04:00
Vadym BardaandGitHub 889cc9b394 ci: add GHA to execute how-to notebooks (#1694) 2024-09-12 15:39:15 +00:00
Nuno CamposandGitHub 73d1051034 Merge pull request #1693 from langchain-ai/nc/11sep/kafka-finally-send
kafka: Expose finally_send as public api
2024-09-11 16:48:41 -07:00
Nuno Campos 571623442a Avoid closing drain before seeing first message in either topic 2024-09-11 16:45:43 -07:00
Nuno CamposandGitHub 33017b53d0 Update bench.yml 2024-09-11 16:38:06 -07:00
Nuno CamposandGitHub c172362918 Merge pull request #1691 from langchain-ai/nc/11sep/kafka-sync
kafka: Implement sync orchestrator and executor classes
2024-09-11 16:34:01 -07:00
Nuno CamposandGitHub 115c37acea Merge pull request #1686 from langchain-ai/nc/11sep/kafka-configurable-consumer-producer
kafka: Make consumer and producer classes configurable
2024-09-11 16:33:15 -07:00
vbarda cd5f5c11f5 ci: update checks for overall CI success 2024-09-11 19:32:20 -04:00
Nuno Campos dd68babac7 kafka: Expose finally_send as public api
- Enables attaching a list of messages (topic/key/value) to send when run finishes
2024-09-11 16:31:35 -07:00
Vadym BardaandGitHub 63c34ca992 langgraph: update snapshots for 0.3.x core tests (#1692) 2024-09-11 19:28:47 -04:00
Nuno Campos 4accc19734 kafka: Implement sync orchestrator and executor classes 2024-09-11 16:06:50 -07:00
Vadym BardaandGitHub 84643b2789 langgraph: update core & snapshots (#1689) 2024-09-11 21:59:12 +00:00
Nuno Campos 217b07ae65 kafka: Make consumer and producer classes configurable
- Define protocol for sync and async producer and consumer
- Accept consumer/producer as init args in Orchestrator/Executor
- If not passed in, create default consumer/producer as before
2024-09-11 14:27:08 -07:00
Nuno Campos 50744bc846 Fix 2024-09-11 13:43:24 -07:00
Nuno Campos f179da00a0 update bench job 2024-09-11 13:41:45 -07:00
Nuno CamposandGitHub 8e275fa485 Merge pull request #1609 from langchain-ai/nc/4sep/benchmark
Add benchmark script
2024-09-11 12:29:22 -07:00
Nuno Campos 47dae71841 Remove files 2024-09-11 12:28:38 -07:00
Nuno Campos de2850332d Rename 2024-09-11 12:27:10 -07:00
Nuno Campos bf4f8e67d8 Rename command 2024-09-11 12:25:22 -07:00
Nuno Campos d844359d61 Fix output dir 2024-09-11 12:23:59 -07:00
Nuno Campos 5f2e9aafce Fix 2024-09-11 12:22:18 -07:00
Nuno Campos 51b8cfca54 fix 2024-09-11 12:20:48 -07:00
Nuno Campos 309b259735 One more 2024-09-11 12:18:35 -07:00
Nuno Campos c00e8c2b46 Fix 2024-09-11 12:17:56 -07:00
Vadym BardaandGitHub ee28fd3324 docs: update how-tos to support pydantic v1 and v2 (#1682) 2024-09-11 19:16:00 +00:00
Nuno Campos 710b4179da Add ci job 2024-09-11 12:14:06 -07:00
Nuno Campos f577529356 Add benchmark/profile commands 2024-09-11 11:44:18 -07:00
David DuongandGitHub 0fa10d67f5 Merge pull request #1681 from langchain-ai/dqbd/sdk-js-0.0.9
fix(sdk-js): bump to 0.0.9
2024-09-11 19:44:57 +02:00
Tat Dat Duong a60a4606fb fix(sdk-js): bump to 0.0.9 2024-09-11 19:41:51 +02:00
Vadym BardaandGitHub 229765c4a5 ci: update link check (#1680) 2024-09-11 13:16:55 -04:00
gbaian10andGitHub bf6ad19963 refactor: Type narrowing for ToolNode.name (#1678)
Avoid type incompatibility when using `add_node` to add a `ToolNode`.
2024-09-11 13:11:39 -04:00
Vadym BardaandGitHub 4c59a5e249 ci: ignore link check for storm tutorial (#1679) 2024-09-11 13:08:46 -04:00
Vadym BardaandGitHub 1f9273b136 docs: put documentation in the docs folder instead of examples (#1674) 2024-09-11 12:27:31 -04:00
Vadym BardaandGitHub f3b5d804ab ci: fix kafka scheduler, split langgraph and kafka into separate test jobs (#1677) 2024-09-11 10:55:11 -04:00
Nuno Campos 26f23ea26c Add benchmark script 2024-09-10 17:32:47 -07:00
Nuno CamposandGitHub e3ca7bb3e9 Merge pull request #1630 from langchain-ai/nc/5sep/scheduler-kafka
Implement LangGraph Scheduler for Kafka
2024-09-10 17:31:58 -07:00
Nuno Campos 34d530d5d8 Fix 2024-09-10 17:24:24 -07:00
Nuno Campos 2b09c284d4 Remove empty build job 2024-09-10 17:22:48 -07:00
Nuno Campos 77083bf634 Disable test jobs for now 2024-09-10 17:22:06 -07:00
Nuno Campos 5de46f7472 Update stop condition for drain 2024-09-10 16:52:09 -07:00
vbarda bb10acbe28 update cache keys 2024-09-10 19:51:23 -04:00
Nuno Campos bdabb723b0 Add langgraph dep 2024-09-10 16:39:34 -07:00
Nuno Campos edc0fd0210 Remove extraneous asserts 2024-09-10 16:20:45 -07:00
Nuno Campos 3886b76771 Lint 2024-09-10 16:17:22 -07:00
Nuno Campos 3a65460767 Use anyio for timeout in dran test helper 2024-09-10 16:17:22 -07:00
Nuno Campos 5e0273886e Lint 2024-09-10 16:17:22 -07:00
Nuno Campos 943cc4d83a Add readme, lint 2024-09-10 16:17:22 -07:00
Nuno Campos fed6499a2e Run ci for kafka lib 2024-09-10 16:17:22 -07:00
Nuno Campos 270559b880 Implement changes in sqlite checkpointer 2024-09-10 16:17:22 -07:00
Nuno Campos 98b8595a94 Move to dev deps 2024-09-10 16:17:22 -07:00
Nuno Campos f7dffa023c Implement subgraph delegation for distributed arch 2024-09-10 16:17:22 -07:00
Nuno Campos 7dc69a543d Rename 2024-09-10 16:17:22 -07:00
Nuno Campos 8f91402642 Use thread_id for partition key, ignore tasks for stale checkpoints 2024-09-10 16:17:22 -07:00
Nuno Campos 030d6d2def Fix subgraph test 2024-09-10 16:17:22 -07:00
Nuno Campos ad7dd0dbb7 Add drain_topics test helper 2024-09-10 16:17:22 -07:00
Nuno Campos 0eb11a3cf9 Remove is_resuming arg 2024-09-10 16:17:22 -07:00
Nuno Campos 1ce8d628f2 In update state skip nodes not found in instance
eg, because removed since
2024-09-10 16:17:22 -07:00
Nuno Campos 5e6b58f847 Remove double shield usage
- we already shield from cancellation in PregelLoop so shouldnt be repeating in AsyncBackgroundExecutor
2024-09-10 16:17:22 -07:00
Nuno Campos b13db42568 WIP Subgraphs 2024-09-10 16:17:22 -07:00
Nuno Campos 83d36761a4 Rename compose projects 2024-09-10 16:17:22 -07:00
Nuno Campos d206621230 Rename test 2024-09-10 16:17:22 -07:00
Nuno Campos 8e6caab78c Add test for interrupts 2024-09-10 16:17:22 -07:00
Nuno Campos ad463ec90a Add more test assertions 2024-09-10 16:17:22 -07:00
Nuno Campos 2d02e5e0c5 Add error topic, add retries (eg for checkpointer database exceptions) 2024-09-10 16:17:22 -07:00
Nuno Campos 5b3bd920d8 Catch errors thrown by nodes run by Executor 2024-09-10 16:17:22 -07:00
Nuno Campos f09b130837 Use pool for postgres checkpointer 2024-09-10 16:17:22 -07:00
Nuno Campos e6d6f565a5 Improvements to consumer and producer patterns
- await future returned by send() instead of flush()
- use consumer groups by default
- process tasks in batches by default, configurable
- manually commit offsets when batch is processed
2024-09-10 16:17:22 -07:00
Nuno Campos dc5be3fd58 Rename 2024-09-10 16:17:22 -07:00
Nuno Campos 381ea9cec8 Rename 2024-09-10 16:17:22 -07:00
Nuno Campos 841aabf5b3 Implement LangGraph Scheduler for Kafka
- Orchestrator and Executor classes to run LangGraph in a distributed fashion using Kafka as a message bus for communication
- Orchestrator and Executor run on-demand when a new message is published to the topic they listen to
- Orchestrator is responsible for running the Pregel algorithm (deciding next tasks to run) and sending messages to the executor topic
- Executor is responsible for executing each task (node), and sending messages to the orchestrator topic when done
2024-09-10 16:17:22 -07:00
Vadym BardaandGitHub 5d4b276af2 ci: remove preview step (#1675) 2024-09-10 18:25:13 +00:00
jessicaouandGitHub acd8325402 adding langchain academy link (#1643) 2024-09-10 12:04:19 -04:00
Vadym BardaandGitHub ed0f55af85 docs: clean up how-to docs to make them runnable (#1666) 2024-09-10 01:56:51 +00:00
Vadym BardaandGitHub 215b87244b docs: update dependencies in setup docs (#1664) 2024-09-09 20:08:16 -04:00
Nuno CamposandGitHub ad04d4e154 Merge pull request #1658 from os1ma/fix-typo-node-interupt
docs: fix typo `NodeInterupt`
2024-09-09 09:35:11 -07:00
David DuongandGitHub ba5cf0d00f Merge pull request #1661 from langchain-ai/dqbd/sdk-js-fetch-types
fix(js): don't be strict on JS types for custom fetch
2024-09-09 18:00:34 +02:00
Tat Dat Duong 58c34cf40c fix(js): don't be strict on JS types for custom fetch 2024-09-09 17:48:55 +02:00
Yuki Oshima 394ce83bb1 docs: fix typo NodeInterupt 2024-09-09 16:59:42 +09:00
1c9b1d29c3 docs: add page on creating react agent from scratch (#1626)
---------

Co-authored-by: vbarda <vadym@langchain.dev>
2024-09-08 16:58:55 +00:00
db306cd01b doc updates (#1639)
---------

Co-authored-by: vbarda <vadym@langchain.dev>
2024-09-08 16:55:52 +00:00
38a644cf79 docs: how-to for finding graph runs in LangSmith (#1631)
---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-09-08 14:59:44 +00:00
2c088fa1bb docs: fix broken link (#1652)
* fix broken link

* actually fix link

---------

Co-authored-by: vbarda <vadym@langchain.dev>
2024-09-08 14:36:59 +00:00
Vadym BardaandGitHub 282562f182 langgraph: add tests for MessagesState/AnyMessage (#1637)
* langgraph: add tests for MessagesState/AnyMessage

* bump to 0.3.0.dev4

* update

* update snapshots
2024-09-07 17:00:41 -04:00
Brace SproulandGitHub 9302a589e0 Merge pull request #1646 from langchain-ai/brace/agent-survey-docs
docs[minor]: Add state of agents survey to docs announcement bar
2024-09-06 15:48:58 -07:00
Brace SproulandGitHub 8f91ad005b Merge branch 'main' into brace/agent-survey-docs 2024-09-06 14:36:46 -07:00
bracesproul 5b511a2386 docs[minor]: Add state of agents survey to docs announcement bar 2024-09-06 14:35:54 -07:00
Nuno CamposandGitHub a424eb40bb Merge pull request #1641 from langchain-ai/wfh/output_schema
Support optional fields in the output schema when defining as Dataclass or TypedDict
2024-09-06 13:55:49 -07:00
Vadym BardaandGitHub 40dd40a867 docs: fix indents for the markdown callouts (#1644)
* docs: fix indents for the markdown callouts
2024-09-06 20:54:37 +00:00
William Fu-Hinthorn 4aa28fb55f Merge 2024-09-06 13:46:16 -07:00
William Fu-Hinthorn 822bdea146 update ye ol' snapshots 2024-09-06 13:40:45 -07:00
vbarda 142db1f020 fix links in the reference 2024-09-06 16:37:56 -04:00
vbarda 6fd6ef43f6 lint 2024-09-06 16:28:05 -04:00
vbarda 7f3c6e3d2f Merge branch 'main' into vb/add-sync-client 2024-09-06 16:24:28 -04:00
Vadym BardaandGitHub b4fe54623d sdk-js: add missing methods (#1640) 2024-09-06 16:23:47 -04:00
vbarda 7233b06c2b update sync 2024-09-06 16:23:17 -04:00
Nuno CamposandGitHub 5305cb7149 Merge pull request #1642 from langchain-ai/wfh/disallow_managed_io
Assert input/output channels aren't managed
2024-09-06 12:57:01 -07:00
William Fu-Hinthorn cc55adac46 icanspell 2024-09-06 12:50:53 -07:00
William Fu-Hinthorn 1832ed46ef Assert input/output channels aren't managed 2024-09-06 12:46:12 -07:00
vbarda a73484d336 rename back 2024-09-06 15:33:29 -04:00
William Fu-Hinthorn e86330ab05 Exclude shared 2024-09-06 12:28:33 -07:00
vbarda a52f397db8 Merge branch 'main' into vb/add-sync-client 2024-09-06 15:28:24 -04:00
William Fu-Hinthorn 093dab1035 Update test 2024-09-06 12:09:37 -07:00
William Fu-Hinthorn fd36ed794c Merge branch 'main' into wfh/output_schema 2024-09-06 12:04:16 -07:00
William FHandGitHub ec4e92792d Optional types for dataclass state defs (#1557) 2024-09-06 11:50:45 -07:00
William Fu-Hinthorn 587335bfe6 Support optional output schema 2024-09-06 11:29:43 -07:00
Nuno Campos a9ccd0fd79 langgraph 0.2.19 2024-09-06 09:29:24 -07:00
Nuno CamposandGitHub b329164c6c Merge pull request #1638 from langchain-ai/nc/6sep/fix-debug-task-event-timing
Fix timing of debug task events
2024-09-06 09:29:00 -07:00
Nuno Campos 61ca2444c0 Fix timing of debug task events 2024-09-06 09:17:36 -07:00
Isaac FranciscoandGitHub 82988b8453 docs: adding lines to docker file (#1633) 2024-09-06 11:30:19 -04:00
28581e047a Support pydantic & dataclasses in ToolNode (#1625)
Co-authored-by: Abinash Panda <abinashpanda205@gmail.com>
2024-09-06 07:39:49 -07:00
Isaac FranciscoandGitHub 8fc0eecac1 [docs]: add subgraph streaming how-to (and some small cleanups) (#1606)
* wip

* spelling

* edit format_namespace
2024-09-05 20:37:47 -07:00
6134b0e995 docs: add shared value (#1447)
* add shared value

* changes

* z

* spelling

* z

* vadym comments

* spelling

* cloud compatibility

* spelling

---------

Co-authored-by: isaac hershenson <ihershenson@hmc.edu>
Co-authored-by: Isaac Francisco <78627776+isahers1@users.noreply.github.com>
2024-09-05 18:23:02 -07:00
Isaac FranciscoandGitHub dc1e33f4de small fixes (#1629) 2024-09-05 20:34:37 -04:00
Nuno Campos fb9f67c158 Fix copy 2024-09-05 17:19:42 -07:00
Nuno Campos f13dd00b62 Fix import 2024-09-05 17:04:56 -07:00
Nuno Campos b229c08027 langgraph 0.2.18 2024-09-05 17:02:07 -07:00
Nuno Campos 7cbad36956 Add back Pregel.copy() 2024-09-05 17:01:20 -07:00
Isaac FranciscoandGitHub 80066280c9 docs: better time travel example (#1622)
* better example

* branching to select different tool instead of change args

* spelling
2024-09-05 14:56:51 -07:00
Isaac FranciscoandGitHub d1f06d6771 removing empty cells (#1624) 2024-09-05 14:46:37 -07:00
Vadym BardaandGitHub 46b6cd45e2 checkpoint: release 1.0.9 (#1628) 2024-09-05 17:24:18 -04:00
Vadym BardaandGitHub 8c05502e97 langgraph: update mermaid snapshots (#1627) 2024-09-05 17:11:05 -04:00
Nuno Campos 72e73e47c9 langgraph 0.2.17 2024-09-05 12:37:17 -07:00
Vadym BardaandGitHub 7bf99a5d2f langgraph: changes for compatibility pydantic v2 / langchain-core==0.3 (#1594) 2024-09-05 15:26:35 -04:00
Nuno CamposandGitHub 7461978b8c Merge pull request #1612 from langchain-ai/nc/4sep/prepare-single-task
Split out prepare_single_task from prepare_next_tasks
2024-09-05 10:21:27 -07:00
Nuno Campos 4f89cfc81d Remove legacy id 2024-09-05 09:21:07 -07:00
Isaac FranciscoandGitHub ea5cb4d100 remove self hosted docs (#1621) 2024-09-05 16:16:32 +00:00
e14c17f6b8 docs: add a how-to on subgraph transform state (#1595)
* docs: add a how-to on subgraph transform state

---------

Co-authored-by: isaac hershenson <ihershenson@hmc.edu>
Co-authored-by: Isaac Francisco <78627776+isahers1@users.noreply.github.com>
2024-09-05 12:16:11 -04:00
Isaac FranciscoandGitHub b34bfe165a docs fixes (#1620) 2024-09-05 12:03:55 -04:00
Nuno Campos ca3715b809 Split out prepare_single_task from prepare_next_tasks 2024-09-04 18:09:42 -07:00
gbaian10andGitHub 7e83cda0b5 docs: Correct the reference repo in the Cloud - Setup App (pyproject.toml) documents (#1607) 2024-09-04 21:05:10 -04:00
Nuno CamposandGitHub 6727277f8f Merge pull request #1610 from langchain-ai/an/04sept/metadata-interrupts
Return `before,after` for `__interrupt` metadata if both interrupts are configured for a node
2024-09-04 17:29:07 -07:00
Andrew Nguonly d89fb9eef0 Add before and after values to __interrupt metadata. 2024-09-04 15:36:05 -07:00
Isaac FranciscoandGitHub 1774dbb860 [docs]: adding js/curl tabs (#1558)
* jsifying

* x

* z

* x

* fix background run output

* reformatting

* z

* z

* z

* z

* z

* add tabs to stream debug

* default urls
2024-09-04 22:13:19 +00:00
Harrison ChaseandGitHub 82c989feea docs: subgraphs manage state (#1543) 2024-09-04 17:57:06 -04:00
Nuno Campos f66493f6db Lint 2024-09-04 14:37:31 -07:00
Nuno Campos eb88dfefa3 Speed improvements to local_read, emit output 2024-09-04 14:31:42 -07:00
Nuno Campos b8d8a879d8 Fix ids in debug task events 2024-09-04 14:31:20 -07:00
Nuno Campos dc10b3aa8e Add test to confirm only one root run is produced 2024-09-04 12:56:32 -07:00
Nuno CamposandGitHub af780f97a4 Merge pull request #1597 from langchain-ai/nc/3sep/perf-optimizations
Reduce cpu time spent on langchain-core utilities
2024-09-04 12:45:20 -07:00
Nuno Campos 3a1b90c882 Fix 2024-09-04 12:34:42 -07:00
Nuno Campos b9361d69b4 Try to fix test 2024-09-04 12:30:27 -07:00
Nuno Campos 26b4d9139e Avoid using json encoding when generating task ids 2024-09-04 12:19:14 -07:00
Nuno Campos 67a164ca2d Run loop tick in bg thread
- prepare_next_tasks, apply_writes do some cpu-heavy work
2024-09-04 12:18:42 -07:00
Nuno Campos b68f9211c2 Run branch.reader in bg thread 2024-09-04 12:13:38 -07:00
Nuno Campos 4efab93e2f Use pseudo rng for uuid6 generation 2024-09-04 12:07:19 -07:00
Nuno Campos cf345ef716 Store loop in async bg exec init 2024-09-04 12:07:02 -07:00
Nuno Campos 535dbd5b06 Reduce from 9s to 4s on benchmark graph
- Use a simpler version of RunnableSequence without tracing serialization
- Remove accepts_run_manager check in RunnableCallable
- Remove creation of ChannelWrite dynamically every time conditional edge runs
2024-09-04 11:02:33 -07:00
Nuno Campos f2e0dc1042 Reduce cpu time spent on langchain-core utilities
- shaves off 2s of 11s runtime of a simple graph with 1,000 subgraphs
2024-09-04 11:02:33 -07:00
Nuno CamposandGitHub 6bf367300b Merge pull request #1598 from langchain-ai/nc/3sep/runner
Move runner code to standalone class, use in Pregel.stream/astream
2024-09-04 11:01:38 -07:00
Nuno Campos e42e1a9f6b Fix test 2024-09-04 10:56:41 -07:00
Nuno Campos 0d51c8614d Move runner code to standalone class, use in Pregel.stream/astream 2024-09-04 10:50:46 -07:00
Nuno Campos b99a101b2c Add large parallel graph test 2024-09-04 10:50:05 -07:00
Nuno Campos e150193491 Avoid deepcopy 2024-09-04 10:50:05 -07:00
Nuno CamposandGitHub 7304ba683e Merge pull request #1282 from langchain-ai/isaac/nodelogging
add task_id to node logs
2024-09-03 16:30:43 -07:00
isaac hershenson ec51760f57 x 2024-09-03 13:45:22 -07:00
Isaac FranciscoandGitHub 32d07df7a4 Merge branch 'main' into isaac/nodelogging 2024-09-03 13:39:05 -07:00
Isaac FranciscoandGitHub 1ae60dccc5 test (#1592) 2024-09-03 10:12:36 -07:00
Nuno Campos 5d1ab66535 sqlite 1.0.3 2024-09-03 09:41:04 -07:00
Nuno CamposandGitHub b4944fa0a0 Merge pull request #1582 from langchain-ai/nc/2sep/rm-pydantic-base-class
Remove pydantic base class from Pregel/PregelNode
2024-09-03 09:39:03 -07:00
Nuno Campos 4ddb4ae5a0 Update 2024-09-03 09:26:45 -07:00
Nuno Campos a99b66ae3f Update 2024-09-03 09:20:17 -07:00
Nuno CamposandNuno Campos 4793b3f5e1 Use a lock for all operations on sqlite checkpointer
- Otherwise when used in multiple subgraphs in parallel separate queries can interfere w each other
2024-09-03 09:20:17 -07:00
Nuno CamposandNuno Campos 3c5913aa29 Remove pydantic base class from Pregel/PregelNode 2024-09-03 09:20:17 -07:00
Sreenivasan R SandGitHub 43d5dbf174 examples: fix missing import introduction (#1584) 2024-09-03 12:12:31 -04:00
Nuno CamposandGitHub 974b6c7bf3 Merge pull request #1549 from langchain-ai/wfh/optional_types
Support optional types from typeddict
2024-09-03 09:11:14 -07:00
Vadym BardaandGitHub d492475c61 checkpoint-sqlite: close connection in from_conn_string (#1589) 2024-09-03 11:00:37 -04:00
gbaian10andGitHub e5b09b8c20 docs: update Postgres checkpointer for persistence (#1556) 2024-09-03 11:00:14 -04:00
Jacob LeeandGitHub c1d7cbd67c Adds JS deploy guide to index (#1590) 2024-09-03 07:47:31 -07:00
gbaian10andGitHub 8c0b27a85b docs: fix Corrective RAG (CRAG) miss function (#1563)
`Corrective RAG (CRAG) using local LLMs` miss `find_tool_calls_react` function
2024-09-03 09:50:00 -04:00
322d6c8dde patch(docs): Update docs with JS cloud instructions (#1560)
* Update docs with JS cloud instructions

* Add to index

* Add md fence

* nits

* nits

* Update setup_javascript.md

---------

Co-authored-by: isaac hershenson <ihershenson@hmc.edu>
2024-09-02 18:48:50 -07:00
Nuno Campos af666a87fb sqlite 1.0.2 2024-09-02 17:58:01 -07:00
Nuno Campos 6e9f54e5ae postgres 1.0.6 2024-09-02 17:57:55 -07:00
Nuno Campos dd4a15b569 Require latest version of langgraph-checkpoint 2024-09-02 17:57:33 -07:00
Nuno CamposandGitHub 1122e5cbbb Merge pull request #1579 from langchain-ai/nc/2sep/async-checkpoint-test-setup
test: Ensure that async checkpointers in tests are setup in same event loop as they are used in
2024-09-02 17:57:05 -07:00
Nuno CamposandGitHub 29311f054d Merge pull request #1580 from langchain-ai/nc/2sep/async-checkpointers-implement-async
checkpoint: Implement sync methods in async checkpointers
2024-09-02 17:51:52 -07:00
Nuno Campos 3b2a237deb Lint 2024-09-02 17:45:57 -07:00
Nuno Campos 0cc3799298 checkpoint: Implement sync methods in async checkpointers
- These are needed when subgraphs are invoked synchronously in nodes
2024-09-02 17:43:34 -07:00
Nuno Campos ddeb9d7314 Disable test in old versions of py 2024-09-02 17:42:37 -07:00
Nuno Campos d65d0ec665 test: Ensure that async checkpointers in tests are setup in same event loop as they are used in
- This more closely remembers the environment they're used in, so it's what we should be testing
- Remove unnecessary pytest-asyncio dependency, use anyio pytest plugin instead
- Convert remaining async tests using only memory checkpointer to use all existing ones
2024-09-02 17:24:54 -07:00
Nuno CamposandGitHub a937754132 lib 0.2.16 2024-09-01 12:15:20 -07:00
Reuben MandGitHub 8c698fc362 Return replan response in dict. Add Replan example (#1566) 2024-08-31 23:41:48 +00:00
gbaian10andGitHub 3a07fe2efb docs: fix agent_supervisor.ipynb (#1562)
fix #1561
2024-08-31 16:35:59 -07:00
William Fu-Hinthorn 1191dc1b48 Handle py3.9 2024-08-30 23:52:41 -07:00
isaac hershenson ee5801511b fmt 2024-08-30 18:25:02 -07:00
isaac hershenson d14477c891 x 2024-08-30 18:22:22 -07:00
isaac hershenson 01765fbda4 x 2024-08-30 17:39:45 -07:00
Isaac FranciscoandGitHub 54bcd490ef Merge branch 'main' into isaac/nodelogging 2024-08-30 16:58:31 -07:00
William Fu-Hinthorn 85e827ae85 Merge branch 'main' into wfh/optional_types 2024-08-30 16:40:56 -07:00
William Fu-Hinthorn 55263c640f Return a default value instead 2024-08-30 16:28:01 -07:00
William Fu-Hinthorn 51f58279ba Update snapshot 2024-08-30 16:20:22 -07:00
Nuno CamposandGitHub 7d6a302858 Merge pull request #1514 from vermapratyush/patch-1
[docs]: Fix typo
2024-08-30 16:20:18 -07:00
Nuno CamposandGitHub d225ef074f Merge pull request #1487 from langchain-ai/isaac/fixcustomersupportbot
customer support bot doc nit
2024-08-30 16:14:50 -07:00
Nuno Campos eca419008c checkpoint 1.0.8 2024-08-30 16:10:57 -07:00
Nuno CamposandGitHub 76994f3c9a Merge pull request #1521 from langchain-ai/nc/28aug/pydantic-serialization
checkpoint: Avoid changes to pydantic models breaking deserialization while still relying on pydantic's type coercion
2024-08-30 15:56:43 -07:00
Nuno Campos ca4ebe1031 Update tests 2024-08-30 15:51:57 -07:00
Nuno CamposandGitHub 299179bc33 Merge pull request #1555 from langchain-ai/nc/30aug/detect-nested-graph-in-function-node
Detect subgraphs called inside function nodes
2024-08-30 15:19:40 -07:00
Nuno Campos 487fc8a8ca Detect subgraphs called inside function nodes 2024-08-30 15:13:56 -07:00
Vadym BardaandGitHub cf4de9a1a5 cli: remove jupyter from examples pyproject (#1554) 2024-08-30 21:45:35 +00:00
Nuno CamposandGitHub 921c366708 Merge pull request #1531 from langchain-ai/dependabot/pip/libs/langgraph/notebook-7.2.2
Bump notebook from 7.2.1 to 7.2.2 in /libs/langgraph
2024-08-30 14:34:45 -07:00
Nuno CamposandGitHub 243881ae90 Merge pull request #1532 from langchain-ai/dependabot/pip/libs/langgraph/jupyterlab-4.2.5
Bump jupyterlab from 4.2.2 to 4.2.5 in /libs/langgraph
2024-08-30 14:34:26 -07:00
Nuno Campos 770132dd79 sdk-py: Add values to get/list threads 2024-08-30 14:23:10 -07:00
Nuno Campos 3943637202 Bump them all 2024-08-30 14:18:35 -07:00
Nuno CamposandGitHub 13cf9b7ec5 Merge pull request #1552 from langchain-ai/nc/30aug/sort-pending-writes-on-fetch
postgres/sqlite: Sort pending writes when fetching from db
2024-08-30 14:12:54 -07:00
Nuno Campos e744db169a postgres/sqlite: Sort pending writes when fetching from db 2024-08-30 14:07:46 -07:00
Nuno CamposandGitHub 770c092b57 Merge pull request #1551 from langchain-ai/nc/30aug/rm-none-default-node-inputs
Remove None default for missing keys when generating input for each node
2024-08-30 14:06:51 -07:00
Nuno Campos c5c10a41e5 Remove None default for missing keys when generating input for each node 2024-08-30 13:59:36 -07:00
Nuno Campos af1f218e00 Try init, then construct 2024-08-30 13:35:33 -07:00
Nuno CamposandGitHub 35807068ef Merge pull request #1545 from langchain-ai/nc/29aug/input-metadata-from-writes
For input checkpoint use filtered input writes in checkpoint metadata
2024-08-30 13:30:54 -07:00
Nuno Campos 5db13dffbe checkpoint: Avoid changes to pydantic models breaking deserialization while still relying on pydantic's type coercion 2024-08-30 13:28:32 -07:00
Nuno Campos 6379cdc36d Fix tests 2024-08-30 13:25:35 -07:00
Nuno CamposandNuno Campos 8154ab784e For input checkpoint use filtered input writes in checkpoint metadata
- if we use the raw input we can end up saving keys that were actually ignored (because not one of the input keys), which is incosistent
2024-08-30 13:24:41 -07:00
Vadym BardaandGitHub c761b80970 docs: update subgraph how-to (#1520) 2024-08-30 14:41:29 -04:00
Nuno CamposandGitHub 36d1570c0f Merge pull request #1550 from langchain-ai/nc/30aug/replay-without-fork
Remove the need to fork a thread to replay a past state
2024-08-30 10:39:57 -07:00
Nuno CamposandGitHub 99a845128e Merge pull request #1522 from langchain-ai/nc/28aug/sdk-join-return-val
sdk-py: Update signature for runs.join
2024-08-30 10:36:15 -07:00
Nuno Campos 6036b4a7d4 Remove the need to fork a thread to replay a past state 2024-08-30 10:35:16 -07:00
Nuno Campos 33edc8e808 sdk-py: Update signature for runs.join 2024-08-30 10:31:33 -07:00
Nuno CamposandGitHub 15a204b2be Merge pull request #1539 from langchain-ai/nc/29aug/nested-update-state
Implement update_state for nested graphs
2024-08-30 10:30:40 -07:00
Nuno CamposandGitHub 24a7e6403f Merge pull request #1538 from langchain-ai/nc/29aug/nested-replay
Replay a nested checkpoint
2024-08-30 10:30:14 -07:00
William Fu-Hinthorn a07ec9d8c8 Handle total=false 2024-08-30 10:21:57 -07:00
Nuno Campos 9fd64cd37b Lint 2024-08-30 10:19:20 -07:00
Nuno Campos fcd0f094f9 Add test from harrison, always produce output when resuming graph 2024-08-30 10:10:51 -07:00
William Fu-Hinthorn 65b64c1331 Support optional types from typeddict
In the input schema
2024-08-30 09:42:53 -07:00
Vadym BardaandGitHub 30598cd913 docs: fix images in structured react agent (#1544) 2024-08-30 01:50:14 +00:00
Nuno Campos 44153e4a49 Update test 2024-08-29 16:52:50 -07:00
Nuno Campos 4133910670 Implement update_state for nested graphs 2024-08-29 16:41:47 -07:00
Nuno Campos 4fc4080597 Enable test for doubly nested interrupts 2024-08-29 15:49:43 -07:00
Nuno Campos 8865831104 Update async test 2024-08-29 15:42:29 -07:00
Nuno Campos a707eef6f7 Lint 2024-08-29 15:42:25 -07:00
Nuno Campos 090c759da0 Replay a nested checkpoint
- note this isn't very useful until update_state is added
2024-08-29 15:39:14 -07:00
Nuno CamposandGitHub 4ebaaba282 Merge pull request #1499 from langchain-ai/nc/27aug/print-output-skipped-tasks
Emit output for skipped tasks, with `cached` mark
2024-08-29 15:38:35 -07:00
Isaac FranciscoandGitHub 5343350a5c [docs]: conceptual guides for streaming from specific nodes/LLMs (#1537)
* x

* changes

* typo
2024-08-29 22:09:18 +00:00
Nuno CamposandGitHub 5dcb5976d9 Merge pull request #1536 from RafaelRViana/documentation-fix
[docs]: fix parameter "multitask_strategy" misspelled
2024-08-29 14:03:52 -07:00
Nuno Campos 791ab654cb Add cached mark 2024-08-29 13:57:37 -07:00
Nuno Campos c183f4f16a Emit output for skipped tasks 2024-08-29 13:56:55 -07:00
Rafael Viana 11e8728685 [docs]: fix parameter misspelled 2024-08-29 17:49:04 -03:00
Nuno CamposandGitHub b1f22d3d81 Merge pull request #1534 from langchain-ai/nc/29aug/stream-subgraphs
Stream output from subgraphs
2024-08-29 13:37:13 -07:00
Nuno Campos ddf67d9233 Add ns to subgraph stream events 2024-08-29 13:32:21 -07:00
Nuno Campos b479b88c7e Add name of subgraph to streaming output 2024-08-29 13:20:28 -07:00
Isaac FranciscoandGitHub dd52248ef2 [docs]: make react agent HIL guide a little better (#1526)
* ocd

* x

* spelling

* changes

* edits

* nits

* changes

* last nit
2024-08-29 19:02:59 +00:00
Nuno Campos 80e442e13d Stream output from subgraphs
- enabled by new argument stream(subgraphs=True)
- the same stream_mode requested for parent graph is applied to all subgraphs
2024-08-29 12:00:02 -07:00
Nuno CamposandGitHub a627a30f4c Merge pull request #1530 from langchain-ai/nc/29aug/get-state-subgraph
Enable passing subgraph checkpoint config to get_state/aget_state
2024-08-29 11:59:02 -07:00
Vadym BardaandGitHub 01f14d3166 docs: update how-to for streaming from final node (#1533) 2024-08-29 18:28:22 +00:00
dependabot[bot]andGitHub 209e4cef7b Bump jupyterlab from 4.2.2 to 4.2.5 in /libs/langgraph
Bumps [jupyterlab](https://github.com/jupyterlab/jupyterlab) from 4.2.2 to 4.2.5.
- [Release notes](https://github.com/jupyterlab/jupyterlab/releases)
- [Changelog](https://github.com/jupyterlab/jupyterlab/blob/@jupyterlab/lsp@4.2.5/CHANGELOG.md)
- [Commits](https://github.com/jupyterlab/jupyterlab/compare/@jupyterlab/lsp@4.2.2...@jupyterlab/lsp@4.2.5)

---
updated-dependencies:
- dependency-name: jupyterlab
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-29 18:10:05 +00:00
dependabot[bot]andGitHub 98789acacc Bump notebook from 7.2.1 to 7.2.2 in /libs/langgraph
Bumps [notebook](https://github.com/jupyter/notebook) from 7.2.1 to 7.2.2.
- [Release notes](https://github.com/jupyter/notebook/releases)
- [Changelog](https://github.com/jupyter/notebook/blob/@jupyter-notebook/tree@7.2.2/CHANGELOG.md)
- [Commits](https://github.com/jupyter/notebook/compare/@jupyter-notebook/tree@7.2.1...@jupyter-notebook/tree@7.2.2)

---
updated-dependencies:
- dependency-name: notebook
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-29 18:05:50 +00:00
Nuno Campos 9d68aac76f Enable passing subgraph checkpoint config to get_state/aget_state 2024-08-29 10:47:50 -07:00
Nuno CamposandGitHub e526674172 Merge pull request #1502 from langchain-ai/nc/27aug/subgraphs-cleanup
Nc/27aug/subgraphs cleanup
2024-08-29 10:17:04 -07:00
Nuno Campos ca8614f873 Implement get_state and get_state_history for nested graphs 2024-08-29 09:45:45 -07:00
ae8b1e164b docs: expand streaming conceptual guides (#1524)
* stash

* cr

* x

* spelling

* Update docs/docs/cloud/how-tos/stream_events.md

Co-authored-by: Vadym Barda <vadym@langchain.dev>

* Update docs/docs/cloud/how-tos/stream_updates.md

Co-authored-by: Vadym Barda <vadym@langchain.dev>

* Update docs/docs/cloud/how-tos/stream_values.md

Co-authored-by: Vadym Barda <vadym@langchain.dev>

* Update docs/docs/concepts/low_level.md

Co-authored-by: Vadym Barda <vadym@langchain.dev>

* final nits

* spelling

---------

Co-authored-by: isaac hershenson <ihershenson@hmc.edu>
Co-authored-by: Isaac Francisco <78627776+isahers1@users.noreply.github.com>
Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-08-29 15:03:08 +00:00
gbaian10andGitHub cd28799215 fix: ToolNode output isn't a str and contains non-ASCII characters (#1505) 2024-08-29 09:57:23 -04:00
Harrison ChaseandGitHub 883b39ba9f docs: better name for react agent w/ structured output how-to (#1527) 2024-08-29 13:50:01 +00:00
Niklas MartinandGitHub 337ccc058f [docs]: fix type hint for state (#1528) 2024-08-29 13:47:05 +00:00
Isaac FranciscoandGitHub 6111d37b99 [docs]: different structured output method (#1497)
* wip

* spelling

* consistent headers

* slight changes

* spelling

* more comments

* link

* changes

* diagrams

* format

* final nits

* x
2024-08-28 20:45:23 -07:00
Isaac FranciscoandGitHub 6962aa5acc ocd (#1525) 2024-08-29 01:50:55 +00:00
Vadym BardaandGitHub 4769122828 docs: fix map-reduce issue (#1523) 2024-08-28 20:40:06 +00:00
Nuno Campos c4010c03a6 Udpate async tests 2024-08-28 12:50:35 -07:00
Nuno Campos 03f6cf779d Fix test setup 2024-08-28 12:48:29 -07:00
Nuno Campos 112700810c Fix 2024-08-28 12:31:43 -07:00
Isaac FranciscoandGitHub 2645eb5a48 [docs]: remove agent executor (#1485) 2024-08-28 14:54:52 -04:00
Isaac FranciscoandGitHub ab71d29286 [docs]: update node config info (#1500)
* config changes

* vadym comments

* format

* spelling

* x
2024-08-28 11:54:44 -07:00
Isaac FranciscoandGitHub da38905db7 [docs]: fix llm compiler (#1517) 2024-08-28 13:36:36 -04:00
Vadym BardaandGitHub 7d3527db38 cli: release 0.1.52 (#1516) 2024-08-28 12:12:46 -04:00
David DuongandGitHub 36ed1a5d4b Merge pull request #1503 from langchain-ai/dqbd/cli-studio-js
feat(cli): add building support for JS
2024-08-28 18:08:32 +02:00
Vadym BardaandGitHub 7637a769dd docs: update reflection notebook (#1515)
* docs: update reflection notebook

* update more

* update more
2024-08-28 12:07:29 -04:00
Tat Dat Duong 3bbe09dac4 Fix missing comma 2024-08-28 17:56:26 +02:00
Pratyush VermaandGitHub 8e6019a6b8 Merge branch 'main' into patch-1 2024-08-28 15:46:39 +01:00
Pratyush VermaandGitHub 666fb3f31d Fix typo 2024-08-28 15:45:02 +01:00
Vadym BardaandGitHub 947f8c8c1d docs: fix astream in reflection notebook (#1512) 2024-08-28 14:32:09 +00:00
Isaac FranciscoandGitHub 84cb3ea151 [docs]: recursion limit info (#1501)
* draft

* vadym comments

* spelling

* final nits

* final nits
2024-08-27 21:06:09 -07:00
Tat Dat Duong f4dea9c5f7 feat(cli): add building support for JS 2024-08-28 02:07:21 +02:00
Nuno Campos a8a2a89602 Fix docstring 2024-08-27 16:59:20 -07:00
Nuno Campos e338a4ec98 Fix filtering on ns 2024-08-27 16:09:11 -07:00
Nuno Campos 499fe10ef2 Undo addition of Send.id 2024-08-27 13:34:50 -07:00
Isaac FranciscoandGitHub a8758661bc acesss tool calls directly (#1495) 2024-08-27 14:47:20 -04:00
Nuno CamposandGitHub 8912d50312 Merge pull request #1498 from langchain-ai/nc/27aug/store-sends-once
Avoid storing Sends twice in memory and postgres checkpointers
2024-08-27 11:24:27 -07:00
Nuno Campos 8d23929288 Remove print 2024-08-27 11:18:53 -07:00
Nuno Campos 9b6100bc4f Avoid storing Sends twice in memory and postgres checkpointers
- Sends are stored through put_writes, so we don't need to also store them inside checkpoint object
- On reading checkpoint, reconstruct pending_sends from the stored writes
2024-08-27 11:10:18 -07:00
Nuno CamposandGitHub 238b562e78 Merge pull request #1496 from langchain-ai/nc/27aug/update-ruff
Update ruff
2024-08-27 11:06:43 -07:00
Nuno Campos 7fcc0da4e3 Reformat 2024-08-27 11:00:25 -07:00
Nuno Campos d7eff6ab85 Remove abc 2024-08-27 10:52:26 -07:00
Nuno Campos 330c91f622 Update ruff 2024-08-27 10:50:39 -07:00
3dbf6f144e [docs]: structured output from tool calling agent (#1480)
* first draft

* vadym comments

* Update docs/mkdocs.yml

Co-authored-by: Vadym Barda <vadym@langchain.dev>

* vadym comments

* spellign

* more comments

* spelling

* final nits

---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-08-27 10:26:28 -07:00
Nuno Campos 8c2fefcb28 sdk-py: Add values to Thread schema 2024-08-27 08:42:55 -07:00
Vadym BardaandGitHub c88d289a73 checkpoint-postgres: release 1.0.4 (#1493) 2024-08-27 11:34:26 -04:00
Vadym BardaandGitHub d12f5c6d8b checkpoint-postgres: allow passing pool (#1452)
* checkpoint-postgres: allow passing pool

* make psycopg_pool a non-dev dependency

* code review

* lockfile

* move methods

* relax requirements, remove binary

* add binary to dev dependencies

* update readme
2024-08-27 15:30:13 +00:00
9ff54e029e [docs]: conceptual guide for astream_events (#1482)
---------

Co-authored-by: Vadym Barda <vadym@langchain.dev>
2024-08-27 15:18:51 +00:00
Nuno CamposandGitHub 2a89c7a5b4 Merge pull request #1492 from langchain-ai/nc/27aug/all-value-channels-same-checkpoint-get
lib: For all value channels the return value of checkpoint() and get() are the same
2024-08-27 08:15:45 -07:00
Nuno Campos f2ec99b9a8 lib: For all value channels the return value of checkpoint() and get() are the same 2024-08-27 08:10:26 -07:00
Vadym BardaandGitHub eb387cc946 docs: update cloud time travel docs to pass checkpoint_id correctly (#1483) 2024-08-27 13:26:22 +00:00
Vadym BardaandGitHub 54b53f384d sdk-js: release 0.0.8 (#1490) 2024-08-27 09:11:57 -04:00
isaac hershenson 86c047eb31 changes 2024-08-26 18:05:17 -07:00
Nuno CamposandGitHub 65784d8174 Merge pull request #1108 from langchain-ai/vb/update-get-state
langgraph: update get_state to handle nested subgraph state
2024-08-26 17:58:41 -07:00
vbarda 507930e5b7 lint 2024-08-26 19:29:05 -04:00
vbarda 85e698e20b filter on checkpoint NS 2024-08-26 19:26:35 -04:00
vbarda bf4dc5d5f6 Merge branch 'main' into vb/update-get-state 2024-08-26 19:17:26 -04:00
Nuno CamposandGitHub ce0fad8ddb Merge pull request #1484 from langchain-ai/vb/add-checkpoint-id-js-sdk
sdk-js: add checkpoint_id arg to runs create/stream/wait payload
2024-08-26 15:36:03 -07:00
Nuno Campos 1315c0d743 sdk-py0.1.29 2024-08-26 15:27:53 -07:00
vbarda ada751d19b better comment 2024-08-26 18:25:43 -04:00
vbarda f310716921 sdk-js: add checkpoint_id arg to runs create/stream/wait payload 2024-08-26 17:16:06 -04:00
Nuno CamposandGitHub 568044171b Merge pull request #1479 from langchain-ai/nc/26aug/with-config
Override with_config to store config in Pregel instance
2024-08-26 13:22:30 -07:00
Nuno Campos 1d0f3577a7 Catch any type error when reviving saved values 2024-08-26 13:17:19 -07:00
Nuno Campos 3979bdb792 Type as self 2024-08-26 13:14:11 -07:00
Nuno CamposandGitHub d8d663ccd5 Merge pull request #1371 from langchain-ai/wfh/set_entry
Use START
2024-08-26 12:01:51 -07:00
Nuno Campos 25a72e77ef Override with_config to store config in Pregel instance
- This enables eg customizing callbacks/metadata in langgraph cloud deployments
2024-08-26 11:57:57 -07:00
Alexander KovriginandGitHub da806c466d Allow passing ToolNode as tools in create_react_agent (#1451) 2024-08-26 13:47:50 -04:00
Vadym BardaandGitHub 49c316578b langgraph: allow END end key in add_edge with list inputs (#1478) 2024-08-26 12:51:18 -04:00
Nuno CamposandGitHub 7039a54871 Merge pull request #1477 from langchain-ai/nc/26aug/update-docs-constraints
docs: Update langgraph-api/cloud version constraints
2024-08-26 08:34:55 -07:00
Nuno CamposandGitHub ef17e0351a Merge pull request #1457 from langchain-ai/dependabot/npm_and_yarn/libs/sdk-js/micromatch-4.0.8
Bump micromatch from 4.0.7 to 4.0.8 in /libs/sdk-js
2024-08-26 08:25:46 -07:00
Nuno Campos 0d9c0732d4 docs: Update langgraph-api/cloud version constraints 2024-08-26 08:25:24 -07:00
William FHandGitHub a2cfe694f1 Fix import (#1472) 2024-08-25 20:47:05 -07:00
Nuno CamposandGitHub 858c166cae Merge pull request #1463 from langchain-ai/nc/24aug/sdk-on-completion
sdk: Add on_completion param
2024-08-24 21:38:11 -07:00
Nuno Campos 03785c7d83 sdk: Add on_completion param 2024-08-24 21:34:35 -07:00
David DuongandGitHub 93cb2a7730 Merge pull request #1460 from langchain-ai/dqbd/js-api-key
feat(sdk-js): add apiKey property
2024-08-24 19:29:57 +02:00
Tat Dat Duong 4b48e71d2c Bump to 0.0.7 2024-08-24 19:24:39 +02:00
Tat Dat Duong b7744aff9b feat(sdk-js): add apiKey property 2024-08-24 19:24:13 +02:00
Nuno Campos 4a4dd16535 checkpoint 1.0.6 2024-08-23 18:25:56 -07:00
Nuno Campos ef790a57c6 Lint 2024-08-23 18:17:51 -07:00
Nuno Campos c49692d794 checkpoint 1.0.5 2024-08-23 18:15:48 -07:00
Nuno Campos 3cda14b069 lib 0.2.14 2024-08-23 18:15:31 -07:00
Nuno Campos 66a13b8865 Add test for runtime value replacement with pydantic model 2024-08-23 18:15:15 -07:00
Nuno Campos 58e139e7fd Lint 2024-08-23 18:15:04 -07:00
Nuno Campos a8d860273b Skip runtime value replacement when not needed 2024-08-23 18:14:59 -07:00
Nuno Campos 3ac4cdf3d4 Fix pydantic model deserialization 2024-08-23 18:14:40 -07:00
Nuno Campos 3a524e0e56 Fix attributeerror 2024-08-23 17:55:14 -07:00
Andrew NguonlyandGitHub 134f8faf8c Add section about authentication to API reference. (#1458) 2024-08-23 17:14:16 -07:00
vbarda 904a1a3471 extra paranoia 2024-08-23 18:09:10 -04:00
vbarda cb30f68642 remove more reused code 2024-08-23 18:01:35 -04:00
vbarda 15692acef9 refactor to remove nested DB calls 2024-08-23 17:56:28 -04:00
dependabot[bot]andGitHub 610257665f Bump micromatch from 4.0.7 to 4.0.8 in /libs/sdk-js
Bumps [micromatch](https://github.com/micromatch/micromatch) from 4.0.7 to 4.0.8.
- [Release notes](https://github.com/micromatch/micromatch/releases)
- [Changelog](https://github.com/micromatch/micromatch/blob/4.0.8/CHANGELOG.md)
- [Commits](https://github.com/micromatch/micromatch/compare/4.0.7...4.0.8)

---
updated-dependencies:
- dependency-name: micromatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-23 20:36:31 +00:00
Nuno Campos bc482431c3 lib0.2.13 2024-08-23 13:35:21 -07:00
155e0c66d5 docs: add how-to for dynamic interrupts (#1446)
---------

Co-authored-by: vbarda <vadym@langchain.dev>
2024-08-23 20:34:33 +00:00
Nuno CamposandGitHub ca63a06549 Merge pull request #1455 from langchain-ai/nc/23aug/some-magic-for-will
lib: Context values never stored in checkpoints
2024-08-23 13:17:50 -07:00
Nuno Campos e8c553c41e Lint 2024-08-23 13:12:46 -07:00
Nuno Campos beafddf7c8 Lint 2024-08-23 13:09:28 -07:00
1e6da19257 Update libs/langgraph/langgraph/managed/context.py
Co-authored-by: William FH <13333726+hinthornw@users.noreply.github.com>
2024-08-23 13:08:56 -07:00
Nuno Campos e0898409b9 Lint 2024-08-23 12:57:31 -07:00
Nuno Campos bc86757e73 lib: Context values never stored in checkpoints
- Convert Context to a ManagedValue
- Add shim for old Context constructor
- Add `runtime` flag for managed values, which, prior to serialization, replaces the value with a placeholder, and replaces it back with the actual value on resuming from checkpoint
2024-08-23 12:46:31 -07:00
vbarda 71442916e5 lint 2024-08-23 14:52:31 -04:00
vbarda 1f29925034 add max recursion depth 2024-08-23 14:44:42 -04:00
Vadym BardaandGitHub 4c4d7054ab Merge branch 'main' into vb/update-get-state 2024-08-23 14:27:40 -04:00
vbarda 1333d8b478 cleanup 2024-08-23 14:26:54 -04:00
vbarda 2bac0d0f41 re-trigger CI 2024-08-23 13:51:57 -04:00
David DuongandGitHub ed7b2c9e8a Merge pull request #1443 from langchain-ai:dqbd/js-sdk-end-event
fix(sdk-js): support sending end events
2024-08-23 16:48:02 +02:00
Nuno CamposandGitHub 0597aedaff Merge pull request #1448 from langchain-ai/nc/22aug/serde-exceptions
Don't try to serialize exceptions
2024-08-22 21:41:06 -07:00
Nuno Campos 82db383199 Don't try to serialize exceptions
- Store their string repr instead
2024-08-22 21:36:27 -07:00
William FHandGitHub dec7eb6f58 [Docs] Use injected RunnableConfig (#1444)
* Pass via type

* Format
2024-08-22 18:54:42 -07:00
vbarda 065055e587 small change 2024-08-22 20:37:48 -04:00
vbarda 4162be8119 optimize subgraph state lookups 2024-08-22 20:35:08 -04:00
Nuno Campos 6ece7124ed Fix param name in docstring 2024-08-22 17:21:01 -07:00
Nuno CamposandGitHub ffa9b8672a Merge pull request #1445 from langchain-ai/nc/22aug/sdk-on-disconnect
sdk: Add on_disconnect arg to create/wait streaming run
2024-08-22 17:06:24 -07:00
Nuno Campos 19b382335f sdk: Add on_disconnect arg to create/wait streaming run 2024-08-22 17:03:11 -07:00
Tat Dat Duong c72acc9145 Add missing status 2024-08-23 01:38:53 +02:00
Nuno CamposandGitHub c30aa1ca13 Merge pull request #1337 from langchain-ai/nc/13aug/sdk-py-join-stream
sdk-py: Add Runs.join_stream endpoint
2024-08-22 15:38:23 -07:00
Nuno Campos 15c3105748 cli0.1.51 2024-08-22 15:37:02 -07:00
Tat Dat Duong 0b7f451b40 Bump to 0.0.6 2024-08-23 00:18:28 +02:00
Tat Dat Duong 75dec9b924 fix(sdk-js): support sending end events 2024-08-23 00:18:06 +02:00
Vadym BardaandGitHub 8090ca67c5 checkpoint-postgres: pass row_factory in cursor (#1433) 2024-08-22 17:39:21 -04:00
vbarda 9f6e57d2a7 more code review 2024-08-22 17:37:46 -04:00
vbarda 72893d9abb code review 2024-08-22 17:33:17 -04:00
Nuno CamposandGitHub 7074604204 Try to improve async stack traces for exceptions in tasks (#1442)
* Try to improve async stack traces for exceptions in tasks

* Lint
2024-08-22 21:23:48 +00:00
Nuno CamposandGitHub 0720b931e8 Merge pull request #1441 from langchain-ai/nc/22aug/test-checkpointers
Test all checkpointers everywhere we test 1 of them
2024-08-22 14:14:49 -07:00
vbarda 4935cf52bf lint 2024-08-22 16:52:16 -04:00
Nuno Campos 45e3d1a3f1 Test all checkpointers everywhere we test 1 of them 2024-08-22 13:51:38 -07:00
vbarda acd8acf237 lint 2024-08-22 16:47:12 -04:00
Nuno Campos 3ec419a2f6 lib0.2.12 2024-08-22 12:45:27 -07:00
Nuno Campos 8a00a0026e checkpoint1.0.4 2024-08-22 12:45:20 -07:00
Nuno CamposandGitHub 7e32de9405 Remove current_tasks from checkpoint interface (#1440)
* Remove current_tasks from checkpoint interface

- Not used, now clear that it can be supported with put_writes(SCHEDULE)

* Add comment
2024-08-22 19:44:26 +00:00
Nuno CamposandGitHub 96af4c72ce Merge pull request #1439 from langchain-ai/nc/22aug/rm-unused-when-values
Remove unused when values for Interrupt
2024-08-22 12:38:28 -07:00
vbarda 6c7d9c35bc remove interrupts 2024-08-22 15:37:20 -04:00
vbarda 5654d8fc86 Merge branch 'main' into vb/update-get-state 2024-08-22 15:34:14 -04:00
Nuno Campos f93512e3b3 Remove unused when values for Interrupt 2024-08-22 12:33:25 -07:00
Nuno CamposandGitHub a261e1a497 Fix semantics of put_writes/list (#1436)
* Fix semantics of put_writes/list

- put_writes(error) should not prevent saving future successful if task is retried successfully
- put_writes(writes) should be a no-op if non-error writes already exist for that task (this prevents tasks executed more than once from modifying writes previously saved / acted on)
- checkpoints should not include channel default values (ie those without a version)
- list() should fetch and return writes for each checkpoint

* Lint

* Rm print

* Fix import

* Lint
2024-08-22 19:04:42 +00:00
38daba5259 Better error messages for invalid update in all channel types (#1437)
* langgraph: support multiple edges for Topic channel annotations

* remove support_multiple_edges

* Better error messages for invalid update in all channel types

---------

Co-authored-by: vbarda <vadym@langchain.dev>
2024-08-22 18:59:29 +00:00
Vadym BardaandGitHub 078f9f7275 docs: fix manage conversation history how-to (#1438) 2024-08-22 14:56:34 -04:00
gbaian10andGitHub 22f5367af7 langgraph: fix add_node input schema error (#1332) 2024-08-22 12:32:21 -04:00
Hassan MemonandGitHub 4e2b508ebb docs: remove extra line from generate function (#1392) 2024-08-22 12:27:23 -04:00
Vadym BardaandGitHub 7ec3c0e827 langgraph: release 0.2.11 (#1432) 2024-08-22 11:54:47 -04:00
Nuno CamposandGitHub 82408bacf1 Merge pull request #1431 from langchain-ai/vb/fix-get-state-bug
langgraph: check for empty checkpoint when creating snapshot tasks
2024-08-22 08:52:00 -07:00
vbarda 9a306ce931 langgraph: check for empty checkpoint when creating snapshot tasks 2024-08-22 11:47:36 -04:00
Harrison ChaseandGitHub a9a59dd4e4 fix notebook (#1422) 2024-08-22 09:29:23 -04:00
Nuno Campos a545a70afb lib0.2.10 2024-08-21 16:33:30 -07:00
Nuno CamposandGitHub 4521f9312d Merge pull request #1420 from langchain-ai/nc/21aug/debug-mode-interrupts-errors
Add interrupts and errors to debug stream mode
2024-08-21 16:31:58 -07:00
Nuno Campos d67419522d Remove error 2024-08-21 16:27:23 -07:00
Nuno Campos d85e267a83 Add interrupts and errors to debug stream mode
- move remaining output code from Pregel.stream to PregelLoop
2024-08-21 16:23:48 -07:00
Vadym BardaandGitHub 426125cf96 Merge branch 'main' into vb/update-get-state 2024-08-21 19:20:20 -04:00
Nuno CamposandGitHub 4827377191 Merge pull request #1419 from langchain-ai/nc/21aug/cli-redis
cli: Add redis container to `langgraph up`
2024-08-21 16:19:09 -07:00
vbarda 0b6088f913 remove futures.clear 2024-08-21 18:26:54 -04:00
vbarda 578ec48031 Merge branch 'main' into vb/update-get-state 2024-08-21 18:21:28 -04:00
vbarda e7bc74e918 remove refactors 2024-08-21 18:06:18 -04:00
vbarda 0a87b9fa1c update more tests 2024-08-21 17:49:51 -04:00
Nuno Campos 37848a5361 cli: Add redis container to langgraph up 2024-08-21 14:37:36 -07:00
Nuno Campos 9147d05cc4 lib0.2.9 2024-08-21 14:32:15 -07:00
Nuno CamposandGitHub 46171dd759 Merge pull request #1418 from langchain-ai/nc/21aug/fix-pending-interrupt-run
Fix pending run when interrupt exception is used
2024-08-21 14:29:59 -07:00
Nuno Campos 47ed3d97e9 Fix pending run when interrupt exception is used 2024-08-21 14:25:00 -07:00
Nuno CamposandGitHub 06c2481783 Merge pull request #1415 from langchain-ai/nc/21aug/loop-rm-pregel-arg
Remove graph arg to PregelLoop
2024-08-21 14:24:40 -07:00
Vadym BardaandGitHub 1907646bd4 sdk-py: release 0.1.28 (#1417) 2024-08-21 17:10:18 -04:00
Vadym BardaandGitHub 3a65f83ae1 sdk-py: allow passing custom headers (#1416) 2024-08-21 21:05:03 +00:00
Nuno CamposandGitHub 57811a6bfd Merge pull request #1414 from langchain-ai/nc/21aug/combine-managers
Combine channel and managed values manager
2024-08-21 13:49:15 -07:00
Nuno Campos 02697b5712 Remove graph arg to PregelLoop 2024-08-21 13:45:42 -07:00
Nuno Campos e76f4cc434 Combine channel and managed values manager 2024-08-21 13:30:18 -07:00
vbarda f51e7ea9a4 pass pending writes in checkpointers 2024-08-21 15:38:30 -04:00
Nuno Campos 14ec51601c lib0.2.8 2024-08-21 12:09:11 -07:00
Nuno CamposandGitHub 14976d4c56 Interrupts shouldn't be retried (#1413)
* Interrupts shouldn't be retried

* Add async test

* Lint
2024-08-21 12:08:58 -07:00
vbarda a94168af7f Merge branch 'main' into vb/update-get-state 2024-08-21 15:07:52 -04:00
Nuno Campos 2f41b2891b lib0.2.7 2024-08-21 11:33:54 -07:00
Nuno CamposandGitHub c857a77dd1 Merge pull request #1352 from langchain-ai/nc/14aug/scoped-value
Add SharedValue
2024-08-21 11:33:18 -07:00
Nuno Campos 5fb2c2c6f8 Lint 2024-08-21 11:27:04 -07:00
Nuno Campos 4250ff92b8 Fix 2024-08-21 11:25:37 -07:00
Nuno Campos 7fd4a9ed30 Lint 2024-08-21 10:48:52 -07:00
Nuno Campos 2106b5e4a6 Lint 2024-08-21 10:48:04 -07:00
Nuno Campos 1af0367b34 Add error message 2024-08-21 09:41:53 -07:00
Nuno Campos f037a2e9cb Update docstring 2024-08-21 09:39:58 -07:00
Nuno Campos aa1a6be160 Rename more 2024-08-21 09:36:21 -07:00
Nuno Campos c9e6ee6da7 Rename 2024-08-21 09:34:12 -07:00
Nuno Campos bd7b9cca21 WIP 2024-08-21 09:30:47 -07:00
Nuno Campos b228fc1a9b Add serde 2024-08-21 09:30:34 -07:00
Nuno Campos c3794f1fd3 Use batched async kv inside loop 2024-08-21 09:30:22 -07:00
Nuno Campos 4e1db854f6 Add async test 2024-08-21 09:30:22 -07:00
Nuno Campos 630d9c79ed Split out async batch to sep file 2024-08-21 09:30:22 -07:00
Nuno Campos 8f8f3849fc Lint 2024-08-21 09:30:22 -07:00
Nuno Campos 656f89e16a Lint 2024-08-21 09:30:22 -07:00
Nuno Campos 9b90a24d94 Lint 2024-08-21 09:30:22 -07:00
Nuno Campos 77d7deb033 Rename 2024-08-21 09:30:22 -07:00
Nuno Campos 7ca37afc74 Fix 2024-08-21 09:30:21 -07:00
Nuno Campos 2bc0e2df42 Fix 2024-08-21 09:30:21 -07:00
Nuno Campos 1dc09dc45f Remove warning on write to managed channel 2024-08-21 09:30:21 -07:00
Nuno Campos 1cc02825ea Add ScopedValue
- state shared between threads
2024-08-21 09:30:21 -07:00
Nuno Campos d1b7a787ee lib0.2.6 2024-08-21 09:22:27 -07:00
Nuno CamposandGitHub f8b053a286 Enable raising Interrupt from inside a node, add list of current interrupts to get_state (#1354)
* Enable raising Interrupt from inside a node, add list of current interrupts to get_state

* Lint

* Allow multiple interrupt values in exception

* Better typings

* Fix some tests

* Fix up

* Lint

* Add test

* Lint

* WIP stay=True

* Fix tests for get_state

* Remove ids

* Fix step count

* 999

* less fun

* Undo

* Update debug interface

* Remove ability to pass multiple values

* Undo
2024-08-21 16:19:15 +00:00
David DuongandGitHub ebf060675d feat(js-sdk): add config and parent_config to thread state schema (#1411)
* feat(js-sdk): add config and parent_config to thread state schema

* Bump to 0.0.5
2024-08-21 17:00:10 +02:00
Nuno Campos 3d33b575d6 0.2.5 2024-08-20 16:59:04 -07:00
vbarda a161a9ca97 more explicit naming 2024-08-20 15:44:16 -04:00
vbarda 422ed92aef sdk-py: add sync client 2024-08-20 15:42:43 -04:00
Vadym BardaandGitHub 314488b5c5 ci: run full test suite on all changes (#1397) 2024-08-20 08:47:12 -04:00
Nuno CamposandGitHub 6e4dc26890 Merge pull request #1396 from langchain-ai/nc/19aug/fix-args
postgres: Fix args to put_writes
2024-08-19 15:57:44 -07:00
Nuno Campos 9cfb4b01c8 postgres: Fix args to put_writes 2024-08-19 15:54:49 -07:00
Nuno CamposandGitHub e7d2621a05 Merge pull request #1395 from langchain-ai/nc/19aug/put-writes-idempotent
checkpoint-*: In put_writes clear any previously saved writes for this task_id
2024-08-19 15:48:40 -07:00
Nuno Campos c0c534cbe3 Add pipeline arg 2024-08-19 15:44:22 -07:00
Nuno Campos 7aaeedd7ba checkpoint-*: In put_writes clear any previously saved writes for this task_id
- Previously implementations were clearing only tasks if the index matched a previously saved one, which isn't enough to guarantee idempotency
2024-08-19 15:40:04 -07:00
Nuno CamposandGitHub e15d56c2f2 Merge pull request #1390 from langchain-ai/nc/19aug/add-xray-test
Add xray test for issue #593
2024-08-19 12:09:51 -07:00
Nuno Campos 8a7c6b4fa7 Add xray test 2024-08-19 12:05:36 -07:00
Nuno CamposandGitHub 2e073473dc Merge pull request #1389 from langchain-ai/nc/19aug/fix-ready-signal
cli: Fix ready signal
2024-08-19 08:26:14 -07:00
Nuno Campos 31dcd15927 cli: Fix ready signal 2024-08-19 07:52:00 -07:00
William Fu-Hinthorn 1bd40b2ebf Do markdown 2024-08-16 15:45:56 -07:00
William Fu-Hinthorn b5429b6342 Use START 2024-08-16 15:43:24 -07:00
Nuno CamposandGitHub fc95028738 Merge pull request #1370 from langchain-ai/nc/16aug/checkpoint-errors
Checkpoint errors in pending_writes, expose under StateSnapshot.tasks
2024-08-16 13:15:40 -07:00
Nuno Campos e916cab08f Checkpoint errors in pending_writes, expose under StateSnapshot.tasks
- Save errors produced by tasks, under pending_writes
- Re-work logic to cancel other tasks when one fails, ready to change for interrupt exception
- Update serializer to handle exceptions
- Update get_state/get_state_history with new return value property "tasks" which contains a richer description of the next tasks, currently with id, name and error (if already ran and errored)
2024-08-16 13:11:27 -07:00
Vadym BardaandGitHub e4f1f90127 update pyproject in monorepo to reflect consistent min python version (#1369) 2024-08-16 15:41:56 +00:00
Nuno Campos a16a33806c lib0.2.4 2024-08-15 15:37:51 -07:00
Nuno CamposandGitHub 007f419bdc Merge pull request #1363 from Glavin001/patch-1
Include exception traceback in run_with_retry logging
2024-08-15 15:37:01 -07:00
Isaac FranciscoandGitHub 5bee9e92b5 [docs]: add studio desktop callout (#1361) 2024-08-15 22:35:04 +00:00
Nuno Campos 6a68581a9f Lint 2024-08-15 15:32:48 -07:00
Nuno Campos 78781b0a90 Use exc_info 2024-08-15 15:23:54 -07:00
Glavin WiechertandGitHub d15c5a46de Include exception traceback in run_with_retry logging 2024-08-15 18:29:05 -03:00
Isaac FranciscoandGitHub ce37fd3a04 [docs]: studio faqs (#1207)
* draft

* spelling

* rephrases

* vadym comments
2024-08-15 11:56:00 -07:00
Isaac FranciscoandGitHub 64636ee978 [docs]: add auth and small changes (#1356)
* wip

* m

* nit
2024-08-15 18:25:53 +00:00
Isaac FranciscoandGitHub 388a9643a5 [docs]: copying threads (#1350)
* wip

* wip

* wip

* vadym comments
2024-08-15 11:19:18 -07:00
Nuno CamposandGitHub c9f4b5aede Merge pull request #1360 from langchain-ai/nc/14auug/debug-checkpoint-full
Add missing attributes to checkpoint event in debug output
2024-08-15 10:26:27 -07:00
Nuno CamposandGitHub 855139d869 Merge pull request #1299 from langchain-ai/dependabot/pip/libs/langgraph/aiohttp-3.10.2
build(deps-dev): bump aiohttp from 3.9.5 to 3.10.2 in /libs/langgraph
2024-08-15 10:20:16 -07:00
Nuno Campos d07cbd34ce checkpoint1.0.3 2024-08-15 10:19:50 -07:00
Nuno Campos c701fef634 Lint 2024-08-15 09:40:53 -07:00
Nuno Campos 2c8fc3c9c6 Add missing attributes to checkpoint event in debug output 2024-08-15 09:30:29 -07:00
vbarda 45054df71a remove include_subgraph_state kwarg 2024-08-14 21:07:56 -04:00
Isaac FranciscoandGitHub 8ad797e261 fix (#1353) 2024-08-14 17:16:00 -07:00
Nuno CamposandGitHub 2dbfc8aca3 Merge pull request #1344 from langchain-ai/nc/14aug/ignore-serialized-values-missing-constructor
checkpoint: Ignore serialized values when constructor no longer available
2024-08-14 14:43:57 -07:00
vbarda 7fa97898aa correctly propagate all subgraph attributes 2024-08-14 16:15:08 -04:00
Isaac FranciscoandGitHub 3b2d5f02e1 [docs]: cloud how to for checking thread status (#1346)
* draft

* nit

* harrison comments

* spelling
2024-08-14 11:56:43 -07:00
Isaac FranciscoandGitHub 34fd833b04 [docs]: purge message graph (#1330)
* purge message graph

* docstrings

* use with dicts
2024-08-14 11:16:38 -07:00
vbarda 6531ec7669 remove inherit checkpointer 2024-08-14 14:14:06 -04:00
Nuno Campos 728b283063 checkpoint: Ignore serialized values when constructor no longer available 2024-08-14 10:59:14 -07:00
Isaac FranciscoandGitHub a3dd43b39b x (#1343) 2024-08-14 16:32:49 +00:00
Isaac FranciscoandGitHub 41a6eb7cf4 [docs]: add CURL commands to some how-tos (#1325) 2024-08-14 12:31:24 -04:00
vbarda 409b915a3f code review 2024-08-14 12:10:07 -04:00
Isaac FranciscoandGitHub c04133b1df [docs]: cloud hil review tool calls (#1334)
* hil review tool calls

* interrupt note
2024-08-14 08:03:15 -07:00
Hassan MemonandGitHub d1450a463e Improved description for chatbot node function (#1339)
Updated the documentation to describe the chatbot node function's return value in a more Pythonic and enthusiastic way. The description now emphasizes that the function returns a dictionary with the updated messages list neatly tucked under the messages key.
2024-08-14 14:12:37 +00:00
Hassan MemonandGitHub 8daeb56194 Fix typo in documentation: corrected 'they agent's' to 'their agent's' (#1338) 2024-08-14 10:08:26 -04:00
Nuno Campos 3b56cdf524 Add Runs.join_stream endpoint 2024-08-13 17:35:31 -07:00
vbarda d9618880a3 update logic for latest snapshot's subgraph snapshots 2024-08-13 20:13:13 -04:00
Nuno CamposandGitHub aa1b94166c Merge pull request #1329 from langchain-ai/nc/13aug/config-checkpoint-passthrough
Passthrough checkpoint in config even when current sub-graph didn't choose to use it
2024-08-13 16:49:12 -07:00
Isaac FranciscoandGitHub 307ae4cf66 link fixes (#1336) 2024-08-13 23:11:01 +00:00
Vadym BardaandGitHub 392891f5fc Merge branch 'main' into vb/update-get-state 2024-08-13 18:20:32 -04:00
vbarda 58887a5a3b checkpoints/interrupts for subgraphs triggered by sends 2024-08-13 18:15:57 -04:00
gbaian10andGitHub 0a25e865b9 docs: fix persistence_postgres.ipynb (#1328)
* docs: fix DB_URI port
* docs: remove unuse import
2024-08-13 16:06:13 -04:00
Nuno Campos a01c1c2bfa Passthrough checkpoint in config even when current sub-graph didn't choose to use it 2024-08-13 10:27:48 -07:00
vbarda 3295274711 fix empty snapshot 2024-08-13 10:23:53 -04:00
vbarda 0135c6f743 correct check for using parent checkpointer 2024-08-13 10:07:52 -04:00
Nuno CamposandGitHub e2a72bf511 Merge pull request #1311 from langchain-ai/nc/11aug/serde-more
checkpoint: Add support for serializing more python types
2024-08-12 17:54:07 -07:00
Vadym BardaandGitHub 519b3b9ce1 docs: add async python<=3.10 warning to streaming concepts (#1324)
* docs: add async python<=3.10 warning to streaming concepts
2024-08-13 00:48:20 +00:00
Vadym BardaandGitHub 0456f52195 Merge branch 'main' into vb/update-get-state 2024-08-12 20:30:56 -04:00
vbarda b5caf1ad3f Merge branch 'vb/update-get-state' of github.com:langchain-ai/langgraph into vb/update-get-state 2024-08-12 20:29:15 -04:00
vbarda f65d9b2b7d pass subgraph nodes/channels 2024-08-12 20:29:09 -04:00
Lenni JustenandGitHub 408676913c Remove extra bullet from index.md (#1149) 2024-08-12 17:21:32 -04:00
Vadym BardaandGitHub 21c842baf6 docs: update streaming example (#1321)
* docs: update streaming example
2024-08-12 21:11:07 +00:00
Vadym BardaandGitHub a03886b9e4 Merge branch 'main' into vb/update-get-state 2024-08-12 16:53:18 -04:00
Lance MartinandGitHub f7bda4c940 Minor clarifications on Memory in docs (#1301)
* Minor clarifications on Memory in docs

* Address comments
2024-08-12 13:42:57 -07:00
vbarda abe9b7c08e lint 2024-08-12 16:32:22 -04:00
vbarda 6d4cdc9456 opt-in 2024-08-12 16:29:15 -04:00
vbarda 5033044587 update checkpointer tests 2024-08-12 16:22:27 -04:00
vbarda 246dd0f8c0 Merge branch 'vb/update-get-state' of github.com:langchain-ai/langgraph into vb/update-get-state 2024-08-12 15:52:33 -04:00
vbarda fb05bdc2bf return all checkpoints from .list 2024-08-12 15:52:17 -04:00
vbarda 9948125745 add checkpointer=INHERIT_CHECKPOINTER 2024-08-12 14:27:50 -04:00
gbaian10andGitHub b8233ded23 docs: fix filter_messages error in manage-conversation-history.ipynb (#1315)
fix: #1314
2024-08-12 14:16:59 -04:00
Vadym BardaandGitHub 6a22b7c26f docs: update async connection pool example in postgres how-to (#1318) 2024-08-12 13:24:59 -04:00
vbarda 322cfc46d3 cleanup 2024-08-12 12:43:28 -04:00
vbarda c9d6a41d75 Merge branch 'main' into vb/update-get-state 2024-08-12 10:26:56 -04:00
Nuno Campos a64c0a2679 Add pathlib.Path and re.Pattern 2024-08-11 19:40:11 -07:00
Nuno Campos fdc5aece52 Add Decimal 2024-08-11 19:34:22 -07:00
Nuno Campos 685db62029 checkpoint: Add support for serializing more python types
- all ip interfaces
- deque,
- ZoneInfo
- date
- time
2024-08-11 19:27:29 -07:00
Nuno CamposandGitHub 4e643baaa6 Merge pull request #1309 from langchain-ai/nc/11aug/skip-context-get-state
Skip initializing Context channels when calling get_state/get_state_history
2024-08-11 10:56:54 -07:00
Nuno Campos 9634468260 Skip initializing Context channels when calling get_state/get_state_history 2024-08-11 10:47:19 -07:00
Isaac FranciscoandGitHub 00c1b6a2b0 callouts (#1269) 2024-08-09 16:43:03 -07:00
dependabot[bot]andGitHub b45273d112 build(deps-dev): bump aiohttp from 3.9.5 to 3.10.2 in /libs/langgraph
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.9.5 to 3.10.2.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.9.5...v3.10.2)

---
updated-dependencies:
- dependency-name: aiohttp
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-09 18:26:13 +00:00
350adae672 hil concepts (#1298)
* hil concepts

* spelling

---------

Co-authored-by: isaac hershenson <ihershenson@hmc.edu>
2024-08-09 10:59:04 -07:00
Isaac FranciscoandGitHub bdb3832985 [docs]: changing setup docs (#1285)
* wip

* draft
2024-08-09 10:07:39 -07:00
Vadym BardaandGitHub 1fc8718352 docs: update how-to for mongodb (#1297)
* docs: update how-to for mongodb
2024-08-09 16:34:11 +00:00
Vadym BardaandGitHub d98eec6e91 checkpoint-postgres: vbump & add a note to readme (#1295) 2024-08-09 09:42:53 -04:00
Vadym BardaandGitHub 659586947d checkpoint-postgres: fix setup for AsyncPostgresSaver (#1294) 2024-08-09 13:39:30 +00:00
Vadym BardaandGitHub c303ef2a2b docs: update redis how-to (#1286) 2024-08-09 02:06:28 +00:00
ff92beb88a review tool calls (#1283)
* review tool calls

* spelling

* link

* link

---------

Co-authored-by: isaac hershenson <ihershenson@hmc.edu>
2024-08-08 18:02:02 -07:00
isaac hershenson eee91d2129 wip 2024-08-08 15:29:40 -07:00
Jacob LeeandGitHub dce73fde66 Clarify send API docstring (#1280) 2024-08-08 12:59:23 -07:00
Vadym BardaandGitHub da6462e608 langgraph: release 0.2.3 (#1279) 2024-08-08 12:43:24 -04:00
Vadym BardaandGitHub 49bf8f6816 checkpoint-postgres: release 1.0.2 (#1278) 2024-08-08 12:42:06 -04:00
Vadym BardaandGitHub 71ce07d971 checkpoint: update docstrings for checkpoint libraries (#1277) 2024-08-08 16:26:16 +00:00
Vadym BardaandGitHub a16f86b5bd docs: update postgres persistence example (#1276) 2024-08-08 12:01:19 -04:00
Vadym BardaandGitHub 4dc27b98f1 langgraph, checkpoint-postgres: propagate new versions in update_state (#1270)
* langgraph, checkpoint-postgres: propagate new versions in update_state
2024-08-08 11:55:55 -04:00
Isaac FranciscoandGitHub be8476d981 added context (#1242) 2024-08-08 11:24:52 -04:00
Vadym BardaandGitHub cd92f19858 docs (examples): replace SqliteSaver with MemorySaver (#1271) 2024-08-08 10:30:43 -04:00
a2f4d57bf2 langgraph: more checkpointer tests (#1263)
* langgraph: more checkpointer tests

* more tests

* lint

* update tests

---------

Co-authored-by: Nuno Campos <nuno@langchain.dev>
2024-08-08 00:45:46 +00:00
Nuno CamposandGitHub f9fa35ed82 Merge pull request #1267 from langchain-ai/vb/update-empty-channels
checkpoint-postgres: set unset channel values to empty in blobs
2024-08-07 17:40:58 -07:00
Vadym BardaandGitHub 3b87a81c70 Merge branch 'main' into vb/update-empty-channels 2024-08-07 20:18:10 -04:00
Nuno CamposandGitHub 002b260e7a Various small changes (#1268) 2024-08-07 20:17:47 -04:00
vbarda 659c9881cf cleanup 2024-08-07 19:54:45 -04:00
vbarda b535d38393 test 2024-08-07 19:53:41 -04:00
vbarda d33807b5ea checkpoint-postgres: remove unset channel values from blobs 2024-08-07 17:31:07 -04:00
Nuno Campos 9650f0d41d postgres1.0.1 2024-08-07 12:15:40 -07:00
Nuno Campos 127b6dedee lib0.2.2 2024-08-07 12:14:34 -07:00
Nuno CamposandGitHub db5a6c569a Merge pull request #1265 from langchain-ai/nc/7aug/stream-nodes-wout-writes
Include in stream output all nodes ran, even if they returned no writes to state keys
2024-08-07 12:11:58 -07:00
Nuno CamposandGitHub b47ab6c30a Merge pull request #1264 from langchain-ai/nc/7aug/fix-tests
fix test setup for checkpointers
2024-08-07 12:08:22 -07:00
Nuno Campos 281c97b9e5 Include in stream output all nodes ran, even if they returned no writes to state keys
- This also includes these nodes in checkpoint.metadata.writes
2024-08-07 12:05:45 -07:00
Nuno Campos cb21a3547e Skip async postgres tests in 3.9 2024-08-07 12:04:11 -07:00
Nuno Campos 6028eb02c9 Lint 2024-08-07 11:49:46 -07:00
Nuno Campos 712d52ad3b fix test setup for checkpointers 2024-08-07 11:39:14 -07:00
Nuno CamposandGitHub 6078c408c3 Raise exception for reducers w wrong signature (#1261) 2024-08-07 17:48:07 +00:00
Nuno CamposandGitHub 9caeeaeeec Merge pull request #1258 from langchain-ai/nc/7aug/postgres-dont-sync-too-much
postgres: Avoid syncing pipeline unless actually needed
2024-08-07 09:43:52 -07:00
Nuno Campos 2bd9eb4298 postgres: Avoid syncing pipeline unless actually needed 2024-08-07 09:40:18 -07:00
Nuno CamposandGitHub 4c2542aac6 Merge pull request #1257 from langchain-ai/nc/7aug/postgres-migrations
postgres: Add migration tracking
2024-08-07 09:33:10 -07:00
vbarda 54da68cfe7 remove flag 2024-08-07 12:25:34 -04:00
vbarda 51b62ca0bd remove setup 2024-08-07 12:23:00 -04:00
Vadym BardaandGitHub ca4b65e1a6 checkpoint-postgres: use correct metadata serialization (#1255) 2024-08-07 12:13:44 -04:00
Nuno Campos 1e237bf33a postgres: Add migration tracking 2024-08-07 08:54:08 -07:00
Vadym BardaandGitHub fb8390e138 langgraph: release 0.2.1 (#1250) 2024-08-07 09:55:50 -04:00
Vadym BardaandGitHub 5cab47f751 checkpoint: move memory into a directory to fix namespace import issues (#1249) 2024-08-07 09:41:06 -04:00
Vadym BardaandGitHub 56bf9c9047 Merge branch 'main' into vb/update-get-state 2024-07-24 14:03:10 -04:00
vbarda a7d48465da use .list for looking up prefix-matched checkpoints 2024-07-24 13:45:48 -04:00
vbarda 6ae2c6c7b9 Merge branch 'main' into vb/update-get-state 2024-07-24 11:18:10 -04:00
vbarda ae696d4f30 add sync history 2024-07-23 21:40:04 -04:00
vbarda b43ef6440f tests 2024-07-23 20:59:10 -04:00
vbarda e615aabf14 cleanup names + make subgraph state optional 2024-07-23 20:28:23 -04:00
vbarda 92ae8f4817 async methods 2024-07-23 19:51:44 -04:00
vbarda 2268802908 Merge branch 'main' into vb/update-get-state 2024-07-23 18:51:36 -04:00
vbarda 261cdf88a5 langgraph: update get_state to handle nested subgraph state 2024-07-23 18:35:49 -04:00
648 changed files with 127093 additions and 98878 deletions
+6
View File
@@ -0,0 +1,6 @@
# Contributing to LangGraph
Hi there! Thank you for even being interested in contributing to LangGraph.
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether they involve new features, improved infrastructure, better documentation, or bug fixes.
To learn how to contribute to LangGraph, please follow the [contribution guide here](https://docs.langchain.com/oss/python/contributing).
+18 -50
View File
@@ -1,41 +1,34 @@
name: "\U0001F41B Bug Report"
description: Report a bug in LangGraph. To report a security issue, please instead use the security option below. For questions, please use the GitHub Discussions.
labels: ["02 Bug Report"]
description: Report a bug in LangGraph. To report a security issue, please instead use the security option below. For questions, please use the LangChain Forum at forum.langchain.com.
labels: [pending, bug]
body:
- type: markdown
attributes:
value: >
value: |
Thank you for taking the time to file a bug report.
Use this to report bugs in LangChain.
If you're not certain that your issue is due to a bug in LangChain, please use [GitHub Discussions](https://github.com/langchain-ai/langchain/discussions)
to ask for help with your issue.
Use this to report BUGS in LangGraph. For usage questions, feature requests and general design questions, please use the [LangChain Forum](https://forum.langchain.com/).
Relevant links to check before filing a bug report to see if your issue has already been reported, fixed or
if there's another way to solve your problem:
[LangGraph documentation](https://langchain-ai.github.io/langgraph/).
[LangChain documentation with the integrated search](https://python.langchain.com/docs/get_started/introduction),
[GitHub search](https://github.com/langchain-ai/langgraph),
[LangChain Github Discussions](https://github.com/langchain-ai/langgraph/discussions),
[LangChain Github Issues](https://github.com/langchain-ai/langgraph/issues),
[LangChain ChatBot](https://chat.langchain.com/)
* [LangChain Forum](https://forum.langchain.com/),
* [LangGraph Github Issues](https://github.com/langchain-ai/langgraph/issues),
* [LangChain documentation with the integrated search](https://docs.langchain.com/),
* [GitHub search](https://github.com/langchain-ai/langgraph),
- type: checkboxes
id: checks
attributes:
label: Checked other resources
description: Please confirm and check all the following options.
description: Before submitting this issue, please confirm that you have completed all the steps below by checking each option. These steps help ensure your issue is well-defined, relevant, and actionable.
options:
- label: I added a very descriptive title to this issue.
- label: This is a bug, not a usage question. For questions, please use the LangChain Forum (https://forum.langchain.com/).
required: true
- label: I searched the [LangGraph](https://langchain-ai.github.io/langgraph/)/LangChain documentation with the integrated search.
- label: I added a clear and detailed title that summarizes the issue.
required: true
- label: I used the GitHub search to find a similar question and didn't find it.
- label: I read what a minimal reproducible example is (https://stackoverflow.com/help/minimal-reproducible-example).
required: true
- label: I am sure that this is a bug in LangGraph/LangChain rather than my code.
required: true
- label: I am sure this is better as an issue [rather than a GitHub discussion](https://github.com/langchain-ai/langgraph/discussions/new/choose), since this is a LangGraph bug and not a design question.
- label: I included a self-contained, minimal example that demonstrates the issue INCLUDING all the relevant imports. The code run AS IS to reproduce the issue.
required: true
- type: textarea
id: reproduction
@@ -44,15 +37,7 @@ body:
attributes:
label: Example Code
description: |
Please add a self-contained, [minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example) with your use case.
If a maintainer can copy it, run it, and see it right away, there's a much higher chance that you'll be able to get help.
**Important!**
* Reduce your code to the minimum required to reproduce the issue if possible. This makes it much easier for others to help you.
* Avoid screenshots when possible, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.
Please add a self-contained, [minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example) with your use case. Replace this code with your own!
placeholder: |
from langgraph.graph import StateGraph
@@ -92,25 +77,8 @@ body:
attributes:
label: System Info
description: |
Please share your system info with us.
"pip freeze | grep langchain"
platform (windows / linux / mac)
python version
OR if you're on a recent version of langchain-core you can paste the output of:
python -m langchain_core.sys_info
Run on your machine: `python -m langchain_core.sys_info`
placeholder: |
"pip freeze | grep langgraph"
platform
python version
Alternatively, if you're on a recent version of langchain-core you can paste the output of:
python -m langchain_core.sys_info
These will only surface LangChain packages, don't forget to include any other relevant
packages you're using (if you're not sure what's relevant, you can paste the entire output of `pip freeze`).
validations:
required: true
+6 -12
View File
@@ -1,15 +1,9 @@
blank_issues_enabled: false
version: 2.1
contact_links:
- name: 🤔 Question or Problem
about: Ask a question or ask about a problem in GitHub Discussions.
url: https://github.com/langchain-ai/langgraph/discussions/categories/q-a
- name: Feature Request
url: https://github.com/langchain-ai/langgraph/discussions/categories/ideas
about: Suggest a feature or an idea
- name: Show and tell
about: Show what you built with LangChain
url: https://github.com/langchain-ai/langgraph/discussions/categories/show-and-tell
- name: Slack
url: https://www.langchain.com/join-community
about: General community discussions
- name: Documentation
url: https://github.com/langchain-ai/docs/issues/new?template=langgraph.yml
about: Report an issue related to the LangGraph documentation
- name: LangChain Forum
url: https://forum.langchain.com/
about: General community discussions and support
-19
View File
@@ -1,19 +0,0 @@
name: Documentation
description: Report an issue related to the LangGraph documentation.
title: "DOC: <Please write a comprehensive title after the 'DOC: ' prefix>"
labels: [03 - Documentation]
body:
- type: textarea
attributes:
label: "Issue with current documentation:"
description: >
Please make sure to leave a reference to the document/code you're
referring to.
- type: textarea
attributes:
label: "Idea or request for content:"
description: >
Please describe as clearly as possible what topics you think are missing
from the current documentation.
+12 -8
View File
@@ -1,25 +1,29 @@
name: 🔒 Privileged
description: You are a LangChain maintainer, or was asked directly by a maintainer to create an issue here. If not, check the other options.
description: You are a LangGraph maintainer, or was asked directly by a maintainer to create an issue here. If not, check the other options.
body:
- type: markdown
attributes:
value: |
Thanks for your interest in LangChain! 🚀
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.
You are a LangChain maintainer if you maintain any of the packages inside of the LangChain repository
or are a regular contributor to LangChain with previous merged merged pull requests.
Thanks for your interest in LangGraph! 🚀
If you are not a LangGraph maintainer or were not asked directly by a maintainer to create an issue, then please start the conversation on the [LangChain Forum](https://forum.langchain.com/) instead.
You are a LangGraph maintainer if you maintain any of the packages inside of the LangGraph repository
or are a regular contributor to LangGraph with previous merged merged pull requests.
- type: checkboxes
id: privileged
attributes:
label: Privileged issue
description: Confirm that you are allowed to create an issue here.
options:
- label: I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here.
- label: I am a LangGraph maintainer, or was asked directly by a LangGraph maintainer to create an issue here.
required: true
- type: textarea
id: content
attributes:
label: Issue Content
description: Add the content of the issue here.
- type: markdown
attributes:
value: |
Community members should **NOT** work on Privileged issues unless these issues have been explicitly marked with a "help-wanted" tag.
+31
View File
@@ -0,0 +1,31 @@
Thank you for contributing to LangGraph! Follow these steps to mark your pull request as ready for review. **If any of these steps are not completed, your PR will not be considered for review.**
- [ ] **PR title**: Follows the format: {TYPE}({SCOPE}): {DESCRIPTION}
- Examples:
- feat(core): add multi-tenant support
- fix(cli): resolve flag parsing error
- docs(openai): update API usage examples
- Allowed `{TYPE}` values:
- feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert, release
- Allowed `{SCOPE}` values (optional):
- langgraph, docs, cli, checkpoint, checkpoint-postgres, checkpoint-sqlite, prebuilt, scheduler-kafka, sdk-py
- Once you've written the title, please delete this checklist item; do not include it in the PR.
- [ ] **PR message**: ***Delete this entire checklist*** and replace with
- **Description:** a description of the change. Include a [closing keyword](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) if applicable.
- **Issue:** the issue # it fixes, if applicable
- **Dependencies:** any dependencies required for this change
- **Twitter handle:** if your PR gets announced, and you'd like a mention, we'll gladly shout you out!
- [ ] **Add tests and docs**: If you're adding a new integration, you must include:
1. A test for the integration, preferably unit tests that do not rely on network access,
2. An example notebook showing its use. It lives in `docs/docs/integrations` directory.
- [ ] **Lint and test**: Run `make format`, `make lint` and `make test` from the root of the package(s) you've modified. We will not consider a PR unless these three are passing in CI. See [contribution guidelines](https://github.com/langchain-ai/langgraph/blob/main/CONTRIBUTING.md) for more.
Additional guidelines:
- Make sure optional dependencies are imported within a function.
- Please do not add dependencies to `pyproject.toml` files (even optional ones) unless they are **required** for unit tests.
- Most PRs should not touch more than one package.
- Changes should be backwards compatible.
-88
View File
@@ -1,88 +0,0 @@
# An action for setting up poetry install with caching.
# Using a custom action since the default action does not
# take poetry install groups into account.
# Action code from:
# https://github.com/actions/setup-python/issues/505#issuecomment-1273013236
name: poetry-install-with-caching
description: Poetry install with support for caching of dependency groups.
inputs:
python-version:
description: Python version, supporting MAJOR.MINOR only
required: true
poetry-version:
description: Poetry version
required: true
cache-key:
description: Cache key to use for manual handling of caching
required: true
runs:
using: composite
steps:
- uses: actions/setup-python@v5
name: Setup python ${{ inputs.python-version }}
id: setup-python
with:
python-version: ${{ inputs.python-version }}
- uses: actions/cache@v3
id: cache-bin-poetry
name: Cache Poetry binary - Python ${{ inputs.python-version }}
env:
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "1"
with:
path: |
/opt/pipx/venvs/poetry
# This step caches the poetry installation, so make sure it's keyed on the poetry version as well.
key: bin-poetry-${{ runner.os }}-${{ runner.arch }}-py-${{ inputs.python-version }}-${{ inputs.poetry-version }}
- name: Refresh shell hashtable and fixup softlinks
if: steps.cache-bin-poetry.outputs.cache-hit == 'true'
shell: bash
env:
POETRY_VERSION: ${{ inputs.poetry-version }}
PYTHON_VERSION: ${{ inputs.python-version }}
run: |
set -eux
# Refresh the shell hashtable, to ensure correct `which` output.
hash -r
# `actions/cache@v3` doesn't always seem able to correctly unpack softlinks.
# Delete and recreate the softlinks pipx expects to have.
rm /opt/pipx/venvs/poetry/bin/python
cd /opt/pipx/venvs/poetry/bin
ln -s "$(which "python$PYTHON_VERSION")" python
chmod +x python
cd /opt/pipx_bin/
ln -s /opt/pipx/venvs/poetry/bin/poetry poetry
chmod +x poetry
# Ensure everything got set up correctly.
/opt/pipx/venvs/poetry/bin/python --version
/opt/pipx_bin/poetry --version
- name: Install poetry
if: steps.cache-bin-poetry.outputs.cache-hit != 'true'
shell: bash
env:
POETRY_VERSION: ${{ inputs.poetry-version }}
PYTHON_VERSION: ${{ inputs.python-version }}
# Install poetry using the python version installed by setup-python step.
run: pipx install "poetry==$POETRY_VERSION" --python '${{ steps.setup-python.outputs.python-path }}' --verbose
- name: Restore pip and poetry cached dependencies
uses: actions/cache@v3
env:
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "4"
with:
path: |
~/.cache/pip
~/.cache/pypoetry/virtualenvs
~/.cache/pypoetry/cache
~/.cache/pypoetry/artifacts
./.venv
key: py-deps-${{ runner.os }}-${{ runner.arch }}-py-${{ inputs.python-version }}-poetry-${{ inputs.poetry-version }}-${{ inputs.cache-key }}-${{ hashFiles('./poetry.lock') }}
+18
View File
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
directories:
- "libs/checkpoint"
- "libs/checkpoint-postgres"
- "libs/checkpoint-sqlite"
- "libs/cli"
- "libs/langgraph"
- "libs/prebuilt"
- "libs/sdk-py"
schedule:
interval: "weekly"
+69
View File
@@ -0,0 +1,69 @@
import ast
import os
from itertools import filterfalse
from typing import Dict, List, Tuple
ROOT_PATH = os.path.abspath(os.path.join(__file__, "..", "..", ".."))
CLIENT_PATH = os.path.join(ROOT_PATH, "libs", "sdk-py", "langgraph_sdk", "client.py")
ASYNC_TO_SYNC_METHOD_MAP: Dict[str, str] = {
"aclose": "close",
"__aenter__": "__enter__",
"__aexit__": "__exit__",
}
def get_class_methods(node: ast.ClassDef) -> List[str]:
return [n.name for n in node.body if isinstance(n, (ast.FunctionDef, ast.AsyncFunctionDef))]
def find_classes(tree: ast.AST) -> List[Tuple[str, List[str]]]:
classes = []
for node in ast.walk(tree):
if isinstance(node, ast.ClassDef):
methods = get_class_methods(node)
classes.append((node.name, methods))
return classes
def compare_sync_async_methods(sync_methods: List[str], async_methods: List[str]) -> List[str]:
sync_set = set(sync_methods)
async_set = {ASYNC_TO_SYNC_METHOD_MAP.get(async_method, async_method) for async_method in async_methods}
missing_in_sync = list(async_set - sync_set)
missing_in_async = list(sync_set - async_set)
return missing_in_sync + missing_in_async
def main():
with open(CLIENT_PATH, "r") as file:
tree = ast.parse(file.read())
classes = find_classes(tree)
def is_sync(class_spec: Tuple[str, List[str]]) -> bool:
return class_spec[0].startswith("Sync")
sync_class_name_to_methods = {class_name: class_methods for class_name, class_methods in filter(is_sync, classes)}
async_class_name_to_methods = {class_name: class_methods for class_name, class_methods in filterfalse(is_sync, classes)}
mismatches = []
for async_class_name, async_class_methods in async_class_name_to_methods.items():
sync_class_name = "Sync" + async_class_name
sync_class_methods = sync_class_name_to_methods.get(sync_class_name, [])
diff = compare_sync_async_methods(sync_class_methods, async_class_methods)
if diff:
mismatches.append((sync_class_name, async_class_name, diff))
if mismatches:
error_message = "Mismatches found between sync and async client methods:\n"
for sync_class_name, async_class_name, diff in mismatches:
error_message += f"{sync_class_name} vs {async_class_name}:\n"
for method in diff:
error_message += f" - {method}\n"
raise ValueError(error_message)
print("All sync and async client methods match.")
if __name__ == "__main__":
main()
+177
View File
@@ -0,0 +1,177 @@
import logging
import pathlib
import sys
import time
from urllib import error, request
import langgraph_cli
import langgraph_cli.config
import langgraph_cli.docker
from langgraph_cli.cli import prepare_args_and_stdin
from langgraph_cli.constants import DEFAULT_PORT
from langgraph_cli.exec import Runner, subp_exec
from langgraph_cli.progress import Progress
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
def test(config: pathlib.Path, port: int, tag: str, verbose: bool):
"""Spin up API with Postgres/Redis via docker compose and wait until ready."""
logger.info("Starting test...")
with Runner() as runner, Progress(message="Pulling...") as set:
# Detect docker/compose capabilities
capabilities = langgraph_cli.docker.check_capabilities(runner)
# Validate config and prepare compose stdin/args using built image
config_json = langgraph_cli.config.validate_config_file(config)
args, stdin = prepare_args_and_stdin(
capabilities=capabilities,
config_path=config,
config=config_json,
docker_compose=None,
port=port,
watch=False,
debugger_port=None,
debugger_base_url=f"http://127.0.0.1:{port}",
postgres_uri=None,
api_version=None,
image=tag,
base_image=None,
)
# Compose up with wait (implies detach), similar to `langgraph up --wait`
args_up = [*args, "up", "--remove-orphans", "--wait"]
compose_cmd = ["docker", "compose"]
if capabilities.compose_type == "standalone":
compose_cmd = ["docker-compose"]
set("Starting...")
try:
runner.run(
subp_exec(
*compose_cmd,
*args_up,
input=stdin,
verbose=verbose,
)
)
except Exception as e: # noqa: BLE001
# On failure, show diagnostics then ensure clean teardown
sys.stderr.write(f"docker compose up failed: {e}\n")
try:
sys.stderr.write("\n== docker compose ps ==\n")
runner.run(
subp_exec(*compose_cmd, *args, "ps", input=stdin, verbose=False)
)
except Exception:
pass
try:
sys.stderr.write("\n== docker compose logs (api) ==\n")
runner.run(
subp_exec(
*compose_cmd,
*args,
"logs",
"langgraph-api",
input=stdin,
verbose=False,
)
)
except Exception:
pass
finally:
try:
runner.run(
subp_exec(
*compose_cmd,
*args,
"down",
"-v",
"--remove-orphans",
input=stdin,
verbose=False,
)
)
finally:
raise
set("")
base_url = f"http://localhost:{port}"
ok_url = f"{base_url}/ok"
logger.info(f"Waiting for {ok_url} to respond with 200...")
deadline = time.time() + 30
last_err: Exception | None = None
while time.time() < deadline:
try:
with request.urlopen(ok_url, timeout=2) as resp:
if resp.status == 200:
sys.stdout.write(
f"""Ready!\n- API: {base_url}\n- /ok: 200 OK\n"""
)
sys.stdout.flush()
break
else:
last_err = RuntimeError(f"Unexpected status: {resp.status}")
logger.error(f"Unexpected status: {resp.status}")
except error.URLError as e:
logger.error(f"URLError: {e}")
last_err = e
except Exception as e: # noqa: BLE001
logger.error(f"Exception: {e}")
last_err = e
time.sleep(0.5)
else:
logger.error("Timeout waiting for /ok to return 200")
# Bring stack down before raising
args_down = [*args, "down", "-v", "--remove-orphans"]
try:
runner.run(
subp_exec(
*compose_cmd,
*args_down,
input=stdin,
verbose=verbose,
)
)
finally:
raise SystemExit(
f"/ok did not return 202 within timeout. Last error: {last_err}"
)
# Clean up: bring compose stack down to free ports for next test
logger.info("Test succeeded. Bringing down compose stack...")
try:
args_down = [*args, "down", "-v", "--remove-orphans"]
runner.run(
subp_exec(
*compose_cmd,
*args_down,
input=stdin,
verbose=verbose,
)
)
logger.info("Compose stack down. Finishing...")
except Exception:
logger.exception("Failed to bring down compose stack")
pass
logger.info("Test finished")
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--tag", type=str)
parser.add_argument("-c", "--config", type=str, default="./langgraph.json")
parser.add_argument("-p", "--port", type=int, default=DEFAULT_PORT)
args = parser.parse_args()
try:
test(pathlib.Path(args.config), args.port, args.tag, verbose=True)
except BaseException:
logger.exception("Test failed")
raise
logger.info("Test execution finished")
+85 -27
View File
@@ -3,8 +3,8 @@ name: CLI integration test
on:
workflow_call:
env:
POETRY_VERSION: "1.7.1"
permissions:
contents: read
jobs:
build:
@@ -13,48 +13,106 @@ jobs:
matrix:
python-version:
- "3.10"
- "3.11"
- "3.14"
example:
- name: A
workdir: libs/cli/examples
tag: langgraph-test-a
- name: B
workdir: libs/cli/examples/graphs
tag: langgraph-test-b
- name: C
workdir: libs/cli/examples/graphs_reqs_a
tag: langgraph-test-c
- name: D
workdir: libs/cli/examples/graphs_reqs_b
tag: langgraph-test-d
name: "CLI integration test"
defaults:
run:
working-directory: libs/cli
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Get changed files
id: changed-files
uses: Ana06/get-changed-files@v2.2.0
uses: Ana06/get-changed-files@v2.3.0
with:
filter: "libs/cli/**"
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
- name: Set up Python ${{ matrix.python-version }}
if: steps.changed-files.outputs.all
uses: "./.github/actions/poetry_setup"
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ env.POETRY_VERSION }}
cache-key: integration-test-cli
- name: Setup env
if: steps.changed-files.outputs.all
working-directory: libs/cli/examples
run: cat .env.example > .env
enable-cache: true
cache-suffix: "cli-integration-test"
ignore-nothing-to-cache: true
- name: Install cli globally
if: steps.changed-files.outputs.all
run: pip install -e .
- name: Start service A
- name: Build and test service ${{ matrix.example.name }}
if: steps.changed-files.outputs.all
working-directory: ${{ matrix.example.workdir }}
env:
LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }}
run: |
timeout 60 langgraph test -c examples/langgraph.json --verbose || (exit "$(($? == 124 ? 0 : $?))")
- name: Start service B
if: steps.changed-files.outputs.all
working-directory: libs/cli/examples/graphs
# Build the image for this example
langgraph build -t ${{ matrix.example.tag }}
# Prepare environment file from local or parent example directory
if [ -f .env.example ]; then cp .env.example .env; elif [ -f ../.env.example ]; then cp ../.env.example .env && cp ../.env.example ../.env; fi
if [ -n "${{ secrets.LANGSMITH_API_KEY }}" ]; then echo "LANGSMITH_API_KEY=${{ secrets.LANGSMITH_API_KEY }}" >> .env; if [ -f ../.env ]; then echo "LANGSMITH_API_KEY=${{ secrets.LANGSMITH_API_KEY }}" >> ../.env; fi; fi
# Run the integration test using the built tag
# Compute repo root to reference the shared script robustly
REPO_ROOT=$(git rev-parse --show-toplevel)
timeout 60 python "$REPO_ROOT/.github/scripts/run_langgraph_cli_test.py" -t ${{ matrix.example.tag }}
- name: Build JS service
if: ${{ steps.changed-files.outputs.all && matrix.example.name == 'A' }}
working-directory: libs/cli/js-examples
run: |
timeout 60 langgraph test --verbose || (exit "$(($? == 124 ? 0 : $?))")
- name: Start service C
if: steps.changed-files.outputs.all
working-directory: libs/cli/examples/graphs_reqs_a
langgraph build -t langgraph-test-e
- name: Build JS monorepo service
if: ${{ steps.changed-files.outputs.all && matrix.example.name == 'A' }}
working-directory: libs/cli/js-monorepo-example
run: |
timeout 60 langgraph test --verbose || (exit "$(($? == 124 ? 0 : $?))")
- name: Start service D
if: steps.changed-files.outputs.all
working-directory: libs/cli/examples/graphs_reqs_b
langgraph build -t langgraph-test-f -c apps/agent/langgraph.json --build-command "yarn run turbo build" --install-command "yarn install"
- name: Build Python monorepo service
if: ${{ steps.changed-files.outputs.all && matrix.example.name == 'A' }}
working-directory: libs/cli/python-monorepo-example
run: |
timeout 60 langgraph test --verbose || (exit "$(($? == 124 ? 0 : $?))")
langgraph build -t langgraph-test-g -c apps/agent/langgraph.json
cp apps/agent/.env.example apps/agent/.env
if [ -n "${{ secrets.LANGSMITH_API_KEY }}" ]; then echo "LANGSMITH_API_KEY=${{ secrets.LANGSMITH_API_KEY }}" >> apps/agent/.env; fi
timeout 60 python ../../../.github/scripts/run_langgraph_cli_test.py -t langgraph-test-g -c apps/agent/langgraph.json
- name: Build and test prerelease reqs service
if: ${{ steps.changed-files.outputs.all && matrix.example.name == 'A' }}
working-directory: libs/cli/examples/graph_prerelease_reqs
run: |
langgraph build -t langgraph-test-h
cp ../.env.example .env
if [ -n "${{ secrets.LANGSMITH_API_KEY }}" ]; then echo "LANGSMITH_API_KEY=${{ secrets.LANGSMITH_API_KEY }}" >> .env; fi
timeout 60 python ../../../../.github/scripts/run_langgraph_cli_test.py -t langgraph-test-h
echo "Finished starting up langgraph-test-h"
LANGGRAPH_VERSION=$(docker run --rm --entrypoint "" langgraph-test-h python -c "import sys; from importlib.metadata import version; v = version('langgraph'); print(v);")
if [ "$LANGGRAPH_VERSION" != "1.0.2" ]; then
echo "LANGGRAPH_VERSION != 1.0.2; $LANGGRAPH_VERSION"
exit 1
fi
LANGCHAIN_OPENAI_VERSION=$(docker run --rm --entrypoint "" langgraph-test-h python -c "import sys; from importlib.metadata import version; v = version('langchain-openai'); print(v);")
if [ "$LANGCHAIN_OPENAI_VERSION" != "1.0.1" ]; then
echo "LANGCHAIN_OPENAI_VERSION != 1.0.1; $LANGCHAIN_OPENAI_VERSION"
exit 1
fi
LANGCHAIN_ANTHROPIC_VERSION=$(docker run --rm --entrypoint "" langgraph-test-h python -c "import sys; from importlib.metadata import version; v = version('langchain-anthropic'); print(v);")
if [ "$LANGCHAIN_ANTHROPIC_VERSION" != "1.0.0a5" ]; then
echo "LANGCHAIN_ANTHROPIC_VERSION != 1.0.0a5; $LANGCHAIN_ANTHROPIC_VERSION"
exit 1
fi
- name: Build and test prerelease reqs fail service
if: ${{ steps.changed-files.outputs.all && matrix.example.name == 'A' }}
working-directory: libs/cli/examples/graph_prerelease_reqs_fail
run: |
langgraph build -t langgraph-test-i || [ $? -eq 1 ]
+16 -46
View File
@@ -8,9 +8,10 @@ on:
type: string
description: "From which folder this pipeline executes"
env:
POETRY_VERSION: "1.7.1"
permissions:
contents: read
env:
# This env var allows us to get inline annotations when ruff has complaints.
RUFF_OUTPUT_FORMAT: github
@@ -27,59 +28,37 @@ jobs:
# Starting new jobs is also relatively slow,
# so linting on fewer versions makes CI faster.
python-version:
- "3.9"
- "3.11"
- "3.12"
name: "lint #${{ matrix.python-version }}"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Get changed files
id: changed-files
uses: Ana06/get-changed-files@v2.2.0
uses: Ana06/get-changed-files@v2.3.0
with:
filter: "${{ inputs.working-directory }}/**"
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
- name: Set up Python ${{ matrix.python-version }}
if: steps.changed-files.outputs.all
uses: "./.github/actions/poetry_setup"
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ inputs.working-directory }}
cache-key: lint-with-extras
- name: Check Poetry File
if: steps.changed-files.outputs.all
shell: bash
working-directory: ${{ inputs.working-directory }}
run: poetry check
- name: Check lock file
if: steps.changed-files.outputs.all
shell: bash
working-directory: ${{ inputs.working-directory }}
run: poetry lock --check
enable-cache: true
cache-suffix: lint-${{ inputs.working-directory }}
- name: Install dependencies
if: steps.changed-files.outputs.all
# Also installs dev/lint/test/typing dependencies, to ensure we have
# type hints for as many of our libraries as possible.
# This helps catch errors that require dependencies to be spotted, for example:
# https://github.com/langchain-ai/langchain/pull/10249/files#diff-935185cd488d015f026dcd9e19616ff62863e8cde8c0bee70318d3ccbca98341
#
# If you change this configuration, make sure to change the `cache-key`
# in the `poetry_setup` action above to stop using the old cache.
# It doesn't matter how you change it, any change will cause a cache-bust.
working-directory: ${{ inputs.working-directory }}
run: poetry install --with dev
run: uv sync --frozen --group lint
- name: Get .mypy_cache to speed up mypy
if: steps.changed-files.outputs.all
uses: actions/cache@v3
uses: actions/cache@v5
env:
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "2"
with:
path: |
${{ inputs.working-directory }}/.mypy_cache
key: mypy-lint-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/poetry.lock', inputs.working-directory)) }}
key: mypy-lint-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/uv.lock', inputs.working-directory)) }}
- name: Analysing package code with our lint
if: steps.changed-files.outputs.all
@@ -94,27 +73,18 @@ jobs:
- name: Install test dependencies
if: steps.changed-files.outputs.all
# Also installs dev/lint/test/typing dependencies, to ensure we have
# type hints for as many of our libraries as possible.
# This helps catch errors that require dependencies to be spotted, for example:
# https://github.com/langchain-ai/langchain/pull/10249/files#diff-935185cd488d015f026dcd9e19616ff62863e8cde8c0bee70318d3ccbca98341
#
# If you change this configuration, make sure to change the `cache-key`
# in the `poetry_setup` action above to stop using the old cache.
# It doesn't matter how you change it, any change will cause a cache-bust.
working-directory: ${{ inputs.working-directory }}
run: |
poetry install --with dev
run: uv sync --group lint
- name: Get .mypy_cache_test to speed up mypy
if: steps.changed-files.outputs.all
uses: actions/cache@v3
uses: actions/cache@v5
env:
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "2"
with:
path: |
${{ inputs.working-directory }}/.mypy_cache_test
key: mypy-test-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/poetry.lock', inputs.working-directory)) }}
key: mypy-test-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/uv.lock', inputs.working-directory)) }}
- name: Analysing tests with our lint
if: steps.changed-files.outputs.all
+19 -22
View File
@@ -8,8 +8,8 @@ on:
type: string
description: "From which folder this pipeline executes"
env:
POETRY_VERSION: "1.7.1"
permissions:
contents: read
jobs:
build:
@@ -17,42 +17,39 @@ jobs:
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
name: "test #${{ matrix.python-version }}"
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: Ana06/get-changed-files@v2.2.0
with:
filter: "${{ inputs.working-directory }}/**"
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
if: steps.changed-files.outputs.all
uses: "./.github/actions/poetry_setup"
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ inputs.working-directory }}
cache-key: core
enable-cache: true
cache-suffix: test-${{ inputs.working-directory }}
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ !github.event.pull_request.head.repo.fork }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_RO_TOKEN }}
- name: Install dependencies
if: steps.changed-files.outputs.all
shell: bash
working-directory: ${{ inputs.working-directory }}
run: poetry install --with dev
run: uv sync --frozen --group test --no-dev
- name: Run core tests
if: steps.changed-files.outputs.all
- name: Run tests
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
make test
run: make test
- name: Ensure the tests did not create any additional files
if: steps.changed-files.outputs.all
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
+58
View File
@@ -0,0 +1,58 @@
name: test
on:
workflow_call:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
defaults:
run:
working-directory: libs/langgraph
name: "test #${{ matrix.python-version }}"
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-suffix: "test-langgraph"
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ !github.event.pull_request.head.repo.fork }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_RO_TOKEN }}
- name: Install dependencies
shell: bash
run: uv sync --frozen --group test --no-dev
- name: Run tests
shell: bash
run: make test_parallel
- name: Ensure the tests did not create any additional files
shell: bash
run: |
set -eu
STATUS="$(git status)"
echo "$STATUS"
# grep will exit non-zero if the target message isn't found,
# and `set -e` above will cause the step to fail.
echo "$STATUS" | grep 'nothing to commit, working tree clean'
+16 -14
View File
@@ -9,12 +9,13 @@ on:
description: "From which folder this pipeline executes"
env:
POETRY_VERSION: "1.7.1"
PYTHON_VERSION: "3.10"
permissions:
contents: read
jobs:
build:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
outputs:
@@ -22,15 +23,14 @@ jobs:
version: ${{ steps.check-version.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
- name: Set up Python $${ env.PYTHON_VERSION }}
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ inputs.working-directory }}
cache-key: release
enable-cache: true
cache-suffix: "release"
# We want to keep this build stage *separate* from the release stage,
# so that there's no sharing of permissions between them.
@@ -44,11 +44,11 @@ jobs:
# > from the publish job.
# https://github.com/pypa/gh-action-pypi-publish#non-goals
- name: Build project for distribution
run: poetry build
run: uv build
working-directory: ${{ inputs.working-directory }}
- name: Upload build
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: test-dist
path: ${{ inputs.working-directory }}/dist/
@@ -58,8 +58,8 @@ jobs:
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
echo pkg-name="$(poetry version | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT
echo version="$(poetry version --short)" >> $GITHUB_OUTPUT
echo pkg-name=$(grep -m 1 "^name = " pyproject.toml | cut -d '"' -f 2)
echo version=$(grep -m 1 "^version = " pyproject.toml | cut -d '"' -f 2)
publish:
needs:
@@ -74,9 +74,9 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: test-dist
path: ${{ inputs.working-directory }}/dist/
@@ -93,3 +93,5 @@ jobs:
# This is *only for CI use* and is *extremely dangerous* otherwise!
# https://github.com/pypa/gh-action-pypi-publish#tolerating-release-package-file-duplicates
skip-existing: true
# Temp workaround since attestations are on by default as of gh-action-pypi-publish v1.11.0
attestations: false
+37
View File
@@ -0,0 +1,37 @@
name: baseline
on:
workflow_dispatch:
push:
branches: [main]
paths:
- "libs/**"
permissions:
contents: read
jobs:
benchmark:
runs-on: ubuntu-latest
defaults:
run:
working-directory: libs/langgraph
steps:
- uses: actions/checkout@v6
- run: SHA=$(git rev-parse HEAD) && echo "SHA=$SHA" >> $GITHUB_ENV
- name: Set up Python 3.11
uses: astral-sh/setup-uv@v7
with:
python-version: "3.11"
enable-cache: true
cache-suffix: "bench"
- name: Install dependencies
run: uv sync --group test
- name: Run benchmarks
run: OUTPUT=out/benchmark-baseline.json make -s benchmark
- name: Save outputs
uses: actions/cache/save@v5
with:
key: ${{ runner.os }}-benchmark-baseline-${{ env.SHA }}
path: |
libs/langgraph/out/benchmark-baseline.json
+71
View File
@@ -0,0 +1,71 @@
name: bench
on:
pull_request:
paths:
- "libs/**"
permissions:
contents: read
jobs:
benchmark:
runs-on: ubuntu-latest
defaults:
run:
working-directory: libs/langgraph
steps:
- uses: actions/checkout@v6
- id: files
name: Get changed files
uses: Ana06/get-changed-files@v2.3.0
with:
format: json
- name: Set up Python 3.11
uses: astral-sh/setup-uv@v7
with:
python-version: "3.11"
enable-cache: true
cache-suffix: "bench"
- name: Install dependencies
run: uv sync --group test
- name: Download baseline
uses: actions/cache/restore@v5
with:
key: ${{ runner.os }}-benchmark-baseline
restore-keys: |
${{ runner.os }}-benchmark-baseline-
fail-on-cache-miss: true
path: |
libs/langgraph/out/benchmark-baseline.json
- name: Run benchmarks
id: benchmark
run: |
{
echo 'OUTPUT<<EOF'
make -s benchmark-fast
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Compare benchmarks
id: compare
run: |
{
echo 'OUTPUT<<EOF'
mv out/benchmark-baseline.json out/main.json
mv out/benchmark.json out/changes.json
uv run pyperf compare_to out/main.json out/changes.json --table --group-by-speed
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Annotation
uses: actions/github-script@v8
with:
script: |
const file = JSON.parse(`${{ steps.files.outputs.added_modified_renamed }}`)[0]
core.notice(`${{ steps.benchmark.outputs.OUTPUT }}`, {
title: 'Benchmark results',
file,
})
core.notice(`${{ steps.compare.outputs.OUTPUT }}`, {
title: 'Comparison against main',
file,
})
+173 -109
View File
@@ -1,114 +1,178 @@
---
name: CI
name: CI
on:
push:
branches: [main]
pull_request:
on:
push:
branches:
- main
pull_request:
# If another push to the same PR or branch happens while this workflow is still running,
# cancel the earlier run in favor of the next run.
#
# There's no point in testing an outdated version of the code. GitHub only allows
# a limited number of job runners to be active at the same time, so it's better to cancel
# pointless jobs early so that more useful jobs can run sooner.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
# If another push to the same PR or branch happens while this workflow is still running,
# cancel the earlier run in favor of the next run.
#
# There's no point in testing an outdated version of the code. GitHub only allows
# a limited number of job runners to be active at the same time, so it's better to cancel
# pointless jobs early so that more useful jobs can run sooner.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
outputs:
python: ${{ steps.filter.outputs.python }}
deps: ${{ steps.filter.outputs.deps }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
python:
- 'libs/langgraph/**'
- 'libs/sdk-py/**'
- 'libs/cli/**'
- 'libs/checkpoint/**'
- 'libs/checkpoint-sqlite/**'
- 'libs/checkpoint-postgres/**'
- 'libs/prebuilt/**'
deps:
- '**/pyproject.toml'
- '**/uv.lock'
lint:
needs: changes
name: cd ${{ matrix.working-directory }}
strategy:
matrix:
working-directory:
[
"libs/langgraph",
"libs/sdk-py",
"libs/cli",
"libs/checkpoint",
"libs/checkpoint-sqlite",
"libs/checkpoint-postgres",
"libs/prebuilt",
]
if: needs.changes.outputs.python == 'true' || needs.changes.outputs.deps == 'true'
uses: ./.github/workflows/_lint.yml
with:
working-directory: ${{ matrix.working-directory }}
secrets: inherit
test:
needs: changes
name: cd ${{ matrix.working-directory }}
strategy:
matrix:
working-directory:
[
"libs/cli",
"libs/checkpoint",
"libs/checkpoint-sqlite",
"libs/checkpoint-postgres",
"libs/prebuilt",
"libs/sdk-py",
]
if: needs.changes.outputs.python == 'true' || needs.changes.outputs.deps == 'true'
uses: ./.github/workflows/_test.yml
with:
working-directory: ${{ matrix.working-directory }}
secrets: inherit
# NOTE: we're testing langgraph separately because it requires a different matrix
test-langgraph:
needs: changes
if: needs.changes.outputs.python == 'true' || needs.changes.outputs.deps == 'true'
name: "cd libs/langgraph"
uses: ./.github/workflows/_test_langgraph.yml
secrets: inherit
check-sdk-methods:
needs: changes
if: needs.changes.outputs.python == 'true'
name: "Check SDK methods matching"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Run check_sdk_methods script
run: python .github/scripts/check_sdk_methods.py
check-schema:
needs: changes
if: needs.changes.outputs.python == 'true'
name: "Check CLI schema hasn't changed #${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.13"
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: astral-sh/setup-uv@v7
with:
python-version: "3.13"
enable-cache: true
cache-suffix: "schema-check-cli"
- name: Install CLI dependencies
run: |
cd libs/cli
uv sync
- name: Generate schema and check for changes
run: |
cd libs/cli
# Create a temporary copy of the current schema
cp schemas/schema.json schemas/schema.current.json
# Generate new schema
uv run python generate_schema.py
# Compare the new schema with the original
if ! diff -q schemas/schema.json schemas/schema.current.json > /dev/null; then
echo "Error: Langgraph.json configuration schema has changed. Please run 'uv run python generate_schema.py' in the libs/cli directory and commit the changes."
diff schemas/schema.json schemas/schema.current.json
exit 1
fi
echo "Schema check passed - no changes detected"
integration-test:
needs: changes
if: needs.changes.outputs.python == 'true' || needs.changes.outputs.deps == 'true'
name: CLI integration test
uses: ./.github/workflows/_integration_test.yml
secrets: inherit
ci_success:
name: "CI Success"
needs:
[
lint,
test,
test-langgraph,
check-sdk-methods,
check-schema,
integration-test,
]
if: |
always()
runs-on: ubuntu-latest
env:
POETRY_VERSION: "1.7.1"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
lint:
name: cd ${{ matrix.working-directory }}
needs: [ build ]
strategy:
matrix:
working-directory: [
"libs/langgraph",
"libs/sdk-py",
"libs/cli",
"libs/checkpoint",
"libs/checkpoint-sqlite",
"libs/checkpoint-postgres"
]
uses: ./.github/workflows/_lint.yml
with:
working-directory: ${{ matrix.working-directory }}
secrets: inherit
test:
name: cd ${{ matrix.working-directory }}
needs: [ build ]
strategy:
matrix:
working-directory: [
"libs/langgraph",
"libs/cli",
"libs/checkpoint",
"libs/checkpoint-sqlite",
"libs/checkpoint-postgres"
]
uses: ./.github/workflows/_test.yml
with:
working-directory: ${{ matrix.working-directory }}
secrets: inherit
integration-test:
name: CLI integration test
needs: [ build ]
uses: ./.github/workflows/_integration_test.yml
secrets: inherit
lint-js:
runs-on: ubuntu-latest
needs: [ build ]
strategy:
matrix:
working-directory:
- "libs/sdk-js"
defaults:
run:
working-directory: ${{ matrix.working-directory }}
steps:
- uses: actions/checkout@v3
- name: Setup Node.js (LTS)
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "yarn"
cache-dependency-path: ${{ matrix.working-directory }}/yarn.lock
- name: Install dependencies
run: yarn install
- name: Run lint
run: yarn lint
- name: Build
run: yarn build
ci_success:
name: "CI Success"
needs: [build, lint, lint-js, test, integration-test]
if: |
always()
runs-on: ubuntu-latest
env:
JOBS_JSON: ${{ toJSON(needs) }}
RESULTS_JSON: ${{ toJSON(needs.*.result) }}
EXIT_CODE: ${{!contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && '0' || '1'}}
steps:
- name: "CI Success"
run: |
echo $JOBS_JSON
echo $RESULTS_JSON
echo "Exiting with $EXIT_CODE"
exit $EXIT_CODE
JOBS_JSON: ${{ toJSON(needs) }}
RESULTS_JSON: ${{ toJSON(needs.*.result) }}
EXIT_CODE: ${{!contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && '0' || '1'}}
steps:
- name: "CI Success"
run: |
echo $JOBS_JSON
echo $RESULTS_JSON
echo "Exiting with $EXIT_CODE"
exit $EXIT_CODE
-39
View File
@@ -1,39 +0,0 @@
---
name: CI / cd . / make spell_check
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
codespell:
name: (Check for spelling errors)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
run: |
pip install toml codespell jupytext
- name: Extract Ignore Words List
run: |
# Use a Python script to extract the ignore words list from pyproject.toml
python .github/workflows/extract_ignored_words_list.py
id: extract_ignore_words
- name: Codespell
uses: codespell-project/actions-codespell@v2
with:
skip: '*.ambr,*.lock,*.ipynb'
ignore_words_list: ${{ steps.extract_ignore_words.outputs.ignore_words_list }}
# We do this to avoid spellchecking cell outputs
- name: Codespell Notebooks
run: make codespell
-68
View File
@@ -1,68 +0,0 @@
name: Deploy Docs
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
env:
POETRY_VERSION: "1.7.1"
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
with:
python-version: "3.12"
poetry-version: ${{ env.POETRY_VERSION }}
cache-key: docs
- name: Install dependencies
run: |
poetry install --with docs
- name: Build site
run: make build-docs
env:
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.MKDOCS_GIT_COMMITTERS_APIKEY }}
- name: Configure GitHub Pages
if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v4
- name: Upload Pages Artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/site/
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v4
- name: Deploy Pull Request Preview
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v2
with:
name: pr-preview-${{ github.event.number }}
path: ./docs/site/
@@ -1,10 +0,0 @@
import toml
pyproject_toml = toml.load("libs/langgraph/pyproject.toml")
# Extract the ignore words list (adjust the key as per your TOML structure)
ignore_words_list = (
pyproject_toml.get("tool", {}).get("codespell", {}).get("ignore-words-list")
)
print(f"::set-output name=ignore_words_list::{ignore_words_list}") # noqa: T201
-87
View File
@@ -1,87 +0,0 @@
name: Check Docs & Links
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
env:
POETRY_VERSION: "1.7.1"
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check links in Markdown files
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
folder-path: "examples/,docs/"
check-modified-files-only: ${{ github.event_name != 'schedule' }}
file-path: "./README.md"
config-file: "./.markdown-link-check.config.json"
notebook-link-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.x + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
with:
python-version: "3.11"
poetry-version: ${{ env.POETRY_VERSION }}
cache-key: core
- name: Install dependencies
run: |
python -m pip install --upgrade pip
poetry install --with docs
poetry run pip install -U pytest pytest-check-links langsmith langchain GitPython
- name: Check links in notebooks
env:
LANGCHAIN_API_KEY: test
run: |
if [ "${{ github.event_name }}" == "schedule" ] || [ "${{ github.event_name }}" == "workflow_dispatch" ] || ([ "${{ github.event_name }}" == "push" ] && [ "${{ github.ref }}" == "refs/heads/main" ]); then
echo "Running link check on all notebooks in examples directory..."
poetry run pytest -v --check-links-ignore "https://(api|web)\.smith\.langchain\.com/.*" --check-links-ignore "https://x.com/.*" --check-links examples
else
echo "Fetching changes from origin/main..."
git fetch origin main
echo "Checking for changed notebook files..."
CHANGED_FILES=$(git diff --name-only --diff-filter=d origin/main | grep '\.ipynb$' || true)
echo "Changed files: ${CHANGED_FILES}"
if [ -n "${CHANGED_FILES}" ]; then
echo "Running link check on changed notebook files..."
poetry run pytest -v --check-links-ignore "https://(api|web)\.smith\.langchain\.com/.*" --check-links-ignore "https://x.com/.*" --check-links ${CHANGED_FILES} || ([ $? = 5 ] && exit 0 || exit $?)
else
echo "No notebook files changed."
fi
fi
check-readmes-synced:
# This checks that the repo README.md is identical to the libs/langgraph/README.md
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Check README.md is in sync
run: |
if ! diff -q README.md libs/langgraph/README.md >/dev/null; then
echo "README.md is out of sync with libs/langgraph/README.md"
diff -C 3 README.md libs/langgraph/README.md
exit 1
fi
+46
View File
@@ -0,0 +1,46 @@
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@v6
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
docs
ci
deps
requireScope: false
ignoreLabels: |
ignore-lint-pr-title
+51 -39
View File
@@ -8,13 +8,14 @@ on:
type: string
default: "libs/langgraph"
permissions:
contents: read
env:
PYTHON_VERSION: "3.11"
POETRY_VERSION: "1.7.1"
jobs:
build:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
outputs:
@@ -24,15 +25,14 @@ jobs:
tag: ${{ steps.check-version.outputs.tag }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
- name: Set up Python
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ inputs.working-directory }}
cache-key: release
enable-cache: true
cache-suffix: "release"
# We want to keep this build stage *separate* from the release stage,
# so that there's no sharing of permissions between them.
@@ -46,11 +46,11 @@ jobs:
# > from the publish job.
# https://github.com/pypa/gh-action-pypi-publish#non-goals
- name: Build project for distribution
run: poetry build
run: uv build
working-directory: ${{ inputs.working-directory }}
- name: Upload build
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: dist
path: ${{ inputs.working-directory }}/dist/
@@ -60,8 +60,14 @@ jobs:
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
PKG_NAME="$(poetry version | cut -d ' ' -f 1)"
VERSION="$(poetry version --short)"
PKG_NAME=$(grep -m 1 "^name = " pyproject.toml | cut -d '"' -f 2)
if grep -q 'dynamic.*=.*\[.*"version".*\]' pyproject.toml; then
# handle dynamic versioning
DIR_NAME=$(echo "$PKG_NAME" | tr '-' '_')
VERSION=$(grep -m 1 '^__version__' "${DIR_NAME}/__init__.py" | cut -d '"' -f 2)
else
VERSION=$(grep -m 1 "^version = " pyproject.toml | cut -d '"' -f 2)
fi
SHORT_PKG_NAME="$(echo "$PKG_NAME" | sed -e 's/langgraph//g' -e 's/-//g')"
if [ -z $SHORT_PKG_NAME ]; then
TAG="$VERSION"
@@ -80,7 +86,7 @@ jobs:
outputs:
release-body: ${{ steps.generate-release-body.outputs.release-body }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
repository: langchain-ai/langgraph
path: langgraph
@@ -136,7 +142,9 @@ jobs:
needs:
- build
- release-notes
permissions: write-all
permissions:
contents: read
id-token: write
uses: ./.github/workflows/_test_release.yml
with:
working-directory: ${{ inputs.working-directory }}
@@ -149,7 +157,7 @@ jobs:
- test-pypi-publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
# We explicitly *don't* set up caching here. This ensures our tests are
# maximally sensitive to catching breakage.
@@ -164,12 +172,11 @@ jobs:
# - The package is published, and it breaks on the missing dependency when
# used in the real world.
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
- name: Set up Python
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ inputs.working-directory }}
enable-cache: true
- name: Import published package
shell: bash
@@ -187,17 +194,21 @@ jobs:
# - attempt install again after 5 seconds if it fails because there is
# sometimes a delay in availability on test pypi
run: |
poetry run pip install \
uv run pip install \
--extra-index-url https://test.pypi.org/simple/ \
"$PKG_NAME==$VERSION" || \
( \
sleep 5 && \
poetry run pip install \
uv run pip install \
--extra-index-url https://test.pypi.org/simple/ \
"$PKG_NAME==$VERSION" \
)
if [[ "$PKG_NAME" == *checkpoint* ]]; then
if [[ "$PKG_NAME" == *prebuilt* ]]; then
uv run pip install langgraph
fi
if [[ "$PKG_NAME" == *checkpoint* || "$PKG_NAME" == *prebuilt* ]]; then
# since checkpoint packages are namespace packages, import them with . convention
# i.e. import langgraph.checkpoint or langgraph.checkpoint.sqlite
IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/./g)"
@@ -207,10 +218,10 @@ jobs:
IMPORT_NAME="$(echo "$PKG_NAME" | sed s/-/_/g)"
fi
poetry run python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"
uv run python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))"
- name: Import test dependencies
run: poetry install --with dev
run: uv sync --group test
working-directory: ${{ inputs.working-directory }}
# Overwrite the local version of the package with the test PyPI version.
@@ -221,7 +232,7 @@ jobs:
PKG_NAME: ${{ needs.build.outputs.pkg-name }}
VERSION: ${{ needs.build.outputs.version }}
run: |
poetry run pip install \
uv run pip install \
--extra-index-url https://test.pypi.org/simple/ \
"$PKG_NAME==$VERSION"
@@ -249,17 +260,16 @@ jobs:
working-directory: ${{ inputs.working-directory }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
- name: Set up Python
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ inputs.working-directory }}
cache-key: release
enable-cache: true
cache-suffix: "release"
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: dist
path: ${{ inputs.working-directory }}/dist/
@@ -270,6 +280,8 @@ jobs:
packages-dir: ${{ inputs.working-directory }}/dist/
verbose: true
print-hash: true
# Temp workaround since attestations are on by default as of gh-action-pypi-publish v1.11.0
attestations: false
mark-release:
needs:
@@ -289,17 +301,16 @@ jobs:
working-directory: ${{ inputs.working-directory }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
- name: Set up Python
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ inputs.working-directory }}
cache-key: release
enable-cache: true
cache-suffix: "release"
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v7
with:
name: dist
path: ${{ inputs.working-directory }}/dist/
@@ -311,5 +322,6 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: false
tag: ${{needs.build.outputs.tag}}
name: ${{ needs.build.outputs.pkg-name }}==${{ needs.build.outputs.version }}
body: ${{ needs.release-notes.outputs.release-body }}
commit: ${{ github.sha }}
-38
View File
@@ -1,38 +0,0 @@
name: JS Release
on:
workflow_dispatch:
jobs:
publish:
# Disallow publishing from branches that aren't `main`.
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
strategy:
matrix:
working-directory:
- "libs/sdk-js"
defaults:
run:
working-directory: ${{ matrix.working-directory }}
steps:
- uses: actions/checkout@v4
# JS Build
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "yarn"
cache-dependency-path: ${{ matrix.working-directory }}/yarn.lock
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build
- name: Publish package to NPM
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
npm publish
-28
View File
@@ -1,28 +0,0 @@
name: Check File Size
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
file-size-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
- name: Filter by size
run: |
large_added_files=$(find ${{ steps.changed-files.outputs.added_files }} -maxdepth 0 -size +1M)
if [ -n "$large_added_files" ]; then
echo "Large files added: $large_added_files"
echo "# Large files added:" >> $GITHUB_STEP_SUMMARY
echo "$large_added_files" >> $GITHUB_STEP_SUMMARY
exit 1
fi
+45
View File
@@ -0,0 +1,45 @@
name: UV Lock Upgrade
on:
schedule:
# run at midnight every Sunday
- cron: '0 0 * * 0'
# allow manual triggering
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
upgrade-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
# use minimum supported Python version
python-version: "3.10"
enable-cache: true
cache-suffix: "uv-lock-upgrade"
- name: Run uv lock --upgrade in all Python packages
run: make lock-upgrade
- name: Create Pull Request
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore(deps): upgrade dependencies with `uv lock --upgrade`"
title: "chore(deps): upgrade dependencies with `uv lock --upgrade`"
body: |
This PR updates the dependencies in all Python packages using `uv lock --upgrade`.
This is an automated PR created by the UV Lock Upgrade workflow.
branch: deps/uv-lock-upgrade
delete-branch: true
labels: |
dependencies
+4 -81
View File
@@ -6,9 +6,6 @@ __pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
@@ -54,27 +51,12 @@ coverage.xml
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
docs/docs/_build/
# PyBuilder
target/
@@ -89,23 +71,9 @@ ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.envrc
@@ -117,16 +85,6 @@ ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
@@ -138,42 +96,7 @@ dmypy.json
# macOS display setting files
.DS_Store
# Wandb directory
wandb/
# asdf tool versions
.tool-versions
/.ruff_cache/
*.pkl
*.bin
# integration test artifacts
data_map*
\[('_type', 'fake'), ('stop', None)]
# Replit files
*replit*
node_modules
docs/.yarn/
docs/node_modules/
docs/.docusaurus/
docs/.cache-loader/
docs/_dist
docs/api_reference/api_reference.rst
docs/api_reference/experimental_api_reference.rst
docs/api_reference/_build
docs/api_reference/*/
!docs/api_reference/_static/
!docs/api_reference/templates/
!docs/api_reference/themes/
docs/docs_skeleton/build
docs/docs_skeleton/node_modules
docs/docs_skeleton/yarn.lock
# Any new jupyter notebooks
# not intended for the repo
Untitled*.ipynb
Chinook.db
.vercel
.turbo
.editorconfig
.scratch
-4
View File
@@ -1,4 +0,0 @@
{
"aliveStatusCodes": [200, 206, 402],
"ignorePatterns": ["*dcbadge.vercel.app*"]
}
+55
View File
@@ -0,0 +1,55 @@
# AGENTS Instructions
This repository is a monorepo. Each library lives in a subdirectory under `libs/`.
When you modify code in any library, run the following commands in that library's directory before creating a pull request:
- `make format` run code formatters
- `make lint` run the linter
- `make test` execute the test suite
To run a particular test file or to pass additional pytest options you can specify the `TEST` variable:
```txt
TEST=path/to/test.py make test
```
Other pytest arguments can also be supplied inside the `TEST` variable.
## Libraries
The repository contains several Python and JavaScript/TypeScript libraries.
Below is a high-level overview:
- **checkpoint** base interfaces for LangGraph checkpointers.
- **checkpoint-postgres** Postgres implementation of the checkpoint saver.
- **checkpoint-sqlite** SQLite implementation of the checkpoint saver.
- **cli** official command-line interface for LangGraph.
- **langgraph** core framework for building stateful, multi-actor agents.
- **prebuilt** high-level APIs for creating and running agents and tools.
- **sdk-js** JS/TS SDK for interacting with the LangGraph REST API.
- **sdk-py** Python SDK for the LangGraph Server API.
### Dependency map
The diagram below lists downstream libraries for each production dependency as
declared in that library's `pyproject.toml` (or `package.json`).
```text
checkpoint
├── checkpoint-postgres
├── checkpoint-sqlite
├── prebuilt
└── langgraph
prebuilt
└── langgraph
sdk-py
├── langgraph
└── cli
sdk-js (standalone)
```
Changes to a library may impact all of its dependents shown above.
+55
View File
@@ -0,0 +1,55 @@
# AGENTS Instructions
This repository is a monorepo. Each library lives in a subdirectory under `libs/`.
When you modify code in any library, run the following commands in that library's directory before creating a pull request:
- `make format` run code formatters
- `make lint` run the linter
- `make test` execute the test suite
To run a particular test file or to pass additional pytest options you can specify the `TEST` variable:
```
TEST=path/to/test.py make test
```
Other pytest arguments can also be supplied inside the `TEST` variable.
## Libraries
The repository contains several Python and JavaScript/TypeScript libraries.
Below is a high-level overview:
- **checkpoint** base interfaces for LangGraph checkpointers.
- **checkpoint-postgres** Postgres implementation of the checkpoint saver.
- **checkpoint-sqlite** SQLite implementation of the checkpoint saver.
- **cli** official command-line interface for LangGraph.
- **langgraph** core framework for building stateful, multi-actor agents.
- **prebuilt** high-level APIs for creating and running agents and tools.
- **sdk-js** JS/TS SDK for interacting with the LangGraph REST API.
- **sdk-py** Python SDK for the LangGraph Server API.
### Dependency map
The diagram below lists downstream libraries for each production dependency as
declared in that library's `pyproject.toml` (or `package.json`).
```text
checkpoint
├── checkpoint-postgres
├── checkpoint-sqlite
├── prebuilt
└── langgraph
prebuilt
└── langgraph
sdk-py
├── langgraph
└── cli
sdk-js (standalone)
```
Changes to a library may impact all of its dependents shown above.
-293
View File
@@ -1,293 +0,0 @@
# Contributing to LangGraph
Thank you for being interested in contributing to LangGraph!
## General guidelines
Here are some things to keep in mind for all types of contributions:
- Follow the ["fork and pull request"](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project) workflow.
- Fill out the checked-in pull request template when opening pull requests. Note related issues and tag relevant maintainers.
- Ensure your PR passes formatting, linting, and testing checks before requesting a review.
- If you would like comments or feedback, please open an issue or discussion and tag a maintainer.
- Backwards compatibility is key. Your changes must not be breaking, except in case of critical bug and security fixes.
- Look for duplicate PRs or issues that have already been opened before opening a new one.
- Keep scope as isolated as possible. As a general rule, your changes should not affect more than one package at a time.
### Bugfixes
For bug fixes, please open up an issue before proposing a fix to ensure the proposal properly addresses the underlying problem. In general, bug fixes should all have an accompanying unit test that fails before the fix.
### New features
For new features, please start a new [discussion](https://github.com/langchain-ai/langgraph/discussions), where the maintainers will help with scoping out the necessary changes.
## Contribute Documentation
Documentation is a vital part of LangGraph. We welcome both new documentation for new features and
community improvements to our current documentation. Please read the resources below before getting started:
- [Documentation style guide](#documentation-style-guide)
- [Documentation setup](#setup)
## Documentation Style Guide
As LangGraph continues to grow, the surface area of documentation required to cover it continues to grow too.
This page provides guidelines for anyone writing documentation for LangGraph, as well as some of our philosophies around organization and structure.
## Philosophy
LangGraph's documentation follows the [Diataxis framework](https://diataxis.fr).
Under this framework, all documentation falls under one of four categories: [Tutorials](#tutorials),
[How-to guides](#how-to-guides),
[References](#references), and [Explanations (aka conceptual guides)](#conceptual-guide).
### Tutorials
Tutorials are lessons that take the reader through a practical activity. Their purpose is to help the user
gain understanding of concepts and how they interact by showing one way to achieve some goal in a hands-on way.
They should **avoid** giving
multiple permutations of ways to achieve that goal in-depth. Choice is burdensome. Instead, they should guide a new user through a recommended path to accomplishing a concrete goal. While the end result of a tutorial does not necessarily need to
be completely production-ready, it should be useful and practically satisfy the the goal that you clearly stated in the tutorial's introduction.
To quote the Diataxis website:
> A tutorial serves the users *acquisition* of skills and knowledge - their study. Its purpose is not to help the user get something done, but to help them learn.
In LangGraph, these are often higher level guides that show off end-to-end use cases.
Some examples include:
- [Build a Customer Support Bot](https://langchain-ai.github.io/langgraph/tutorials/customer-support/customer-support/)
- [Build a SQL Agent](https://langchain-ai.github.io/langgraph/tutorials/sql-agent/)
Here are some high-level tips on writing a good tutorial:
- Focus on guiding the user to get something done, but keep in mind the end-goal is more to impart principles than to create a perfect production system.
- Be specific, not abstract and follow one path.
- No need to go deeply into alternative approaches, but its ok to reference them, ideally with a link to an appropriate how-to guide.
- Get "a point on the board" as soon as possible - something the user can run that outputs something.
- You can iterate and expand afterwards.
- Try to frequently checkpoint at given steps where the user can run code and see progress.
- Focus on results, not technical explanation.
- Crosslink heavily to appropriate conceptual/reference pages
- The first time you mention a LangGraph concept, use its full name (e.g. "human-in-the-loop"), and link to its conceptual/other documentation page.
- It's also helpful to add a prerequisite callout that links to any pages with necessary background information.
- End with a recap/next steps section summarizing what the tutorial covered and future reading, such as related how-to guides.
- Use phrases like "Next we can run X & Y. We will expect Z.". Then afterwards, use language like "Notice Z" that recalls our expectations and directs the reader's attention to the topic we are trying to teach.
- Do not shy away from repetition.
### How-to guides
A how-to guide, as the name implies, demonstrates how to do something discrete and specific.
It should assume that the user is already familiar with underlying concepts, and is trying to solve an immediate problem, but
should still give some background or list the scenarios where the information contained within can be relevant.
They can and should discuss alternatives if one approach may be better than another in certain cases.
To quote the Diataxis website:
> A how-to guide serves the work of the already-competent user, whom you can assume to know what they want to do, and to be able to follow your instructions correctly.
Some examples include:
- [How to add persistence to your graph](https://langchain-ai.github.io/langgraph/how-tos/persistence/)
- [How to view and update past graph state](https://langchain-ai.github.io/langgraph/how-tos/human_in_the_loop/time-travel/)
Here are some high-level tips on writing a good how-to guide:
- Clearly explain what you are guiding the user through at the start
- Assume higher intent than a tutorial and show what the user needs to do to get that task done
- Assume familiarity of concepts, but explain why suggested actions are helpful
- Crosslink heavily to conceptual/reference pages
- Discuss alternatives and responses to real-world tradeoffs that may arise when solving a problem
- Use lots of example code, ideally within complete code blocks that the reader can copy and run.
- End with a recap/next steps section summarizing what the tutorial covered and future reading, such as other related how-to guides
### Conceptual guides
LangGraph's conceptual guides fall under the **Explanation** quadrant of Diataxis. They should cover LangChain terms and concepts
in a more abstract way than how-to guides or tutorials, and should be geared towards curious users interested in
gaining a deeper understanding of the framework. Try to avoid excessively large code examples. The goal here is to
impart perspective to the user rather than to finish a practical project. These guides should cover **why** things work they way they do.
To quote the Diataxis website:
> The perspective of explanation is higher and wider than that of the other types. It does not take the users eye-level view, as in a how-to guide, or a close-up view of the machinery, like reference material. Its scope in each case is a topic - “an area of knowledge”, that somehow has to be bounded in a reasonable, meaningful way.
Some examples include:
- [What does it mean to be agentic?](https://langchain-ai.github.io/langgraph/concepts/high_level/)
- [Tool calling](https://langchain-ai.github.io/langgraph/concepts/agentic_concepts/#tool-calling)
Here are some high-level tips on writing a good conceptual guide:
- Explain design decisions. Why does concept X exist and why was it designed this way?
- Use analogies and reference other concepts and alternatives
- Avoid blending in too much reference content
- You can and should reference content covered in other guides, but make sure to link to them
### References
References contain detailed, low-level information that describes exactly what functionality exists and how to use it.
In LangGraph, this is mainly our API reference pages, which are populated from docstrings within code.
References pages are generally not read end-to-end, but are consulted as necessary when a user needs to know
how to use something specific.
To quote the Diataxis website:
> The only purpose of a reference guide is to describe, as succinctly as possible, and in an orderly way. Whereas the content of tutorials and how-to guides are led by needs of the user, reference material is led by the product it describes.
Many of the reference pages in LangChain are automatically generated from code,
but here are some high-level tips on writing a good docstring:
- Be concise
- Discuss special cases and deviations from a user's expectations
- Go into detail on required inputs and outputs
- Light details on when one might use the feature are fine, but in-depth details belong in other sections.
Each category serves a distinct purpose and requires a specific approach to writing and structuring the content.
## General guidelines
Here are some other guidelines you should think about when writing and organizing documentation.
We generally do not merge new tutorials from outside contributors without an actue need.
We welcome updates as well as new integration docs, how-tos, and references.
### Avoid duplication
Multiple pages that cover the same material in depth are difficult to maintain and cause confusion. There should
be only one (very rarely two), canonical pages for a given concept or feature. Instead, you should link to other guides.
### Link to other sections
Because sections of the docs do not exist in a vacuum, it is important to link to other sections as often as possible
to allow a developer to learn more about an unfamiliar topic inline.
This includes linking to the API references as well as conceptual sections!
### Be concise
In general, take a less-is-more approach. If a section with a good explanation of a concept already exists, you should link to it rather than
re-explain it, unless the concept you are documenting presents some new wrinkle.
Be concise, including in code samples.
### General style
- Use active voice and present tense whenever possible
- Use examples and code snippets to illustrate concepts and usage
- Use appropriate header levels (`#`, `##`, `###`, etc.) to organize the content hierarchically
- Use fewer cells with more code to make copy/paste easier
- Use bullet points and numbered lists to break down information into easily digestible chunks
- Use tables (especially for **Reference** sections) and diagrams often to present information visually
- Include the table of contents for longer documentation pages to help readers navigate the content, but hide it for shorter pages
## Setup
LangChain documentation consists of two components:
1. Main Documentation: Hosted at [https://langchain-ai.github.io](https://langchain-ai.github.io/langgraph/),
this comprehensive resource serves as the primary user-facing documentation.
It covers a wide array of topics, including tutorials, use cases, integrations,
and more, offering extensive guidance on building with LangGraph.
The content for this documentation lives in the `/docs` directory of the monorepo.
2. In-code Documentation: This is documentation of the codebase itself, which is also
used to generate the externally facing [API Reference](https://langchain-ai.github.io/langgraph/reference/graphs/).
The content for the API reference is autogenerated by scanning the docstrings in the codebase. For this reason we ask that developers document their code well.
We appreciate all contributions to the documentation, whether it be fixing a typo,
adding a new tutorial or example and whether it be in the main documentation or the API Reference.
### 📜 Main Documentation
The content for the main documentation is located in the `/docs` directory of the monorepo.
The documentation is written using a combination of ipython notebooks (`.ipynb` files)
and markdown (`.md` files). The notebooks are converted to markdown
and then built using [MkDocs](https://www.mkdocs.org/).
Feel free to make contributions to the main documentation! 🥰
After modifying the documentation:
1. Run the linting and formatting commands (see below) to ensure that the documentation is well-formatted and free of errors.
2. Optionally build the documentation locally to verify that the changes look good.
3. Make a pull request with the changes.
### ⚒️ Linting and Building Documentation Locally
After writing up the documentation, you may want to lint and build the documentation
locally to ensure that it looks good and is free of errors.
If you're unable to build it locally that's okay as well, as you will be able to
see a preview of the documentation on the pull request page.
From the **monorepo root**, run the following command to install the dependencies:
```bash
poetry install --with docs --no-root
```
#### Building
The code that builds the documentation is located in the `/docs` directory of the monorepo.
Before building the documentation, it is always a good idea to clean the build directory:
```bash
make clean-docs
```
You can build and preview the documentation as outlined below:
```bash
make serve-docs
```
#### Linting
The documentation is linted from the **monorepo root**. To lint it, run the following from there:
```bash
make spellcheck
```
### In-code Documentation
The in-code documentation is autogenerated from docstrings.
For the API reference to be useful, the codebase must be well-documented. This means that all functions, classes, and methods should have a docstring that explains what they do, what the arguments are, and what the return value is. This is a good practice in general, but it is especially important for LangChain because the API reference is the primary resource for developers to understand how to use the codebase.
We generally follow the [Google Python Style Guide](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) for docstrings.
Here is an example of a well-documented function:
```python
def my_function(arg1: int, arg2: str) -> float:
"""This is a short description of the function. (It should be a single sentence.)
This is a longer description of the function. It should explain what
the function does, what the arguments are, and what the return value is.
It should wrap at 88 characters.
Examples:
This is a section for examples of how to use the function.
.. code-block:: python
my_function(1, "hello")
Args:
arg1: This is a description of arg1. We do not need to specify the type since
it is already specified in the function signature.
arg2: This is a description of arg2.
Returns:
This is a description of the return value.
"""
return 3.14
```
+61 -21
View File
@@ -1,28 +1,68 @@
.PHONY: build-docs serve-docs serve-clean-docs clean-docs codespell build-typedoc
# Define the directories containing projects
LIBS_DIRS := $(wildcard libs/*)
build-typedoc:
cd libs/sdk-js && yarn install --include-dev && yarn typedoc
cd libs/sdk-js && yarn --silent concat-md --decrease-title-levels --ignore=js_ts_sdk_ref.md --start-title-level-at 2 docs > ../../docs/docs/cloud/reference/sdk/js_ts_sdk_ref.md 2>/dev/null
# Add links to the monorepo
sed -e '1,10s|@langchain/langgraph-sdk|[@langchain/langgraph-sdk](https://github.com/langchain-ai/langgraph/tree/main/libs/sdk-js)|g' docs/docs/cloud/reference/sdk/js_ts_sdk_ref.md > temp_file && mv temp_file docs/docs/cloud/reference/sdk/js_ts_sdk_ref.md
# Default target
.PHONY: all
all: lint format lock test
# Install dependencies for all projects
.PHONY: install
install:
@echo "Creating virtual environment..."
@uv venv
@for dir in $(LIBS_DIRS); do \
if [ -f $$dir/pyproject.toml ]; then \
echo "Installing dependencies for $$dir"; \
uv pip install -e $$dir; \
fi; \
done
# Lint all projects
.PHONY: lint
lint:
@for dir in $(LIBS_DIRS); do \
if [ -f $$dir/Makefile ]; then \
echo "Running lint in $$dir"; \
$(MAKE) -C $$dir lint; \
fi; \
done
build-docs: build-typedoc
poetry run python docs/_scripts/copy_notebooks.py
poetry run python -m mkdocs build --clean -f docs/mkdocs.yml --strict
# Format all projects
.PHONY: format
format:
@for dir in $(LIBS_DIRS); do \
if [ -f $$dir/Makefile ]; then \
echo "Running format in $$dir"; \
$(MAKE) -C $$dir format; \
fi; \
done
serve-clean-docs: clean-docs
poetry run python docs/_scripts/copy_notebooks.py
poetry run python -m mkdocs serve -c -f docs/mkdocs.yml --strict -w ./libs/langgraph
# Lock all projects
.PHONY: lock
lock:
@for dir in $(LIBS_DIRS); do \
if [ -f $$dir/Makefile ]; then \
echo "Running lock in $$dir"; \
(cd $$dir && uv lock); \
fi; \
done
serve-docs: build-typedoc
poetry run python docs/_scripts/copy_notebooks.py
poetry run python -m mkdocs serve -f docs/mkdocs.yml -w ./libs/langgraph --dirty
# Lock all projects and upgrade dependencies
.PHONY: lock-upgrade
lock-upgrade:
@for dir in $(LIBS_DIRS); do \
if [ -f $$dir/Makefile ]; then \
echo "Running lock-upgrade in $$dir"; \
(cd $$dir && uv lock --upgrade); \
fi; \
done
clean-docs:
find ./docs/docs -name "*.ipynb" -type f -delete
rm -rf docs/site
codespell:
./docs/codespell_notebooks.sh .
# Test all projects
.PHONY: test
test:
@for dir in $(LIBS_DIRS); do \
if [ -f $$dir/Makefile ]; then \
echo "Running test in $$dir"; \
$(MAKE) -C $$dir test; \
fi; \
done
+56 -196
View File
@@ -1,231 +1,91 @@
# 🦜🕸️LangGraph
<picture class="github-only">
<source media="(prefers-color-scheme: light)" srcset="https://langchain-ai.github.io/langgraph/static/wordmark_dark.svg">
<source media="(prefers-color-scheme: dark)" srcset="https://langchain-ai.github.io/langgraph/static/wordmark_light.svg">
<img alt="LangGraph Logo" src="https://langchain-ai.github.io/langgraph/static/wordmark_dark.svg" width="80%">
</picture>
![Version](https://img.shields.io/pypi/v/langgraph)
<div>
<br>
</div>
[![Version](https://img.shields.io/pypi/v/langgraph.svg)](https://pypi.org/project/langgraph/)
[![Downloads](https://static.pepy.tech/badge/langgraph/month)](https://pepy.tech/project/langgraph)
[![Open Issues](https://img.shields.io/github/issues-raw/langchain-ai/langgraph)](https://github.com/langchain-ai/langgraph/issues)
[![Docs](https://img.shields.io/badge/docs-latest-blue)](https://langchain-ai.github.io/langgraph/)
[![Docs](https://img.shields.io/badge/docs-latest-blue)](https://docs.langchain.com/oss/python/langgraph/overview)
⚡ Building language agents as graphs ⚡
Trusted by companies shaping the future of agents including Klarna, Replit, Elastic, and more LangGraph is a low-level orchestration framework for building, managing, and deploying long-running, stateful agents.
> [!NOTE]
> Looking for the JS version? Click [here](https://github.com/langchain-ai/langgraphjs) ([JS docs](https://langchain-ai.github.io/langgraphjs/)).
## Get started
## Overview
Install LangGraph:
[LangGraph](https://langchain-ai.github.io/langgraph/) is a library for building stateful, multi-actor applications with LLMs, used to create agent and multi-agent workflows. Compared to other LLM frameworks, it offers these core benefits: cycles, controllability, and persistence. LangGraph allows you to define flows that involve cycles, essential for most agentic architectures, differentiating it from DAG-based solutions. As a very low-level framework, it provides fine-grained control over both the flow and state of your application, crucial for creating reliable agents. Additionally, LangGraph includes built-in persistence, enabling advanced human-in-the-loop and memory features.
LangGraph is inspired by [Pregel](https://research.google/pubs/pub37252/) and [Apache Beam](https://beam.apache.org/). The public interface draws inspiration from [NetworkX](https://networkx.org/documentation/latest/). LangGraph is built by LangChain Inc, the creators of LangChain, but can be used without LangChain.
### Key Features
- **Cycles and Branching**: Implement loops and conditionals in your apps.
- **Persistence**: Automatically save state after each step in the graph. Pause and resume the graph execution at any point to support error recovery, human-in-the-loop workflows, time travel and more.
- **Human-in-the-Loop**: Interrupt graph execution to approve or edit next action planned by the agent.
- **Streaming Support**: Stream outputs as they are produced by each node (including token streaming).
- **Integration with LangChain**: LangGraph integrates seamlessly with [LangChain](https://github.com/langchain-ai/langchain/) and [LangSmith](https://docs.smith.langchain.com/) (but does not require them).
## Installation
```shell
```
pip install -U langgraph
```
## Example
One of the central concepts of LangGraph is state. Each graph execution creates a state that is passed between nodes in the graph as they execute, and each node updates this internal state with its return value after it executes. The way that the graph updates its internal state is defined by either the type of graph chosen or a custom function.
Let's take a look at a simple example of an agent that can use a search tool.
```shell
pip install langchain-anthropic
```
```shell
export ANTHROPIC_API_KEY=sk-...
```
Optionally, we can set up [LangSmith](https://docs.smith.langchain.com/) for best-in-class observability.
```shell
export LANGSMITH_TRACING=true
export LANGSMITH_API_KEY=lsv2_sk_...
```
Create a simple workflow:
```python
from typing import Annotated, Literal, TypedDict
from langchain_core.messages import HumanMessage
from langchain_anthropic import ChatAnthropic
from langchain_core.tools import tool
from langgraph.checkpoint.memory import MemorySaver
from langgraph.graph import END, StateGraph, MessagesState
from langgraph.prebuilt import ToolNode
from langgraph.graph import START, StateGraph
from typing_extensions import TypedDict
# Define the tools for the agent to use
@tool
def search(query: str):
"""Call to surf the web."""
# This is a placeholder, but don't tell the LLM that...
if "sf" in query.lower() or "san francisco" in query.lower():
return "It's 60 degrees and foggy."
return "It's 90 degrees and sunny."
class State(TypedDict):
text: str
tools = [search]
tool_node = ToolNode(tools)
model = ChatAnthropic(model="claude-3-5-sonnet-20240620", temperature=0).bind_tools(tools)
# Define the function that determines whether to continue or not
def should_continue(state: MessagesState) -> Literal["tools", END]:
messages = state['messages']
last_message = messages[-1]
# If the LLM makes a tool call, then we route to the "tools" node
if last_message.tool_calls:
return "tools"
# Otherwise, we stop (reply to the user)
return END
def node_a(state: State) -> dict:
return {"text": state["text"] + "a"}
# Define the function that calls the model
def call_model(state: MessagesState):
messages = state['messages']
response = model.invoke(messages)
# We return a list, because this will get added to the existing list
return {"messages": [response]}
def node_b(state: State) -> dict:
return {"text": state["text"] + "b"}
# Define a new graph
workflow = StateGraph(MessagesState)
graph = StateGraph(State)
graph.add_node("node_a", node_a)
graph.add_node("node_b", node_b)
graph.add_edge(START, "node_a")
graph.add_edge("node_a", "node_b")
# Define the two nodes we will cycle between
workflow.add_node("agent", call_model)
workflow.add_node("tools", tool_node)
# Set the entrypoint as `agent`
# This means that this node is the first one called
workflow.set_entry_point("agent")
# We now add a conditional edge
workflow.add_conditional_edges(
# First, we define the start node. We use `agent`.
# This means these are the edges taken after the `agent` node is called.
"agent",
# Next, we pass in the function that will determine which node is called next.
should_continue,
)
# We now add a normal edge from `tools` to `agent`.
# This means that after `tools` is called, `agent` node is called next.
workflow.add_edge("tools", 'agent')
# Initialize memory to persist state between graph runs
checkpointer = MemorySaver()
# Finally, we compile it!
# This compiles it into a LangChain Runnable,
# meaning you can use it as you would any other runnable.
# Note that we're (optionally) passing the memory when compiling the graph
app = workflow.compile(checkpointer=checkpointer)
# Use the Runnable
final_state = app.invoke(
{"messages": [HumanMessage(content="what is the weather in sf")]},
config={"configurable": {"thread_id": 42}}
)
final_state["messages"][-1].content
print(graph.compile().invoke({"text": ""}))
# {'text': 'ab'}
```
```
"Based on the search results, I can tell you that the current weather in San Francisco is:\n\nTemperature: 60 degrees Fahrenheit\nConditions: Foggy\n\nSan Francisco is known for its microclimates and frequent fog, especially during the summer months. The temperature of 60°F (about 15.5°C) is quite typical for the city, which tends to have mild temperatures year-round. The fog, often referred to as "Karl the Fog" by locals, is a characteristic feature of San Francisco\'s weather, particularly in the mornings and evenings.\n\nIs there anything else you\'d like to know about the weather in San Francisco or any other location?"
```
Get started with the [LangGraph Quickstart](https://docs.langchain.com/oss/python/langgraph/quickstart).
Now when we pass the same `"thread_id"`, the conversation context is retained via the saved state (i.e. stored list of messages)
To quickly build agents with LangChain's `create_agent` (built on LangGraph), see the [LangChain Agents documentation](https://docs.langchain.com/oss/python/langchain/agents).
```python
final_state = app.invoke(
{"messages": [HumanMessage(content="what about ny")]},
config={"configurable": {"thread_id": 42}}
)
final_state["messages"][-1].content
```
## Core benefits
```
"Based on the search results, I can tell you that the current weather in New York City is:\n\nTemperature: 90 degrees Fahrenheit (approximately 32.2 degrees Celsius)\nConditions: Sunny\n\nThis weather is quite different from what we just saw in San Francisco. New York is experiencing much warmer temperatures right now. Here are a few points to note:\n\n1. The temperature of 90°F is quite hot, typical of summer weather in New York City.\n2. The sunny conditions suggest clear skies, which is great for outdoor activities but also means it might feel even hotter due to direct sunlight.\n3. This kind of weather in New York often comes with high humidity, which can make it feel even warmer than the actual temperature suggests.\n\nIt's interesting to see the stark contrast between San Francisco's mild, foggy weather and New York's hot, sunny conditions. This difference illustrates how varied weather can be across different parts of the United States, even on the same day.\n\nIs there anything else you'd like to know about the weather in New York or any other location?"
```
LangGraph provides low-level supporting infrastructure for *any* long-running, stateful workflow or agent. LangGraph does not abstract prompts or architecture, and provides the following central benefits:
### Step-by-step Breakdown
- [Durable execution](https://docs.langchain.com/oss/python/langgraph/durable-execution): Build agents that persist through failures and can run for extended periods, automatically resuming from exactly where they left off.
- [Human-in-the-loop](https://docs.langchain.com/oss/python/langgraph/interrupts): Seamlessly incorporate human oversight by inspecting and modifying agent state at any point during execution.
- [Comprehensive memory](https://docs.langchain.com/oss/python/langgraph/memory): Create truly stateful agents with both short-term working memory for ongoing reasoning and long-term persistent memory across sessions.
- [Debugging with LangSmith](http://www.langchain.com/langsmith): Gain deep visibility into complex agent behavior with visualization tools that trace execution paths, capture state transitions, and provide detailed runtime metrics.
- [Production-ready deployment](https://docs.langchain.com/langsmith/app-development): Deploy sophisticated agent systems confidently with scalable infrastructure designed to handle the unique challenges of stateful, long-running workflows.
1. <details>
<summary>Initialize the model and tools.</summary>
## LangGraphs ecosystem
- we use `ChatAnthropic` as our LLM. **NOTE:** we need make sure the model knows that it has these tools available to call. We can do this by converting the LangChain tools into the format for OpenAI tool calling using the `.bind_tools()` method.
- we define the tools we want to use - a search tool in our case. It is really easy to create your own tools - see documentation here on how to do that [here](https://python.langchain.com/docs/modules/agents/tools/custom_tools).
</details>
While LangGraph can be used standalone, it also integrates seamlessly with any LangChain product, giving developers a full suite of tools for building agents. To improve your LLM application development, pair LangGraph with:
2. <details>
<summary>Initialize graph with state.</summary>
- [LangSmith](http://www.langchain.com/langsmith) — Helpful for agent evals and observability. Debug poor-performing LLM app runs, evaluate agent trajectories, gain visibility in production, and improve performance over time.
- [LangSmith Deployment](https://docs.langchain.com/langsmith/deployments) — Deploy and scale agents effortlessly with a purpose-built deployment platform for long running, stateful workflows. Discover, reuse, configure, and share agents across teams — and iterate quickly with visual prototyping in [LangGraph Studio](https://docs.langchain.com/oss/python/langgraph/studio).
- [LangChain](https://docs.langchain.com/oss/python/langchain/overview) Provides integrations and composable components to streamline LLM application development.
- we initialize graph (`StateGraph`) by passing state schema (in our case `MessagesState`)
- `MessagesState` is a prebuilt state schema that has one attribute -- a list of LangChain `Message` objects, as well as logic for merging the updates from each node into the state
</details>
> [!NOTE]
> Looking for the JS version of LangGraph? See the [JS repo](https://github.com/langchain-ai/langgraphjs) and the [JS docs](https://docs.langchain.com/oss/javascript/langgraph/overview).
3. <details>
<summary>Define graph nodes.</summary>
## Additional resources
There are two main nodes we need:
- [Guides](https://docs.langchain.com/oss/python/langgraph/overview): Quick, actionable code snippets for topics such as streaming, adding memory & persistence, and design patterns (e.g. branching, subgraphs, etc.).
- [Reference](https://reference.langchain.com/python/langgraph/): Detailed reference on core classes, methods, how to use the graph and checkpointing APIs, and higher-level prebuilt components.
- [Examples](https://docs.langchain.com/oss/python/langgraph/agentic-rag): Guided examples on getting started with LangGraph.
- [LangChain Forum](https://forum.langchain.com/): Connect with the community and share all of your technical questions, ideas, and feedback.
- [LangChain Academy](https://academy.langchain.com/courses/intro-to-langgraph): Learn the basics of LangGraph in our free, structured course.
- [Case studies](https://www.langchain.com/built-with-langgraph): Hear how industry leaders use LangGraph to ship AI applications at scale.
- The `agent` node: responsible for deciding what (if any) actions to take.
- The `tools` node that invokes tools: if the agent decides to take an action, this node will then execute that action.
</details>
## Acknowledgements
4. <details>
<summary>Define entry point and graph edges.</summary>
First, we need to set the entry point for graph execution - `agent` node.
Then we define one normal and one conditional edge. Conditional edge means that the destination depends on the contents of the graph's state (`MessageState`). In our case, the destination is not known until the agent (LLM) decides.
- Conditional edge: after the agent is called, we should either:
- a. Run tools if the agent said to take an action, OR
- b. Finish (respond to the user) if the agent did not ask to run tools
- Normal edge: after the tools are invoked, the graph should always return to the agent to decide what to do next
</details>
5. <details>
<summary>Compile the graph.</summary>
- When we compile the graph, we turn it into a LangChain [Runnable](https://python.langchain.com/v0.2/docs/concepts/#runnable-interface), which automatically enables calling `.invoke()`, `.stream()` and `.batch()` with your inputs
- We can also optionally pass checkpointer object for persisting state between graph runs, and enabling memory, human-in-the-loop workflows, time travel and more. In our case we use `MemorySaver` - a simple in-memory checkpointer
</details>
6. <details>
<summary>Execute the graph.</summary>
1. LangGraph adds the input message to the internal state, then passes the state to the entrypoint node, `"agent"`.
2. The `"agent"` node executes, invoking the chat model.
3. The chat model returns an `AIMessage`. LangGraph adds this to the state.
4. Graph cycles the following steps until there are no more `tool_calls` on `AIMessage`:
- If `AIMessage` has `tool_calls`, `"tools"` node executes
- The `"agent"` node executes again and returns `AIMessage`
5. Execution progresses to the special `END` value and outputs the final state.
And as a result, we get a list of all our chat messages as output.
</details>
## Documentation
* [Tutorials](https://langchain-ai.github.io/langgraph/tutorials/): Learn to build with LangGraph through guided examples.
* [How-to Guides](https://langchain-ai.github.io/langgraph/how-tos/): Accomplish specific things within LangGraph, from streaming, to adding memory & persistence, to common design patterns (branching, subgraphs, etc.), these are the place to go if you want to copy and run a specific code snippet.
* [Conceptual Guides](https://langchain-ai.github.io/langgraph/concepts/): In-depth explanations of the key concepts and principles behind LangGraph, such as nodes, edges, state and more.
* [API Reference](https://langchain-ai.github.io/langgraph/reference/graphs/): Review important classes and methods, simple examples of how to use the graph and checkpointing APIs, higher-level prebuilt components and more.
* [Cloud (beta)](https://langchain-ai.github.io/langgraph/cloud/): With one click, deploy LangGraph applications to LangGraph Cloud.
## Contributing
For more information on how to contribute, see [here](https://github.com/langchain-ai/langgraph/blob/main/CONTRIBUTING.md).
LangGraph is inspired by [Pregel](https://research.google/pubs/pub37252/) and [Apache Beam](https://beam.apache.org/). The public interface draws inspiration from [NetworkX](https://networkx.org/documentation/latest/). LangGraph is built by LangChain Inc, the creators of LangChain, but can be used without LangChain.
-4
View File
@@ -1,4 +0,0 @@
*.ipynb
site/
docs/tutorials/**/*.png
docs/cloud/reference/sdk/js_ts_sdk_ref.md
-221
View File
@@ -1,221 +0,0 @@
import json
import os
import re
import shutil
from pathlib import Path
root_dir = Path(__file__).resolve().parents[2]
examples_dir = root_dir / "examples"
docs_dir = root_dir / "docs/docs"
how_tos_dir = docs_dir / "how-tos"
tutorials_dir = docs_dir / "tutorials"
cloud_how_tos_dir = docs_dir / "cloud/how-tos"
cloud_sdk_dir = docs_dir / "cloud"
_MANUAL = {
"how-tos": [
"state-context-key.ipynb",
"async.ipynb",
"stream-values.ipynb",
"stream-updates.ipynb",
"stream-multiple.ipynb",
"streaming-tokens.ipynb",
"streaming-tokens-without-langchain.ipynb",
"streaming-content.ipynb",
"streaming-events-from-within-tools.ipynb",
"streaming-events-from-within-tools-without-langchain.ipynb",
"streaming-from-final-node.ipynb",
"persistence.ipynb",
"input_output_schema.ipynb",
"pass_private_state.ipynb",
"memory/manage-conversation-history.ipynb",
"memory/delete-messages.ipynb",
"memory/add-summary-conversation-history.ipynb",
"persistence_postgres.ipynb",
"persistence_mongodb.ipynb",
"persistence_redis.ipynb",
"visualization.ipynb",
"state-model.ipynb",
"subgraph.ipynb",
"force-calling-a-tool-first.ipynb",
"pass-run-time-values-to-tools.ipynb",
"tool-calling.ipynb",
"tool-calling-errors.ipynb",
"pass-config-to-tools.ipynb",
"many-tools.ipynb",
"dynamic-returning-direct.ipynb",
"managing-agent-steps.ipynb",
"respond-in-format.ipynb",
"branching.ipynb",
"dynamically-returning-directly.ipynb",
"configuration.ipynb",
"map-reduce.ipynb",
"create-react-agent.ipynb",
"create-react-agent-system-prompt.ipynb",
"create-react-agent-memory.ipynb",
"create-react-agent-hitl.ipynb",
"human_in_the_loop/breakpoints.ipynb",
"human_in_the_loop/time-travel.ipynb",
"human_in_the_loop/edit-graph-state.ipynb",
"human_in_the_loop/wait-user-input.ipynb",
"node-retries.ipynb",
],
"tutorials": [
"introduction.ipynb",
"customer-support/customer-support.ipynb",
"tutorials/tnt-llm/tnt-llm.ipynb",
"tutorials/sql-agent.ipynb",
],
}
_MANUAL_INVERSE = {v: docs_dir / k for k, vs in _MANUAL.items() for v in vs}
_HOW_TOS = {"agent_executor", "chat_agent_executor_with_function_calling", "docs"}
_HIDE = set(
str(examples_dir / f)
for f in [
"agent_executor/base.ipynb",
"agent_executor/force-calling-a-tool-first.ipynb",
"agent_executor/high-level.ipynb",
"agent_executor/human-in-the-loop.ipynb",
"agent_executor/managing-agent-steps.ipynb",
"chat_agent_executor_with_function_calling/anthropic.ipynb",
"chat_agent_executor_with_function_calling/base.ipynb",
"chat_agent_executor_with_function_calling/dynamically-returning-directly.ipynb",
"chat_agent_executor_with_function_calling/force-calling-a-tool-first.ipynb",
"chat_agent_executor_with_function_calling/high-level-tools.ipynb",
"chat_agent_executor_with_function_calling/high-level.ipynb",
"chat_agent_executor_with_function_calling/human-in-the-loop.ipynb",
"chat_agent_executor_with_function_calling/managing-agent-steps.ipynb",
"chat_agent_executor_with_function_calling/prebuilt-tool-node.ipynb",
"chat_agent_executor_with_function_calling/respond-in-format.ipynb",
"chatbots/customer-support.ipynb",
"rag/langgraph_rag_agent_llama3_local.ipynb",
"rag/langgraph_self_rag_pinecone_movies.ipynb",
"rag/langgraph_adaptive_rag_cohere.ipynb",
"dynamically-returning-directly.ipynb",
"force-calling-a-tool-first.ipynb",
"managing-agent-steps.ipynb",
"respond-in-format.ipynb",
"quickstart.ipynb",
"human-in-the-loop.ipynb",
"learning.ipynb",
"docs/quickstart.ipynb",
"tutorials/rag-agent-testing.ipynb",
"tutorials/rag-agent-testing-local.ipynb",
"tutorials/tool-calling-agent-local.ipynb",
"time-travel.ipynb",
"code_assistant/langgraph_code_assistant_mistral.ipynb",
]
)
def clean_notebooks():
roots = (how_tos_dir, tutorials_dir)
for dir_ in roots:
traversed = []
for root, dirs, files in os.walk(dir_):
for file in files:
if file.endswith(".ipynb"):
os.remove(os.path.join(root, file))
# Now delete the dir if it is empty now
if root not in roots:
traversed.append(root)
for root in reversed(traversed):
if not os.listdir(root):
os.rmdir(root)
def update_notebook_links(notebook_path):
with open(notebook_path, "r", encoding="utf-8") as f:
notebook = json.load(f)
for cell in notebook["cells"]:
if cell["cell_type"] == "markdown":
for i, source in enumerate(cell["source"]):
# Update relative notebook links
cell["source"][i] = re.sub(
r"\[([^\]]+)\]\(([^:)]+\.ipynb)\)",
lambda m: transform_link(m.group(1), m.group(2)),
source,
)
with open(notebook_path, "w", encoding="utf-8") as f:
json.dump(notebook, f, indent=2)
def transform_link(text, link):
dir_path, filename = os.path.split(link)
# Remove the .ipynb extension
filename_without_ext = os.path.splitext(filename)[0]
# If it's a local link (starts with ./)
if link.startswith("./"):
# Change to parent directory and remove ./ prefix
new_link = f"../{filename_without_ext}/"
elif dir_path:
# If there's a directory path, keep it and add one more level up
new_link = f"../{dir_path}/{filename_without_ext}/"
else:
# If it's just a filename, simply go one level up
new_link = f"../{filename_without_ext}/"
return f"[{text}]({new_link})"
def copy_notebooks():
# Nested ones are mostly tutorials rn
for root, dirs, files in os.walk(examples_dir):
if any(
path.startswith(".") or path.startswith("__") for path in root.split(os.sep)
):
continue
if any(path in _HOW_TOS for path in root.split(os.sep)):
dst_dir = how_tos_dir
elif "sdk" in root.split(os.sep):
dst_dir = cloud_sdk_dir
elif "cloud_examples" in root.split(os.sep):
dst_dir = cloud_how_tos_dir
else:
dst_dir = tutorials_dir
for file in files:
dst_dir_ = dst_dir
if file.endswith((".ipynb", ".png")):
src_path = os.path.join(root, file)
if src_path in _HIDE:
print("Hiding:", src_path)
continue
dst_path = os.path.join(
dst_dir, os.path.relpath(src_path, examples_dir)
)
for k in _MANUAL_INVERSE:
if src_path.endswith(k):
overridden_dir = _MANUAL_INVERSE[k]
dst_path = os.path.join(
overridden_dir, os.path.relpath(src_path, examples_dir)
)
print(f"Overriding: {src_path} to {dst_path}")
break
# Avoid double nesting.
dst_path = dst_path.replace("tutorials/tutorials", "tutorials").replace(
"how-tos/how-tos", "how-tos"
)
os.makedirs(os.path.dirname(dst_path), exist_ok=True)
print(f"Copying: {src_path} to {dst_path}")
shutil.copy(src_path, dst_path)
# Convert all ./img/* to ../img/*
if file.endswith(".ipynb"):
with open(dst_path, "r") as f:
content = f.read()
content = content.replace("(./img/", "(../img/")
content = content.replace('src=\\"./img/', 'src=\\"../img/')
with open(dst_path, "w") as f:
f.write(content)
update_notebook_links(dst_path)
dst_dir = dst_dir_
if __name__ == "__main__":
clean_notebooks()
copy_notebooks()
-13
View File
@@ -1,13 +0,0 @@
ERROR_FOUND=0
for file in $(find $1 -name "*.ipynb"); do
OUTPUT=$(cat "$file" | jupytext --from ipynb --to py:percent | codespell -)
if [ -n "$OUTPUT" ]; then
echo "Errors found in $file"
echo "$OUTPUT"
ERROR_FOUND=1
fi
done
if [ "$ERROR_FOUND" -ne 0 ]; then
exit 1
fi
-111
View File
@@ -1,111 +0,0 @@
# API Concepts
This page describes the high-level concepts of the LangGraph Cloud API. The conceptual guide of LangGraph (Python library) is [here](../../concepts/index.md).
## Data Models
The LangGraph Cloud API consists of a few core data models: [Assistants](#assistants), [Threads](#threads), [Runs](#runs), and [Cron Jobs](#cron-jobs).
### Assistants
An assistant is a configured instance of a [`CompiledGraph`][compiledgraph]. It abstracts the cognitive architecture of the graph and contains instance specific configuration and metadata. Multiple assistants can reference the same graph but can contain different configuration and metadata, which may differentiate the behavior of the assistants. An assistant (i.e. the graph) is invoked as part of a run.
The LangGraph Cloud API provides several endpoints for creating and managing assistants. See the <a href="../reference/api/api_ref.html#tag/assistantscreate" target="_blank">API reference</a> for more details.
#### Configuring Assistants
You can save custom assistants from the same graph to set different default prompts, models, and other configurations without changing a line of code in your graph. This allows you the ability to quickly test out different configurations without having to rewrite your graph every time, and also give users the flexibility to select different configurations when using your LangGraph application. See <a href="https://langchain-ai.github.io/langgraph/cloud/how-tos/cloud_examples/configuration_cloud/">this</a> how-to for information on how to configure a deployed graph.
### Threads
A thread contains the accumulated state of a group of runs. If a run is executed on a thread, then the [state][state] of the underlying graph of the assistant will be persisted to the thread. A thread's current and historical state can be retrieved. To persist state, a thread must be created prior to executing a run.
The state of a thread at a particular point in time is called a checkpoint.
For more on threads and checkpoints, see this section of the [LangGraph conceptual guide](../../concepts/low_level.md#checkpointer).
The LangGraph Cloud API provides several endpoints for creating and managing threads and thread state. See the <a href="../reference/api/api_ref.html#tag/threadscreate" target="_blank">API reference</a> for more details.
### Runs
A run is an invocation of an assistant. 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.
The LangGraph Cloud API provides several endpoints for creating and managing runs. See the <a href="../reference/api/api_ref.html#tag/runscreate" target="_blank">API reference</a> for more details.
### Cron Jobs
It's often useful to run graphs on some schedule. LangGraph Cloud supports cron jobs, which run on a user defined schedule. The user specifies a schedule, an assistant, and some input. After than, on the specified schedule LangGraph cloud will:
- Create a new thread with the specified assistant
- Send the specified input to that thread
Note that this sends the same input to the thread every time. See the [how-to guide](../how-tos/cloud_examples/cron_jobs.ipynb) for creating cron jobs.
The LangGraph Cloud API provides several endpoints for creating and managing cron jobs. See the <a href="../reference/api/api_ref.html#tag/runscreate/POST/threads/{thread_id}/runs/crons" target="_blank">API reference</a> for more details.
## Features
The LangGraph Cloud API offers several features to support complex agent architectures.
### Streaming
Streaming is critical for making LLM applications feel responsive to end users. When creating a streaming run, the streaming mode determines what data is streamed back to the API client. The LangGraph Cloud API supports five streaming modes.
- `values`: Stream the full state of the graph after each node is executed. See the [how-to guide](../how-tos/stream_values.md) for streaming values.
- `messages`: Stream complete messages (at the end of node execution) as well as tokens for any messages generated inside a node. This mode is primarily meant for powering chat applications. This is only an option if your graph contains a `messages` key. See the [how-to guide](../how-tos/stream_messages.md) for streaming messages.
- `updates`: Streams updates to the state of the graph after each node is executed. See the [how-to guide](../how-tos/stream_updates.md) for streaming updates.
- `events`: Stream all events (including the state of the graph) after each node is executed. See the [how-to guide](../how-tos/stream_events.md) for streaming events. This can be used to do token-by-token streaming for LLMs.
- `debug`: Stream debug events after each node is executed. See the [how-to guide](../how-tos/stream_debug.md) for streaming debug events.
You can also specify multiple streaming modes at the same time. See the [how-to guide](../how-tos/stream_multiple.md) for configuring multiple streaming modes at the same time.
See the <a href="../reference/api/api_ref.html#tag/runscreate/POST/threads/{thread_id}/runs/stream" target="_blank">API reference</a> for how to create streaming runs.
### Human-in-the-Loop
There are many occasions where the graph cannot run completely autonomously. For instance, the user might need to input some additional arguments to a function call, or select the next edge for the graph to continue on. In these instances, we need to insert some human in the loop interaction, which you can learn about in the [human in the loop how-tos](../how-tos/index.md#human-in-the-loop).
### Double Texting
Many times users might interact with your graph in unintended ways. For instance, a user may send one message and before the graph has finished running send a second message. To solve this issue of "double-texting" (i.e. prompting the graph a second time before the first run has finished), LangGraph has provided four different solutions, all of which are covered in the [Double Texting how-tos](../how-tos/index.md#double-texting). These options are:
- `reject`: This is the simplest option, this just rejects any follow up runs and does not allow double texting. See the [how-to guide](../how-tos/reject_concurrent.md) for configuring the reject double text option.
- `enqueue`: This is a relatively simple option which continues the first run until it completes the whole run, then sends the new input as a separate run. See the [how-to guide](../how-tos/enqueue_concurrent.md) for configuring the enqueue double text option.
- `interrupt`: This option interrupts the current execution but saves all the work done up until that point. It then inserts the user input and continues from there. If you enable this option, your graph should be able to handle weird edge cases that may arise. See the [how-to guide](../how-tos/interrupt_concurrent.md) for configuring the interrupt double text option.
- `rollback`: This option rolls back all work done up until that point. It then sends the user input in, basically as if it just followed the original run input. See the [how-to guide](../how-tos/rollback_concurrent.md) for configuring the rollback double text option.
### Stateless Runs
All runs use the built-in checkpointer to store checkpoints for runs. However, it can often be useful to just kick off a run without worrying about explicitly creating a thread and without wanting to keep those checkpointers around. Stateless runs allow you to do this by exposing an endpoint that:
- Takes in user input
- Under the hood, creates a thread
- Runs the agent but skips all checkpointing steps
- Cleans up the thread afterwards
Stateless runs are still retried as regular retries are per node, while everything still in memory, so doesn't use checkpoints.
The only difference is in stateless background runs, if the task worker dies halfway (not because the run itself failed, for some external reason) then the whole run will be retried like any background run, but
- whereas a stateful background run would retry from the last successful checkpoint
- a stateless background run would retry from the beginning
See the [how-to guide](../how-tos/cloud_examples/stateless_runs.ipynb) for creating stateless runs.
### Webhooks
For all types of runs, langgraph cloud supports completion webhooks. When you create the run you can pass a webhook URL to be called when the completes (successfully or not). This is especially useful for background runs and cron jobs, as the webhook can give you an indication the run has completed and you can perform further actions for your appilcation.
See this [how-to guide](../how-tos/cloud_examples/webhooks.ipynb) to learn about how to use webhooks with LangGraph Cloud.
## Deployment
The LangGraph Cloud offers several features to support secure and robost deployments.
### Authentication
LangGraph applications deployed to LangGraph Cloud are automatically configured with LangSmith authentication. In order to call the API, a valid <a href="https://docs.smith.langchain.com/how_to_guides/setup/create_account_api_key#api-keys" target="_blank">LangSmith API key</a> is required.
### Local Testing
Before deploying your app in production to LangGraph Cloud, you may wish to test out your graph locally in order to ensure that everything is running as expected. Luckily, LangGraph makes this easy for you through use of the LangGraph CLI. Read more in this [how-to guide](../deployment/test_locally.md) or look at the [CLI reference](../reference/cli.md) to learn more.
-28
View File
@@ -1,28 +0,0 @@
# Cloud Concepts
This page describes the high-level concepts of the LangGraph Cloud deployment.
## Deployment
A deployment is an instance of a LangGraph API. A single deployment can have many [revisions](#revision). When a deployment is created, all of the necessary infrastructure (e.g. database, containers, secrets store) are automatically provisioned. See the [architecture diagram](#architecture) below for more details.
See the [how-to guide](../deployment/cloud.md#create-new-deployment) for creating a new deployment.
## Revision
A revision is an iteration of a [deployment](#deployment). When a new deployment is created, an initial revision is automatically created. To deploy new code changes or update environment variable configurations for a deployment, a new revision must be created. When a revision is created, a new container image is built automatically.
See the [how-to guide](../deployment/cloud.md#create-new-revision) for creating a new revision.
## Asynchronous Deployment
Infrastructure for [deployments](#deployment) and [revisions](#revision) are provisioned and deployed asynchronously. They are not deployed immediately after submission. Currently, deployment can take up to several minutes.
## Architecture
!!! warning "Subject to Change"
The LangGraph Cloud deployment architecture may change in the future.
A high-level diagram of a LangGraph Cloud deployment.
![diagram](langgraph_cloud_architecture.png)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

-78
View File
@@ -1,78 +0,0 @@
# How to Deploy to LangGraph Cloud
LangGraph Cloud is available within <a href="https://www.langchain.com/langsmith" target="_blank">LangSmith</a>. To deploy a LangGraph Cloud API, navigate to the <a href="https://smith.langchain.com/" target="_blank">LangSmith UI</a>.
## Prerequisites
1. LangGraph Cloud applications are deployed from GitHub repositories. Configure and upload a LangGraph Cloud application to a GitHub repository in order to deploy it to LangGraph Cloud.
1. [Verify that the LangGraph API runs locally](test_locally.md). If the API does not build and run successfully (i.e. `langgraph up`), deploying to LangGraph Cloud will fail as well.
## Create New Deployment
Starting from the <a href="https://smith.langchain.com/" target="_blank">LangSmith UI</a>...
1. In the left-hand navigation panel, select `Deployments`. The `Deployments` view contains a list of existing LangGraph Cloud deployments.
1. In the top-right corner, select `+ New Deployment` to create a new deployment.
1. In the `Create New Deployment` panel, fill out the required fields.
1. `Deployment details`
1. Select `Import from GitHub` and follow the GitHub OAuth workflow to install and authorize LangChain's `hosted-langserve` GitHub app to access the selected repositories. After installation is complete, return to the `Create New Deployment` panel and select the GitHub repository to deploy from the dropdown menu.
1. Specify a name for the deployment.
1. Specify the full path to the [LangGraph API config file](../reference/cli.md#configuration-file) including the file name. For example, if the file `langgraph.json` is in the root of the repository, simply specify `langgraph.json`.
1. Specify the desired `git` reference (e.g. branch name). For example, different branches of the repository can be deployed.
1. Select the desired `Deployment Type`.
1. `Development` deployments are meant for non-production use cases and are provisioned with minimal resources.
1. `Production` deployments can serve up to 500 requests/second and are provisioned with highly available storage with automatic backups.
1. Specify `Environment Variables` and secrets. See the [Environment Variables reference](../reference/env_var.md) to configure additional variables for the deployment.
1. Sensitive values such as API keys (e.g. `OPENAI_API_KEY`) should be specified as secrets.
1. Additional non-secret environment variables can be specified as well.
1. A new LangSmith `Tracing Project` is automatically created with the same name as the deployment.
1. In the top-right corner, select `Submit`. After a few seconds, the `Deployment` view appears and the new deployment will be queued for provisioning.
## Create New Revision
When [creating a new deployment](#create-new-deployment), a new revision is created by default. Subsequent revisions can be created to deploy new code changes.
Starting from the <a href="https://smith.langchain.com/" target="_blank">LangSmith UI</a>...
1. In the left-hand navigation panel, select `Deployments`. The `Deployments` view contains a list of existing LangGraph Cloud deployments.
1. Select an existing deployment to create a new revision for.
1. In the `Deployment` view, in the top-right corner, select `+ New Revision`.
1. In the `New Revision` modal, fill out the required fields.
1. Specify the full path to the [LangGraph API config file](../reference/cli.md#configuration-file) including the file name. For example, if the file `langgraph.json` is in the root of the repository, simply specify `langgraph.json`.
1. Specify the desired `git` reference (e.g. branch name). For example, different branches of the repository can be deployed.
1. Specify `Environment Variables` and secrets. Existing secrets and environment variables are prepopulated. See the [Environment Variables reference](../reference/env_var.md) to configure additional variables for the revision.
1. Add new secrets or environment variables.
1. Remove existing secrets or environment variables.
1. Update the value of existing secrets or environment variables.
1. Select `Submit`. After a few seconds, the `New Revision` modal will close and the new revision will be queued for deployment.
## View Build and Deployment Logs
Build and deployment logs are available for each revision.
Starting from the `Deployment` view...
1. Select the desired revision from the `Revisions` table. A panel slides open from the right-hand side and the `Build` tab is selected by default, which displays build logs for the revision.
1. In the panel, select the `Deploy` tab to view deployment logs for the revision.
1. Within the `Deploy` tab, adjust the date/time range picker as needed. By default, the date/time range picker is set to the `Last 15 minutes`.
## Interrupt Revision
Interrupting a revision will stop deployment of the revision.
!!! warning "Undefined Behavior"
Interrupted revisions have undefined behavior. This is only useful if you need to deploy a new revision and you already have a revision "stuck" in progress. In the future, this feature may be removed.
Starting from the `Deployment` view...
1. Select the menu icon (three dots) on the right-hand side of the row for the desired revision from the `Revisions` table.
1. Select `Interrupt` from the menu.
1. A modal will appear. Review the confirmation message. Select `Interrupt revision`.
## Delete Deployment
Starting from the <a href="https://smith.langchain.com/" target="_blank">LangSmith UI</a>...
1. In the left-hand navigation panel, select `Deployments`. The `Deployments` view contains a list of existing LangGraph Cloud deployments.
1. Select the menu icon (three dots) on the right-hand side of the row for the desired deployment and select `Delete`.
1. A `Confirmation` modal will appear. Select `Delete`.
-146
View File
@@ -1,146 +0,0 @@
# Rebuild Graph at Runtime
You might need to rebuild your graph with a different configuration for a new run. For example, you might need to use a different graph state or graph structure depending on the config. This guide shows how you can do this.
!!! note "Note"
In most cases, customizing behavior based on the config should be handled by a single graph where each node can read a config and change its behavior based on it
## Prerequisites
Make sure to check out [this how-to guide](./setup.md) on setting up your app for deployment first.
## Define graphs
Let's say you have an app with a simple graph that calls an LLM and returns the response to the user. The app file directory looks like the following:
```
my-app/
|-- requirements.txt
|-- .env
|-- openai_agent.py # code for your graph
```
where the graph is defined in `openai_agent.py`.
### No rebuild
In the standard LangGraph API configuration, the server uses the compiled graph instance that's defined at the top level of `openai_agent.py`, which looks like the following:
```python
from langchain_openai import ChatOpenAI
from langgraph.graph import END, MessageGraph
model = ChatOpenAI(temperature=0)
graph_workflow = MessageGraph()
graph_workflow.add_node("agent", model)
graph_workflow.add_edge("agent", END)
graph_workflow.set_entry_point("agent")
agent = graph_workflow.compile()
```
To make the server aware of your graph, you need to specify a path to the variable that contains the `CompiledStateGraph` instance in your LangGraph API configuration (`langgraph.json`), e.g.:
```
{
"dependencies": ["."],
"graphs": {
"openai_agent": "./openai_agent.py:agent",
},
"env": "./.env"
}
```
### Rebuild
To make your graph rebuild on each new run with custom configuration, you need to rewrite `openai_agent.py` to instead provide a _function_ that takes a config and returns a graph (or compiled graph) instance. Let's say we want to return our existing graph for user ID '1', and a tool-calling agent for other users. We can modify `openai_agent.py` as follows:
```python
from typing import Annotated, TypedDict
from langchain_openai import ChatOpenAI
from langgraph.graph import END, MessageGraph
from langgraph.graph.state import StateGraph
from langgraph.graph.message import add_messages
from langgraph.prebuilt import ToolNode
from langchain_core.tools import tool
from langchain_core.messages import BaseMessage
from langchain_core.runnables import RunnableConfig
class State(TypedDict):
messages: Annotated[list[BaseMessage], add_messages]
model = ChatOpenAI(temperature=0)
def make_default_graph():
"""Make a simple LLM agent"""
graph_workflow = StateGraph(State)
def call_model(state):
return {"messages": [model.invoke(state["messages"])]}
graph_workflow.add_node("agent", call_model)
graph_workflow.add_edge("agent", END)
graph_workflow.set_entry_point("agent")
agent = graph_workflow.compile()
return agent
def make_alternative_graph():
"""Make a tool-calling agent"""
@tool
def add(a: float, b: float):
"""Adds two numbers."""
return a + b
tool_node = ToolNode([add])
model_with_tools = model.bind_tools([add])
def call_model(state):
return {"messages": [model_with_tools.invoke(state["messages"])]}
def should_continue(state: State):
if state["messages"][-1].tool_calls:
return "tools"
else:
return END
graph_workflow = StateGraph(State)
graph_workflow.add_node("agent", call_model)
graph_workflow.add_node("tools", tool_node)
graph_workflow.add_edge("tools", "agent")
graph_workflow.set_entry_point("agent")
graph_workflow.add_conditional_edges("agent", should_continue)
agent = graph_workflow.compile()
return agent
# this is the graph making function that will decide which graph to
# build based on the provided config
def make_graph(config: RunnableConfig):
user_id = config.get("configurable", {}).get("user_id")
# route to different graph state / structure based on the user ID
if user_id == "1":
return make_default_graph()
else:
return make_alternative_graph()
```
Finally, you need to specify the path to your graph-making function (`make_graph`) in `langgraph.json`:
```
{
"dependencies": ["."],
"graphs": {
"openai_agent": "./openai_agent.py:make_graph",
},
"env": "./.env"
}
```
See more info on LangGraph API configuration file [here](../reference/cli.md#configuration-file)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

-35
View File
@@ -1,35 +0,0 @@
# How to Self-Host LangGraph Cloud API
!!! warning "Enterprise License Required"
Self-hosting LangGraph Cloud API requires a license key. Please contact sales@langchain.dev for more details.
LangGraph Cloud APIs can be self-hosted with a valid LangGraph Cloud license key. Self-hosted deployments are built with Docker and deployed with Helm (on Kubernetes) or with Docker Compose. Ensure that the [Docker CLI](https://docs.docker.com/engine/reference/commandline/cli/) is installed.
LangGraph Cloud license key should be passed to the service as an environment variable named LANGGRAPH_CLOUD_LICENSE_KEY.
## Build Docker Image
1. Follow the [How-to Guide](setup.md) for setting up a LangGraph application for deployment. Your LangGraph application will vary from the example in the How-to Guide. However, ensure that the [LangGraph API configuration file](../reference/cli.md#configuration-file) is created.
1. Install the [LangGraph CLI](../reference/cli.md#installation).
1. Run the following LangGraph CLI `build` command to build a Docker image. Specify the image tag (`-t`) and other desired [options](../reference/cli.md#build).
langgraph build -t tag_name
!!! info "Build Platform"
When building the Docker image, ensure that the image is built for the platform of the target Kubernetes cluster: `langgraph build -t tag_name --platform linux/amd64,linux/arm64`
## Self-Host on Kubernetes
This section is for self-hosting LangGraph Cloud API on Kubernetes via Helm. A Kubernetes cluster must be provisioned before proceeding with these steps. The public Helm chart for LangGraph Cloud is available [here](https://github.com/langchain-ai/helm/tree/main/charts/langgraph-cloud).
1. Publish the built Docker image to a repository that can be accessed by the target Kubernetes cluster.
1. Ensure that the [Helm client](https://github.com/helm/helm?tab=readme-ov-file#install) is installed.
1. Make note of all environment variables that are needed for the application. These values will need to be set in the Helm `values` YAML configuration.
1. Follow [these instructions](https://github.com/langchain-ai/helm/tree/main/charts/langgraph-cloud#readme) to configure the Helm chart and deploy to Kubernetes.
## Self-Host with Docker
!!! warning "Under Construction"
This section of the documentation is in progress.
Docker Compose can be used to deploy LangGraph Cloud to the compute infrastructure of your choice (e.g. VM).
-139
View File
@@ -1,139 +0,0 @@
# How to Set Up a LangGraph Application for Deployment
A LangGraph application must be configured with a [LangGraph API configuration file](../reference/cli.md#configuration-file) in order to be deployed to LangGraph Cloud (or to be self-hosted). This how-to guide discusses the basic steps to setup a LangGraph application for deployment using `requirements.txt` to specify project dependencies.
!!! tip "Setup with pyproject.toml"
If you prefer using poetry for dependency management, check out [this how-to guide](./setup_pyproject.md) on using `pyproject.toml` for LangGraph Cloud.
The final repo structure will look something like this:
```bash
my-app/
|-- requirements.txt # package dependencies
|-- .env # environment variables
|-- openai_agent.py # code for an agent
|-- anthropic_agent.py # code for another agent
|-- langgraph.json # configuration file for LangGraph
```
After each step, an example file directory is provided to demonstrate how code can be organized.
## Specify Dependencies
Dependencies can optionally be specified in one of the following files: `pyproject.toml`, `setup.py`, or `requirements.txt`. If none of these files is created, then dependencies can be specified later in the [LangGraph API configuration file](#create-langgraph-api-config).
The dependencies below will be included in the image, you can also use them in your code, as long as with a compatible version range:
```
langgraph>=0.1.19,<0.2.0
langchain-core>=0.2.8,<0.3.0
langsmith>=0.1.63
orjson>=3.10.1
httpx>=0.27.0
tenacity>=8.3.0
uvicorn>=0.29.0
sse-starlette>=2.1.0
uvloop>=0.19.0
httptools>=0.6.1
jsonschema-rs>=0.18.0
croniter>=1.0.1
```
Example `requirements.txt` file:
```
langgraph
langchain_openai
```
Example file directory:
```
my-app/
|-- requirements.txt # Python packages required for your graph
```
## Specify Environment Variables
Environment variables can optionally be specified in a file (e.g. `.env`). See the [Environment Variables reference](../reference/env_var.md) to configure additional variables for a deployment.
Example `.env` file:
```
MY_ENV_VAR_1=foo
MY_ENV_VAR_2=bar
OPENAI_API_KEY=key
```
Example file directory:
```
my-app/
|-- requirements.txt
|-- .env # file with environment variables
```
## Define Graphs
Implement your graphs! Graphs can be defined in a single file or multiple files. Make note of the variable names of each [CompiledGraph][compiledgraph] to be included in the LangGraph application. The variable names will be used later when creating the [LangGraph API configuration file](../reference/cli.md#configuration-file).
Example `openai_agent.py` file:
```python
from langchain_openai import ChatOpenAI
from langgraph.graph import END, MessageGraph
model = ChatOpenAI(temperature=0)
graph_workflow = MessageGraph()
graph_workflow.add_node("agent", model)
graph_workflow.add_edge("agent", END)
graph_workflow.set_entry_point("agent")
agent = graph_workflow.compile()
```
!!! warning "Assign `CompiledGraph` to Variable"
The build process for LangGraph Cloud requires that the `CompiledGraph` object be assigned to a variable at the top-level of a Python module (alternatively, you can provide [a function that creates a graph](./graph_rebuild.md)).
Example file directory:
```
my-app/
|-- requirements.txt
|-- .env
|-- openai_agent.py # code for your graph
|-- anthropic_agent.py # code for your graph
```
## Create LangGraph API Config
Create a [LangGraph API configuration file](../reference/cli.md#configuration-file) called `langgraph.json`. See the [LangGraph CLI reference](../reference/cli.md#configuration-file) for detailed explanations of each key in the JSON object of the configuration file.
Example `langgraph.json` file:
```json
{
"dependencies": [
"."
],
"graphs": {
"openai_agent": "./openai_agent.py:agent",
"anthropic_agent": "./anthropic_agent.py:agent"
},
"env": "./.env"
}
```
Note that the variable name of the `CompiledGraph` appears at the end of the value of each subkey in the top-level `graphs` key (i.e. `:<variable_name>`).
!!! warning "Configuration Location"
The LangGraph API configuration file must be placed in a directory that is at the same level or higher than the Python files that contain compiled graphs and associated dependencies.
Example file directory:
```bash
my-app/
|-- requirements.txt
|-- .env
|-- openai_agent.py
|-- anthropic_agent.py
|-- langgraph.json # configuration file for LangGraph
```
## Next
After you setup your project and place it in a github repo, it's time to [deploy your app](./cloud.md).
@@ -1,169 +0,0 @@
# How to Set Up a LangGraph Application for Deployment
A LangGraph application must be configured with a [LangGraph API configuration file](../reference/cli.md#configuration-file) in order to be deployed to LangGraph Cloud (or to be self-hosted). This how-to guide discusses the basic steps to setup a LangGraph application for deployment using `pyproject.toml` to define your package's dependencies. If you prefer using `requirements.txt` for dependency management, check out [this how-to guide](./setup.md).
The final repo structure will look something like this:
```bash
my-app/
├── my_agent # all project code lies within here
│   ├── __init__.py
│   └── agent.py # code for your graph
│-- .env # environment variables
│-- langgraph.json # configuration file for LangGraph
└── pyproject.toml # dependencies for your project
```
After each step, an example file directory is provided to demonstrate how code can be organized.
## Specify Dependencies
Dependencies can optionally be specified in one of the following files: `pyproject.toml`, `setup.py`, or `requirements.txt`. If none of these files is created, then dependencies can be specified later in the [LangGraph API configuration file](#create-langgraph-api-config).
The dependencies below will be included in the image, you can also use them in your code, as long as with a compatible version range:
```
langgraph>=0.1.19,<0.2.0
langchain-core>=0.2.8,<0.3.0
langsmith>=0.1.63
orjson>=3.10.1
httpx>=0.27.0
tenacity>=8.3.0
uvicorn>=0.29.0
sse-starlette>=2.1.0
uvloop>=0.19.0
httptools>=0.6.1
jsonschema-rs>=0.18.0
croniter>=1.0.1
```
Example `pyproject.toml` file:
```toml
[tool.poetry]
name = "my-agent"
version = "0.0.1"
description = "An excellent agent build for LangGraph cloud."
authors = ["Polly the parrot <1223+polly@users.noreply.github.com>"]
license = "MIT"
readme = "README.md"
[tool.poetry.dependencies]
python = ">=3.9.0,<3.13"
langgraph = "^0.1.7"
langchain-fireworks = "^0.1.3"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
```
Example file directory:
```bash
my-app/
├── my_agent
│   ├── __init__.py
│   └── agent.py
└── pyproject.toml # Python packages required for your graph
```
## Specify Environment Variables
Environment variables can optionally be specified in a file (e.g. `.env`). See the [Environment Variables reference](../reference/env_var.md) to configure additional variables for a deployment.
Example `.env` file:
```
MY_ENV_VAR_1=foo
MY_ENV_VAR_2=bar
FIREWORKS_API_KEY=key
```
Example file directory:
```bash
my-app/
├── my_agent
│   ├── __init__.py
│   └── agent.py
|-- .env # file with environment variables
└── pyproject.toml
```
## Define Graphs
Implement your graphs! Graphs can be defined in a single file or multiple files. Make note of the variable names of each [CompiledGraph][compiledgraph] to be included in the LangGraph application. The variable names will be used later when creating the [LangGraph API configuration file](../reference/cli.md#configuration-file).
Example `agent.py` file:
```python
# my_agent/agent.py
from langchain_fireworks import ChatFireworks
from langgraph.graph import END, StateGraph, add_messages
from typing_extensions import TypedDict, Annotated
model = ChatFireworks(model="accounts/fireworks/models/firefunction-v2", temperature=0)
class State(TypedDict):
messages: Annotated[list, add_messages]
graph_workflow = StateGraph(State)
graph_workflow.add_node("agent", model)
graph_workflow.add_edge("agent", END)
graph_workflow.set_entry_point("agent")
agent = graph_workflow.compile()
```
!!! warning "Assign `CompiledGraph` to Variable"
The build process for LangGraph Cloud requires that the `CompiledGraph` object be assigned to a variable at the top-level of a Python module.
Example file directory:
```bash
my-app/
├── my_agent
│   ├── __init__.py
│   └── agent.py # code for your graph
|-- .env
└── pyproject.toml
```
## Create LangGraph API Config
Create a [LangGraph API configuration file](../reference/cli.md#configuration-file) called `langgraph.json`. See the [LangGraph CLI reference](../reference/cli.md#configuration-file) for detailed explanations of each key in the JSON object of the configuration file.
Example `langgraph.json` file:
```json
{
"dependencies": ["."],
"graphs": {
"my_fantastic_agent": "./my_agent/agent.py:agent"
},
"env": "./.env"
}
```
Note that the variable name of the `CompiledGraph` appears at the end of the value of each subkey in the top-level `graphs` key (i.e. `:<variable_name>`).
!!! warning "Configuration Location"
The LangGraph API configuration file must be placed in a directory that is at the same level or higher than the Python files that contain compiled graphs and associated dependencies.
Example file directory:
```bash
my-app/
├── my_agent
│   ├── __init__.py
│   └── agent.py # code for your graph
│-- .env
│-- langgraph.json # configuration file for LangGraph
└── pyproject.toml
```
## Next
After you setup your project and place it in a github repo, it's time to [deploy your app](./cloud.md).
@@ -1,99 +0,0 @@
# How to test a LangGraph app locally
This guide assumes you have a LangGraph app correctly set up with a proper configuration file and a corresponding compiled graph, and that you have a proper LangChain API key.
Testing locally ensures that there are no errors or conflicts with Python dependencies and confirms that the configuration file is specified correctly.
## Setup
Install the proper packages:
```shell
pip install langgraph-cli
```
Ensure you have an API key, which you can create from the LangSmith UI (Settings > API Keys). This is required to authenticate that you have LangGraph Cloud access. After you have saved the key to a safe place, place the following line in your `.env` file:
```python
LANGCHAIN_API_KEY = *********
```
## Start the API server
Once you have downloaded the CLI, you can run the following command to start the API server for local testing:
```shell
langgraph up
```
This will start up the LangGraph API server locally. If this runs successfully, you should see something like:
```shell
Ready!
- API: http://localhost:8123
2024-06-26 19:20:41,056:INFO:uvicorn.access 127.0.0.1:44138 - "GET /ok HTTP/1.1" 200
```
### Interact with the server
We can now interact with the API server using the LangGraph SDK. First, we need to start our client, select our assistant (in this case a graph we called "agent", make sure to select the proper assistant you wish to test).
=== "Python"
```python
from langgraph_sdk import get_client
# only pass the url argument to get_client() if you changed the default port when calling langgraph up
client = get_client()
assistant_id = "agent"
thread = await client.threads.create()
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
// only set the apiUrl if you changed the default port when calling langgraph up
const client = new Client();
const assistantId = "agent"
const thread = await client.threads.create();
```
Now we can invoke our graph to ensure it is working. Make sure to change the input to match the proper schema for your graph.
=== "Python"
```python
input = {"messages": [{"role": "human", "content": "what's the weather in sf"}]}
async for chunk in client.runs.stream(
thread["thread_id"],
assistant_id,
input=input,
stream_mode="updates",
):
print(f"Receiving new event of type: {chunk.event}...")
print(chunk.data)
print("\n\n")
```
=== "Javascript"
```js
const input = { "messages": [{ "role": "human", "content": "what's the weather in sf"}] }
const streamResponse = client.runs.stream(
thread["thread_id"],
assistantId,
{
input: input,
streamMode: "updates",
}
);
for await (const chunk of streamResponse) {
console.log(`Receiving new event of type: ${chunk.event}...`);
console.log(chunk.data);
console.log("\n\n");
}
```
If your graph works correctly, you should see your graph output displayed in the console. Of course, there are many more ways you might need to test your graph, for a full list of commands you can send with the SDK, see the [Python](https://langchain-ai.github.io/langgraph/cloud/reference/sdk/python_sdk_ref/) and [JS/TS](https://langchain-ai.github.io/langgraph/cloud/reference/sdk/js_ts_sdk_ref/) references.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 322 KiB

@@ -1,183 +0,0 @@
## Enqueue
This guide assumes knowledge of what double-texting is, which you can learn about in the [double-texting conceptual guide](../concepts/api.md#double-texting).
The guide covers the `enqueue` option for double texting, which adds the interruptions to a queue and executes them in the order they are received by the client. Below is a quick example of using the `enqueue` option.
First, we will define a quick helper function for printing out JS model outputs (you can skip this if using Python):
```js
function prettyPrint(m) {
const padded = " " + m['type'] + " ";
const sepLen = Math.floor((80 - padded.length) / 2);
const sep = "=".repeat(sepLen);
const secondSep = sep + (padded.length % 2 ? "=" : "");
console.log(`${sep}${padded}${secondSep}`);
console.log("\n\n");
console.log(m.content);
}
```
Then, let's import our required packages and instantiate our client, assistant, and thread.
=== "Python"
```python
import asyncio
import httpx
from langchain_core.messages import convert_to_messages
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
assistant_id = "agent"
thread = await client.threads.create()
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
const assistantId = "agent";
const thread = await client.threads.create();
```
Now let's start two runs, with the second interrupting the first one with a multitask strategy of "enqueue":
=== "Python"
```python
first_run = await client.runs.create(
thread["thread_id"],
assistant_id,
input={"messages": [{"role": "human", "content": "what's the weather in sf?"}]},
)
second_run = await client.runs.create(
thread["thread_id"],
assistant_id,
input={"messages": [{"role": "human", "content": "what's the weather in nyc?"}]},
multitask_strategy="enqueue",
)
```
=== "Javascript"
```js
const firstRun = await client.runs.create(
thread["thread_id"],
assistantId,
input={"messages": [{"role": "human", "content": "what's the weather in sf?"}]},
)
const secondRun = await client.runs.create(
thread["thread_id"],
assistantId,
input={"messages": [{"role": "human", "content": "what's the weather in nyc?"}]},
multitask_strategy="enqueue",
)
```
Verify that the thread has data from both runs:
=== "Python"
```python
# wait until the second run completes
await client.runs.join(thread["thread_id"], second_run["run_id"])
state = await client.threads.get_state(thread["thread_id"])
for m in convert_to_messages(state["values"]["messages"]):
m.pretty_print()
```
=== "Javascript"
```js
await client.runs.join(thread["thread_id"], secondRun["run_id"]);
const state = await client.threads.getState(thread["thread_id"]);
for (const m of state["values"]["messages"]) {
prettyPrint(m);
}
```
Output:
================================ Human Message =================================
what's the weather in sf?
================================== Ai Message ==================================
[{'id': 'toolu_01Dez1sJre4oA2Y7NsKJV6VT', 'input': {'query': 'weather in san francisco'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}]
Tool Calls:
tavily_search_results_json (toolu_01Dez1sJre4oA2Y7NsKJV6VT)
Call ID: toolu_01Dez1sJre4oA2Y7NsKJV6VT
Args:
query: weather in san francisco
================================= Tool Message =================================
Name: tavily_search_results_json
[{"url": "https://www.accuweather.com/en/us/san-francisco/94103/weather-forecast/347629", "content": "Get the current and future weather conditions for San Francisco, CA, including temperature, precipitation, wind, air quality and more. See the hourly and 10-day outlook, radar maps, alerts and allergy information."}]
================================== Ai Message ==================================
According to AccuWeather, the current weather conditions in San Francisco are:
Temperature: 57°F (14°C)
Conditions: Mostly Sunny
Wind: WSW 10 mph
Humidity: 72%
The forecast for the next few days shows partly sunny skies with highs in the upper 50s to mid 60s F (14-18°C) and lows in the upper 40s to low 50s F (9-11°C). Typical mild, dry weather for San Francisco this time of year.
Some key details from the AccuWeather forecast:
Today: Mostly sunny, high of 62°F (17°C)
Tonight: Partly cloudy, low of 49°F (9°C)
Tomorrow: Partly sunny, high of 59°F (15°C)
Saturday: Mostly sunny, high of 64°F (18°C)
Sunday: Partly sunny, high of 61°F (16°C)
So in summary, expect seasonable spring weather in San Francisco over the next several days, with a mix of sun and clouds and temperatures ranging from the upper 40s at night to the low 60s during the days. Typical dry conditions with no rain in the forecast.
================================ Human Message =================================
what's the weather in nyc?
================================== Ai Message ==================================
[{'text': 'Here are the current weather conditions and forecast for New York City:', 'type': 'text'}, {'id': 'toolu_01FFft5Sx9oS6AdVJuRWWcGp', 'input': {'query': 'weather in new york city'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}]
Tool Calls:
tavily_search_results_json (toolu_01FFft5Sx9oS6AdVJuRWWcGp)
Call ID: toolu_01FFft5Sx9oS6AdVJuRWWcGp
Args:
query: weather in new york city
================================= Tool Message =================================
Name: tavily_search_results_json
[{"url": "https://www.weatherapi.com/", "content": "{'location': {'name': 'New York', 'region': 'New York', 'country': 'United States of America', 'lat': 40.71, 'lon': -74.01, 'tz_id': 'America/New_York', 'localtime_epoch': 1718734479, 'localtime': '2024-06-18 14:14'}, 'current': {'last_updated_epoch': 1718733600, 'last_updated': '2024-06-18 14:00', 'temp_c': 29.4, 'temp_f': 84.9, 'is_day': 1, 'condition': {'text': 'Sunny', 'icon': '//cdn.weatherapi.com/weather/64x64/day/113.png', 'code': 1000}, 'wind_mph': 2.2, 'wind_kph': 3.6, 'wind_degree': 158, 'wind_dir': 'SSE', 'pressure_mb': 1025.0, 'pressure_in': 30.26, 'precip_mm': 0.0, 'precip_in': 0.0, 'humidity': 63, 'cloud': 0, 'feelslike_c': 31.3, 'feelslike_f': 88.3, 'windchill_c': 28.3, 'windchill_f': 82.9, 'heatindex_c': 29.6, 'heatindex_f': 85.3, 'dewpoint_c': 18.4, 'dewpoint_f': 65.2, 'vis_km': 16.0, 'vis_miles': 9.0, 'uv': 7.0, 'gust_mph': 16.5, 'gust_kph': 26.5}}"}]
================================== Ai Message ==================================
According to the weather data from WeatherAPI:
Current Conditions in New York City (as of 2:00 PM local time):
- Temperature: 85°F (29°C)
- Conditions: Sunny
- Wind: 2 mph (4 km/h) from the SSE
- Humidity: 63%
- Heat Index: 85°F (30°C)
The forecast shows sunny and warm conditions persisting over the next few days:
Today: Sunny, high of 85°F (29°C)
Tonight: Clear, low of 68°F (20°C)
Tomorrow: Sunny, high of 88°F (31°C)
Thursday: Mostly sunny, high of 90°F (32°C)
Friday: Partly cloudy, high of 87°F (31°C)
So New York City is experiencing beautiful sunny weather with seasonably warm temperatures in the mid-to-upper 80s Fahrenheit (around 30°C). Humidity is moderate in the 60% range. Overall, ideal late spring/early summer conditions for being outdoors in the city over the next several days.
@@ -1,103 +0,0 @@
# How to Add Breakpoints
When creating LangGraph agents, it is often nice to add a human-in-the-loop component.
This can be helpful when giving them access to tools.
Often in these situations you may want to manually approve an action before taking.
This can be in several ways, but the primary supported way is to add an "interrupt" before a node is executed.
This interrupts execution at that node.
You can then resume from that spot to continue.
## Setup
### Code for your graph
In this how-to we use a simple ReAct style hosted graph (you can see the full code for defining it [here](../../how-tos/human_in_the_loop/breakpoints.ipynb)). The important thing is that there are two nodes (one named `agent` that calls the LLM, and one named `action` that calls the tool), and a routing function from `agent` that determines whether to call `action` next or just end the graph run (the `action` node always calls the `agent` node after execution).
### SDK Initialization
=== "Python"
```python
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
assistant_id = "agent"
thread = await client.threads.create()
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
const assistantId = "agent"
const thread = await client.threads.create();
```
## Adding a breakpoint
We now want to add a breakpoint in our graph run, which we will do before a tool is called.
We can do this by adding `interrupt_before=["action"]`, which tells us to interrupt before calling the action node.
We can do this either when compiling the graph or when kicking off a run.
Here we will do it when kicking of a run, if you would like to to do it at compile time you need to edit the python file where your graph is defined and add the `interrupt_before` parameter when you call `.compile`.
First let's access our hosted LangGraph instance through the SDK:
And, now let's compile it with a breakpoint before the tool node:
=== "Python"
```python
input = {"messages": [{"role": "human", "content": "what's the weather in sf"}]}
async for chunk in client.runs.stream(
thread["thread_id"],
assistant_id,
input=input,
stream_mode="updates",
interrupt_before=["action"],
):
print(f"Receiving new event of type: {chunk.event}...")
print(chunk.data)
print("\n\n")
```
=== "Javascript"
```js
const input = { "messages": [{ "role": "human", "content": "what's the weather in sf"}] }
const streamResponse = client.runs.stream(
thread["thread_id"],
assistantId,
{
input: input,
streamMode: "updates",
interruptBefore: ["action"],
}
);
for await (const chunk of streamResponse) {
console.log(`Receiving new event of type: ${chunk.event}...`);
console.log(chunk.data);
console.log("\n\n");
}
```
Output:
Receiving new event of type: metadata...
{'run_id': '3b77ef83-687a-4840-8858-0371f91a92c3'}
Receiving new event of type: data...
{'agent': {'messages': [{'content': [{'id': 'toolu_01HwZqM1ptX6E15A5LAmyZTB', 'input': {'query': 'weather in san francisco'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}], 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-e5d17791-4d37-4ad2-815f-a0c4cba62585', 'example': False, 'tool_calls': [{'name': 'tavily_search_results_json', 'args': {'query': 'weather in san francisco'}, 'id': 'toolu_01HwZqM1ptX6E15A5LAmyZTB'}], 'invalid_tool_calls': []}]}}
Receiving new event of type: end...
None
@@ -1,182 +0,0 @@
# How to Edit State of a Deployed Graph
When creating LangGraph agents, it is often nice to add a human-in-the-loop component. This can be helpful when giving them access to tools. Often in these situations you may want to edit the graph state before continuing (for example, to edit what tool is being called, or how it is being called).
This can be in several ways, but the primary supported way is to add an "interrupt" before a node is executed. This interrupts execution at that node. You can then use update_state to update the state, and then resume from that spot to continue.
## Setup
We are not going to show the full code for the graph we are hosting, but you can see it [here](../../how-tos/human_in_the_loop/edit-graph-state.ipynb#build-the-agent) if you want to. Once this graph is hosted, we are ready to invoke it and wait for user input.
### SDK initialization
First, we need to setup our client so that we can communicate with our hosted graph:
=== "Python"
```python
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
assistant_id = "agent"
thread = await client.threads.create()
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
const assistantId = "agent";
const thread = await client.threads.create();
```
## Editing state
### Initial invocation
Now let's invoke our graph, making sure to interrupt before the `action` node.
=== "Python"
```python
input = { 'messages':[{ "role":"user", "content":"search for weather in SF" }] }
async for chunk in client.runs.stream(
thread["thread_id"],
assistant_id,
input=input,
stream_mode="updates",
interrupt_before=["action"],
):
if chunk.data and chunk.event != "metadata":
print(chunk.data)
```
=== "Javascript"
```js
const input = {"messages": [{ "role": "human", "content": "search for weather in SF"}] }
const streamResponse = client.runs.stream(
thread["thread_id"],
assistantId,
{
input: input,
streamMode: "updates",
interruptBefore: ["action"],
}
);
for await (const chunk of streamResponse) {
if (chunk.data && chunk.event !== "metadata") {
console.log(chunk.data);
}
}
```
Output:
{'agent': {'messages': [{'content': [{'text': "Certainly! I'll search for the current weather in San Francisco for you using the search function. Here's how I'll do that:", 'type': 'text'}, {'id': 'toolu_01KEJMBFozSiZoS4mAcPZeqQ', 'input': {'query': 'current weather in San Francisco'}, 'name': 'search', 'type': 'tool_use'}], 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-6dbb0167-f8f6-4e2a-ab68-229b2d1fbb64', 'example': False, 'tool_calls': [{'name': 'search', 'args': {'query': 'current weather in San Francisco'}, 'id': 'toolu_01KEJMBFozSiZoS4mAcPZeqQ'}], 'invalid_tool_calls': [], 'usage_metadata': None}]}}
### Edit the state
Now, let's assume we actually meant to search for the weather in Sidi Frej (another city with the initials SF). We can edit the state to properly reflect that:
=== "Python"
```python
# First, lets get the current state
current_state = await client.threads.get_state(thread['thread_id'])
# Let's now get the last message in the state
# This is the one with the tool calls that we want to update
last_message = current_state['values']['messages'][-1]
# Let's now update the args for that tool call
last_message['tool_calls'][0]['args'] = {'query': 'current weather in Sidi Frej'}
# Let's now call `update_state` to pass in this message in the `messages` key
# This will get treated as any other update to the state
# It will get passed to the reducer function for the `messages` key
# That reducer function will use the ID of the message to update it
# It's important that it has the right ID! Otherwise it would get appended
# as a new message
await client.threads.update_state(thread['thread_id'], {"messages": last_message})
```
=== "Javascript"
```js
// First, lets get the current state
const currentState = await client.threads.getState(thread['thread_id']);
// Let's now get the last message in the state
// This is the one with the tool calls that we want to update
let lastMessage = currentState['values']['messages'][-1];
// Let's now update the args for that tool call
lastMessage['tool_calls'][0]['args'] = {'query': 'current weather in Sidi Frej'};
// Let's now call `update_state` to pass in this message in the `messages` key
// This will get treated as any other update to the state
// It will get passed to the reducer function for the `messages` key
// That reducer function will use the ID of the message to update it
// It's important that it has the right ID! Otherwise it would get appended
// as a new message
await client.threads.updateState(thread['thread_id'], {values:{"messages": lastMessage}});
```
Output:
{'configurable': {'thread_id': '88d58d3f-4151-47a9-a8e0-e42fdd3527b8',
'thread_ts': '1ef3274b-a809-6913-8002-91536ce6554d'}}
### Resume invocation
Now we can resume our graph run but with the updated state:
=== "Python"
```python
async for chunk in client.runs.stream(
thread["thread_id"],
assistant_id,
input=None,
stream_mode="updates",
):
if chunk.data and chunk.event != "metadata":
print(chunk.data)
```
=== "Javascript"
```js
const streamResponse = client.runs.stream(
thread["thread_id"],
assistantId,
{
input: null,
streamMode: "updates",
}
);
for await (const chunk of streamResponse) {
if (chunk.data && chunk.event !== "metadata") {
console.log(chunk.data);
}
}
```
Output:
{'action': {'messages': [{'content': '["I looked up: current weather in Sidi Frej. Result: It\'s sunny in San Francisco, but you better look out if you\'re a Gemini 😈."]', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': 'search', 'id': '1161b8d1-bee4-4188-9be8-698aecb69f10', 'tool_call_id': 'toolu_01KEJMBFozSiZoS4mAcPZeqQ'}]}}
{'agent': {'messages': [{'content': [{'text': 'I apologize for the confusion in my search query. It seems the search function interpreted "SF" as "Sidi Frej" instead of "San Francisco" as we intended. Let me search again with the full city name to get the correct information:', 'type': 'text'}, {'id': 'toolu_0111rrwgfAcmurHZn55qjqTR', 'input': {'query': 'current weather in San Francisco'}, 'name': 'search', 'type': 'tool_use'}], 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-b8c25779-cfb4-46fc-a421-48553551242f', 'example': False, 'tool_calls': [{'name': 'search', 'args': {'query': 'current weather in San Francisco'}, 'id': 'toolu_0111rrwgfAcmurHZn55qjqTR'}], 'invalid_tool_calls': [], 'usage_metadata': None}]}}
{'action': {'messages': [{'content': '["I looked up: current weather in San Francisco. Result: It\'s sunny in San Francisco, but you better look out if you\'re a Gemini 😈."]', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': 'search', 'id': '6bc632ae-5ee6-4d01-9532-79c524a2d443', 'tool_call_id': 'toolu_0111rrwgfAcmurHZn55qjqTR'}]}}
{'agent': {'messages': [{'content': "Now, based on the search results, I can provide you with information about the current weather in San Francisco:\n\nThe weather in San Francisco is currently sunny. \n\nIt's worth noting that the search result included an unusual comment about Gemini, which doesn't seem directly related to the weather. This might be due to the search engine including some astrological information or a joke in its results. However, for the purpose of weather information, we can focus on the fact that it's sunny in San Francisco right now.\n\nIs there anything else you'd like to know about the weather in San Francisco or any other location?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-227a042b-dd97-476e-af32-76a3703af5d8', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}
As you can see it now looks up the current weather in Sidi Frej (although our dummy search node still returns results for SF because we don't actually do a search in this example, we just return the same "It's sunny in San Francisco ..." result every time).
@@ -1,226 +0,0 @@
# How to Replay and Branch from Prior States
With LangGraph Cloud you have the ability to return to any of your prior states and either re-run the graph to reproduce issues noticed during testing, or branch out in a different way from what was originally done in the prior states. In this guide we will show a quick example of how to rerun past states and how to branch off from previous states as well.
## Setup
We are not going to show the full code for the graph we are hosting, but you can see it [here](../../how-tos/human_in_the_loop/time-travel.ipynb#build-the-agent) if you want to. Once this graph is hosted, we are ready to invoke it and wait for user input.
### SDK initialization
First, we need to setup our client so that we can communicate with our hosted graph:
=== "Python"
```python
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
assistant_id = "agent"
thread = await client.threads.create()
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
const assistantId = agent;
const thread = await client.threads.create();
```
## Replay a state
### Initial invocation
Before replaying a state - we need to create states to replay from! In order to do this, let's invoke our graph with a simple message:
=== "Python"
```python
input = { 'messages':[{ "role":"user", "content":"Please search the weather in SF" }] }
async for chunk in client.runs.stream(
thread["thread_id"],
assistant_id, # graph_id
input=input,
stream_mode="updates",
):
if chunk.data and chunk.event != "metadata":
print(chunk.data)
```
=== "Javascript"
```js
const input = {"messages": [{ "role": "human", "content": "Please search the weather in SF"}] }
const streamResponse = client.runs.stream(
thread["thread_id"],
assistantId,
{
input: input,
streamMode: "updates",
}
);
for await (const chunk of streamResponse) {
if (chunk.data && chunk.event !== "metadata") {
console.log(chunk.data);
}
}
```
Output:
{'agent': {'messages': [{'content': [{'text': "Certainly! I'll use the search function to look up the current weather in San Francisco for you. Let me do that now.", 'type': 'text'}, {'id': 'toolu_011vroKUtWU7SBdrngpgpFMn', 'input': {'query': 'current weather in San Francisco'}, 'name': 'search', 'type': 'tool_use'}], 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ee639877-d97d-40f8-96dc-d0d1ae22d203', 'example': False, 'tool_calls': [{'name': 'search', 'args': {'query': 'current weather in San Francisco'}, 'id': 'toolu_011vroKUtWU7SBdrngpgpFMn'}], 'invalid_tool_calls': [], 'usage_metadata': None}]}}
{'action': {'messages': [{'content': '["I looked up: current weather in San Francisco. Result: It\'s sunny in San Francisco, but you better look out if you\'re a Gemini 😈."]', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': 'search', 'id': '7bad0e72-5ebe-4b08-9b8a-b99b0fe22fb7', 'tool_call_id': 'toolu_011vroKUtWU7SBdrngpgpFMn'}]}}
{'agent': {'messages': [{'content': "Based on the search results, I can provide you with information about the current weather in San Francisco:\n\nThe weather in San Francisco is currently sunny. This is great news for outdoor activities and enjoying the city's beautiful sights.\n\nIt's worth noting that the search result included an unusual comment about Geminis, which isn't typically part of a weather report. This might be due to the search engine including some astrological information or a joke in its results. However, for the purpose of answering your question about the weather, we can focus on the fact that it's sunny in San Francisco.\n\nIf you need any more specific information about the weather in San Francisco, such as temperature, wind speed, or forecast for the coming days, please let me know, and I'd be happy to search for that information for you.", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-dbac539a-33c8-4f0c-9e20-91f318371e7c', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}
Now let's get our list of states, and invoke from the third state (right before the tool get called):
=== "Python"
```python
states = await client.threads.get_history(thread['thread_id'])
# We can confirm that this state is correct by checking the 'next' attribute and seeing that it is the tool call node
state_to_replay = states[2]
print(state_to_replay['next'])
```
=== "Javascript"
```js
const states = await client.threads.getHistory(thread['thread_id']);
// We can confirm that this state is correct by checking the 'next' attribute and seeing that it is the tool call node
const stateToReplay = states[2];
console.log(stateToReplay['next']);
```
Output:
['action']
To rerun from a state, we need to pass in the `checkpoint_id` into the config of the run like follows:
=== "Python"
```python
async for chunk in client.runs.stream(
thread["thread_id"],
assistant_id, # graph_id
input=None,
stream_mode="updates",
config={"configurable": {"thread_ts": state_to_replay['checkpoint_id']}}
):
if chunk.data and chunk.event != "metadata":
print(chunk.data)
```
=== "Javascript"
```js
const streamResponse = client.runs.stream(
thread["thread_id"],
assistantId,
{
input: null,
streamMode: "updates",
config: {"configurable": {"thread_ts": stateToReplay['checkpoint_id']}},
}
);
for await (const chunk of streamResponse) {
if (chunk.data && chunk.event !== "metadata") {
console.log(chunk.data);
}
}
```
Output:
{'action': {'messages': [{'content': '["I looked up: current weather in San Francisco. Result: It\'s sunny in San Francisco, but you better look out if you\'re a Gemini 😈."]', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': 'search', 'id': 'eba650e5-400e-4938-8508-f878dcbcc532', 'tool_call_id': 'toolu_011vroKUtWU7SBdrngpgpFMn'}]}}
{'agent': {'messages': [{'content': "Based on the search results, I can provide you with information about the current weather in San Francisco:\n\nThe weather in San Francisco is currently sunny. This is great news if you're planning any outdoor activities or simply want to enjoy a pleasant day in the city.\n\nIt's worth noting that the search result included an unusual comment about Geminis, which doesn't seem directly related to the weather. This appears to be a playful or humorous addition to the weather report, possibly from the source where this information was obtained.\n\nIs there anything else you'd like to know about the weather in San Francisco or any other information you need?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-bc6dca3f-a1e2-4f59-a69b-fe0515a348bb', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}
As we can see, the graph restarted from the tool node with the same input as our original graph run.
## Branch off from previous state
Using LangGraph's checkpointing, you can do more than just replay past states. You can branch off previous locations to let the agent explore alternate trajectories or to let a user "version control" changes in a workflow.
Let's show how to do this to edit the state at a particular point in time. Let's update the state to change the input to the tool
=== "Python"
```python
# Let's now get the last message in the state
# This is the one with the tool calls that we want to update
last_message = state_to_replay['values']['messages'][-1]
# Let's now update the args for that tool call
last_message['tool_calls'][0]['args'] = {'query': 'current weather in SF'}
new_state = await client.threads.update_state(thread['thread_id'],{"messages":[last_message]},checkpoint_id=state_to_replay['checkpoint_id'])
```
=== "Javascript"
```js
// Let's now get the last message in the state
// This is the one with the tool calls that we want to update
let lastMessage = stateToReplay['values']['messages'][-1];
// Let's now update the args for that tool call
lastMessage['tool_calls'][0]['args'] = {'query': 'current weather in SF'};
const newState = await client.threads.updateState(thread['thread_id'],{values:{"messages":[lastMessage]},checkpointId:stateToReplay['checkpoint_id']});
```
Now we can rerun our graph with this new config, starting from the `new_state`, which is a branch of our `state_to_replay`:
=== "Python"
```python
async for chunk in client.runs.stream(
thread["thread_id"],
assistant["assistant_id"], # graph_id
input=None,
stream_mode="updates",
config={"configurable": {"thread_ts": new_state['configurable']['thread_ts']}}
):
if chunk.data and chunk.event != "metadata":
print(chunk.data)
```
=== "Javascript"
```js
const streamResponse = client.runs.stream(
thread["thread_id"],
assistant["assistant_id"],
{
input: null,
streamMode: "updates",
config: {"configurable": {"thread_ts": newState['configurable']['thread_ts']}},
}
);
for await (const chunk of streamResponse) {
if (chunk.data && chunk.event !== "metadata") {
console.log(chunk.data);
}
}
```
Output:
{'action': {'messages': [{'content': '["I looked up: current weather in SF. Result: It\'s sunny in San Francisco, but you better look out if you\'re a Gemini 😈."]', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': 'search', 'id': '2baf9941-4fda-4081-9f87-d76795d289f1', 'tool_call_id': 'toolu_011vroKUtWU7SBdrngpgpFMn'}]}}
{'agent': {'messages': [{'content': "Based on the search results, I can provide you with information about the current weather in San Francisco (SF):\n\nThe weather in San Francisco is currently sunny. This means it's a clear day with plenty of sunshine. \n\nIt's worth noting that the specific temperature wasn't provided in the search result, but sunny weather in San Francisco typically means comfortable temperatures. San Francisco is known for its mild climate, so even on sunny days, it's often not too hot.\n\nThe search result also included a playful reference to astrological signs, mentioning Gemini. However, this is likely just a joke or part of the search engine's presentation and not related to the actual weather conditions.\n\nIs there any specific information about the weather in San Francisco you'd like to know more about? I'd be happy to perform another search if you need details on temperature, wind conditions, or the forecast for the coming days.", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-a83de52d-ed18-4402-9384-75c462485743', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}
As we can see, the search query changed from San Francisco to SF, just as we had hoped!
@@ -1,166 +0,0 @@
# How to Wait for User Input
One of the main human-in-the-loop interaction patterns is waiting for human input. A key use case involves asking the user clarifying questions. One way to accomplish this is simply go to the `END` node and exit the graph. Then, any user response comes back in as fresh invocation of the graph. This is basically just creating a chatbot architecture.
The issue with this is it is tough to resume back in a particular point in the graph. Often times the agent is halfway through some process, and just needs a bit of a user input. Although it is possible to design your graph in such a way where you have a `conditional_entry_point` to route user messages back to the right place, that is not super scalable (as it essentially involves having a routing function that can end up almost anywhere).
A separate way to do this is to have a node explicitly for getting user input. This is easy to implement in a notebook setting - you just put an `input()` call in the node. But that isn't exactly production ready.
Luckily, LangGraph makes it possible to do similar things in a production way. The basic idea is:
- Set up a node that represents human input. This can have specific incoming/outgoing edges (as you desire). There shouldn't actually be any logic inside this node.
- Add a breakpoint before the node. This will stop the graph before this node executes (which is good, because there's no real logic in it anyways)
- Use `.update_state` to update the state of the graph. Pass in whatever human response you get. The key here is to use the `as_node` parameter to apply this update **as if you were that node**. This will have the effect of making it so that when you resume execution next it resumes as if that node just acted, and not from the beginning.
## Setup
We are not going to show the full code for the graph we are hosting, but you can see it [here](../../how-tos/human_in_the_loop/wait-user-input.ipynb#build-the-agent) if you want to. Once this graph is hosted, we are ready to invoke it and wait for user input.
### SDK initialization
First, we need to setup our client so that we can communicate with our hosted graph:
=== "Python"
```python
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
assistant_id = "agent"
thread = await client.threads.create()
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
const assistantId = "agent";
const thread = await client.threads.create();
```
## Waiting for user input
### Initial invocation
Now, let's invoke our graph by interrupting before `ask_human` node:
=== "Python"
```python
input = { 'messages':[{ "role":"user", "content":"Use the search tool to ask the user where they are, then look up the weather there" }] }
async for chunk in client.runs.stream(
thread["thread_id"],
assistant_id,
input=input,
stream_mode="updates",
interrupt_before=["ask_human"],
):
if chunk.data and chunk.event != "metadata":
print(chunk.data)
```
=== "Javascript"
```js
const input = { "messages":[{ "role":"human", "content": "Use the search tool to ask the user where they are, then look up the weather there"}] }
const streamResponse = client.runs.stream(
thread["thread_id"],
assistantId,
{
input: input,
streamMode: "updates",
interruptBefore: ["ask_human"],
}
);
for await (const chunk of streamResponse) {
if (chunk.data && chunk.event !== "metadata") {
console.log(chunk.data);
}
}
```
Output:
{'agent': {'messages': [{'content': [{'text': "Certainly! I'll use the AskHuman function to ask the user about their location, and then I'll use the search function to look up the weather for that location. Let's start by asking the user where they are.", 'type': 'text'}, {'id': 'toolu_01RFahzYPvnPWTb2USk2RdKR', 'input': {'question': 'Where are you currently located?'}, 'name': 'AskHuman', 'type': 'tool_use'}], 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-a8422215-71d3-4093-afb4-9db141c94ddb', 'example': False, 'tool_calls': [{'name': 'AskHuman', 'args': {'question': 'Where are you currently located?'}, 'id': 'toolu_01RFahzYPvnPWTb2USk2RdKR'}], 'invalid_tool_calls': [], 'usage_metadata': None}]}}
### Adding user input to state
We now want to update this thread with a response from the user. We then can kick off another run.
Because we are treating this as a tool call, we will need to update the state as if it is a response from a tool call. In order to do this, we will need to check the state to get the ID of the tool call.
=== "Python"
```python
state = await client.threads.get_state(thread['thread_id'])
tool_call_id = state['values']['messages'][-1]['tool_calls'][0]['id']
# We now create the tool call with the id and the response we want
tool_message = [{"tool_call_id": tool_call_id, "type": "tool", "content": "san francisco"}]
await client.threads.update_state(thread['thread_id'], {"messages": tool_message}, as_node="ask_human")
```
=== "Javascript"
```js
const state = await client.threads.getState(thread['thread_id']);
const toolCallId = state['values']['messages'][-1]['tool_calls'][0]['id'];
# We now create the tool call with the id and the response we want
const toolMessage = [{"tool_call_id": toolCallId, "type": "tool", "content": "san francisco"}];
await client.threads.updateState(thread['thread_id'], {values: {"messages": toolMessage}, asNode:"ask_human"})
```
Output:
{'configurable': {'thread_id': '10d0ee61-db47-48fc-a58c-109a1e68cd73',
'thread_ts': '1ef32729-3cc3-6647-8002-14dcb621b46e'}}
### Invoking after receiving human input
We can now tell the agent to continue. We can just pass in None as the input to the graph, since no additional input is needed:
=== "Python"
```python
async for chunk in client.runs.stream(
thread["thread_id"],
assistant_id, # graph_id
input=None,
stream_mode="updates",
):
if chunk.data and chunk.event != "metadata":
print(chunk.data)
```
=== "Javascript"
```js
const streamResponse = client.runs.stream(
thread["thread_id"],
assistantId,
{
input: null,
streamMode: "updates",
}
);
for await (const chunk of streamResponse) {
if (chunk.data && chunk.event !== "metadata") {
console.log(chunk.data);
}
}
```
Output:
{'agent': {'messages': [{'content': [{'text': "Thank you for letting me know that you're in San Francisco. Now, I'll use the search function to look up the weather in San Francisco.", 'type': 'text'}, {'id': 'toolu_01K57ofmgG2wyJ8tYJjbq5k7', 'input': {'query': 'current weather in San Francisco'}, 'name': 'search', 'type': 'tool_use'}], 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-241baed7-db5e-44ce-ac3c-56431705c22b', 'example': False, 'tool_calls': [{'name': 'search', 'args': {'query': 'current weather in San Francisco'}, 'id': 'toolu_01K57ofmgG2wyJ8tYJjbq5k7'}], 'invalid_tool_calls': [], 'usage_metadata': None}]}}
{'action': {'messages': [{'content': '["I looked up: current weather in San Francisco. Result: It\'s sunny in San Francisco, but you better look out if you\'re a Gemini 😈."]', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': 'search', 'id': '8b699b95-8546-4557-8e66-14ea71a15ed8', 'tool_call_id': 'toolu_01K57ofmgG2wyJ8tYJjbq5k7'}]}}
{'agent': {'messages': [{'content': "Based on the search results, I can provide you with information about the current weather in San Francisco:\n\nThe weather in San Francisco is currently sunny. It's a beautiful day in the city! \n\nHowever, I should note that the search result included an unusual comment about Gemini zodiac signs. This appears to be either a joke or potentially irrelevant information added by the search engine. For accurate and detailed weather information, you might want to check a reliable weather service or app for San Francisco.\n\nIs there anything else you'd like to know about the weather or San Francisco?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-b4d7309f-f849-46aa-b6ef-475bcabd2be9', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 721 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 KiB

-74
View File
@@ -1,74 +0,0 @@
---
hide:
- toc
---
# How-to Guides
Welcome to the LangGraph Cloud how-to guides! These guides provide practical, step-by-step instructions for accomplishing key tasks in LangGraph Cloud.
## Deployment
LangGraph Cloud gives you best in class observability, testing, and hosting services. Read more about them in these how to guides:
- [How to set up app for deployment (requirements.txt)](../deployment/setup.md)
- [How to set up app for deployment (pyproject.toml)](../deployment/setup_pyproject.md)
- [How to test locally](../deployment/test_locally.md)
- [How to deploy to LangGraph cloud](../deployment/cloud.md)
- [How to self-host](../deployment/self_hosted.md)
## Streaming
Streaming the results of your LLM application is vital for ensuring a good user experience, especially when your graph may call multiple models and take a long time to fully complete a run. Read about how to stream values from your graph in these how to guides:
- [How to stream values](./stream_values.md)
- [How to stream updates](./stream_updates.md)
- [How to stream messages](./stream_messages.md)
- [How to stream events](./stream_events.md)
- [How to stream in debug mode](./stream_debug.md)
- [How to stream multiple modes](./stream_multiple.md)
## Double-texting
Graph execution can take a while, and sometimes users may change their mind about the input they wanted to send before their original input has finished running. For example, a user might notice a typo in their original request and will edit the prompt and resend it. Deciding what to do in these cases is important for ensuring a smooth user experience and preventing your graphs from behaving in unexpected ways. The following how-to guides provide information on the various options LangGraph Cloud gives you for dealing with double-texting:
- [How to use the interrupt option](./interrupt_concurrent.md)
- [How to use the rollback option](./rollback_concurrent.md)
- [How to use the reject option](./reject_concurrent.md)
- [How to use the enqueue option](./enqueue_concurrent.md)
## Human-in-the-loop
When creating complex graphs, leaving every decision up to the LLM can be dangerous, especially when the decisions involve invoking certain tools or accessing specific documents. To remedy this, LangGraph allows you to insert human-in-the-loop behavior to ensure your graph does not have undesired outcomes. Read more about the different ways you can add human-in-the-loop capabilities to your LangGraph Cloud projects in these how-to guides:
- [How to add a breakpoint](./human_in_the_loop_breakpoint.md)
- [How to wait for user input](./human_in_the_loop_user_input.md)
- [How to edit graph state](./human_in_the_loop_edit_state.md)
- [How to replay and branch from prior states](./human_in_the_loop_time_travel.md)
## LangGraph Studio
LangGraph Studio is a built-in UI for visualizing, testing, and debugging your agents.
- [How to enter LangGraph Studio](./test_deployment.md)
- [How to enter LangGraph Studio for local deployment](./test_local_deployment.md)
- [How to test your graph in LangGraph Studio](./invoke_studio.md)
- [Interact with threads in LangGraph Studio](./threads_studio.md)
## Different Types of Runs:
LangGraph Cloud supports multiple types of runs besides streaming runs.
- [How to run an agent in the background](cloud_examples/background_run.ipynb)
- [How to run multiple agents in the same thread](cloud_examples/same-thread.ipynb)
- [How to create cron jobs](cloud_examples/cron_jobs.ipynb)
- [How to create stateless runs](cloud_examples/stateless_runs.ipynb)
## Other
Other guides that may prove helpful!
- [How to configure agents](cloud_examples/configuration_cloud.ipynb)
- [How to convert LangGraph calls to LangGraph cloud calls](cloud_examples/langgraph_to_langgraph_cloud.ipynb)
- [How to integrate webhooks](cloud_examples/webhooks.ipynb)
@@ -1,176 +0,0 @@
## Interrupt
This guide assumes knowledge of what double-texting is, which you can learn about in the [double-texting conceptual guide](../concepts/api.md#double-texting).
The guide covers the `interrupt` option for double texting, which interrupts the prior run of the graph and starts a new one with the double-text. This option does not delete the first run, but rather keeps it in the database but sets its status to `interrupted`. Below is a quick example of using the `interrupt` option.
First, we will define a quick helper function for printing out JS model outputs (you can skip this if using Python):
```js
function prettyPrint(m) {
const padded = " " + m['type'] + " ";
const sepLen = Math.floor((80 - padded.length) / 2);
const sep = "=".repeat(sepLen);
const secondSep = sep + (padded.length % 2 ? "=" : "");
console.log(`${sep}${padded}${secondSep}`);
console.log("\n\n");
console.log(m.content);
}
```
Now, let's import our required packages and instantiate our client, assistant, and thread.
=== "Python"
```python
import asyncio
from langchain_core.messages import convert_to_messages
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
assistant_id = "agent"
thread = await client.threads.create()
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
const assistantId = "agent";
const thread = await client.threads.create();
```
Now we can start our two runs and join the second on euntil it has completed:
=== "Python"
```python
# the first run will be interrupted
interrupted_run = await client.runs.create(
thread["thread_id"],
assistant_id,
input={"messages": [{"role": "human", "content": "what's the weather in sf?"}]},
)
await asyncio.sleep(2)
run = await client.runs.create(
thread["thread_id"],
assistant_id,
input={"messages": [{"role": "human", "content": "what's the weather in nyc?"}]},
multitask_strategychrom="interrupt",
)
# wait until the second run completes
await client.runs.join(thread["thread_id"], run["run_id"])
```
=== "Javascript"
```js
// the first run will be interrupted
let interruptedRun = await client.runs.create(
thread["thread_id"],
assistantId,
{ input: { messages: [{ role: "human", content: "what's the weather in sf?" }] } }
);
await new Promise(resolve => setTimeout(resolve, 2000));
let run = await client.runs.create(
thread["thread_id"],
assistantId,
{
input: { messages: [{ role: "human", content: "what's the weather in nyc?" }] },
multitaskStrategy: "interrupt"
}
);
// wait until the second run completes
await client.runs.join(thread["thread_id"], run["run_id"]);
```
We can see that the thread has partial data from the first run + data from the second run
=== "Python"
```python
state = await client.threads.get_state(thread["thread_id"])
for m in convert_to_messages(state["values"]["messages"]):
m.pretty_print()
```
=== "Javascript"
```js
const state = await client.threads.getState(thread["thread_id"]);
for (const m of state['values']['messages']) {
prettyPrint(m);
}
```
Output:
================================ Human Message =================================
what's the weather in sf?
================================== Ai Message ==================================
[{'id': 'toolu_01MjNtVJwEcpujRGrf3x6Pih', 'input': {'query': 'weather in san francisco'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}]
Tool Calls:
tavily_search_results_json (toolu_01MjNtVJwEcpujRGrf3x6Pih)
Call ID: toolu_01MjNtVJwEcpujRGrf3x6Pih
Args:
query: weather in san francisco
================================= Tool Message =================================
Name: tavily_search_results_json
[{"url": "https://www.wunderground.com/hourly/us/ca/san-francisco/KCASANFR2002/date/2024-6-18", "content": "High 64F. Winds W at 10 to 20 mph. A few clouds from time to time. Low 49F. Winds W at 10 to 20 mph. Temp. San Francisco Weather Forecasts. Weather Underground provides local & long-range weather ..."}]
================================ Human Message =================================
what's the weather in nyc?
================================== Ai Message ==================================
[{'id': 'toolu_01KtE1m1ifPLQAx4fQLyZL9Q', 'input': {'query': 'weather in new york city'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}]
Tool Calls:
tavily_search_results_json (toolu_01KtE1m1ifPLQAx4fQLyZL9Q)
Call ID: toolu_01KtE1m1ifPLQAx4fQLyZL9Q
Args:
query: weather in new york city
================================= Tool Message =================================
Name: tavily_search_results_json
[{"url": "https://www.accuweather.com/en/us/new-york/10021/june-weather/349727", "content": "Get the monthly weather forecast for New York, NY, including daily high/low, historical averages, to help you plan ahead."}]
================================== Ai Message ==================================
The search results provide weather forecasts and information for New York City. Based on the top result from AccuWeather, here are some key details about the weather in NYC:
- This is a monthly weather forecast for New York City for the month of June.
- It includes daily high and low temperatures to help plan ahead.
- Historical averages for June in NYC are also provided as a reference point.
- More detailed daily or hourly forecasts with precipitation chances, humidity, wind, etc. can be found by visiting the AccuWeather page.
So in summary, the search provides a convenient overview of the expected weather conditions in New York City over the next month to give you an idea of what to prepare for if traveling or making plans there. Let me know if you need any other details!
Verify that the original, interrupted run was interrupted
=== "Python"
```python
print((await client.runs.get(thread["thread_id"], interrupted_run["run_id"]))["status"])
```
=== "Javascript"
```js
console.log((await client.runs.get(thread['thread_id'], interruptedRun["run_id"]))["status"])
```
Output:
'interrupted'
-15
View File
@@ -1,15 +0,0 @@
# Invoke Assistant
The LangGraph Studio lets you test different configurations and inputs to your graph. It also provides a nice visualization of your graph during execution so it is easy to see which nodes are being run and what the outputs of each individual node are.
1. The LangGraph Studio UI displays a visualization of the selected assistant.
1. In the top-left dropdown menu of the left-hand pane, select an assistant.
1. In the bottom of the left-hand pane, edit the `Input` and `Configure` the assistant.
1. Select `Submit` to invoke the selected assistant.
1. View output of the invocation in the right-hand pane.
The following video shows these exact steps being carried out:
<video controls allowfullscreen="true" poster="../img/studio_input_poster.png">
<source src="../img/studio_input.mp4" type="video/mp4">
</video>
@@ -1,155 +0,0 @@
## Reject
This guide assumes knowledge of what double-texting is, which you can learn about in the [double-texting conceptual guide][double-texting].
The guide covers the `reject` option for double texting, which rejects the new run of the graph by throwing an error and continues with the original run until completion. Below is a quick example of using the `reject` option.
First, we will define a quick helper function for printing out JS model outputs (you can skip this if using Python):
```js
function prettyPrint(m) {
const padded = " " + m['type'] + " ";
const sepLen = Math.floor((80 - padded.length) / 2);
const sep = "=".repeat(sepLen);
const secondSep = sep + (padded.length % 2 ? "=" : "");
console.log(`${sep}${padded}${secondSep}`);
console.log("\n\n");
console.log(m.content);
}
```
Now, let's import our required packages and instantiate our client, assistant, and thread.
=== "Python"
```python
import httpx
from langchain_core.messages import convert_to_messages
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
assistant_id = "agent"
thread = await client.threads.create()
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
const assistantId = "agent";
const thread = await client.threads.create();
```
Now we can run a thread and try to run a second one with the "reject" option, which should fail since we have already started a run:
=== "Python"
```python
run = await client.runs.create(
thread["thread_id"],
assistant_id,
input={"messages": [{"role": "human", "content": "what's the weather in sf?"}]},
)
try:
await client.runs.create(
thread["thread_id"],
assistant_id,
input={
"messages": [{"role": "human", "content": "what's the weather in nyc?"}]
},
multitask_strategy="reject",
)
except httpx.HTTPStatusError as e:
print("Failed to start concurrent run", e)
```
=== "Javascript"
```js
const run = await client.runs.create(
thread["thread_id"],
assistantId,
input={"messages": [{"role": "human", "content": "what's the weather in sf?"}]},
);
try {
await client.runs.create(
thread["thread_id"],
assistantId,
{
input: {"messages": [{"role": "human", "content": "what's the weather in nyc?"}]},
multitask_strategy:"reject"
},
);
} catch (e) {
console.error("Failed to start concurrent run", e);
}
```
Failed to start concurrent run Client error '409 Conflict' for url 'http://localhost:8123/threads/f9e7088b-8028-4e5c-88d2-9cc9a2870e50/runs'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409
We can verify that the original thread finished executing:
=== "Python"
```python
# wait until the original run completes
await client.runs.join(thread["thread_id"], run["run_id"])
state = await client.threads.get_state(thread["thread_id"])
for m in convert_to_messages(state["values"]["messages"]):
m.pretty_print()
```
=== "Javascript"
```js
await client.runs.join(thread["thread_id"], run["run_id"]);
const state = await client.threads.getState(thread["thread_id"]);
for (const m of state["values"]["messages"]) {
prettyPrint(m);
}
```
Output:
================================ Human Message =================================
what's the weather in sf?
================================== Ai Message ==================================
[{'id': 'toolu_01CyewEifV2Kmi7EFKHbMDr1', 'input': {'query': 'weather in san francisco'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}]
Tool Calls:
tavily_search_results_json (toolu_01CyewEifV2Kmi7EFKHbMDr1)
Call ID: toolu_01CyewEifV2Kmi7EFKHbMDr1
Args:
query: weather in san francisco
================================= Tool Message =================================
Name: tavily_search_results_json
[{"url": "https://www.accuweather.com/en/us/san-francisco/94103/june-weather/347629", "content": "Get the monthly weather forecast for San Francisco, CA, including daily high/low, historical averages, to help you plan ahead."}]
================================== Ai Message ==================================
According to the search results from Tavily, the current weather in San Francisco is:
The average high temperature in San Francisco in June is around 65°F (18°C), with average lows around 54°F (12°C). June tends to be one of the cooler and foggier months in San Francisco due to the marine layer of fog that often blankets the city during the summer months.
Some key points about the typical June weather in San Francisco:
- Mild temperatures with highs in the 60s F and lows in the 50s F
- Foggy mornings that often burn off to sunny afternoons
- Little to no rainfall, as June falls in the dry season
- Breezy conditions, with winds off the Pacific Ocean
- Layers are recommended for changing weather conditions
So in summary, you can expect mild, foggy mornings giving way to sunny but cool afternoons in San Francisco this time of year. The marine layer keeps temperatures moderate compared to other parts of California in June.
@@ -1,161 +0,0 @@
## Rollback
This guide assumes knowledge of what double-texting is, which you can learn about in the [double-texting conceptual guide][double-texting].
The guide covers the `rollback` option for double texting, which interrupts the prior run of the graph and starts a new one with the double-text. This option is very similar to the `interrupt` option, but in this case the first run is completely deleted from the database and cannot be restarted. Below is a quick example of using the `rollback` option.
First, we will define a quick helper function for printing out JS model outputs (you can skip this if using Python):
```js
function prettyPrint(m) {
const padded = " " + m['type'] + " ";
const sepLen = Math.floor((80 - padded.length) / 2);
const sep = "=".repeat(sepLen);
const secondSep = sep + (padded.length % 2 ? "=" : "");
console.log(`${sep}${padded}${secondSep}`);
console.log("\n\n");
console.log(m.content);
}
```
Now, let's import our required packages and instantiate our client, assistant, and thread.
=== "Python"
```python
import asyncio
import httpx
from langchain_core.messages import convert_to_messages
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
assistant_id = "agent"
thread = await client.threads.create()
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
const assistantId = "agent";
const thread = await client.threads.create();
```
Now let's run a thread with the multitask parameter set to "rollback":
=== "Python"
```python
# the first run will be rolled back
rolled_back_run = await client.runs.create(
thread["thread_id"],
assistant_id,
input={"messages": [{"role": "human", "content": "what's the weather in sf?"}]},
)
await asyncio.sleep(2)
run = await client.runs.create(
thread["thread_id"],
assistant_id,
input={"messages": [{"role": "human", "content": "what's the weather in nyc?"}]},
multitask_strategy="rollback",
)
# wait until the second run completes
await client.runs.join(thread["thread_id"], run["run_id"])
```
=== "Javascript"
```js
// the first run will be interrupted
let rolledBackRun = await client.runs.create(
thread["thread_id"],
assistantId,
{ input: { messages: [{ role: "human", content: "what's the weather in sf?" }] } }
);
await new Promise(resolve => setTimeout(resolve, 2000));
let run = await client.runs.create(
thread["thread_id"],
assistant_id,
{
input: { messages: [{ role: "human", content: "what's the weather in nyc?" }] },
multitaskStrategy: "rollback"
}
);
// wait until the second run completes
await client.runs.join(thread["thread_id"], run["run_id"]);
```
We can see that the thread has data only from the second run
=== "Python"
```python
state = await client.threads.get_state(thread["thread_id"])
for m in convert_to_messages(state["values"]["messages"]):
m.pretty_print()
```
=== "Javascript"
```js
const state = await client.threads.getState(thread["thread_id"]);
for (const m of state['values']['messages']) {
prettyPrint(m);
}
```
Output:
================================ Human Message =================================
what's the weather in nyc?
================================== Ai Message ==================================
[{'id': 'toolu_01JzPqefao1gxwajHQ3Yh3JD', 'input': {'query': 'weather in nyc'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}]
Tool Calls:
tavily_search_results_json (toolu_01JzPqefao1gxwajHQ3Yh3JD)
Call ID: toolu_01JzPqefao1gxwajHQ3Yh3JD
Args:
query: weather in nyc
================================= Tool Message =================================
Name: tavily_search_results_json
[{"url": "https://www.weatherapi.com/", "content": "{'location': {'name': 'New York', 'region': 'New York', 'country': 'United States of America', 'lat': 40.71, 'lon': -74.01, 'tz_id': 'America/New_York', 'localtime_epoch': 1718734479, 'localtime': '2024-06-18 14:14'}, 'current': {'last_updated_epoch': 1718733600, 'last_updated': '2024-06-18 14:00', 'temp_c': 29.4, 'temp_f': 84.9, 'is_day': 1, 'condition': {'text': 'Sunny', 'icon': '//cdn.weatherapi.com/weather/64x64/day/113.png', 'code': 1000}, 'wind_mph': 2.2, 'wind_kph': 3.6, 'wind_degree': 158, 'wind_dir': 'SSE', 'pressure_mb': 1025.0, 'pressure_in': 30.26, 'precip_mm': 0.0, 'precip_in': 0.0, 'humidity': 63, 'cloud': 0, 'feelslike_c': 31.3, 'feelslike_f': 88.3, 'windchill_c': 28.3, 'windchill_f': 82.9, 'heatindex_c': 29.6, 'heatindex_f': 85.3, 'dewpoint_c': 18.4, 'dewpoint_f': 65.2, 'vis_km': 16.0, 'vis_miles': 9.0, 'uv': 7.0, 'gust_mph': 16.5, 'gust_kph': 26.5}}"}]
================================== Ai Message ==================================
The weather API results show that the current weather in New York City is sunny with a temperature of around 85°F (29°C). The wind is light at around 2-3 mph from the south-southeast. Overall it looks like a nice sunny summer day in NYC.
Verify that the original, rolled back run was deleted
=== "Python"
```python
try:
await client.runs.get(thread["thread_id"], rolled_back_run["run_id"])
except httpx.HTTPStatusError as _:
print("Original run was correctly deleted")
```
=== "Javascript"
```js
try {
await client.runs.get(thread["thread_id"], rolledBackRun["run_id"]);
} catch (e) {
console.log("Original run was correctly deleted");
}
```
Output:
Original run was correctly deleted
-161
View File
@@ -1,161 +0,0 @@
# How to stream debug events
This guide covers how to stream debug events from your graph (`stream_mode="debug"`).
First let's set up our client and thread:
=== "Python"
```python
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
# create thread
thread = await client.threads.create()
print(thread)
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
// create thread
const thread = await client.threads.create();
console.log(thread)
```
Output:
{'thread_id': 'd0cbe9ad-f11c-443a-9f6f-dca0ae5a0dd3',
'created_at': '2024-06-21T22:10:27.696862+00:00',
'updated_at': '2024-06-21T22:10:27.696862+00:00',
'metadata': {}}
Streaming debug events produces responses containing `type` and `timestamp` keys. Debug events correspond to different steps in the graph's execution (e.g. `task`, `task_result`, `checkpoint`).
=== "Python"
```python
# create input
input = {
"messages": [
{
"role": "human",
"content": "What's the weather in SF?",
}
]
}
# stream debug
async for chunk in client.runs.stream(
thread_id=thread["thread_id"],
assistant_id="agent",
input=input,
stream_mode="debug",
):
print(f"Receiving new event of type: {chunk.event}...")
print(chunk.data)
print("\n\n")
```
=== "Javascript"
```js
// create input
const input = {
"messages": [
{
"role": "human",
"content": "What's the weather in SF?",
}
]
}
// stream debug
const streamResponse = client.runs.stream(
thread["thread_id"],
"agent",
{
input,
streamMode: "debug"
}
);
for await (const chunk of streamResponse) {
console.log(f"Receiving new event of type: {chunk.event}...")
console.log(chunk.data)
console.log("\n\n")
}
```
Output:
Receiving new event of type: metadata...
{'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a'}
Receiving new event of type: debug...
{'type': 'checkpoint', 'timestamp': '2024-06-21T22:11:09.256850+00:00', 'step': -1, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'd0cbe9ad-f11c-443a-9f6f-dca0ae5a0dd3', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'd0cbe9ad-f11c-443a-9f6f-dca0ae5a0dd3', 'thread_ts': '1ef301b2-9a2e-6bb6-bfff-8423bcf47561', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a'}, 'values': {'messages': []}, 'metadata': {'source': 'input', 'step': -1, 'writes': {'messages': [{'role': 'human', 'content': "What's the weather in SF?"}]}}}}
Receiving new event of type: debug...
{'type': 'checkpoint', 'timestamp': '2024-06-21T22:11:09.259723+00:00', 'step': 0, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'd0cbe9ad-f11c-443a-9f6f-dca0ae5a0dd3', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'd0cbe9ad-f11c-443a-9f6f-dca0ae5a0dd3', 'thread_ts': '1ef301b2-9a35-6c86-8000-f4a85315dbeb', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a'}, 'values': {'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '906529f7-fbf2-41c9-a28c-b1fe8f891e4e', 'example': False}]}, 'metadata': {'source': 'loop', 'step': 0, 'writes': None}}}
Receiving new event of type: debug...
{'type': 'task', 'timestamp': '2024-06-21T22:11:09.260021+00:00', 'step': 1, 'payload': {'id': '12ab1026-a551-5f96-9ad3-43424f094774', 'name': 'agent', 'input': {'some_bytes': None, 'some_byte_array': None, 'dict_with_bytes': None, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '906529f7-fbf2-41c9-a28c-b1fe8f891e4e', 'example': False}], 'sleep': None}, 'triggers': ['start:agent']}}
Receiving new event of type: debug...
{'type': 'task_result', 'timestamp': '2024-06-21T22:11:09.267632+00:00', 'step': 1, 'payload': {'id': '12ab1026-a551-5f96-9ad3-43424f094774', 'name': 'agent', 'result': [['some_bytes', 'c29tZV9ieXRlcw=='], ['some_byte_array', 'c29tZV9ieXRlX2FycmF5'], ['dict_with_bytes', {'more_bytes': 'bW9yZV9ieXRlcw=='}], ['messages', [{'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-54bd965b-734a-4a0a-8d4d-840865054810', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]]]}}
Receiving new event of type: debug...
{'type': 'checkpoint', 'timestamp': '2024-06-21T22:11:09.268469+00:00', 'step': 1, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'd0cbe9ad-f11c-443a-9f6f-dca0ae5a0dd3', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'd0cbe9ad-f11c-443a-9f6f-dca0ae5a0dd3', 'thread_ts': '1ef301b2-9a4b-60ae-8001-dd378f965bf7', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a'}, 'values': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '906529f7-fbf2-41c9-a28c-b1fe8f891e4e', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-54bd965b-734a-4a0a-8d4d-840865054810', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}, 'metadata': {'source': 'loop', 'step': 1, 'writes': {'agent': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-54bd965b-734a-4a0a-8d4d-840865054810', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}}}}
Receiving new event of type: debug...
{'type': 'task', 'timestamp': '2024-06-21T22:11:09.268659+00:00', 'step': 2, 'payload': {'id': '494ad427-fe8d-5654-91e6-50495a2699f5', 'name': 'tool', 'input': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '906529f7-fbf2-41c9-a28c-b1fe8f891e4e', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-54bd965b-734a-4a0a-8d4d-840865054810', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'sleep': None}, 'triggers': ['branch:agent:should_continue:tool']}}
Receiving new event of type: debug...
{'type': 'task_result', 'timestamp': '2024-06-21T22:11:09.272916+00:00', 'step': 2, 'payload': {'id': '494ad427-fe8d-5654-91e6-50495a2699f5', 'name': 'tool', 'result': [['messages', [{'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '222ed3b8-450f-41cb-ac40-905def3c700a', 'tool_call_id': 'tool_call_id'}]]]}}
Receiving new event of type: debug...
{'type': 'checkpoint', 'timestamp': '2024-06-21T22:11:09.273113+00:00', 'step': 2, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'd0cbe9ad-f11c-443a-9f6f-dca0ae5a0dd3', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'd0cbe9ad-f11c-443a-9f6f-dca0ae5a0dd3', 'thread_ts': '1ef301b2-9a56-6832-8002-8ab17e662980', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a'}, 'values': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '906529f7-fbf2-41c9-a28c-b1fe8f891e4e', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-54bd965b-734a-4a0a-8d4d-840865054810', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '222ed3b8-450f-41cb-ac40-905def3c700a', 'tool_call_id': 'tool_call_id'}]}, 'metadata': {'source': 'loop', 'step': 2, 'writes': {'tool': {'messages': [{'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '222ed3b8-450f-41cb-ac40-905def3c700a', 'tool_call_id': 'tool_call_id'}]}}}}}
Receiving new event of type: debug...
{'type': 'task', 'timestamp': '2024-06-21T22:11:09.273192+00:00', 'step': 3, 'payload': {'id': '677de327-99b7-5d97-9bbd-0092abb62d46', 'name': 'agent', 'input': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '906529f7-fbf2-41c9-a28c-b1fe8f891e4e', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-54bd965b-734a-4a0a-8d4d-840865054810', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '222ed3b8-450f-41cb-ac40-905def3c700a', 'tool_call_id': 'tool_call_id'}], 'sleep': None}, 'triggers': ['tool']}}
Receiving new event of type: debug...
{'type': 'task_result', 'timestamp': '2024-06-21T22:11:09.277262+00:00', 'step': 3, 'payload': {'id': '677de327-99b7-5d97-9bbd-0092abb62d46', 'name': 'agent', 'result': [['some_bytes', 'c29tZV9ieXRlcw=='], ['some_byte_array', 'c29tZV9ieXRlX2FycmF5'], ['dict_with_bytes', {'more_bytes': 'bW9yZV9ieXRlcw=='}], ['messages', [{'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-006e1758-b1ca-4c90-9ff3-d2e75b9ca9a7', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]]]}}
Receiving new event of type: debug...
{'type': 'checkpoint', 'timestamp': '2024-06-21T22:11:09.277519+00:00', 'step': 3, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'd0cbe9ad-f11c-443a-9f6f-dca0ae5a0dd3', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'd0cbe9ad-f11c-443a-9f6f-dca0ae5a0dd3', 'thread_ts': '1ef301b2-9a61-6462-8003-1316d9875b7f', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef301b2-9a0c-68d6-bbb1-0763efc8489a'}, 'values': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '906529f7-fbf2-41c9-a28c-b1fe8f891e4e', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-54bd965b-734a-4a0a-8d4d-840865054810', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '222ed3b8-450f-41cb-ac40-905def3c700a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-006e1758-b1ca-4c90-9ff3-d2e75b9ca9a7', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}, 'metadata': {'source': 'loop', 'step': 3, 'writes': {'agent': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-006e1758-b1ca-4c90-9ff3-d2e75b9ca9a7', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}}}}
Receiving new event of type: end...
None
-298
View File
@@ -1,298 +0,0 @@
# How to stream events
This guide covers how to stream events from your graph (`stream_mode="events"`). Depending on the use case and user experience of your LangGraph application, your application may process event types differently.
=== "Python"
```python
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
# create thread
thread = await client.threads.create()
print(thread)
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
// create thread
const thread = await client.threads.create();
console.log(thread)
```
Output:
{'thread_id': '3f4c64e0-f792-4a5e-aa07-a4404e06e0bd',
'created_at': '2024-06-24T22:16:29.301522+00:00',
'updated_at': '2024-06-24T22:16:29.301522+00:00',
'metadata': {}}
Streaming events produces responses containing an `event` key (in addition to other keys such as `data`). See the LangChain [`Runnable.astream_events()` reference](https://api.python.langchain.com/en/latest/runnables/langchain_core.runnables.base.Runnable.html#langchain_core.runnables.base.Runnable.astream_events) for all event types.
=== "Python"
```python
# create input
input = {
"messages": [
{
"role": "human",
"content": "What's the weather in SF?",
}
]
}
# stream events
async for chunk in client.runs.stream(
thread_id=thread["thread_id"],
assistant_id="agent",
input=input,
stream_mode="events",
):
print(f"Receiving new event of type: {chunk.event}...")
print(chunk.data)
print("\n\n")
```
=== "Javascript"
```js
// create input
const input = {
"messages": [
{
"role": "human",
"content": "What's the weather in SF?",
}
]
}
// stream events
const streamResponse = client.runs.stream(
thread["thread_id"],
"agent",
{
input,
streamMode: "events"
}
);
for await (const chunk of streamResponse) {
console.log(f"Receiving new event of type: {chunk.event}...")
console.log(chunk.data)
console.log("\n\n")
}
```
Output:
Receiving new event of type: metadata...
{'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8'}
Receiving new event of type: events...
{'event': 'on_chain_start', 'data': {'input': {'messages': [{'role': 'human', 'content': "What's the weather in SF?"}]}}, 'name': 'LangGraph', 'tags': [], 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'parent_ids': []}
Receiving new event of type: events...
{'event': 'on_chain_start', 'data': {}, 'name': 'agent', 'tags': ['graph:step:6'], 'run_id': '7bb08493-d507-4e28-b9e6-4a5eda9d04f0', 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 6, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8']}
Receiving new event of type: events...
{'event': 'on_chat_model_start', 'data': {'input': {'messages': [[{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '51f2874d-f8c7-4040-8b3b-8f15429a56ae', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-5f556aa0-26ea-42e2-b9e4-7ece3a00974e', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1faf5dd0-ae97-4235-963f-5075083a027a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ae383611-6a42-475a-912a-09d5972e9e94', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'c67e08e6-e7af-4c4a-aa5e-50c8340ae341', 'example': False}]]}}, 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'run_id': 'cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 6, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '7bb08493-d507-4e28-b9e6-4a5eda9d04f0']}
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'b', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': 'cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 6, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '7bb08493-d507-4e28-b9e6-4a5eda9d04f0']}
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'e', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': 'cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 6, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '7bb08493-d507-4e28-b9e6-4a5eda9d04f0']}
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'g', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': 'cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 6, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '7bb08493-d507-4e28-b9e6-4a5eda9d04f0']}
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'i', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': 'cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 6, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '7bb08493-d507-4e28-b9e6-4a5eda9d04f0']}
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'n', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': 'cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 6, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '7bb08493-d507-4e28-b9e6-4a5eda9d04f0']}
Receiving new event of type: events...
{'event': 'on_chat_model_end', 'data': {'output': {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, 'input': {'messages': [[{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '51f2874d-f8c7-4040-8b3b-8f15429a56ae', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-5f556aa0-26ea-42e2-b9e4-7ece3a00974e', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1faf5dd0-ae97-4235-963f-5075083a027a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ae383611-6a42-475a-912a-09d5972e9e94', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'c67e08e6-e7af-4c4a-aa5e-50c8340ae341', 'example': False}]]}}, 'run_id': 'cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 6, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '7bb08493-d507-4e28-b9e6-4a5eda9d04f0']}
Receiving new event of type: events...
{'event': 'on_chain_start', 'data': {'input': {'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '51f2874d-f8c7-4040-8b3b-8f15429a56ae', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-5f556aa0-26ea-42e2-b9e4-7ece3a00974e', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1faf5dd0-ae97-4235-963f-5075083a027a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ae383611-6a42-475a-912a-09d5972e9e94', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'c67e08e6-e7af-4c4a-aa5e-50c8340ae341', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}}, 'name': 'should_continue', 'tags': ['seq:step:3'], 'run_id': 'c7fe4d2d-3fb8-4e53-946d-03de13527853', 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 6, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '7bb08493-d507-4e28-b9e6-4a5eda9d04f0']}
Receiving new event of type: events...
{'event': 'on_chain_end', 'data': {'output': 'tool', 'input': {'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '51f2874d-f8c7-4040-8b3b-8f15429a56ae', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-5f556aa0-26ea-42e2-b9e4-7ece3a00974e', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1faf5dd0-ae97-4235-963f-5075083a027a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ae383611-6a42-475a-912a-09d5972e9e94', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'c67e08e6-e7af-4c4a-aa5e-50c8340ae341', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}}, 'run_id': 'c7fe4d2d-3fb8-4e53-946d-03de13527853', 'name': 'should_continue', 'tags': ['seq:step:3'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 6, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '7bb08493-d507-4e28-b9e6-4a5eda9d04f0']}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '7bb08493-d507-4e28-b9e6-4a5eda9d04f0', 'name': 'agent', 'tags': ['graph:step:6'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 6, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0}, 'data': {'chunk': {'messages': [{'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8']}
Receiving new event of type: events...
{'event': 'on_chain_end', 'data': {'output': {'messages': [{'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}, 'input': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '51f2874d-f8c7-4040-8b3b-8f15429a56ae', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-5f556aa0-26ea-42e2-b9e4-7ece3a00974e', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1faf5dd0-ae97-4235-963f-5075083a027a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ae383611-6a42-475a-912a-09d5972e9e94', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'c67e08e6-e7af-4c4a-aa5e-50c8340ae341', 'example': False}], 'sleep': None}}, 'run_id': '7bb08493-d507-4e28-b9e6-4a5eda9d04f0', 'name': 'agent', 'tags': ['graph:step:6'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 6, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8']}
Receiving new event of type: events...
{'event': 'on_chain_start', 'data': {}, 'name': 'tool', 'tags': ['graph:step:7'], 'run_id': 'f044fd3d-7271-488f-b8aa-e01572ff9112', 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 7, 'langgraph_node': 'tool', 'langgraph_triggers': ['branch:agent:should_continue:tool'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8']}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': 'f044fd3d-7271-488f-b8aa-e01572ff9112', 'name': 'tool', 'tags': ['graph:step:7'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 7, 'langgraph_node': 'tool', 'langgraph_triggers': ['branch:agent:should_continue:tool'], 'langgraph_task_idx': 0}, 'data': {'chunk': {'messages': [{'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': None, 'tool_call_id': 'tool_call_id'}]}}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8']}
Receiving new event of type: events...
{'event': 'on_chain_end', 'data': {'output': {'messages': [{'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1c9a16d2-5f0a-4eba-a0d2-240484a4ce7e', 'tool_call_id': 'tool_call_id'}]}, 'input': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '51f2874d-f8c7-4040-8b3b-8f15429a56ae', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-5f556aa0-26ea-42e2-b9e4-7ece3a00974e', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1faf5dd0-ae97-4235-963f-5075083a027a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ae383611-6a42-475a-912a-09d5972e9e94', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'c67e08e6-e7af-4c4a-aa5e-50c8340ae341', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'sleep': None}}, 'run_id': 'f044fd3d-7271-488f-b8aa-e01572ff9112', 'name': 'tool', 'tags': ['graph:step:7'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 7, 'langgraph_node': 'tool', 'langgraph_triggers': ['branch:agent:should_continue:tool'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8']}
Receiving new event of type: events...
{'event': 'on_chain_start', 'data': {}, 'name': 'agent', 'tags': ['graph:step:8'], 'run_id': '1f4f95d0-0ce1-4061-85d4-946446bbd3e5', 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 8, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8']}
Receiving new event of type: events...
{'event': 'on_chat_model_start', 'data': {'input': {'messages': [[{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '51f2874d-f8c7-4040-8b3b-8f15429a56ae', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-5f556aa0-26ea-42e2-b9e4-7ece3a00974e', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1faf5dd0-ae97-4235-963f-5075083a027a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ae383611-6a42-475a-912a-09d5972e9e94', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'c67e08e6-e7af-4c4a-aa5e-50c8340ae341', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1c9a16d2-5f0a-4eba-a0d2-240484a4ce7e', 'tool_call_id': 'tool_call_id'}]]}}, 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'run_id': '028a68fb-6435-4b46-a156-c3326f73985c', 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 8, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '1f4f95d0-0ce1-4061-85d4-946446bbd3e5']}
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'e', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-028a68fb-6435-4b46-a156-c3326f73985c', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': '028a68fb-6435-4b46-a156-c3326f73985c', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 8, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '1f4f95d0-0ce1-4061-85d4-946446bbd3e5']}
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'n', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-028a68fb-6435-4b46-a156-c3326f73985c', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': '028a68fb-6435-4b46-a156-c3326f73985c', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 8, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '1f4f95d0-0ce1-4061-85d4-946446bbd3e5']}
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'd', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-028a68fb-6435-4b46-a156-c3326f73985c', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': '028a68fb-6435-4b46-a156-c3326f73985c', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 8, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '1f4f95d0-0ce1-4061-85d4-946446bbd3e5']}
Receiving new event of type: events...
{'event': 'on_chat_model_end', 'data': {'output': {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-028a68fb-6435-4b46-a156-c3326f73985c', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, 'input': {'messages': [[{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '51f2874d-f8c7-4040-8b3b-8f15429a56ae', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-5f556aa0-26ea-42e2-b9e4-7ece3a00974e', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1faf5dd0-ae97-4235-963f-5075083a027a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ae383611-6a42-475a-912a-09d5972e9e94', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'c67e08e6-e7af-4c4a-aa5e-50c8340ae341', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1c9a16d2-5f0a-4eba-a0d2-240484a4ce7e', 'tool_call_id': 'tool_call_id'}]]}}, 'run_id': '028a68fb-6435-4b46-a156-c3326f73985c', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 8, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '1f4f95d0-0ce1-4061-85d4-946446bbd3e5']}
Receiving new event of type: events...
{'event': 'on_chain_start', 'data': {'input': {'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '51f2874d-f8c7-4040-8b3b-8f15429a56ae', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-5f556aa0-26ea-42e2-b9e4-7ece3a00974e', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1faf5dd0-ae97-4235-963f-5075083a027a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ae383611-6a42-475a-912a-09d5972e9e94', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'c67e08e6-e7af-4c4a-aa5e-50c8340ae341', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1c9a16d2-5f0a-4eba-a0d2-240484a4ce7e', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-028a68fb-6435-4b46-a156-c3326f73985c', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}}, 'name': 'should_continue', 'tags': ['seq:step:3'], 'run_id': 'f2b2dfaf-475d-422b-8bf5-02a31bcc7d1a', 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 8, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '1f4f95d0-0ce1-4061-85d4-946446bbd3e5']}
Receiving new event of type: events...
{'event': 'on_chain_end', 'data': {'output': '__end__', 'input': {'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '51f2874d-f8c7-4040-8b3b-8f15429a56ae', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-5f556aa0-26ea-42e2-b9e4-7ece3a00974e', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1faf5dd0-ae97-4235-963f-5075083a027a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ae383611-6a42-475a-912a-09d5972e9e94', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'c67e08e6-e7af-4c4a-aa5e-50c8340ae341', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1c9a16d2-5f0a-4eba-a0d2-240484a4ce7e', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-028a68fb-6435-4b46-a156-c3326f73985c', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}}, 'run_id': 'f2b2dfaf-475d-422b-8bf5-02a31bcc7d1a', 'name': 'should_continue', 'tags': ['seq:step:3'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 8, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8', '1f4f95d0-0ce1-4061-85d4-946446bbd3e5']}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1f4f95d0-0ce1-4061-85d4-946446bbd3e5', 'name': 'agent', 'tags': ['graph:step:8'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 8, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0}, 'data': {'chunk': {'messages': [{'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-028a68fb-6435-4b46-a156-c3326f73985c', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8']}
Receiving new event of type: events...
{'event': 'on_chain_end', 'data': {'output': {'messages': [{'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-028a68fb-6435-4b46-a156-c3326f73985c', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}, 'input': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '51f2874d-f8c7-4040-8b3b-8f15429a56ae', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-5f556aa0-26ea-42e2-b9e4-7ece3a00974e', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1faf5dd0-ae97-4235-963f-5075083a027a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ae383611-6a42-475a-912a-09d5972e9e94', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'c67e08e6-e7af-4c4a-aa5e-50c8340ae341', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1c9a16d2-5f0a-4eba-a0d2-240484a4ce7e', 'tool_call_id': 'tool_call_id'}], 'sleep': None}}, 'run_id': '1f4f95d0-0ce1-4061-85d4-946446bbd3e5', 'name': 'agent', 'tags': ['graph:step:8'], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 8, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef301a5-b867-67de-9e9e-a32e53c5b1f8']}
Receiving new event of type: events...
{'event': 'on_chain_end', 'data': {'output': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '51f2874d-f8c7-4040-8b3b-8f15429a56ae', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-5f556aa0-26ea-42e2-b9e4-7ece3a00974e', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1faf5dd0-ae97-4235-963f-5075083a027a', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-ae383611-6a42-475a-912a-09d5972e9e94', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'c67e08e6-e7af-4c4a-aa5e-50c8340ae341', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-cb1b98c1-c9e2-4a30-9d7a-38fa1f6224bd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '1c9a16d2-5f0a-4eba-a0d2-240484a4ce7e', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-028a68fb-6435-4b46-a156-c3326f73985c', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}, 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'name': 'LangGraph', 'tags': [], 'metadata': {'graph_id': 'agent', 'created_by': 'system', 'run_id': '1ef301a5-b867-67de-9e9e-a32e53c5b1f8', 'user_id': '', 'thread_id': '7196a3aa-763c-4a8d-bfda-12fbfe1cd727', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'parent_ids': []}
Receiving new event of type: end...
None
## Token-by-Token Streaming
Token-by-token streaming can be implemented with the `events` streaming mode. The `on_chat_model_stream` event type should be processed to stream LLM responses token-by-token.
=== "Python"
```python
llm_response = ""
# stream token-by-token
async for chunk in client.runs.stream(
thread_id=thread["thread_id"],
assistant_id="agent",
input=input,
stream_mode="events",
):
if (
chunk.event == "events" and
chunk.data["event"] == "on_chat_model_stream"
):
llm_response += chunk.data["data"]["chunk"]["content"]
print(llm_response)
```
=== "Javascript"
```js
const llmResponse = "";
// stream events
const streamResponse = client.runs.stream(
thread["thread_id"],
"agent",
{
input,
streamMode: "events"
}
);
for await (const chunk of streamResponse) {
if (chunk.event === "events" && chunk.data.event === "on_chat_model_stream") {
llmResponse += chunk.data.data.chunk.content;
console.log(llmResponse);
}
}
```
Output:
b
be
beg
begi
begin
begine
beginen
beginend
-390
View File
@@ -1,390 +0,0 @@
# How to stream messages from your graph
LangGraph Cloud supports multiple streaming modes. The main ones are:
- `values`: This streaming mode streams back values of the graph. This is the **full state of the graph** after each node is called.
- `updates`: This streaming mode streams back updates to the graph. This is the **update to the state of the graph** after each node is called.
- `messages`: This streaming mode streams back messages - both complete messages (at the end of a node) as well as **tokens** for any messages generated inside a node. This mode is primarily meant for powering chat applications.
This guide covers `stream_mode="messages"`.
In order to use this mode, the state of the graph you are interacting with MUST have a `messages` key that is a list of messages.
E.g., the state should look something like:
=== "Python"
```python
from typing import TypedDict, Annotated
from langgraph.graph import add_messages
from langchain_core.messages import AnyMessage
class State(TypedDict):
messages: Annotated[list[AnyMessage], add_messages]
```
Alternatively, you can use an instance or subclass of `from langgraph.graph import MessagesState` (`MessagesState` is equivalent to the implementation above).
> [!NOTE]
> LangGraph Cloud only supports hosting graphs written in Python at the moment.
With `stream_mode="messages"` two things will be streamed back:
- It outputs messages produced by any chat model called inside (unless tagged in a special way)
- It outputs messages returned from nodes (to allow for nodes to return `ToolMessages` and the like
First let's set up our client and thread:
=== "Python"
```python
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
# create thread
thread = await client.threads.create()
print(thread)
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
// create thread
const thread = await client.threads.create();
console.log(thread)
```
Output:
{'thread_id': 'e1431c95-e241-4d1d-a252-27eceb1e5c86',
'created_at': '2024-06-21T15:48:59.808924+00:00',
'updated_at': '2024-06-21T15:48:59.808924+00:00',
'metadata': {}}
Let's also define a helper function for better formatting of the tool calls in messages
=== "Python"
```python
def format_tool_calls(tool_calls):
if tool_calls:
formatted_calls = []
for call in tool_calls:
formatted_calls.append(
f"Tool Call ID: {call['id']}, Function: {call['name']}, Arguments: {call['args']}"
)
return "\n".join(formatted_calls)
return "No tool calls"
```
=== "Javascript"
```js
function formatToolCalls(toolCalls) {
if (toolCalls && toolCalls.length > 0) {
const formattedCalls = toolCalls.map(call => {
return `Tool Call ID: ${call.id}, Function: ${call.name}, Arguments: ${call.args}`;
});
return formattedCalls.join("\n");
}
return "No tool calls";
}
```
Now we can stream by messages, which will return complete messages (at the end of node execution) as well as tokens for any messages generated inside a node:
=== "Python"
```python
input = {"messages": [{"role": "user", "content": "what's the weather in sf"}]}
config = {"configurable": {"model_name": "openai"}}
async for event in client.runs.stream(
thread["thread_id"],
assistant_id="agent",
input=input,
config=config,
stream_mode="messages",
):
if event.event == "metadata":
print(f"Metadata: Run ID - {event.data['run_id']}")
print("-" * 50)
elif event.event == "messages/partial":
for data_item in event.data:
if "role" in data_item and data_item["role"] == "user":
print(f"Human: {data_item['content']}")
else:
tool_calls = data_item.get("tool_calls", [])
invalid_tool_calls = data_item.get("invalid_tool_calls", [])
content = data_item.get("content", "")
response_metadata = data_item.get("response_metadata", {})
if content:
print(f"AI: {content}")
if tool_calls:
print("Tool Calls:")
print(format_tool_calls(tool_calls))
if invalid_tool_calls:
print("Invalid Tool Calls:")
print(format_tool_calls(invalid_tool_calls))
if response_metadata:
finish_reason = response_metadata.get("finish_reason", "N/A")
print(f"Response Metadata: Finish Reason - {finish_reason}")
print("-" * 50)
```
=== "Javascript"
```js
const input = {
"messages": [
{
"role": "human",
"content": "What's the weather in sf",
}
]
}
const config = {"configurable": {"model_name": "openai"}}
const streamResponse = client.runs.stream(
thread["thread_id"],
"agent",
{
input,
config,
streamMode: "messages"
}
);
for await (const event of streamResponse) {
if (event.event === "metadata") {
console.log(`Metadata: Run ID - ${event.data.run_id}`);
console.log("-".repeat(50));
} else if (event.event === "messages/partial") {
event.data.forEach(dataItem => {
if (dataItem.role && dataItem.role === "user") {
console.log(`Human: ${dataItem.content}`);
} else {
const toolCalls = dataItem.tool_calls || [];
const invalidToolCalls = dataItem.invalid_tool_calls || [];
const content = dataItem.content || "";
const responseMetadata = dataItem.response_metadata || {};
if (content) {
console.log(`AI: ${content}`);
}
if (toolCalls.length > 0) {
console.log("Tool Calls:");
console.log(formatToolCalls(toolCalls));
}
if (invalidToolCalls.length > 0) {
console.log("Invalid Tool Calls:");
console.log(formatToolCalls(invalidToolCalls));
}
if (responseMetadata) {
const finishReason = responseMetadata.finish_reason || "N/A";
console.log(`Response Metadata: Finish Reason - ${finishReason}`);
}
}
});
console.log("-".repeat(50));
}
}
```
Output:
Metadata: Run ID - 1ef2fe5c-6a1d-6575-bc09-d7832711c17e
--------------------------------------------------
Invalid Tool Calls:
Tool Call ID: call_cg14F20jMBqWYrNgEkdWHwB3, Function: tavily_search_results_json, Arguments:
--------------------------------------------------
Tool Calls:
Tool Call ID: call_cg14F20jMBqWYrNgEkdWHwB3, Function: tavily_search_results_json, Arguments: {}
--------------------------------------------------
Tool Calls:
Tool Call ID: call_cg14F20jMBqWYrNgEkdWHwB3, Function: tavily_search_results_json, Arguments: {}
--------------------------------------------------
Tool Calls:
Tool Call ID: call_cg14F20jMBqWYrNgEkdWHwB3, Function: tavily_search_results_json, Arguments: {'query': ''}
--------------------------------------------------
Tool Calls:
Tool Call ID: call_cg14F20jMBqWYrNgEkdWHwB3, Function: tavily_search_results_json, Arguments: {'query': 'current'}
--------------------------------------------------
Tool Calls:
Tool Call ID: call_cg14F20jMBqWYrNgEkdWHwB3, Function: tavily_search_results_json, Arguments: {'query': 'current weather'}
--------------------------------------------------
Tool Calls:
Tool Call ID: call_cg14F20jMBqWYrNgEkdWHwB3, Function: tavily_search_results_json, Arguments: {'query': 'current weather in'}
--------------------------------------------------
Tool Calls:
Tool Call ID: call_cg14F20jMBqWYrNgEkdWHwB3, Function: tavily_search_results_json, Arguments: {'query': 'current weather in San'}
--------------------------------------------------
Tool Calls:
Tool Call ID: call_cg14F20jMBqWYrNgEkdWHwB3, Function: tavily_search_results_json, Arguments: {'query': 'current weather in San Francisco'}
--------------------------------------------------
Tool Calls:
Tool Call ID: call_cg14F20jMBqWYrNgEkdWHwB3, Function: tavily_search_results_json, Arguments: {'query': 'current weather in San Francisco'}
--------------------------------------------------
Tool Calls:
Tool Call ID: call_cg14F20jMBqWYrNgEkdWHwB3, Function: tavily_search_results_json, Arguments: {'query': 'current weather in San Francisco'}
Response Metadata: Finish Reason - tool_calls
--------------------------------------------------
--------------------------------------------------
AI: The
--------------------------------------------------
AI: The current
--------------------------------------------------
AI: The current weather
--------------------------------------------------
AI: The current weather in
--------------------------------------------------
AI: The current weather in San
--------------------------------------------------
AI: The current weather in San Francisco
--------------------------------------------------
AI: The current weather in San Francisco is
--------------------------------------------------
AI: The current weather in San Francisco is over
--------------------------------------------------
AI: The current weather in San Francisco is overcast
--------------------------------------------------
AI: The current weather in San Francisco is overcast with
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F).
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-s
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-south
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 k
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph).
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%,
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km (
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km (9
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km (9 miles
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km (9 miles).
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km (9 miles). The
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km (9 miles). The UV
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km (9 miles). The UV index
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km (9 miles). The UV index is
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km (9 miles). The UV index is
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km (9 miles). The UV index is 3
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km (9 miles). The UV index is 3.
--------------------------------------------------
AI: The current weather in San Francisco is overcast with a temperature of 13.9°C (57.0°F). The wind is blowing from the south-southwest at 6.9 mph (11.2 kph). The humidity is at 81%, and the visibility is 16 km (9 miles). The UV index is 3.
Response Metadata: Finish Reason - stop
--------------------------------------------------
-440
View File
@@ -1,440 +0,0 @@
# How to configure multiple streaming modes at the same time
This guide covers how to configure multiple streaming modes at the same time.
First let's set up our client and thread:
=== "Python"
```python
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
# create thread
thread = await client.threads.create()
print(thread)
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
// create thread
const thread = await client.threads.create();
console.log(thread)
```
Output:
{'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4',
'created_at': '2024-06-24T21:30:07.980789+00:00',
'updated_at': '2024-06-24T21:30:07.980789+00:00',
'metadata': {}}
When configuring multiple streaming modes for a run, responses for each respective mode will be produced. In the following example, note that a `list` of modes (`messages`, `events`, `debug`) is passed to the `stream_mode` parameter and the response contains `events`, `debug`, `messages/complete`, `messages/metadata`, and `messages/partial` event types.
=== "Python"
```python
# create input
input = {
"messages": [
{
"role": "human",
"content": "What's the weather in SF?",
}
]
}
# stream events with multiple streaming modes
async for chunk in client.runs.stream(
thread_id=thread["thread_id"],
assistant_id="agent",
input=input,
stream_mode=["messages", "events", "debug"],
):
print(f"Receiving new event of type: {chunk.event}...")
print(chunk.data)
print("\n\n")
```
=== "Javascript"
```js
// create input
const input = {
"messages": [
{
"role": "human",
"content": "What's the weather in SF?",
}
]
}
// stream events with multiple streaming modes
const streamResponse = client.runs.stream(
thread["thread_id"],
"agent",
{
input,
streamMode: ["messages", "events", "debug"]
}
);
for await (const chunk of streamResponse) {
console.log(f"Receiving new event of type: {chunk.event}...")
console.log(chunk.data)
console.log("\n\n")
}
```
Output:
Receiving new event of type: metadata...
{'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25'}
Receiving new event of type: events...
{'event': 'on_chain_start', 'data': {'input': {'messages': [{'role': 'human', 'content': "What's the weather in SF?"}]}}, 'name': 'LangGraph', 'tags': [], 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'parent_ids': []}
Receiving new event of type: debug...
{'type': 'checkpoint', 'timestamp': '2024-06-24T21:34:06.116009+00:00', 'step': -1, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'thread_ts': '1ef32717-bc7c-6daa-bfff-6b9027c1a50e', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25'}, 'values': {'messages': []}, 'metadata': {'source': 'input', 'step': -1, 'writes': {'messages': [{'role': 'human', 'content': "What's the weather in SF?"}]}}}}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['debug', {'type': 'checkpoint', 'timestamp': '2024-06-24T21:34:06.116009+00:00', 'step': -1, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'thread_ts': '1ef32717-bc7c-6daa-bfff-6b9027c1a50e', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25'}, 'values': {'messages': []}, 'metadata': {'source': 'input', 'step': -1, 'writes': {'messages': [{'role': 'human', 'content': "What's the weather in SF?"}]}}}}]}, 'parent_ids': []}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['values', {'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}]}]}, 'parent_ids': []}
Receiving new event of type: messages/complete...
[{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}]
Receiving new event of type: debug...
{'type': 'checkpoint', 'timestamp': '2024-06-24T21:34:06.117924+00:00', 'step': 0, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'thread_ts': '1ef32717-bc81-68c8-8000-4e18ae7d67a5', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25'}, 'values': {'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}]}, 'metadata': {'source': 'loop', 'step': 0, 'writes': None}}}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['debug', {'type': 'checkpoint', 'timestamp': '2024-06-24T21:34:06.117924+00:00', 'step': 0, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'thread_ts': '1ef32717-bc81-68c8-8000-4e18ae7d67a5', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25'}, 'values': {'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}]}, 'metadata': {'source': 'loop', 'step': 0, 'writes': None}}}]}, 'parent_ids': []}
Receiving new event of type: debug...
{'type': 'task', 'timestamp': '2024-06-24T21:34:06.118042+00:00', 'step': 1, 'payload': {'id': '212ed9c2-a454-50c5-a202-12066bbbe7b8', 'name': 'agent', 'input': {'some_bytes': None, 'some_byte_array': None, 'dict_with_bytes': None, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}], 'sleep': None}, 'triggers': ['start:agent']}}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['debug', {'type': 'task', 'timestamp': '2024-06-24T21:34:06.118042+00:00', 'step': 1, 'payload': {'id': '212ed9c2-a454-50c5-a202-12066bbbe7b8', 'name': 'agent', 'input': {'some_bytes': None, 'some_byte_array': None, 'dict_with_bytes': None, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}], 'sleep': None}, 'triggers': ['start:agent']}}]}, 'parent_ids': []}
Receiving new event of type: events...
{'event': 'on_chain_start', 'data': {}, 'name': 'agent', 'tags': ['graph:step:1'], 'run_id': '72b74d24-5792-48da-a887-102100d6e2c0', 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25']}
Receiving new event of type: events...
{'event': 'on_chat_model_start', 'data': {'input': {'messages': [[{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}]]}}, 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'run_id': '2424dd6d-5cf5-4244-8d98-357640ce6e12', 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', '72b74d24-5792-48da-a887-102100d6e2c0']}
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'b', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': '2424dd6d-5cf5-4244-8d98-357640ce6e12', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', '72b74d24-5792-48da-a887-102100d6e2c0']}
Receiving new event of type: messages/metadata...
{'run-2424dd6d-5cf5-4244-8d98-357640ce6e12': {'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}}}
Receiving new event of type: messages/partial...
[{'content': 'b', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'e', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': '2424dd6d-5cf5-4244-8d98-357640ce6e12', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', '72b74d24-5792-48da-a887-102100d6e2c0']}
Receiving new event of type: messages/partial...
[{'content': 'be', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'g', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': '2424dd6d-5cf5-4244-8d98-357640ce6e12', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', '72b74d24-5792-48da-a887-102100d6e2c0']}
Receiving new event of type: messages/partial...
[{'content': 'beg', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'i', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': '2424dd6d-5cf5-4244-8d98-357640ce6e12', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', '72b74d24-5792-48da-a887-102100d6e2c0']}
Receiving new event of type: messages/partial...
[{'content': 'begi', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'n', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': '2424dd6d-5cf5-4244-8d98-357640ce6e12', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', '72b74d24-5792-48da-a887-102100d6e2c0']}
Receiving new event of type: messages/partial...
[{'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]
Receiving new event of type: events...
{'event': 'on_chat_model_end', 'data': {'output': {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, 'input': {'messages': [[{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}]]}}, 'run_id': '2424dd6d-5cf5-4244-8d98-357640ce6e12', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', '72b74d24-5792-48da-a887-102100d6e2c0']}
Receiving new event of type: events...
{'event': 'on_chain_start', 'data': {'input': {'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}}, 'name': 'should_continue', 'tags': ['seq:step:3'], 'run_id': '227afb0f-f909-4d54-a042-556ca6d98a69', 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', '72b74d24-5792-48da-a887-102100d6e2c0']}
Receiving new event of type: events...
{'event': 'on_chain_end', 'data': {'output': 'tool', 'input': {'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}}, 'run_id': '227afb0f-f909-4d54-a042-556ca6d98a69', 'name': 'should_continue', 'tags': ['seq:step:3'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', '72b74d24-5792-48da-a887-102100d6e2c0']}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '72b74d24-5792-48da-a887-102100d6e2c0', 'name': 'agent', 'tags': ['graph:step:1'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0}, 'data': {'chunk': {'messages': [{'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25']}
Receiving new event of type: events...
{'event': 'on_chain_end', 'data': {'output': {'messages': [{'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}, 'input': {'some_bytes': None, 'some_byte_array': None, 'dict_with_bytes': None, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}], 'sleep': None}}, 'run_id': '72b74d24-5792-48da-a887-102100d6e2c0', 'name': 'agent', 'tags': ['graph:step:1'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 1, 'langgraph_node': 'agent', 'langgraph_triggers': ['start:agent'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25']}
Receiving new event of type: debug...
{'type': 'task_result', 'timestamp': '2024-06-24T21:34:06.124350+00:00', 'step': 1, 'payload': {'id': '212ed9c2-a454-50c5-a202-12066bbbe7b8', 'name': 'agent', 'result': [['some_bytes', 'c29tZV9ieXRlcw=='], ['some_byte_array', 'c29tZV9ieXRlX2FycmF5'], ['dict_with_bytes', {'more_bytes': 'bW9yZV9ieXRlcw=='}], ['messages', [{'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]]]}}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['debug', {'type': 'task_result', 'timestamp': '2024-06-24T21:34:06.124350+00:00', 'step': 1, 'payload': {'id': '212ed9c2-a454-50c5-a202-12066bbbe7b8', 'name': 'agent', 'result': [['some_bytes', 'c29tZV9ieXRlcw=='], ['some_byte_array', 'c29tZV9ieXRlX2FycmF5'], ['dict_with_bytes', {'more_bytes': 'bW9yZV9ieXRlcw=='}], ['messages', [{'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]]]}}]}, 'parent_ids': []}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['values', {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}]}, 'parent_ids': []}
Receiving new event of type: messages/complete...
[{'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]
Receiving new event of type: debug...
{'type': 'checkpoint', 'timestamp': '2024-06-24T21:34:06.124510+00:00', 'step': 1, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'thread_ts': '1ef32717-bc91-6a34-8001-26353c117c25', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25'}, 'values': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}, 'metadata': {'source': 'loop', 'step': 1, 'writes': {'agent': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}}}}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['debug', {'type': 'checkpoint', 'timestamp': '2024-06-24T21:34:06.124510+00:00', 'step': 1, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'thread_ts': '1ef32717-bc91-6a34-8001-26353c117c25', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25'}, 'values': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}, 'metadata': {'source': 'loop', 'step': 1, 'writes': {'agent': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}}}}]}, 'parent_ids': []}
Receiving new event of type: debug...
{'type': 'task', 'timestamp': '2024-06-24T21:34:06.124572+00:00', 'step': 2, 'payload': {'id': '44139125-a1be-57c2-9cb2-19eb62bbaf2f', 'name': 'tool', 'input': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'sleep': None}, 'triggers': ['branch:agent:should_continue:tool']}}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['debug', {'type': 'task', 'timestamp': '2024-06-24T21:34:06.124572+00:00', 'step': 2, 'payload': {'id': '44139125-a1be-57c2-9cb2-19eb62bbaf2f', 'name': 'tool', 'input': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'sleep': None}, 'triggers': ['branch:agent:should_continue:tool']}}]}, 'parent_ids': []}
Receiving new event of type: events...
{'event': 'on_chain_start', 'data': {}, 'name': 'tool', 'tags': ['graph:step:2'], 'run_id': '91575720-886e-485e-ae2d-d6817e5346bf', 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 2, 'langgraph_node': 'tool', 'langgraph_triggers': ['branch:agent:should_continue:tool'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25']}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '91575720-886e-485e-ae2d-d6817e5346bf', 'name': 'tool', 'tags': ['graph:step:2'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 2, 'langgraph_node': 'tool', 'langgraph_triggers': ['branch:agent:should_continue:tool'], 'langgraph_task_idx': 0}, 'data': {'chunk': {'messages': [{'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': None, 'tool_call_id': 'tool_call_id'}]}}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25']}
Receiving new event of type: events...
{'event': 'on_chain_end', 'data': {'output': {'messages': [{'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}]}, 'input': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'sleep': None}}, 'run_id': '91575720-886e-485e-ae2d-d6817e5346bf', 'name': 'tool', 'tags': ['graph:step:2'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 2, 'langgraph_node': 'tool', 'langgraph_triggers': ['branch:agent:should_continue:tool'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25']}
Receiving new event of type: debug...
{'type': 'task_result', 'timestamp': '2024-06-24T21:34:06.126828+00:00', 'step': 2, 'payload': {'id': '44139125-a1be-57c2-9cb2-19eb62bbaf2f', 'name': 'tool', 'result': [['messages', [{'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}]]]}}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['debug', {'type': 'task_result', 'timestamp': '2024-06-24T21:34:06.126828+00:00', 'step': 2, 'payload': {'id': '44139125-a1be-57c2-9cb2-19eb62bbaf2f', 'name': 'tool', 'result': [['messages', [{'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}]]]}}]}, 'parent_ids': []}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['values', {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}]}]}, 'parent_ids': []}
Receiving new event of type: messages/complete...
[{'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}]
Receiving new event of type: debug...
{'type': 'checkpoint', 'timestamp': '2024-06-24T21:34:06.126966+00:00', 'step': 2, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'thread_ts': '1ef32717-bc97-6a06-8002-8e9ffc1ea75a', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25'}, 'values': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}]}, 'metadata': {'source': 'loop', 'step': 2, 'writes': {'tool': {'messages': [{'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}]}}}}}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['debug', {'type': 'checkpoint', 'timestamp': '2024-06-24T21:34:06.126966+00:00', 'step': 2, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'thread_ts': '1ef32717-bc97-6a06-8002-8e9ffc1ea75a', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25'}, 'values': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}]}, 'metadata': {'source': 'loop', 'step': 2, 'writes': {'tool': {'messages': [{'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}]}}}}}]}, 'parent_ids': []}
Receiving new event of type: debug...
{'type': 'task', 'timestamp': '2024-06-24T21:34:06.127034+00:00', 'step': 3, 'payload': {'id': 'f1ccf371-63b3-5268-a837-7f360a93c4ec', 'name': 'agent', 'input': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}], 'sleep': None}, 'triggers': ['tool']}}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['debug', {'type': 'task', 'timestamp': '2024-06-24T21:34:06.127034+00:00', 'step': 3, 'payload': {'id': 'f1ccf371-63b3-5268-a837-7f360a93c4ec', 'name': 'agent', 'input': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}], 'sleep': None}, 'triggers': ['tool']}}]}, 'parent_ids': []}
Receiving new event of type: events...
{'event': 'on_chain_start', 'data': {}, 'name': 'agent', 'tags': ['graph:step:3'], 'run_id': 'b7d0900c-bfc2-43e4-b760-99bbc5bad84e', 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 3, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25']}
Receiving new event of type: events...
{'event': 'on_chat_model_start', 'data': {'input': {'messages': [[{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}]]}}, 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'run_id': '0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 3, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', 'b7d0900c-bfc2-43e4-b760-99bbc5bad84e']}
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'e', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': '0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 3, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', 'b7d0900c-bfc2-43e4-b760-99bbc5bad84e']}
Receiving new event of type: messages/metadata...
{'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575': {'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 3, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}}}
Receiving new event of type: messages/partial...
[{'content': 'e', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'n', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': '0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 3, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', 'b7d0900c-bfc2-43e4-b760-99bbc5bad84e']}
Receiving new event of type: messages/partial...
[{'content': 'en', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]
Receiving new event of type: events...
{'event': 'on_chat_model_stream', 'data': {'chunk': {'content': 'd', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'AIMessageChunk', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None, 'tool_call_chunks': []}}, 'run_id': '0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 3, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', 'b7d0900c-bfc2-43e4-b760-99bbc5bad84e']}
Receiving new event of type: messages/partial...
[{'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]
Receiving new event of type: events...
{'event': 'on_chat_model_end', 'data': {'output': {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, 'input': {'messages': [[{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}]]}}, 'run_id': '0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'name': 'FakeListChatModel', 'tags': ['seq:step:1'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 3, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0, 'ls_model_type': 'chat'}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', 'b7d0900c-bfc2-43e4-b760-99bbc5bad84e']}
Receiving new event of type: events...
{'event': 'on_chain_start', 'data': {'input': {'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}}, 'name': 'should_continue', 'tags': ['seq:step:3'], 'run_id': '8af814e9-8136-4aab-acbc-dffc5bcafdfd', 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 3, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', 'b7d0900c-bfc2-43e4-b760-99bbc5bad84e']}
Receiving new event of type: events...
{'event': 'on_chain_end', 'data': {'output': '__end__', 'input': {'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}}, 'run_id': '8af814e9-8136-4aab-acbc-dffc5bcafdfd', 'name': 'should_continue', 'tags': ['seq:step:3'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 3, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25', 'b7d0900c-bfc2-43e4-b760-99bbc5bad84e']}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': 'b7d0900c-bfc2-43e4-b760-99bbc5bad84e', 'name': 'agent', 'tags': ['graph:step:3'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 3, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0}, 'data': {'chunk': {'messages': [{'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25']}
Receiving new event of type: events...
{'event': 'on_chain_end', 'data': {'output': {'messages': [{'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}], 'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}}, 'input': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}], 'sleep': None}}, 'run_id': 'b7d0900c-bfc2-43e4-b760-99bbc5bad84e', 'name': 'agent', 'tags': ['graph:step:3'], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca', 'langgraph_step': 3, 'langgraph_node': 'agent', 'langgraph_triggers': ['tool'], 'langgraph_task_idx': 0}, 'parent_ids': ['1ef32717-bc30-6cf2-8a26-33f63567bc25']}
Receiving new event of type: debug...
{'type': 'task_result', 'timestamp': '2024-06-24T21:34:06.133991+00:00', 'step': 3, 'payload': {'id': 'f1ccf371-63b3-5268-a837-7f360a93c4ec', 'name': 'agent', 'result': [['some_bytes', 'c29tZV9ieXRlcw=='], ['some_byte_array', 'c29tZV9ieXRlX2FycmF5'], ['dict_with_bytes', {'more_bytes': 'bW9yZV9ieXRlcw=='}], ['messages', [{'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]]]}}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['debug', {'type': 'task_result', 'timestamp': '2024-06-24T21:34:06.133991+00:00', 'step': 3, 'payload': {'id': 'f1ccf371-63b3-5268-a837-7f360a93c4ec', 'name': 'agent', 'result': [['some_bytes', 'c29tZV9ieXRlcw=='], ['some_byte_array', 'c29tZV9ieXRlX2FycmF5'], ['dict_with_bytes', {'more_bytes': 'bW9yZV9ieXRlcw=='}], ['messages', [{'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]]]}}]}, 'parent_ids': []}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['values', {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}]}, 'parent_ids': []}
Receiving new event of type: messages/complete...
[{'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]
Receiving new event of type: debug...
{'type': 'checkpoint', 'timestamp': '2024-06-24T21:34:06.134190+00:00', 'step': 3, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'thread_ts': '1ef32717-bca9-6418-8003-8d0d0b06845c', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25'}, 'values': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}, 'metadata': {'source': 'loop', 'step': 3, 'writes': {'agent': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}}}}
Receiving new event of type: events...
{'event': 'on_chain_stream', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'data': {'chunk': ['debug', {'type': 'checkpoint', 'timestamp': '2024-06-24T21:34:06.134190+00:00', 'step': 3, 'payload': {'config': {'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'callbacks': [None], 'recursion_limit': 25, 'configurable': {'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'thread_ts': '1ef32717-bca9-6418-8003-8d0d0b06845c', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25'}, 'values': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}, 'metadata': {'source': 'loop', 'step': 3, 'writes': {'agent': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}}}}]}, 'parent_ids': []}
Receiving new event of type: events...
{'event': 'on_chain_end', 'data': {'output': {'some_bytes': 'c29tZV9ieXRlcw==', 'some_byte_array': 'c29tZV9ieXRlX2FycmF5', 'dict_with_bytes': {'more_bytes': 'bW9yZV9ieXRlcw=='}, 'messages': [{'content': "What's the weather in SF?", 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': '7da1bafa-f53c-4df8-ba63-8dd517140b9f', 'example': False}, {'content': 'begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-2424dd6d-5cf5-4244-8d98-357640ce6e12', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}, {'content': 'tool_call__begin', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': None, 'id': '639ca779-403d-4915-a066-327e1f634c8b', 'tool_call_id': 'tool_call_id'}, {'content': 'end', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-0f2ef0a1-0fc7-445c-9df4-55e8bb284575', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}, 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'name': 'LangGraph', 'tags': [], 'metadata': {'created_by': 'system', 'run_id': '1ef32717-bc30-6cf2-8a26-33f63567bc25', 'user_id': '', 'graph_id': 'agent', 'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4', 'assistant_id': 'fe096781-5601-53d2-b2f6-0d3403f7e9ca'}, 'parent_ids': []}
Receiving new event of type: end...
None
-119
View File
@@ -1,119 +0,0 @@
# How to stream state updates of your graph
LangGraph Cloud supports multiple streaming modes. The main ones are:
- `values`: This streaming mode streams back values of the graph. This is the **full state of the graph** after each node is called.
- `updates`: This streaming mode streams back updates to the graph. This is the **update to the state of the graph** after each node is called.
- `messages`: This streaming mode streams back messages - both complete messages (at the end of a node) as well as **tokens** for any messages generated inside a node. This mode is primarily meant for powering chat applications.
This guide covers `stream_mode="updates"`.
First let's set up our client and thread:
=== "Python"
```python
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
# create thread
thread = await client.threads.create()
print(thread)
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl:"whatever-your-deployment-url-is" });
// create thread
const thread = await client.threads.create();
console.log(thread)
```
Output:
{'thread_id': '979e3c89-a702-4882-87c2-7a59a250ce16',
'created_at': '2024-06-21T15:22:07.453100+00:00',
'updated_at': '2024-06-21T15:22:07.453100+00:00',
'metadata': {}}
Now we can stream by updates, which outputs updates made to the state by each node after it has executed:
=== "Python"
```python
input = {
"messages": [
{
"role": "human",
"content": "what's the weather in la"
}
]
}
async for chunk in client.runs.stream(
thread["thread_id"],
"agent",
input=input,
stream_mode="updates",
):
print(f"Receiving new event of type: {chunk.event}...")
print(chunk.data)
print("\n\n")
```
=== "Javascript"
```js
const input = {
"messages": [
{
"role": "human",
"content": "What's the weather in la",
}
]
}
const streamResponse = client.runs.stream(
thread["thread_id"],
"agent",
{
input,
streamMode: "updates"
}
);
for await (const chunk of streamResponse) {
console.log(f"Receiving new event of type: {chunk.event}...")
console.log(chunk.data)
console.log("\n\n")
}
```
Output:
Receiving new event of type: metadata...
{'run_id': 'cfc96c16-ed9a-44bd-b5bb-c30e3c0725f0'}
Receiving new event of type: data...
{'agent': {'messages': [{'content': [{'id': 'toolu_0148tMmDK51iLQfG1yaNwRHM', 'input': {'query': 'weather in los angeles'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}], 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-1a9d32b0-7007-4a36-abde-8df812a0ed94', 'example': False, 'tool_calls': [{'name': 'tavily_search_results_json', 'args': {'query': 'weather in los angeles'}, 'id': 'toolu_0148tMmDK51iLQfG1yaNwRHM'}], 'invalid_tool_calls': []}]}}
Receiving new event of type: data...
{'action': {'messages': [{'content': '[{"url": "https://www.weatherapi.com/", "content": "{\'location\': {\'name\': \'Los Angeles\', \'region\': \'California\', \'country\': \'United States of America\', \'lat\': 34.05, \'lon\': -118.24, \'tz_id\': \'America/Los_Angeles\', \'localtime_epoch\': 1716062239, \'localtime\': \'2024-05-18 12:57\'}, \'current\': {\'last_updated_epoch\': 1716061500, \'last_updated\': \'2024-05-18 12:45\', \'temp_c\': 18.9, \'temp_f\': 66.0, \'is_day\': 1, \'condition\': {\'text\': \'Overcast\', \'icon\': \'//cdn.weatherapi.com/weather/64x64/day/122.png\', \'code\': 1009}, \'wind_mph\': 2.2, \'wind_kph\': 3.6, \'wind_degree\': 10, \'wind_dir\': \'N\', \'pressure_mb\': 1017.0, \'pressure_in\': 30.02, \'precip_mm\': 0.0, \'precip_in\': 0.0, \'humidity\': 65, \'cloud\': 100, \'feelslike_c\': 18.9, \'feelslike_f\': 66.0, \'vis_km\': 16.0, \'vis_miles\': 9.0, \'uv\': 6.0, \'gust_mph\': 7.5, \'gust_kph\': 12.0}}"}]', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': 'tavily_search_results_json', 'id': 'a36e8cd1-0e96-4417-9c15-f10a945d2b42', 'tool_call_id': 'toolu_0148tMmDK51iLQfG1yaNwRHM'}]}}
Receiving new event of type: data...
{'agent': {'messages': [{'content': 'The weather in Los Angeles is currently overcast with a temperature of around 66°F (18.9°C). There are light winds from the north at around 2-3 mph. The humidity is 65% and visibility is good at 9 miles. Overall, mild spring weather conditions in LA.', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-d5c1c2f0-b12d-41ce-990b-f36570e7483d', 'example': False, 'tool_calls': [], 'invalid_tool_calls': []}]}}
Receiving new event of type: end...
None
-190
View File
@@ -1,190 +0,0 @@
# How to stream full state of your graph
LangGraph Cloud supports multiple streaming modes. The main ones are:
- `values`: This streaming mode streams back values of the graph. This is the **full state of the graph** after each node is called.
- `updates`: This streaming mode streams back updates to the graph. This is the **update to the state of the graph** after each node is called.
- `messages`: This streaming mode streams back messages - both complete messages (at the end of a node) as well as **tokens** for any messages generated inside a node. This mode is primarily meant for powering chat applications.
This guide covers `stream_mode="values"`.
First let's set up our client and thread:
=== "Python"
```python
from langgraph_sdk import get_client
client = get_client(url="whatever-your-deployment-url-is")
# create thread
thread = await client.threads.create()
print(thread)
```
=== "Javascript"
```js
import { Client } from "@langchain/langgraph-sdk";
const client = new Client({ apiUrl: "whatever-your-deployment-url-is" });
// create thread
const thread = await client.threads.create();
console.log(thread)
```
Output:
{'thread_id': 'bfc68029-1f7b-400f-beab-6f9032a52da4',
'created_at': '2024-06-24T21:30:07.980789+00:00',
'updated_at': '2024-06-24T21:30:07.980789+00:00',
'metadata': {}}
Now we can stream by values, which streams the full state of the graph after each node has finished executing:
=== "Python"
```python
input = {"messages": [{"role": "human", "content": "what's the weather in la"}]}
# stream values
async for chunk in client.runs.stream(
thread["thread_id"],
"agent",
input=input,
stream_mode="values"
):
print(f"Receiving new event of type: {chunk.event}...")
print(chunk.data)
print("\n\n")
```
=== "Javascript"
```js
const input = {"messages": [{"role": "human", "content": "what's the weather in la"}]}
const streamResponse = client.runs.stream(
thread["thread_id"],
"agent",
{
input,
streamMode: "values"
}
);
for await (const chunk of streamResponse) {
console.log(f"Receiving new event of type: {chunk.event}...")
console.log(chunk.data)
console.log("\n\n")
}
```
Output:
Receiving new event of type: metadata...
{'run_id': 'f08791ce-0a3d-44e0-836c-ff62cd2e2786'}
Receiving new event of type: values...
{'messages': [{'role': 'human', 'content': 'what's the weather in la'}]}
Receiving new event of type: values...
{'messages': [{'content': 'what's the weather in la', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'faa15565-8823-4aa1-87af-e21b40526fae', 'example': False}, {'content': [{'id': 'toolu_01E5mSaZWm5rWJnCqmt63v4g', 'input': {'query': 'weather in los angeles'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}], 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-3fe1db7a-6b8d-4d83-ba07-8657190ad811', 'example': False, 'tool_calls': [{'name': 'tavily_search_results_json', 'args': {'query': 'weather in los angeles'}, 'id': 'toolu_01E5mSaZWm5rWJnCqmt63v4g'}], 'invalid_tool_calls': []}]}
Receiving new event of type: values...
{'messages': [{'content': 'what's the weather in la', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'faa15565-8823-4aa1-87af-e21b40526fae', 'example': False}, {'content': [{'id': 'toolu_01E5mSaZWm5rWJnCqmt63v4g', 'input': {'query': 'weather in los angeles'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}], 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-3fe1db7a-6b8d-4d83-ba07-8657190ad811', 'example': False, 'tool_calls': [{'name': 'tavily_search_results_json', 'args': {'query': 'weather in los angeles'}, 'id': 'toolu_01E5mSaZWm5rWJnCqmt63v4g'}], 'invalid_tool_calls': []}, {'content': '[{"url": "https://www.weatherapi.com/", "content": "{\'location\': {\'name\': \'Los Angeles\', \'region\': \'California\', \'country\': \'United States of America\', \'lat\': 34.05, \'lon\': -118.24, \'tz_id\': \'America/Los_Angeles\', \'localtime_epoch\': 1716310320, \'localtime\': \'2024-05-21 9:52\'}, \'current\': {\'last_updated_epoch\': 1716309900, \'last_updated\': \'2024-05-21 09:45\', \'temp_c\': 16.7, \'temp_f\': 62.1, \'is_day\': 1, \'condition\': {\'text\': \'Overcast\', \'icon\': \'//cdn.weatherapi.com/weather/64x64/day/122.png\', \'code\': 1009}, \'wind_mph\': 8.1, \'wind_kph\': 13.0, \'wind_degree\': 250, \'wind_dir\': \'WSW\', \'pressure_mb\': 1015.0, \'pressure_in\': 29.97, \'precip_mm\': 0.0, \'precip_in\': 0.0, \'humidity\': 65, \'cloud\': 100, \'feelslike_c\': 16.7, \'feelslike_f\': 62.1, \'vis_km\': 16.0, \'vis_miles\': 9.0, \'uv\': 5.0, \'gust_mph\': 12.5, \'gust_kph\': 20.2}}"}]', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': 'tavily_search_results_json', 'id': '0d5dab31-5ff8-4ae2-a560-bc4bcba7c9d7', 'tool_call_id': 'toolu_01E5mSaZWm5rWJnCqmt63v4g'}]}
Receiving new event of type: values...
{'messages': [{'content': 'what's the weather in la', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'human', 'name': None, 'id': 'faa15565-8823-4aa1-87af-e21b40526fae', 'example': False}, {'content': [{'id': 'toolu_01E5mSaZWm5rWJnCqmt63v4g', 'input': {'query': 'weather in los angeles'}, 'name': 'tavily_search_results_json', 'type': 'tool_use'}], 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-3fe1db7a-6b8d-4d83-ba07-8657190ad811', 'example': False, 'tool_calls': [{'name': 'tavily_search_results_json', 'args': {'query': 'weather in los angeles'}, 'id': 'toolu_01E5mSaZWm5rWJnCqmt63v4g'}], 'invalid_tool_calls': []}, {'content': '[{"url": "https://www.weatherapi.com/", "content": "{\'location\': {\'name\': \'Los Angeles\', \'region\': \'California\', \'country\': \'United States of America\', \'lat\': 34.05, \'lon\': -118.24, \'tz_id\': \'America/Los_Angeles\', \'localtime_epoch\': 1716310320, \'localtime\': \'2024-05-21 9:52\'}, \'current\': {\'last_updated_epoch\': 1716309900, \'last_updated\': \'2024-05-21 09:45\', \'temp_c\': 16.7, \'temp_f\': 62.1, \'is_day\': 1, \'condition\': {\'text\': \'Overcast\', \'icon\': \'//cdn.weatherapi.com/weather/64x64/day/122.png\', \'code\': 1009}, \'wind_mph\': 8.1, \'wind_kph\': 13.0, \'wind_degree\': 250, \'wind_dir\': \'WSW\', \'pressure_mb\': 1015.0, \'pressure_in\': 29.97, \'precip_mm\': 0.0, \'precip_in\': 0.0, \'humidity\': 65, \'cloud\': 100, \'feelslike_c\': 16.7, \'feelslike_f\': 62.1, \'vis_km\': 16.0, \'vis_miles\': 9.0, \'uv\': 5.0, \'gust_mph\': 12.5, \'gust_kph\': 20.2}}"}]', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'tool', 'name': 'tavily_search_results_json', 'id': '0d5dab31-5ff8-4ae2-a560-bc4bcba7c9d7', 'tool_call_id': 'toolu_01E5mSaZWm5rWJnCqmt63v4g'}, {'content': 'Based on the weather API results, the current weather in Los Angeles is overcast with a temperature of around 62°F (17°C). There are light winds from the west-southwest around 8-13 mph. The humidity is 65% and visibility is good at 9 miles. Overall, mild spring weather conditions in LA.', 'additional_kwargs': {}, 'response_metadata': {}, 'type': 'ai', 'name': None, 'id': 'run-4d6d4c23-5aad-4042-b0d9-19407a9e08e3', 'example': False, 'tool_calls': [], 'invalid_tool_calls': []}]}
Receiving new event of type: end...
None
If we want to just get the final result, we can use this endpoint and just keep track of the last value we received
=== "Python"
```python
final_answer = None
async for chunk in client.runs.stream(
thread["thread_id"],
"agent",
input=input,
stream_mode="values"
):
if chunk.event == "values":
final_answer = chunk.data
```
=== "Javascript"
```js
let finalAnswer;
const streamResponse = client.runs.stream(
thread["thread_id"],
"agent",
{
input,
streamMode: "values"
}
);
for await (const chunk of streamResponse) {
finalAnswer = chunk.data;
}
```
Output:
{'messages': [{'content': 'what's the weather in la',
'additional_kwargs': {},
'response_metadata': {},
'type': 'human',
'name': None,
'id': 'e78c2f94-d810-42fc-a399-11f6bb1b1092',
'example': False},
{'content': [{'id': 'toolu_01SBMoAGr4U9x3ibztm2UUom',
'input': {'query': 'weather in los angeles'},
'name': 'tavily_search_results_json',
'type': 'tool_use'}],
'additional_kwargs': {},
'response_metadata': {},
'type': 'ai',
'name': None,
'id': 'run-80767ab8-09fc-40ec-9e45-657ddef5e0b1',
'example': False,
'tool_calls': [{'name': 'tavily_search_results_json',
'args': {'query': 'weather in los angeles'},
'id': 'toolu_01SBMoAGr4U9x3ibztm2UUom'}],
'invalid_tool_calls': []},
{'content': '[{"url": "https://www.weatherapi.com/", "content": "{\'location\': {\'name\': \'Los Angeles\', \'region\': \'California\', \'country\': \'United States of America\', \'lat\': 34.05, \'lon\': -118.24, \'tz_id\': \'America/Los_Angeles\', \'localtime_epoch\': 1716310320, \'localtime\': \'2024-05-21 9:52\'}, \'current\': {\'last_updated_epoch\': 1716309900, \'last_updated\': \'2024-05-21 09:45\', \'temp_c\': 16.7, \'temp_f\': 62.1, \'is_day\': 1, \'condition\': {\'text\': \'Overcast\', \'icon\': \'//cdn.weatherapi.com/weather/64x64/day/122.png\', \'code\': 1009}, \'wind_mph\': 8.1, \'wind_kph\': 13.0, \'wind_degree\': 250, \'wind_dir\': \'WSW\', \'pressure_mb\': 1015.0, \'pressure_in\': 29.97, \'precip_mm\': 0.0, \'precip_in\': 0.0, \'humidity\': 65, \'cloud\': 100, \'feelslike_c\': 16.7, \'feelslike_f\': 62.1, \'vis_km\': 16.0, \'vis_miles\': 9.0, \'uv\': 5.0, \'gust_mph\': 12.5, \'gust_kph\': 20.2}}"}]',
'additional_kwargs': {},
'response_metadata': {},
'type': 'tool',
'name': 'tavily_search_results_json',
'id': 'af25e94a-c119-48c3-bbd3-096e42f472ac',
'tool_call_id': 'toolu_01SBMoAGr4U9x3ibztm2UUom'},
{'content': 'Based on the weather API results, the current weather in Los Angeles is overcast with a temperature of around 62°F (17°C). There are light winds from the west-southwest around 8-13 mph. The humidity is 65% and visibility is good at 9 miles. Overall, mild spring weather conditions in LA.',
'additional_kwargs': {},
'response_metadata': {},
'type': 'ai',
'name': None,
'id': 'run-b90f0037-e56a-4f3b-ad92-00d10d079a9e',
'example': False,
'tool_calls': [],
'invalid_tool_calls': []}]}
@@ -1,16 +0,0 @@
# Test Cloud Deployment
The LangGraph Studio UI connects directly to LangGraph Cloud deployments.
Starting from the <a href="https://smith.langchain.com/" target="_blank">LangSmith UI</a>...
1. In the left-hand navigation panel, select `Deployments`. The `Deployments` view contains a list of existing LangGraph Cloud deployments.
1. Select an existing deployment to test with LangGraph Studio.
1. In the top-right corner, select `Open LangGraph Studio`.
1. [Invoke an assistant](./invoke_studio.md) or [view an existing thread](./threads_studio.md).
The following video shows these exact steps being carried out:
<video controls allowfullscreen="true" poster="../img/studio_usage_poster.png">
<source src="../img/studio_usage.mp4" type="video/mp4">
</video>
@@ -1,28 +0,0 @@
# LangGraph Studio With Local Deployment
!!! warning "Browser Compatibility"
Viewing the studio page of a local LangGraph deployment does not work in Safari. Use Chrome instead.
## Setup
Make sure you have setup your app correctly, by creating a compiled graph, a `.env` file with any environment variables, and a `langgraph.json` config file that points to your environment file and compiled graph. See [here](https://langchain-ai.github.io/langgraph/cloud/deployment/setup/) for more detailed instructions.
After you have your app setup, head into the directory with your `langgraph.json` file and call `langgraph up -c langgraph.json --watch` to start the API server in watch mode which means it will restart on code changes, which is ideal for local testing. If the API server start correctly you should see logs that look something like this:
Ready!
- API: http://localhost:8123
2024-06-26 19:20:41,056:INFO:uvicorn.access 127.0.0.1:44138 - "GET /ok HTTP/1.1" 200
Read this [reference](https://langchain-ai.github.io/langgraph/cloud/reference/cli/#up) to learn about all the options for starting the API server.
## Access Studio
Once you have successfully started the API server, you can access the studio by going to the following URL: `https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:8123` (see warning above if using Safari).
If everything is working correctly you should see the studio show up looking something like this (with your graph diagram on the left hand side):
![LangGraph Studio](./img/studio_screenshot.png)
## Use the Studio for Testing
To learn about how to use the studio for testing, read the [LangGraph Studio how-tos](https://langchain-ai.github.io/langgraph/cloud/how-tos/#langgraph-studio).
-23
View File
@@ -1,23 +0,0 @@
# Interacting with Threads in Studio
## View Thread
1. In the top of the right-hand pane, select the `New Thread` dropdown menu to view existing threads.
1. View the state of the thread (i.e. the output) in the right-hand pane.
1. To create a new thread, select `+ New Thread`.
The following video shows these exact steps being carried out:
<video controls="true" allowfullscreen="true" poster="../img/studio_threads_poster.png">
<source src="../img/studio_threads.mp4" type="video/mp4">
</video>
## Edit Thread State
The LangGraph Studio UI contains features for editing thread state. Explore these features in the right-hand pane. Select the `Edit` icon, modify the desired state, and then select `Fork` to invoke the assistant with the updated state.
The following video shows how to edit a thread in the studio:
<video controls allowfullscreen="true" poster="../img/studio_forks_poster.png">
<source src="../img/studio_forks.mp4" type="video/mp4">
</video>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 405 KiB

-42
View File
@@ -1,42 +0,0 @@
# LangGraph Cloud (beta)
!!! tip
- LangGraph is an MIT-licensed open-source library, which we are committed to maintaining and growing for the community.
- LangGraph Cloud is an optional managed hosting service for LangGraph, which provides additional features geared towards production deployments.
- We are actively contributing improvements back to LangGraph informed by our work on LangGraph Cloud.
- You can always deploy LangGraph applications on your own infrastructure using the open-source LangGraph project.
!!! warning "Under Construction"
LangGraph Cloud documentation is under construction. Contents may change until general availability.
<video controls preload="auto" allowfullscreen="true" poster="how-tos/img/studio_forks_poster.png">
<source src="how-tos/img/studio_forks.mp4" type="video/mp4">
</video>
## Overview
LangGraph Cloud is a managed service for deploying and hosting LangGraph applications. Deploying applications with LangGraph Cloud shortens the time-to-market for developers. With one click, deploy a production-ready API with built-in persistence for your LangGraph application. LangGraph Cloud APIs are horizontally scalable and deployed with durable storage.
The LangGraph Cloud API exposes functionality of your LangGraph application through [Assistants](./concepts/api.md#assistants). An assistant abstracts the cognitive architecture of your graph. Invoke an assistant by calling the pre-built [API endpoints](./reference/api/api_ref.md).
LangGraph Cloud is seamlessly integrated with [LangSmith](https://www.langchain.com/langsmith) and is accessible from within the LangSmith UI.
## Key Features
The LangGraph Cloud API supports key LangGraph features in addition to new functionality for enabling complex, agentic workflows.
- **Assistants and Threads**: Assistants abstract the cognitive architecture of graphs and threads track the state/history of graphs.
- **Streaming**: API support for [LangGraph streaming modes](../concepts/low_level.md#streaming) including setting multiple streaming modes at the same time.
- **Human-in-the-Loop**: API support for [LangGraph human-in-the-loop features](../concepts/agentic_concepts.md#human-in-the-loop).
- **Double Texting**: Configure how assistants respond when new input is received while processing a previous input. Interrupt, rollback, reject, or enqueue.
- **Background Runs/Cron Jobs**: A built-in task queue enables background runs and scheduled cron jobs.
- **Stateless Runs**: For simpler use cases, invoke an assistant without needing to create a thread.
## Documentation
- [Tutorials](./quick_start.md): Learn to build and deploy applications for LangGraph Cloud.
- [How-to Guides](./how-tos/index.md): Learn how to set up a LangGraph application for deployment and implement features of the LangGraph Cloud API such as streaming tokens, configuring double texting, and creating cron jobs. Go here if you want to copy and run a specific code snippet.
- [Conceptual Guides](./concepts/api.md): In-depth explanations of the core data models (e.g. assistants), key features of the LangGraph Cloud API (e.g. double texting), and the architecture of a LangGraph Cloud deployment.
- [Reference](./reference/api/api_ref.md): References for the LangGraph Cloud API, the corresponding Python and JS/TS SDKs, the LangGraph CLI, and deployment environment variables.
-252
View File
@@ -1,252 +0,0 @@
# Quick Start
This quick start guide will cover how to build a simple agent that can look up things on the internet. We will then deploy it to LangGraph Cloud, use the LangGraph Studio to visualize and test it out, and use the LangGraph SDK to interact with it.
## Set up requirements
This tutorial will use:
- Anthropic for the LLM - sign up and get an API key [here](https://console.anthropic.com/)
- Tavily for the search engine - sign up and get an API key [here](https://app.tavily.com/)
- LangSmith for hosting - sign up and get an API key [here](https://smith.langchain.com/)
## Set up local files
1. Create a new application with the following directory and files:
<my-app>/
|-- agent.py # code for your LangGraph agent
|-- requirements.txt # Python packages required for your graph
|-- langgraph.json # configuration file for LangGraph
|-- .env # environment files with API keys
2. The `agent.py` file should contain Python code for defining your graph. The following code is a simple example, the important thing is that at some point in your file you compile your graph and assign the compiled graph to a variable (in this case the `graph` variable). This example code uses `create_react_agent`, a prebuilt agent, read more about it [here](..//concepts/agentic_concepts.md#react-agent).
```python
from langchain_anthropic import ChatAnthropic
from langchain_community.tools.tavily_search import TavilySearchResults
from langgraph.prebuilt import create_react_agent
model = ChatAnthropic(model="claude-3-5-sonnet-20240620")
tools = [TavilySearchResults(max_results=2)]
graph = create_react_agent(model, tools)
```
3. The `requirements.txt` file should contain any dependencies for your graph(s). In this case we only require four packages for our graph to run:
langgraph
langchain_anthropic
tavily-python
langchain_community
4. The [`langgraph.json`][langgraph.json] file is a configuration file that describes what graph(s) you are going to host. In this case we only have one graph to host: the compiled `graph` object from `agent.py`.
```json
{
"dependencies": ["."],
"graphs": {
"agent": "./agent.py:graph"
},
"env": ".env"
}
```
Learn more about the LangGraph CLI configuration file [here](./reference/cli.md#configuration-file).
5. The `.env` file should have any environment variables needed to run your graph. This will only be used for local testing, so if you are not testing locally you can skip this step. NOTE: if you do add this, you should NOT check this into git. For this graph, we need two environment variables:
```shell
ANTHROPIC_API_KEY=...
TAVILY_API_KEY=...
```
Now that we have set everything up on our local file system, we are ready to host our graph.
## Test the graph build locally
Before deploying to the cloud, we probably want to test the building of our graph locally. This is useful to make sure we have configured our [CLI configuration file][langgraph.json] correctly and our graph runs.
In order to do this we can first install the LangGraph CLI
```shell
pip install langgraph-cli
```
We can then test our API server locally. This requires access to LangGraph closed beta. In order to run the server locally, you will need to add your `LANGSMITH_API_KEY` to the .env file so we can validate you have access to LangGraph closed beta.
```shell
langgraph up
```
This will start up the LangGraph API server locally. If this runs successfully, you should see something like:
```shell
Ready!
- API: http://localhost:8123
2024-06-26 19:20:41,056:INFO:uvicorn.access 127.0.0.1:44138 - "GET /ok HTTP/1.1" 200
```
You can now test this out! **Note: this local server is intended SOLELY for local testing purposes and is not performant enough for production applications, so please do not use it as such.** To test it out, you can go to another terminal window and run:
```shell
curl --request POST \
--url http://localhost:8123/runs/stream \
--header 'Content-Type: application/json' \
--data '{
"assistant_id": "agent",
"input": {
"messages": [
{
"role": "user",
"content": "How are you?"
}
]
},
"metadata": {},
"config": {
"configurable": {}
},
"multitask_strategy": "reject",
"stream_mode": [
"values"
]
}'
```
If you get back a valid response, then all is functioning properly!
## Deploy to Cloud
### Push your code to GitHub
Turn the `<my-app>` directory into a GitHub repo. You can use the GitHub CLI if you like, or just create a repo manually (if unfamiliar, instructions [here](https://docs.github.com/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github)).
### Deploy from GitHub with LangGraph Cloud
Once you have created your github repository with a Python file containing your compiled graph as well as a `langgraph.json` file containing the configuration for hosting your graph, you can head over to LangSmith and click on the 🚀 icon on the left navbar to create a new deployment. Then click the `+ New Deployment` button.
![Langsmith Workflow](./img/cloud_deployment.png)
**_If you have not deployed to LangGraph Cloud before:_** there will be a button that shows up saying Import from GitHub. Youll need to follow that flow to connect LangGraph Cloud to GitHub.
**_Once you have set up your GitHub connection:_** the new deployment page will look as follows:
![Deployment before being filled out](./deployment/img/deployment_page.png)
To deploy your application, you should do the following:
1. Select your GitHub username or organization from the selector
2. Search for your repo to deploy in the search bar and select it
3. Choose any name
4. In the `LangGraph API config file` field, enter the path to your `langgraph.json` file (which in this case is just `langgraph.json`)
5. For Git Reference, you can select either the git branch for the code you want to deploy, or the exact commit SHA.
6. If your chain relies on environment variables, add those in. They will be propagated to the underlying server so your code can access them. In this case, we need `ANTHROPIC_API_KEY` and `TAVILY_API_KEY`.
Putting this all together, you should have something as follows for your deployment details:
![Deployment filled out](./deployment/img/deploy_filled_out.png)
Hit `Submit` and your application will start deploying!
## Inspect Traces + Monitor Service
### Deployments View
After your deployment is complete, your deployments page should look as follows:
![Deployed page](./deployment/img/deployed_page.png)
You can see that by default, you get access to the `Trace Count` monitoring chart and `Recent Traces` run view. These are powered by LangSmith.
You can click on `All Charts` to view all monitoring info for your server, or click on `See tracing project` to get more information on an individual trace.
### Access the Docs
You can access the docs by clicking on the API docs link, which should send you to a page that looks like this:
![API Docs page](./deployment/img/api_page.png)
You wont actually be able to test any of the API endpoints without authorizing first. To do so, grab your Langsmith API key and add it at the top where it says `API KEY (X-API-KEY)`. You should now be able to select any of the API endpoints, click `Test Request`, enter the parameters you would like to pass, and then click `Send` to view the results of the API call.
## Interact with your deployment via LangGraph Studio
If you click on your deployment you should see a blue button in the top right that says `LangGraph Studio`. Clicking on this button will take you to a page that looks like this:
![Studio UI before being run](./deployment/img/graph_visualization.png)
On this page you can test out your graph by passing in starting states and clicking `Start Run` (this should behave identically to calling `.invoke`). You will then be able to look into the execution thread for each run and explore the steps your graph is taking to produce its output.
![Studio UI once being run](./deployment/img/graph_run.png)
## Use with the SDK
Once you have tested that your hosted graph works as expected using LangGraph Studio, you can start using your hosted graph all over your organization by using the LangGraph SDK. Let's see how we can access our hosted graph and execute our run from a python file.
First, make sure you have the SDK installed by calling `pip install langgraph_sdk`.
Before using, you need to get the URL of your LangGraph deployment. You can find this in the `Deployment` view. Click the URL to copy it to the clipboard.
You also need to make sure you have set up your API key properly so you can authenticate with LangGraph Cloud.
```shell
export LANGSMITH_API_KEY=...
```
The first thing to do when using the SDK is to setup our client, access our assistant, and create a thread to execute a run on:
```python
from langgraph_sdk import get_client
# Replace this with the URL of your own deployed graph
URL = "https://chatbot-23a570f3210f52a7b167f09f6158e3b3-ffoprvkqsa-uc.a.run.app"
client = get_client(url=URL)
# Search all hosted graphs
assistants = await client.assistants.search()
# In this example we select the first assistant since we are only hosting a single graph
assistant = assistants[0]
# We create a thread for tracking the state of our run
thread = await client.threads.create()
```
We can then execute a run on the thread:
```python
input = {"messages":[{"role": "user", "content": "Hello! My name is Bagatur and I am 26 years old."}]}
async for chunk in client.runs.stream(
thread['thread_id'],
assistant["assistant_id"],
input=input,
stream_mode="updates",
):
if chunk.data and chunk.event != "metadata":
print(chunk.data)
```
{'agent': {'messages': [{'content': "Hi Bagatur! It's nice to meet you. How can I assist you today?", 'additional_kwargs': {}, 'response_metadata': {'finish_reason': 'stop', 'model_name': 'gpt-4o-2024-05-13', 'system_fingerprint': 'fp_9cb5d38cf7'}, 'type': 'ai', 'name': None, 'id': 'run-c89118b7-1b1e-42b9-a85d-c43fe99881cd', 'example': False, 'tool_calls': [], 'invalid_tool_calls': [], 'usage_metadata': None}]}}
## What's Next
Congratulations! If you've worked your way through this tutorial you are well on your way to becoming a LangGraph Cloud expert. Here are some other resources to check out to help you out on the path to expertise:
### LangGraph Cloud How-tos
If you want to learn more about streaming from hosted graphs, check out the Streaming [how-to guides](how-tos/index.md#streaming).
To learn more about double-texting and all the ways you can handle it in your application, read up on these [how-to guides](how-tos/index.md#double-texting).
To learn about how to include different human-in-the-loop behavior in your graph, take a look at [these how-tos](how-tos/index.md#human-in-the-loop).
### LangGraph Tutorials
Before hosting, you have to write a graph to host. Here are some tutorials to get you more comfortable with writing LangGraph graphs and give you inspiration for the types of graphs you want to host.
[This tutorial](../tutorials/customer-support/customer-support.ipynb) walks you through how to write a customer support bot using LangGraph.
If you are interested in writing a SQL agent, check out [this tutorial](../tutorials/sql-agent.ipynb).
Check out the [LangGraph tutorials](../tutorials/index.md) page to read about more exciting use cases.
@@ -1,19 +0,0 @@
<!doctype html>
<html>
<head>
<title>LangGraph Cloud API Reference</title>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1" />
</head>
<body>
<script id="api-reference" data-url="./openapi.json"></script>
<script>
var configuration = {}
document.getElementById('api-reference').dataset.configuration =
JSON.stringify(configuration)
</script>
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
</body>
</html>
-5
View File
@@ -1,5 +0,0 @@
# API Reference
The LangGraph Cloud API reference is available with each deployment at the `/docs` URL path (e.g. `http://localhost:8124/docs`).
Click <a href="/langgraph/cloud/reference/api/api_ref.html" target="_blank">here</a> to view the API reference.
File diff suppressed because it is too large Load Diff
-127
View File
@@ -1,127 +0,0 @@
# LangGraph CLI
The LangGraph CLI includes commands to build and run a LangGraph Cloud API server locally in [Docker](https://www.docker.com/). For development and testing, use the CLI to deploy a local API server.
## Installation
1. Ensure that Docker is installed (e.g. `docker --version`).
2. Install the `langgraph-cli` Python package (e.g. `pip install langgraph-cli`).
3. Run the command `langgraph --help` to confirm that the CLI is installed.
[](){#langgraph.json}
## Configuration File
The LangGraph CLI requires a JSON configuration file with the following keys:
| Key | Description |
| --- | ----------- |
| `dependencies` | **Required**. Array of dependencies for LangGraph Cloud API server. Dependencies can be one of the following: (1) `"."`, which will look for local Python packages, (2) `pyproject.toml`, `setup.py` or `requirements.txt` in the app directory `"./local_package"`, or (3) a package name. |
| `graphs` | **Required**. Mapping from graph ID to path where the compiled graph or a function that makes a graph is defined. Example: <ul><li>`./your_package/your_file.py:variable`, where `variable` is an instance of `langgraph.graph.state.CompiledStateGraph`</li><li>`./your_package/your_file.py:make_graph`, where `make_graph` is a function that takes a config dictionary (`langchain_core.runnables.RunnableConfig`) and creates an instance of `langgraph.graph.state.StateGraph` / `langgraph.graph.state.CompiledStateGraph`.</li></ul> |
| `env` | Path to `.env` file or a mapping from environment variable to its value. |
| `python_version` | `3.11` or `3.12`. Defaults to `3.11`. |
| `pip_config_file`| Path to `pip` config file. |
| `dockerfile_lines` | Array of additional lines to add to Dockerfile following the import from parent image. |
<div class="admonition tip">
<p class="admonition-title">Note</p>
<p>
The LangGraph CLI defaults to using the configuration file <strong>langgraph.json</strong> in the current directory.
</p>
</div>
Example:
```json
{
"dependencies": [
"langchain_openai",
"./your_package"
],
"graphs": {
"my_graph_id": "./your_package/your_file.py:variable"
},
"env": "./.env"
}
```
Example:
```json
{
"python_version": "3.11",
"dependencies": [
"langchain_openai",
"."
],
"graphs": {
"my_graph_id": "./your_package/your_file.py:make_graph"
},
"env": {
"OPENAI_API_KEY": "secret-key"
}
}
```
## Commands
The base command for the LangGraph CLI is `langgraph`.
**Usage**
```
langgraph [OPTIONS] COMMAND [ARGS]
```
### `build`
Build LangGraph Cloud API server Docker image.
**Usage**
```
langgraph build [OPTIONS]
```
**Options**
| Option | Default | Description |
| ------ | ------- | ----------- |
| `--platform TEXT` | | Target platform(s) to build the Docker image for. Example: `langgraph build --platform linux/amd64,linux/arm64` |
| `-t, --tag TEXT` | | **Required**. Tag for the Docker image. Example: `langgraph build -t my-image` |
| `--pull / --no-pull` | `--pull` | Build with latest remote Docker image. Use `--no-pull` for running the LangGraph Cloud API server with locally built images. |
| `-c, --config FILE` | `langgraph.json` | Path to configuration file declaring dependencies, graphs and environment variables. |
| `--help` | | Display command documentation. |
### `up`
Start langgraph API server. For local testing, requires a LangSmith API key with access to LangGraph Cloud closed beta. Requires a license key for production use.
**Usage**
```
langgraph up [OPTIONS]
```
**Options**
| Option | Default | Description |
| ------ | ------- | ----------- |
| `--wait` | | Wait for services to start before returning. Implies --detach |
| `--postgres-uri TEXT` | Local database | Postgres URI to use for the database. |
| `--watch` | | Restart on file changes |
| `--debugger-base-url TEXT` | `http://127.0.0.1:[PORT]` | URL used by the debugger to access LangGraph API. |
| `--debugger-port INTEGER` | | Pull the debugger image locally and serve the UI on specified port |
| `--verbose` | | Show more output from the server logs. |
| `-c, --config FILE` | `langgraph.json` | Path to configuration file declaring dependencies, graphs and environment variables. |
| `-d, --docker-compose FILE` | | Path to docker-compose.yml file with additional services to launch. |
| `-p, --port INTEGER` | `8123` | Port to expose. Example: `langgraph test --port 8000` |
| `--pull / --no-pull` | `pull` | Pull latest images. Use --no-pull for running the server with locally-built images. Example: `langgraph up --no-pull` |
| `--recreate / --no-recreate` | `no-recreate` | Recreate containers even if their configuration and image haven't changed |
| `--help` | | Display command documentation. |
### `test`
Test your LangGraph in the cloud. The only function you can call from the SDK after testing your graph is `client.runs.stream(thread_id=None, ...)`
**Usage**
```
langgraph test [OPTIONS]
```
**Options**
| Option | Default | Description |
| ------ | ------- | ----------- |
| `--verbose` | | Show more output from the server logs. |
| `-c, --config FILE` | `langgraph.json` | Path to configuration file declaring dependencies, graphs and environment variables. |
| `-p, --port INTEGER` | `8123` | Port to expose. Example: `langgraph test --port 8000` |
| `--pull / --no-pull` | `pull` | Pull latest images. Use --no-pull for running the server with locally-built images. Example: `langgraph up --no-pull` |
| `--help` | | Display command documentation. |
-13
View File
@@ -1,13 +0,0 @@
# Environment Variables
The LangGraph Cloud API supports specific environment variables for configuring a deployment.
## `LANGGRAPH_AUTH_TYPE`
Type of authentication for the LangGraph Cloud API deployment. Valid values: `langsmith`, `noop`.
For deployments to LangGraph Cloud, this environment variable is set automatically. For local development or deployments where authentication is handled externally (e.g. self-hosted), set this environment variable to `noop`.
## `N_JOBS_PER_WORKER`
Number of jobs per worker for the LangGraph Cloud task queue. Defaults to `10`.
@@ -1,79 +0,0 @@
# Python SDK Reference
The Python SDK provides four underlying clients (`AssistantsClient`, `ThreadsClient`, `RunsClient`, `CronClient`) that correspond to each of the core API models and one top-level client (`LangGraphClient`) to access them.
## get_client()
The `get_client()` function returns the top-level `LangGraphClient` client.
```python
from langgraph_sdk import get_client
# get top-level LangGraphClient
client = get_client(url="http://localhost:8123")
# example usage: client.<model>.<method_name>()
assistants = await client.assistants.get(assistant_id="some_uuid")
```
::: langgraph_sdk.client.get_client
handler: python
## LangGraphClient
`LangGraphClient` is the top-level client for accessing `AssistantsClient`, `ThreadsClient`, `RunsClient`, and `CronClient`.
::: langgraph_sdk.client.LangGraphClient
handler: python
## AssistantsClient
Access the `AssistantsClient` via the `LangGraphClient.assistants` attribute.
```python
from langgraph_sdk import get_client
client = get_client(url="http://localhost:8123")
await client.assistants.<method_name>()
```
::: langgraph_sdk.client.AssistantsClient
handler: python
## ThreadsClient
Access the `ThreadsClient` via the `LangGraphClient.threads` attribute.
```python
from langgraph_sdk import get_client
client = get_client(url="http://localhost:8123")
await client.threads.<method_name>()
```
::: langgraph_sdk.client.ThreadsClient
handler: python
## RunsClient
Access the `RunsClient` via the `LangGraphClient.runs` attribute.
```python
from langgraph_sdk import get_client
client = get_client(url="http://localhost:8123")
await client.runs.<method_name>()
```
::: langgraph_sdk.client.RunsClient
handler: python
## CronClient
Access the `CronClient` via the `LangGraphClient.crons` attribute.
```python
from langgraph_sdk import get_client
client = get_client(url="http://localhost:8123")
await client.crons.<method_name>()
```
::: langgraph_sdk.client.CronClient
handler: python
Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

-4
View File
@@ -1,4 +0,0 @@
tags:
- concepts
- conceptual guide
- explanation
-99
View File
@@ -1,99 +0,0 @@
# Common Agentic Patterns
## Structured Output
It's pretty common to want LLMs inside nodes to return structured output when building agents. This is because that structured output can often be used to route to the next step (e.g. choose between two different edges) or update specific keys of the state.
Since LangGraph nodes can be arbitrary Python functions, you can do this however you want. If you want to use LangChain, [this how-to guide](https://python.langchain.com/v0.2/docs/how_to/structured_output/) is a starting point.
## Tool calling
It's extremely common to want agents to do tool calling. Tool calling refers to choosing from several available tools, and specifying which ones to call and what the inputs should be. This is extremely common in agents, as you often want to let the LLM decide which tools to call and then call those tools.
Since LangGraph nodes can be arbitrary Python functions, you can do this however you want. If you want to use LangChain, [this how-to guide](https://python.langchain.com/v0.2/docs/how_to/tool_calling/) is a starting point.
## Memory
Memory is a key concept to agentic applications. Memory is important because end users often expect the application they are interacting with remember previous interactions. The most simple example of this is chatbots - they clearly need to remember previous messages in a conversation.
LangGraph is perfectly suited to give you full control over the memory of your application. With user defined [`State`](./low_level.md#state) you can specify the exact schema of the memory you want to retain. With [checkpointers](./low_level.md#checkpointer) you can store checkpoints of previous interactions and resume from there in follow up interactions.
See [this guide](../how-tos/persistence.ipynb) for how to add memory to your graph.
## Human-in-the-loop
Agentic systems often require some human-in-the-loop (or "on-the-loop") interaction patterns. This is because agentic systems are still not super reliable, so having a human involved is required for any sensitive tasks/actions. These are all easily enabled in LangGraph, largely due to [checkpointers](./low_level.md#checkpointer). The reason a checkpointer is necessary is that a lot of these interaction patterns involve running a graph up until a certain point, waiting for some sort of human feedback, and then continuing. When you want to "continue" you will need to access the state of the graph previous to getting interrupted, and checkpointers are a built in, highly convenient way to do that.
There are a few common human-in-the-loop interaction patterns we see emerging.
### Approval
A basic one is to have the agent wait for approval before executing certain tools. This may be all tools, or just a subset of tools. This is generally recommend for more sensitive actions (like writing to a database). This can easily be done in LangGraph by setting a [breakpoint](./low_level.md#breakpoints) before specific nodes.
See [this guide](../how-tos/human_in_the_loop/breakpoints.ipynb) for how do this in LangGraph.
### Wait for input
A similar one is to have the agent wait for human input. This can be done by:
1. Create a node specifically for human input
2. Add a breakpoint before the node
3. Get user input
4. Update the state with that user input, acting as that node
5. Resume execution
See [this guide](../how-tos/human_in_the_loop/wait-user-input.ipynb) for how do this in LangGraph.
### Edit agent actions
This is a more advanced interaction pattern. In this interaction pattern the human can actually edit some of the agent's previous decisions. This can be done either during the flow (after a [breakpoint](./low_level.md#breakpoints), part of the [approval](#approval) flow) or after the fact (as part of [time-travel](#time-travel))
See [this guide](../how-tos/human_in_the_loop/edit-graph-state.ipynb) for how do this in LangGraph.
### Time travel
This is a pretty advanced interaction pattern. In this interaction pattern, the human can look back at the list of previous checkpoints, find one they like, optionally [edit it](#edit-agent-actions), and then resume execution from there.
See [this guide](../how-tos/human_in_the_loop/time-travel.ipynb) for how to do this in LangGraph.
## Map-Reduce
A common pattern in agents is to generate a list of objects, do some work on each of those objects, and then combine the results. This is very similar to the common [map-reduce](https://en.wikipedia.org/wiki/MapReduce) operation. This can be tricky for a few reasons. First, it can be tough to define a structured graph ahead of time because the length of the list of objects may be unknown. Second, in order to do this map-reduce you need multiple versions of the state to exist... but the graph shares a common shared state, so how can this be?
LangGraph supports this via the [Send](./low_level.md#send) api. This can be used to allow a conditional edge to Send multiple different states to multiple nodes. The state it sends can be different from the state of the core graph.
See a how-to guide for this [here](../how-tos/map-reduce.ipynb)
## Multi-agent
A term you may have heard is "multi-agent" architectures. What exactly does this mean?
Given that it is hard to even define an "agent", it's almost impossible to exactly define a "multi-agent" architecture. When most people talk about a multi-agent architecture, they typically mean a system where there are multiple different LLM-based systems. These LLM-based systems can be as simple as a prompt and an LLM call, or as complex as a [ReAct agent](#react-agent).
The big question in multi-agent systems is how they communicate. This involves both the schema of how they communicate, as well as the sequence in which they communicate. LangGraph is perfect for orchestrating these types of systems. It allows you to define multiple agents (each one is a node) an arbitrary state (to encapsulate the schema of how they communicate) as well as the edges (to control the sequence in which they communicate).
## Planning
One of the big things that agentic systems struggle with is long term planning. A common technique to overcome this is to have an explicit planning this. This generally involves calling an LLM to come up with a series of steps to execute. From there, the system then tries to execute the series of tasks (this could use a sub-agent to do so). Optionally, you can revisit the plan after each step and update it if needed.
## Reflection
Agents often struggle to produce reliable results. Therefore, it can be helpful to check whether the agent has completed a task correctly or not. If it has - then you can finish. If it hasn't - then you can take the feedback on why it's not correct and pass it back into another iteration of the agent.
This "reflection" step often uses an LLM, but doesn't have to. A good example of where using an LLM may not be necessary is in coding, when you can try to compile the generated code and use any errors as the feedback.
## ReAct Agent
One of the most common agent architectures is what is commonly called the ReAct agent architecture. In this architecture, an LLM is called repeatedly in a while-loop. At each step the agent decides which tools to call, and what the inputs to those tools should be. Those tools are then executed, and the outputs are fed back into the LLM as observations. The while-loop terminates when the agent decides it is not worth calling any more tools.
One of the few high level, pre-built agents we have in LangGraph - you can use it with [`create_react_agent`](../reference/prebuilt.md#create_react_agent)
This is named after and based on the [ReAct](https://arxiv.org/abs/2210.03629) paper. However, there are several differences between this paper and our implementation:
- First, we use [tool-calling](#tool-calling) to have LLMs call tools, whereas the paper used prompting + parsing of raw output. This is because tool calling did not exist when the paper was written, but is generally better and more reliable.
- Second, we use messages to prompt the LLM, whereas the paper used string formatting. This is because at the time of writing, LLMs didn't even expose a message-based interface, whereas now that's the only interface they expose.
- Third, the paper required all inputs to the tools to be a single string. This was largely due to LLMs not being super capable at the time, and only really being able to generate a single input. Our implementation allows for using tools that require multiple inputs.
- Forth, the paper only looks at calling a single tool at the time, largely due to limitations in LLMs performance at the time. Our implementation allows for calling multiple tools at a time.
- Finally, the paper asked the LLM to explicitly generate a "Thought" step before deciding which tools to call. This is the "Reasoning" part of "ReAct". Our implementation does not do this by default, largely because LLMs have gotten much better and that is not as necessary. Of course, if you wish to prompt it do so, you certainly can.
See [this guide](../how-tos/human_in_the_loop/time-travel.ipynb) for a full walkthrough of how to use the prebuilt ReAct agent.
-15
View File
@@ -1,15 +0,0 @@
# FAQ
Common questions and their answers!
## Do I need to use LangChain in order to use LangGraph?
No! LangGraph is a general-purpose framework - the nodes and edges are nothing more than Python functions. You can use LangChain, raw HTTP requests, or even other frameworks inside these nodes and edges.
## Does LangGraph work with LLMs that don't support tool calling?
Yes! You can use LangGraph with any LLMs. The main reason we use LLMs that support tool calling is that this is often the most convenient way to have the LLM make its decision about what to do. If your LLM does not support tool calling, you can still use it - you just need to write a bit of logic to convert the raw LLM string response to a decision about what to do.
## Does LangGraph work with OSS LLMs?
Yes! LangGraph is totally ambivalent to what LLMs are used under the hood. The main reason we use closed LLMs in most of the tutorials is that they seamlessly support tool calling, while OSS LLMs often don't. But tool calling is not necessary (see [this section](#does-langgraph-work-with-llms-that-dont-support-tool-calling)) so you can totally use LangGraph with OSS LLMs.
-55
View File
@@ -1,55 +0,0 @@
# LangGraph for Agentic Applications
## What does it mean to be agentic?
Other people may talk about a system being an "agent" - we prefer to talk about systems being "agentic". But what does this actually mean?
When we talk about systems being "agentic", we are talking about systems that use an LLM to decide the control flow of an application. There are different levels that an LLM can be used to decide the control flow, and this spectrum of "agentic" makes more sense to us than defining an arbitrary cutoff for what is or isn't an agent.
Examples of using an LLM to decide the control of an application:
- Using an LLM to route between two potential paths
- Using an LLM to decide which of many tools to call
- Using an LLM to decide whether the generated answer is sufficient or more work is need
The more times these types of decisions are made inside an application, the more agentic it is.
If these decisions are being made in a loop, then its even more agentic!
There are other concepts often associated with being agentic, but we would argue these are a by-product of the above definition:
- [Tool calling](agentic_concepts.md#tool-calling): this is often how LLMs make decisions
- Action taking: often times, the LLMs' outputs are used as the input to an action
- [Memory](agentic_concepts.md#memory): reliable systems need to have knowledge of things that occurred
- [Planning](agentic_concepts.md#planning): planning steps (either explicit or implicit) are useful for ensuring that the LLM, when making decisions, makes them in the highest fidelity way.
## Why LangGraph?
LangGraph has several core principles that we believe make it the most suitable framework for building agentic applications:
- [Controllability](../how-tos/index.md#controllability)
- [Human-in-the-Loop](../how-tos/index.md#human-in-the-loop)
- [Streaming First](../how-tos/index.md#streaming)
**Controllability**
LangGraph is extremely low level. This gives you a high degree of control over what the system you are building actually does. We believe this is important because it is still hard to get agentic systems to work reliably, and we've seen that the more control you exercise over them, the more likely it is that they will "work".
**Human-in-the-Loop**
LangGraph comes with a built-in persistence layer as a first-class concept. This enables several different human-in-the-loop interaction patterns. We believe that "Human-Agent Interaction" patterns will be the new "Human-Computer Interaction", and have built LangGraph with built in persistence to enable this.
**Streaming First**
LangGraph comes with first class support for streaming. Agentic applications often take a while to run, and so giving the user some idea of what is happening is important, and streaming is a great way to do that. LangGraph supports streaming of both events ([like a tool call being taken](../how-tos/stream-updates.ipynb)) as well as of [tokens that an LLM may emit](../how-tos/streaming-tokens.ipynb).
## Deployment
So you've built your LangGraph object - now what?
Now you need to deploy it.
There are many ways to deploy LangGraph objects, and the right solution depends on your needs and use case.
We'll highlight two ways here: using [LangGraph Cloud](../cloud/index.md) or rolling your own solution.
[LangGraph Cloud](../cloud/index.md) is an opinionated way to deploy LangGraph objects from the LangChain team. Please see the [LangGraph Cloud documentation](../cloud/index.md) for all the details about what it involves, to see if it is a good fit for you.
If it is not a good fit, you may want to roll your own deployment. In this case, we would recommend using [FastAPI](https://fastapi.tiangolo.com/) to stand up a server. You can then call this graph from inside the FastAPI server as you see fit.
-57
View File
@@ -1,57 +0,0 @@
# Conceptual Guides
In this guide we will explore the concepts behind build agentic and multi-agent systems with LangGraph. We assume you have already learned the basic covered in the [introduction tutorial](../tutorials/introduction.ipynb) and want to deepen your understanding of LangGraph's underlying design and inner workings.
There are three main parts to this concept guide. First, we'll discuss at a very high level what it means to be agentic. Next, we'll look at lower-level concepts in LangGraph that are core for understanding how to build your own agentic systems. Finally, we'll discuss common agentic patterns and how you can achieve those with LangGraph. These will be mostly conceptual guides - for more technical, hands-on guides see our [how-to guides](../how-tos/index.md)
LangGraph for Agentic Applications
- [What does it mean to be agentic?](high_level.md#what-does-it-mean-to-be-agentic)
- [Why LangGraph](high_level.md#why-langgraph)
- [Deployment](high_level.md#deployment)
Low Level Concepts
- [Graphs](low_level.md#graphs)
- [StateGraph](low_level.md#stategraph)
- [MessageGraph](low_level.md#messagegraph)
- [Compiling Your Graph](low_level.md#compiling-your-graph)
- [State](low_level.md#state)
- [Schema](low_level.md#schema)
- [Reducers](low_level.md#reducers)
- [MessageState](low_level.md#working-with-messages-in-graph-state)
- [Nodes](low_level.md#nodes)
- [`START` node](low_level.md#start-node)
- [`END` node](low_level.md#end-node)
- [Edges](low_level.md#edges)
- [Normal Edges](low_level.md#normal-edges)
- [Conditional Edges](low_level.md#conditional-edges)
- [Entry Point](low_level.md#entry-point)
- [Conditional Entry Point](low_level.md#conditional-entry-point)
- [Send](low_level.md#send)
- [Checkpointer](low_level.md#checkpointer)
- [Threads](low_level.md#threads)
- [Checkpointer states](low_level.md#checkpointer-state)
- [Get state](low_level.md#get-state)
- [Get state history](low_level.md#get-state-history)
- [Update state](low_level.md#update-state)
- [Configuration](low_level.md#configuration)
- [Visualization](low_level.md#visualization)
- [Streaming](low_level.md#streaming)
Common Agentic Patterns
- [Structured output](agentic_concepts.md#structured-output)
- [Tool calling](agentic_concepts.md#tool-calling)
- [Memory](agentic_concepts.md#memory)
- [Human in the loop](agentic_concepts.md#human-in-the-loop)
- [Approval](agentic_concepts.md#approval)
- [Wait for input](agentic_concepts.md#wait-for-input)
- [Edit agent actions](agentic_concepts.md#edit-agent-actions)
- [Time travel](agentic_concepts.md#time-travel)
- [Map-Reduce](agentic_concepts.md#map-reduce)
- [Multi-agent](agentic_concepts.md#multi-agent)
- [Planning](agentic_concepts.md#planning)
- [Reflection](agentic_concepts.md#reflection)
- [Off-the-shelf ReAct Agent](agentic_concepts.md#react-agent)
-428
View File
@@ -1,428 +0,0 @@
# Low Level Conceptual Guide
## Graphs
At its core, LangGraph models agent workflows as graphs. You define the behavior of your agents using three key components:
1. [`State`](#state): A shared data structure that represents the current snapshot of your application. It can be any Python type, but is typically a `TypedDict` or Pydantic `BaseModel`.
2. [`Nodes`](#nodes): Python functions that encode the logic of your agents. They receive the current `State` as input, perform some computation or side-effect, and return an updated `State`.
3. [`Edges`](#edges): Python functions that determine which `Node` to execute next based on the current `State`. They can be conditional branches or fixed transitions.
By composing `Nodes` and `Edges`, you can create complex, looping workflows that evolve the `State` over time. The real power, though, comes from how LangGraph manages that `State`. To emphasize: `Nodes` and `Edges` are nothing more than Python functions - they can contain an LLM or just good ol' Python code.
In short: _nodes do the work. edges tell what to do next_.
LangGraph's underlying graph algorithm uses [message passing](https://en.wikipedia.org/wiki/Message_passing) to define a general program. When a Node completes its operation, it sends messages along one or more edges to other node(s). These recipient nodes then execute their functions, pass the resulting messages to the next set of nodes, and the process continues. Inspired by Google's [Pregel](https://research.google/pubs/pregel-a-system-for-large-scale-graph-processing/) system, the program proceeds in discrete "super-steps."
A super-step can be considered a single iteration over the graph nodes. Nodes that run in parallel are part of the same super-step, while nodes that run sequentially belong to separate super-steps. At the start of graph execution, all nodes begin in an `inactive` state. A node becomes `active` when it receives a new message (state) on any of its incoming edges (or "channels"). The active node then runs its function and responds with updates. At the end of each super-step, nodes with no incoming messages vote to `halt` by marking themselves as `inactive`. The graph execution terminates when all nodes are `inactive` and no messages are in transit.
### StateGraph
The `StateGraph` class is the main graph class to uses. This is parameterized by a user defined `State` object.
### MessageGraph
The `MessageGraph` class is a special type of graph. The `State` of a `MessageGraph` is ONLY a list of messages. This class is rarely used except for chatbots, as most applications require the `State` to be more complex than a list of messages.
### Compiling your graph
To build your graph, you first define the [state](#state), you then add [nodes](#nodes) and [edges](#edges), and then you compile it. What exactly is compiling your graph and why is it needed?
Compiling is a pretty simple step. It provides a few basic checks on the structure of your graph (no orphaned nodes, etc). It is also where you can specify runtime args like [checkpointers](#checkpointer) and [breakpoints](#breakpoints). You compile your graph by just calling the `.compile` method:
```python
graph = graph_builder.compile(...)
```
You **MUST** compile your graph before you can use it.
## State
The first thing you do when you define a graph is define the `State` of the graph. The `State` consists of the [schema of the graph](#schema) as well as [`reducer` functions](#reducers) which specify how to apply updates to the state. The schema of the `State` will be the input schema to all `Nodes` and `Edges` in the graph, and can be either a `TypedDict` or a `Pydantic` model. All `Nodes` will emit updates to the `State` which are then applied using the specified `reducer` function.
### Schema
The main documented way to specify the schema of a graph is by using `TypedDict`. However, we also support [using a Pydantic BaseModel](../how-tos/state-model.ipynb) as your graph state to add **default values** and additional data validation.
By default, the graph will have the same input and output schemas. If you want to change this, you can also specify explicit input and output schemas directly. This is useful when you have a lot of keys, and some are explicitly for input and others for output. See the [notebook here](../how-tos/input_output_schema.ipynb) for how to use.
By default, all nodes in the graph will share the same state. This means that they will read and write to the same state channels. It is possible to have nodes write to private state channels inside the graph for internal node communication - see [this notebook](../how-tos/pass_private_state.ipynb) for how to do that.
### Reducers
Reducers are key to understanding how updates from nodes are applied to the `State`. Each key in the `State` has its own independent reducer function. If no reducer function is explicitly specified then it is assumed that all updates to that key should override it. Let's take a look at a few examples to understand them better.
**Example A:**
```python
from typing import TypedDict
class State(TypedDict):
foo: int
bar: list[str]
```
In this example, no reducer functions are specified for any key. Let's assume the input to the graph is `{"foo": 1, "bar": ["hi"]}`. Let's then assume the first `Node` returns `{"foo": 2}`. This is treated as an update to the state. Notice that the `Node` does not need to return the whole `State` schema - just an update. After applying this update, the `State` would then be `{"foo": 2, "bar": ["hi"]}`. If the second node returns `{"bar": ["bye"]}` then the `State` would then be `{"foo": 2, "bar": ["bye"]}`
**Example B:**
```python
from typing import TypedDict, Annotated
from operator import add
class State(TypedDict):
foo: int
bar: Annotated[list[str], add]
```
In this example, we've used the `Annotated` type to specify a reducer function (`operator.add`) for the second key (`bar`). Note that the first key remains unchanged. Let's assume the input to the graph is `{"foo": 1, "bar": ["hi"]}`. Let's then assume the first `Node` returns `{"foo": 2}`. This is treated as an update to the state. Notice that the `Node` does not need to return the whole `State` schema - just an update. After applying this update, the `State` would then be `{"foo": 2, "bar": ["hi"]}`. If the second node returns `{"bar": ["bye"]}` then the `State` would then be `{"foo": 2, "bar": ["hi", "bye"]}`. Notice here that the `bar` key is updated by adding the two lists together.
### Working with Messages in Graph State
#### Why use messages?
Most modern LLM providers have a chat model interface that accepts a list of messages as input. LangChain's [`ChatModel`](https://python.langchain.com/v0.2/docs/concepts/#chat-models) in particular accepts a list of `Message` objects as inputs. These messages come in a variety of forms such as `HumanMessage` (user input) or `AIMessage` (LLM response). To read more about what message objects are, please refer to [this](https://python.langchain.com/v0.2/docs/concepts/#messages) conceptual guide.
#### Using Messages in your Graph
In many cases, it is helpful to store prior conversation history as a list of messages in your graph state. To do so, we can add a key (channel) to the graph state that stores a list of `Message` objects and annotate it with a reducer function (see `messages` key in the example below). The reducer function is vital to telling the graph how to update the list of `Message` objects in the state with each state update (for example, when a node sends an update). If you don't specify a reducer, every state update will overwrite the list of messages with the most recently provided value. If you wanted to simply append messages to the existing list, you could use `operator.add` as a reducer.
However, you might also want to manually update messages in your graph state (e.g. human-in-the-loop). If you were to use `operator.add`, the manual state updates you send to the graph would be appended to the existing list of messages, instead of updating existing messages. To avoid that, you need a reducer that can keep track of message IDs and overwrite existing messages, if updated. To achieve this, you can use the prebuilt `add_messages` function. For brand new messages, it will simply append to existing list, but it will also handle the updates for existing messages correctly.
#### Serialization
In addition to keeping track of message IDs, the `add_messages` function will also try to deserialize messages into LangChain `Message` objects whenever a state update is received on the `messages` channel. See more information on LangChain serialization/deserialization [here](https://python.langchain.com/v0.2/docs/how_to/serialization/). This allows sending graph inputs / state updates in the following format:
```python
# this is supported
{"messages": [HumanMessage(content="message")]}
# and this is also supported
{"messages": [{"type": "human", "content": "message"}]}
```
Since the state updates are always deserialized into LangChain `Messages` when using `add_messages`, you should use dot notation to access message attributes, like `state["messages"][-1].content`. Below is an example of a graph that uses `add_messages` as it's reducer function.
```python
from langchain_core.messages import AnyMessage
from langgraph.graph.message import add_messages
from typing import Annotated, TypedDict
class GraphState(TypedDict):
messages: Annotated[list[AnyMessage], add_messages]
```
#### MessagesState
Since having a list of messages in your state is so common, there exists a prebuilt state called `MessagesState` which makes it easy to use messages. `MessagesState` is defined with a single `messages` key which is a list of `AnyMessage` objects and uses the `add_messages` reducer. Typically, there is more state to track than just messages, so we see people subclass this state and add more fields, like:
```python
from langgraph.graph import MessagesState
class State(MessagesState):
documents: list[str]
```
## Nodes
In LangGraph, nodes are typically python functions (sync or `async`) where the **first** positional argument is the [state](#state), and (optionally), the **second** positional argument is a "config", containing optional [configurable parameters](#configuration) (such as a `thread_id`).
Similar to `NetworkX`, you add these nodes to a graph using the [add_node][langgraph.graph.StateGraph.add_node] method:
```python
from langchain_core.runnables import RunnableConfig
from langgraph.graph import StateGraph
builder = StateGraph(dict)
def my_node(state: dict, config: RunnableConfig):
print("In node: ", config["configurable"]["user_id"])
return {"results": f"Hello, {state['input']}!"}
# The second argument is optional
def my_other_node(state: dict):
return state
builder.add_node("my_node", my_node)
builder.add_node("other_node", my_other_node)
...
```
Behind the scenes, functions are converted to [RunnableLambda's](https://api.python.langchain.com/en/latest/runnables/langchain_core.runnables.base.RunnableLambda.html#langchain_core.runnables.base.RunnableLambda), which add batch and async support to your function, along with native tracing and debugging.
If you add a node to graph without specifying a name, it will be given a default name equivalent to the function name.
```python
builder.add_node(my_node)
# You can then create edges to/from this node by referencing it as `"my_node"`
```
### `START` Node
The `START` Node is a special node that represents the node sends user input to the graph. The main purpose for referencing this node is to determine which nodes should be called first.
```python
from langgraph.graph import START
graph.add_edge(START, "node_a")
```
### `END` Node
The `END` Node is a special node that represents a terminal node. This node is referenced when you want to denote which edges have no actions after they are done.
```
from langgraph.graph import END
graph.add_edge("node_a", END)
```
## Edges
Edges define how the logic is routed and how the graph decides to stop. This is a big part of how your agents work and how different nodes communicate with each other. There are a few key types of edges:
- Normal Edges: Go directly from one node to the next.
- Conditional Edges: Call a function to determine which node(s) to go to next.
- Entry Point: Which node to call first when user input arrives.
- Conditional Entry Point: Call a function to determine which node(s) to call first when user input arrives.
A node can have MULTIPLE outgoing edges. If a node has multiple out-going edges, **all** of those destination nodes will be executed in parallel as a part of the next superstep.
### Normal Edges
If you **always** want to go from node A to node B, you can use the [add_edge][langgraph.graph.StateGraph.add_edge] method directly.
```python
graph.add_edge("node_a", "node_b")
```
### Conditional Edges
If you want to **optionally** route to 1 or more edges (or optionally terminate), you can use the [add_conditional_edges][langgraph.graph.StateGraph.add_conditional_edges] method. This method accepts the name of a node and a "routing function" to call after that node is executed:
```python
graph.add_conditional_edges("node_a", routing_function)
```
Similar to nodes, the `routing_function` accept the current `state` of the graph and return a value.
By default, the return value `routing_function` is used as the name of the node (or a list of nodes) to send the state to next. All those nodes will be run in parallel as a part of the next superstep.
You can optionally provide a dictionary that maps the `routing_function`'s output to the name of the next node.
```python
graph.add_conditional_edges("node_a", routing_function, {True: "node_b", False: "node_c"})
```
### Entry Point
The entry point is the first node(s) that are run when the graph starts. You can use the [`add_edge`][langgraph.graph.StateGraph.add_edge] method from the virtual [`START`][start] node to the first node to execute to specify where to enter the graph.
```python
from langgraph.graph import START
graph.add_edge(START, "node_a")
```
### Conditional Entry Point
A conditional entry point lets you start at different nodes depending on custom logic. You can use [`add_conditional_edges`][langgraph.graph.StateGraph.add_conditional_edges] from the virtual [`START`][start] node to accomplish this.
```python
from langgraph.graph import START
graph.add_conditional_edges(START, routing_function)
```
You can optionally provide a dictionary that maps the `routing_function`'s output to the name of the next node.
```python
graph.add_conditional_edges(START, routing_function, {True: "node_b", False: "node_c"})
```
## `Send`
By default, `Nodes` and `Edges` are defined ahead of time and operate on the same shared state. However, there can be cases where the exact edges are not known ahead of time and/or you may want different versions of `State` to exist at the same time. A common of example of this is with `map-reduce` design patterns. In this design pattern, a first node may generate a list of objects, and you may want to apply some other node to all those objects. The number of objects may be unknown ahead of time (meaning the number of edges may not be known) and the input `State` to the downstream `Node` should be different (one for each generated object).
To support this design pattern, LangGraph supports returning [`Send`](../reference/graphs.md#send) objects from conditional edges. `Send` takes two arguments: first is the name of the node, and second is the state to pass to that node.
```python
def continue_to_jokes(state: OverallState):
return [Send("generate_joke", {"subject": s}) for s in state['subjects']]
graph.add_conditional_edges("node_a", continue_to_jokes)
```
## Checkpointer
LangGraph has a built-in persistence layer, implemented through [checkpointers][basecheckpointsaver]. When you use a checkpointer with a graph, you can interact with the state of that graph. When you use a checkpointer with a graph, you can interact with and manage the graph's state. The checkpointer saves a _checkpoint_ of the graph state at every super-step, enabling several powerful capabilities:
First, checkpointers facilitate [human-in-the-loop workflows](agentic_concepts.md#human-in-the-loop) workflows by allowing humans to inspect, interrupt, and approve steps.Checkpointers are needed for these workflows as the human has to be able to view the state of a graph at any point in time, and the graph has to be to resume execution after the human has made any updates to the state.
Second, it allows for ["memory"](agentic_concepts.md#memory) between interactions. You can use checkpointers to create threads and save the state of a thread after a graph executes. In the case of repeated human interactions (like conversations) any follow up messages can be sent to that checkpoint, which will retain its memory of previous ones.
See [this guide](../how-tos/persistence.ipynb) for how to add a checkpointer to your graph.
## Threads
Threads enable the checkpointing of multiple different runs, making them essential for multi-tenant chat applications and other scenarios where maintaining separate states is necessary. A thread is a unique ID assigned to a series of checkpoints saved by a checkpointer. When using a checkpointer, you must specify a `thread_id` or `thread_ts` when running the graph.
`thread_id` is simply the ID of a thread. This is always required
`thread_ts` can optionally be passed. This identifier refers to a specific checkpoint within a thread. This can be used to kick of a run of a graph from some point halfway through a thread.
You must pass these when invoking the graph as part of the configurable part of the config.
```python
config = {"configurable": {"thread_id": "a"}}
graph.invoke(inputs, config=config)
```
See [this guide](../how-tos/persistence.ipynb) for how to use threads.
## Checkpointer state
When interacting with the checkpointer state, you must specify a [thread identifier](#threads).Each checkpoint saved by the checkpointer has two properties:
- **values**: This is the value of the state at this point in time.
- **next**: This is a tuple of the nodes to execute next in the graph.
### Get state
You can get the state of a checkpointer by calling `graph.get_state(config)`. The config should contain `thread_id`, and the state will be fetched for that thread.
### Get state history
You can also call `graph.get_state_history(config)` to get a list of the history of the graph. The config should contain `thread_id`, and the state history will be fetched for that thread.
### Update state
You can also interact with the state directly and update it. This takes three different components:
- config
- values
- `as_node`
**config**
The config should contain `thread_id` specifying which thread to update.
**values**
These are the values that will be used to update the state. Note that this update is treated exactly as any update from a node is treated. This means that these values will be passed to the [reducer](#reducers) functions that are part of the state. So this does NOT automatically overwrite the state. Let's walk through an example.
Let's assume you have defined the state of your graph as:
```python
from typing import TypedDict, Annotated
from operator import add
class State(TypedDict):
foo: int
bar: Annotated[list[str], add]
```
Let's now assume the current state of the graph is
```
{"foo": 1, "bar": ["a"]}
```
If you update the state as below:
```
graph.update_state(config, {"foo": 2, "bar": ["b"]})
```
Then the new state of the graph will be:
```
{"foo": 2, "bar": ["a", "b"]}
```
The `foo` key is completely changed (because there is no reducer specified for that key, so it overwrites it). However, there is a reducer specified for the `bar` key, and so it appends `"b"` to the state of `bar`.
**`as_node`**
The final thing you specify when calling `update_state` is `as_node`. This update will be applied as if it came from node `as_node`. If `as_node` is not provided, it will be set to the last node that updated the state, if not ambiguous.
The reason this matters is that the next steps in the graph to execute depend on the last node to have given an update, so this can be used to control which node executes next.
## Graph Migrations
LangGraph can easily handle migrations of graph definitions (nodes, edges, and state) even when using a checkpointer to track state.
- For threads at the end of the graph (i.e. not interrupted) you can change the entire topology of the graph (i.e. all nodes and edges, remove, add, rename, etc)
- For threads currently interrupted, we support all topology changes other than renaming / removing nodes (as that thread could now be about to enter a node that no longer exists) -- if this is a blocker please reach out and we can prioritize a solution.
- For modifying state, we have full backwards and forwards compatibility for adding and removing keys
- State keys that are renamed lose their saved state in existing threads
- State keys whose types change in incompatible ways could currently cause issues in threads with state from before the change -- if this is a blocker please reach out and we can prioritize a solution.
## Configuration
When creating a graph, you can also mark that certain parts of the graph are configurable. This is commonly done to enable easily switching between models or system prompts. This allows you to create a single "cognitive architecture" (the graph) but have multiple different instance of it.
You can optionally specify a `config_schema` when creating a graph.
```python
class ConfigSchema(TypedDict):
llm: str
graph = StateGraph(State, config_schema=ConfigSchema)
```
You can then pass this configuration into the graph using the `configurable` config field.
```python
config = {"configurable": {"llm": "anthropic"}}
graph.invoke(inputs, config=config)
```
You can then access and use this configuration inside a node:
```python
def node_a(state, config):
llm_type = config.get("configurable", {}).get("llm", "openai")
llm = get_llm(llm_type)
...
```
See [this guide](../how-tos/configuration.ipynb) for a full breakdown on configuration
## Breakpoints
It can often be useful to set breakpoints before or after certain nodes execute. This can be used to wait for human approval before continuing. These can be set when you ["compile" a graph](#compiling-your-graph). You can set breakpoints either _before_ a node executes (using `interrupt_before`) or after a node executes (using `interrupt_after`.)
You **MUST** use a [checkpoiner](#checkpointer) when using breakpoints. This is because your graph needs to be able to resume execution.
In order to resume execution, you can just invoke your graph with `None` as the input.
```python
# Initial run of graph
graph.invoke(inputs, config=config)
# Let's assume it hit a breakpoint somewhere, you can then resume by passing in None
graph.invoke(None, config=config)
```
See [this guide](../how-tos/human_in_the_loop/breakpoints.ipynb) for a full walkthrough of how to add breakpoints.
## Visualization
It's often nice to be able to visualize graphs, especially as they get more complex. LangGraph comes with several built-in ways to visualize graphs. See [this how-to guide](../how-tos/visualization.ipynb) for more info.
## Streaming
LangGraph is built with first class support for streaming. There are several different streaming modes that LangGraph supports:
- [`"values"`](../how-tos/stream-values.ipynb): This streams the full value of the state after each step of the graph.
- [`"updates`](../how-tos/stream-updates.ipynb): This streams the updates to the state after each step of the graph. If multiple updates are made in the same step (e.g. multiple nodes are run) then those updates are streamed separately.
- `"debug"`: This streams as much information as possible throughout the execution of the graph.
In addition, you can use the [`astream_events`](../how-tos/streaming-events-from-within-tools.ipynb) method to stream back events that happen _inside_ nodes. This is useful for [streaming tokens of LLM calls](../how-tos/streaming-tokens.ipynb).
-5
View File
@@ -1,5 +0,0 @@
tags:
- how-tos
- how-to
- howto
- how to
-89
View File
@@ -1,89 +0,0 @@
---
hide:
- toc
---
# How-to guides
Welcome to the LangGraph how-to guides! These guides provide practical, step-by-step instructions for accomplishing key tasks in LangGraph.
## Controllability
LangGraph is known for being a highly controllable agent framework.
These how-to guides show how to achieve that controllability.
- [How to create subgraphs](subgraph.ipynb)
- [How to create branches for parallel execution](branching.ipynb)
- [How to create map-reduce branches for parallel execution](map-reduce.ipynb)
## Persistence
LangGraph makes it easy to persist state across graph runs. The guide below shows how to add persistence to your graph.
- [How to add persistence ("memory") to your graph](persistence.ipynb)
- [How to manage conversation history](memory/manage-conversation-history.ipynb)
- [How to delete messages](memory/delete-messages.ipynb)
- [How to add summary conversation memory](memory/add-summary-conversation-history.ipynb)
- [How to create a custom checkpointer using Postgres](persistence_postgres.ipynb)
- [How to create a custom checkpointer using MongoDB](persistence_mongodb.ipynb)
- [How to create a custom checkpointer using Redis](persistence_redis.ipynb)
## Human in the Loop
One of LangGraph's main benefits is that it makes human-in-the-loop workflows easy.
These guides cover common examples of that.
- [How to add breakpoints](human_in_the_loop/breakpoints.ipynb)
- [How to edit graph state](human_in_the_loop/edit-graph-state.ipynb)
- [How to wait for user input](human_in_the_loop/wait-user-input.ipynb)
- [How to view and update past graph state](human_in_the_loop/time-travel.ipynb)
## Streaming
LangGraph is built to be streaming first.
These guides show how to use different streaming modes.
- [How to stream full state of your graph](stream-values.ipynb)
- [How to stream state updates of your graph](stream-updates.ipynb)
- [How to stream LLM tokens](streaming-tokens.ipynb)
- [How to stream LLM tokens without LangChain models](streaming-tokens-without-langchain.ipynb)
- [How to stream arbitrarily nested content](streaming-content.ipynb)
- [How to configure multiple streaming modes at the same time](stream-multiple.ipynb)
- [How to stream events from within a tool](streaming-events-from-within-tools.ipynb)
- [How to stream events from within a tool without LangChain models](streaming-events-from-within-tools-without-langchain.ipynb)
- [How to stream events from the final node](streaming-from-final-node.ipynb)
## Tool calling
- [How to call tools using ToolNode](tool-calling.ipynb)
- [How to handle tool calling errors](tool-calling-errors.ipynb)
- [How to pass graph state to tools](pass-run-time-values-to-tools.ipynb)
- [How to pass config to tools](pass-config-to-tools.ipynb)
- [How to handle large numbers of tools](many-tools.ipynb)
## State Management
- [Use Pydantic model as state](state-model.ipynb)
- [Use a context object in state](state-context-key.ipynb)
- [Have a separate input and output schema](input_output_schema.ipynb)
- [Pass private state between nodes inside the graph](pass_private_state.ipynb)
## Other
- [How to run graph asynchronously](async.ipynb)
- [How to visualize your graph](visualization.ipynb)
- [How to add runtime configuration to your graph](configuration.ipynb)
- [How to use a Pydantic model as your state](state-model.ipynb)
- [How to use a context object in state](state-context-key.ipynb)
- [How to add node retries](node-retries.ipynb)
## Prebuilt ReAct Agent
These guides show how to use the prebuilt ReAct agent.
Please note that here will we use a **prebuilt agent**. One of the big benefits of LangGraph is that you can easily create your own agent architectures. So while it's fine to start here to build an agent quickly, we would strongly recommend learning how to build your own agent so that you can take full advantage of LangGraph.
- [How to create a ReAct agent](create-react-agent.ipynb)
- [How to add memory to a ReAct agent](create-react-agent-memory.ipynb)
- [How to add a custom system prompt to a ReAct agent](create-react-agent-system-prompt.ipynb)
- [How to add human-in-the-loop processes to a ReAct agent](create-react-agent-hitl.ipynb)

Some files were not shown because too many files have changed in this diff Show More