Commit Graph
58 Commits
Author SHA1 Message Date
Mason DaughertyGitHubopen-swe[bot] <open-swe@users.noreply.github.com>
bdb8a9c7a4 feat: route LangSmith traces from thread streams (#8723)
## Description
Expose the existing `langsmith_tracing` option on Python sync and async
thread-stream run starts and forward it through the protocol.

## Release Note
Python thread streams can route traces to an additional LangSmith
project per run.

## Test Plan
- [x] Verify sync and async run-start payloads include tracing settings

## Related PRs
- langchain-ai/agent-protocol#95
- langchain-ai/langgraphjs#2745
- langchain-ai/langgraph-api#4033

Made by [Open
SWE](https://openswe.vercel.app/agents/f9e34294-b9c3-52f0-815a-0102188e1181)

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
2026-08-26 16:57:39 -04:00
Mason DaughertyandGitHub 97320843fe ci(deps): pin GitHub Actions to commit SHAs (#8065)
Every third-party GitHub Action in the workflows is now pinned to a full
commit SHA instead of a floating major tag, closing a supply-chain gap
where a mutable tag like `@v6` could be force-pushed to point at
malicious code. Seven actions were already SHA-pinned; this brings the
remaining first-party `actions/*` and `astral-sh/setup-uv` references in
line.

## Changes
- Pinned all previously tag-referenced actions to their current commit
SHA with the exact release as a trailing comment (the format Dependabot
reads and updates): `actions/checkout` → `v6.0.3`,
`actions/setup-python` → `v6.2.0`, `actions/github-script` → `v9.0.0`,
`actions/upload-artifact` → `v7.0.1`, `actions/download-artifact` →
`v8.0.1`, `actions/cache/{restore,save}` → `v5.0.5`,
`actions/configure-pages` → `v6.0.0`, `actions/deploy-pages` → `v5.0.0`,
`actions/upload-pages-artifact` → `v5.0.0`,
`actions/create-github-app-token` → `v3.2.0`, and `astral-sh/setup-uv` →
`v7.6.0`.
- Applied across all workflow files plus the `uv_setup` composite
action; local same-repo references (`./.github/workflows/_*.yml`,
`./.github/actions/uv_setup`) left as path refs since they resolve from
the same commit.
2026-06-12 21:29:40 -04:00
Mason DaughertyandGitHub 8558481859 docs: standardize package README.md structure (#8064)
Aligns the repository's package READMEs around a shared documentation
shape so users see consistent install, positioning, docs, release, and
contribution guidance across LangGraph packages.
2026-06-12 19:32:10 -04:00
Mason DaughertyandGitHub 7ab79f9f3e release(langgraph): 1.2.5 (#8062) 2026-06-12 16:26:18 -04:00
Mason DaughertyandGitHub 385033fd9c fix(langgraph): merge lc_versions config metadata (#8052)
Preserve LangChain package-version trace metadata when graph-bound
config and invoke-time config both contribute `lc_versions`. The earlier
broad nested metadata merge has been narrowed to the LangChain-owned
`lc_versions` namespace, so arbitrary user metadata keeps the existing
last-writer-wins behavior.

## Changes

- Add a shared metadata merge path used by `merge_configs()` and
`ensure_config()` so top-level metadata keys are preserved across bound
and runtime configs.
- Special-case only `metadata["lc_versions"]` for one-level
package-version accumulation; duplicate package entries remain
last-writer-wins and non-mapping values still replace.
- Keep generic nested metadata maps, including user-owned
`metadata["versions"]`, as replacement-only to avoid changing arbitrary
metadata semantics.
- Raise the `langchain-core` lower bound to `>=1.4.7` so LangGraph’s
`lc_versions` handling aligns with the lc-core package-version
instrumentation.
- Cover both config merge helpers with tests for `lc_versions`
accumulation, non-recursive replacement within the package map, generic
nested metadata replacement, and defensive copying of mapping values.

## Test note

The stream event assertions for `test_imp_exception` now avoid depending
on leaked internal task-path metadata. With older `langchain-core`,
callback metadata could be mutated by later task runs, so every task
event in this test appeared to have the final task path index. That made
even the `task_with_exception` start event report
`metadata["langgraph_node"] == "my_task"`, which is inconsistent with
the event name.

`langchain-core>=1.4.6` preserves per-event metadata more accurately:
the first `my_task`, `task_with_exception`, and second `my_task` report
distinct task path indexes. The test now asserts the stable behavior
instead: event sequence, tags, required metadata, root stream payloads,
exception handling, and final outputs, without requiring the old leaked
task index.
2026-06-12 16:20:38 -04:00
Mason DaughertyandGitHub 076e2a3627 fix(ci): avoid inline benchmark output interpolation (#7779)
Avoid interpolating changed-file and benchmark outputs directly into the
`github-script` source for benchmark annotations.
2026-05-12 22:27:38 -07:00
Mason DaughertyandGitHub 4a86705bd7 ci: disable uv cache in publish pipeline (#7777)
Disable `uv` dependency caching throughout the release workflow so
build, validation, PyPI publish, and GitHub release jobs do not restore
shared cache state.

Release jobs already pass the built distributions through explicit
artifacts; keeping dependency caches out of this path avoids
cache-poisoning risk and makes the existing pre-release validation
comment match the actual workflow behavior.
2026-05-12 10:10:50 -07:00
Mason DaughertyandGitHub 7eb2d8d6d8 ci: re-run require_issue_link check after PR reopen, close stale comments (#7403)
Combined:

(1)

After reopening a PR and removing the `missing-issue-link` label, the
`require_issue_link` check still shows as failed on the PR. Because the
default `GITHUB_TOKEN` suppresses event-driven re-triggers, the old red
check persists until the contributor pushes again. This adds a
best-effort re-run of the failed check so the PR's status clears
automatically on assignment.

(2)

When the `require_issue_link` workflow closes a PR and posts an
enforcement comment, that comment was never cleaned up after the
situation resolved — leaving a stale "automatically closed" message
visible on reopened PRs. Now all three resolution paths (maintainer
bypass, author fixing the issue link, and contributor assignment)
minimize the enforcement comment as outdated via GraphQL. The cleanup is
best-effort: failures log a warning but never block the primary workflow
logic (label removal, bypass, reopen).
2026-04-03 11:32:14 -04:00
Mason DaughertyandGitHub c965a483e8 ci: minimize stale enforcement comments on pr reopen (#7365)
When the `require_issue_link` workflow closes a PR and posts an
enforcement comment, that comment was never cleaned up after the
situation resolved — leaving a stale "automatically closed" message
visible on reopened PRs. Now all three resolution paths (maintainer
bypass, author fixing the issue link, and contributor assignment)
minimize the enforcement comment as outdated via GraphQL. The cleanup is
best-effort: failures log a warning but never block the primary workflow
logic (label removal, bypass, reopen).
2026-03-31 15:39:29 -04:00
Mason DaughertyandGitHub d344a22dfb ci: auto-reopen PRs on issue assignment (#7358)
`require_issue_link.yml` auto-closes external PRs when the author isn't
assigned to the linked issue, but there was no trigger to reopen them
when a maintainer later grants the assignment. Contributors had to
manually edit their PR description to trigger re-evaluation — poor UX
that generated repeat questions. This adds a companion workflow that
listens for issue assignment events and reopens matching PRs
automatically.
2026-03-30 20:54:02 -04:00
Mason DaughertyandGitHub e74864ab0c fix(ci): use repo permissions instead of org membership for maintainer override (#7268)
The `require_issue_link` workflow's maintainer override (reopen PR or
remove `missing-issue-link` to bypass enforcement) has never worked. It
calls `orgs.getMembershipForUser` to verify the sender is an org member,
but `GITHUB_TOKEN` is a GitHub App installation token — not an org
member — so the endpoint always returns 403. The catch block only
handled 404, so the unhandled 403 crashed the entire job, blocking even
the normal issue-link validation from running.

## Changes
- Replace `orgs.getMembershipForUser` with
`repos.getCollaboratorPermissionLevel` in `senderIsOrgMember()` — checks
if the event sender (the user who reopened the PR or removed the label)
has write/maintain/admin access on the repo, which works with
`GITHUB_TOKEN` and is a better proxy for "maintainer" than org
membership
2026-03-24 07:03:16 +00:00
Mason DaughertyandGitHub 11f4d3339f chore: extract reusable uv_setup composite action (#7262)
Extract a composite GitHub Action for Python + uv setup, replacing 12
scattered `astral-sh/setup-uv@v7` calls with a single reusable
`uv_setup` action that scopes cache dependency globs per library. Also
tightens issue template language and fixes a broken expression in the
release-test workflow.

## Changes

- Add `.github/actions/uv_setup/action.yml` — composite action wrapping
`astral-sh/setup-uv@v7` with a `working-directory` input that scopes
`cache-dependency-glob` to `<dir>/pyproject.toml`, `<dir>/uv.lock`, and
`<dir>/requirements*.txt`
- Migrate all workflow files (`_test.yml`, `_lint.yml`,
`_test_langgraph.yml`, `_integration_test.yml`, `baseline.yml`,
`bench.yml`, `ci.yml`, `release.yml`, `_test_release.yml`,
`uv_lock_ugprade.yml`) from inline `astral-sh/setup-uv@v7` to
`./.github/actions/uv_setup`, passing library-specific
`working-directory` for cache scoping
- Fix typo in `_test_release.yml` step name: `$${ env.PYTHON_VERSION }}`
→ `${{ env.PYTHON_VERSION }}`
- Disable uv cache for the release smoke-test job (`enable-cache:
false`) since it installs from PyPI, not the local lockfile
- Update `config.yml` API reference URL to point to `/python/langgraph/`
instead of `/python/`
- Tighten `privileged.yml` — shorter description, add English language
policy link, add "do not begin work unless assigned" notice
2026-03-24 00:25:58 -04:00
Mason DaughertyandGitHub c8c1b71db0 chore: update templates (#7261) 2026-03-24 00:17:49 -04:00
Mason DaughertyandGitHub 84d7b07031 docs: further README.md refinements (#7188) 2026-03-16 00:06:51 -04:00
Mason DaughertyandGitHub fd8cef77ce docs: restyle README.md to match langchain repo layout (#7187)
Restyle `README.md` to match the `langchain` monorepo's layout: centered
logo with link, tagline `<h3>`, centered badges wrapped in `<a>` tags,
dedicated **Documentation** / **Discussions** callout sections, and
consistent heading/bullet formatting. Add `.markdownlint.json` (ported
from `langchain`) to suppress expected inline-HTML lint warnings.
2026-03-15 23:58:21 -04:00
Mason DaughertyandGitHub 81489ab858 chore: fix typo (#7131) 2026-03-12 14:44:24 +00:00
Mason DaughertyandGitHub f702729e04 chore: add make type target for type checking (#6748) 2026-02-21 05:13:38 +00:00
Mason DaughertyandGitHub f6d95abbe3 docs(prebuilt): update warning for create_react_agent (#6760) 2026-02-06 15:08:08 -05:00
Mason DaughertyandGitHub f688b068e7 chore(infra): update AGENTS.md for inline code formatting guidelines (#6752) 2026-02-05 18:32:08 -05:00
Mason DaughertyandGitHub c94e7b96ac chore: update contributing/templates (#6732)
Supersedes #6703 -- thanks to @Ramakrishna1967 for flagging
2026-01-30 09:18:18 -08:00
Mason DaughertyandGitHub 2dd39432a3 docs: enhance Runtime and ToolRuntime class descriptions for clarity (#6689) 2026-01-26 13:22:54 -08:00
Mason DaughertyandGitHub 3ff6340379 docs: add clarity to use of thread_id (#6515) 2026-01-26 12:09:01 -08:00
Mason DaughertyandGitHub 0a6145fd72 docs: add docstrings to add_node overloads (#6514)
They were missing `Args` sections, and IDEs don't pick these up from the
canonical.

Each overload now includes the full `Args:` documentation, examples
tailored to that specific signature, and `Returns:` section.
2026-01-26 11:48:34 -08:00
Mason DaughertyandGitHub fbcb8a911b docs: update notebook links and add archival notices for examples (#6720)
Addresses some comments in #6682

- Update links in notebooks to point to the new documentation location.
- Add archival notices indicating that the examples are no longer
updated.
- Remove some obsolete notebooks that have been moved to the new
documentation.

Please comment here if you encounter any issues
2026-01-26 06:00:16 +00: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
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
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
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
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
Mason DaughertyandGitHub 7d557cb865 chore: fix links for docs (#6538) 2025-12-05 23:09:41 +00:00
Mason DaughertyandGitHub 02bb7a436a chore: remove erroneous release title prefix (#6528) 2025-12-02 13:45:43 -05:00
Mason DaughertyandGitHub 630bd9ab95 fix: release name should be same as package name (#6503) 2025-11-25 19:02:44 -05:00
Mason DaughertyandGitHub d45f52ab0c chore: clean up some refs (#6487) 2025-11-23 02:13:30 -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
Mason DaughertyandGitHub c2ef3f3fd3 fix: remove SDK inline links (#6307)
these were broken; remove for now.
2025-11-07 07:56:00 -05:00
Mason DaughertyandGitHub 0f83d9fafe style: update docstrings to reference StateGraph (#6308)
nit
2025-11-07 07:47:29 -05:00
Mason DaughertyandGitHub 4ec92f9fb1 chore: add pyproject.toml links (#6364) 2025-11-07 07:43:51 -05:00
Mason DaughertyandGitHub a6dde39be7 chore: style fixes for refs (#6365) 2025-10-30 17:59:40 -04:00
Mason DaughertyandGitHub 10abf2deb1 fix: replace python.langchain links with new docs.langchain (#6352) 2025-10-27 13:36:12 -04:00
Mason DaughertyandGitHub 7e666b58cd style: fixes for ref docs (#6297) 2025-10-16 20:58:16 -04: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
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
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
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
Mason DaughertyandGitHub b5afec4b2a chore: add PR template (#5491) 2025-07-15 14:48:59 -04: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