Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bcf9ec4
Update LG version
hinthornw Aug 20, 2025
88832fe
Update to include
hinthornw Sep 12, 2025
706c656
chore: bump langgraph to v1.0
casparb Oct 17, 2025
ceb1c6f
lint
casparb Oct 17, 2025
f675777
chore: bump langgraph to v1.0 (#29)
casparb Oct 17, 2025
e2e26fc
fix: int test
casparb Oct 17, 2025
80f68ce
remove print
casparb Oct 17, 2025
8c80639
remove unused import
casparb Oct 17, 2025
696f2ad
fix: int test (#30)
casparb Oct 17, 2025
f0b8cf2
Update README.md
casparb Oct 18, 2025
76c9a3e
Update cli version
hinthornw Nov 3, 2025
d0ef162
Remove uv.lock from .gitignore (#32)
rahul-langchain Dec 2, 2025
f5726ab
Bump CLI dep
hinthornw Dec 15, 2025
0e68628
Bump lockfile
hinthornw Jan 16, 2026
9a144d8
Bump the uv group across 1 directory with 4 updates
dependabot[bot] Feb 26, 2026
60c5d79
Bump the uv group across 1 directory with 4 updates (#33)
jkennedyvz Feb 26, 2026
0678999
Bump the uv group across 1 directory with 2 updates
dependabot[bot] Mar 12, 2026
e139f54
Bump the uv group across 1 directory with 2 updates (#35)
jkennedyvz Mar 16, 2026
f3f63c8
Bump requests from 2.32.5 to 2.33.0 in the uv group across 1 directory
dependabot[bot] Mar 26, 2026
cd860dd
Bump requests from 2.32.5 to 2.33.0 in the uv group across 1 director…
jkennedyvz Mar 27, 2026
0ce2ee3
ci: add minimum workflow permissions
jkennedyvz Mar 27, 2026
535f958
ci: add minimum workflow permissions (#38)
jkennedyvz Mar 27, 2026
9c18f26
Bump langchain-core in the uv group across 1 directory
dependabot[bot] Mar 28, 2026
47f6f18
Bump langchain-core from 1.2.11 to 1.2.22 in the uv group across 1 di…
jkennedyvz Apr 1, 2026
7af025f
Bump cryptography in the uv group across 1 directory
dependabot[bot] Apr 1, 2026
6e4b8f1
Bump cryptography from 46.0.5 to 46.0.6 in the uv group across 1 dire…
jkennedyvz Apr 1, 2026
954a7fb
fix: constrain pyjwt>=2.12.0 to resolve CVE-2026-32597
jkennedyvz Apr 1, 2026
3ee366a
fix: patch 1 security alert (high severity) (#42)
jkennedyvz Apr 1, 2026
64daef5
chore(deps): bump aiohttp in the uv group across 1 directory
dependabot[bot] Apr 1, 2026
8a29256
chore(deps): bump aiohttp from 3.13.3 to 3.13.4 in the uv group acros…
jkennedyvz Apr 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- cron: "37 14 * * *" # Run at 7:37 AM Pacific Time (14:37 UTC) every day
workflow_dispatch: # Allows triggering the workflow manually in GitHub UI

permissions:
contents: read

# If another scheduled run starts while this workflow is still running,
# cancel the earlier run in favor of the next run.
concurrency:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
workflow_dispatch: # Allows triggering the workflow manually in GitHub UI

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.
concurrency:
Expand Down Expand Up @@ -42,12 +45,12 @@ jobs:
uv pip install mypy
uv run mypy --strict src/
- name: Check README spelling
uses: codespell-project/actions-codespell@v2
uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # v2
with:
ignore_words_file: .codespellignore
path: README.md
- name: Check code spelling
uses: codespell-project/actions-codespell@v2
uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 # v2
with:
ignore_words_file: .codespellignore
path: src/
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
__pycache__/
*.py[cod]
*$py.class
uv.lock

# C extensions
*.so
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ TEST_FILE ?= tests/unit_tests/
test:
python -m pytest $(TEST_FILE)

integration_tests:
python -m pytest tests/integration_tests

test_watch:
python -m ptw --snapshot-update --now . -- -vv tests/unit_tests

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# LangGraph ReAct Agent Template

[![CI](https://github.com/langchain-ai/react-agent/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/langchain-ai/react-agent/actions/workflows/unit-tests.yml)
[![Integration Tests](https://github.com/langchain-ai/react-agent/actions/workflows/integration-tests.yml/badge.svg)](https://github.com/langchain-ai/react-agent/actions/workflows/integration-tests.yml)
[![Open in - LangGraph Studio](https://img.shields.io/badge/Open_in-LangGraph_Studio-00324d.svg?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI4NS4zMzMiIGhlaWdodD0iODUuMzMzIiB2ZXJzaW9uPSIxLjAiIHZpZXdCb3g9IjAgMCA2NCA2NCI+PHBhdGggZD0iTTEzIDcuOGMtNi4zIDMuMS03LjEgNi4zLTYuOCAyNS43LjQgMjQuNi4zIDI0LjUgMjUuOSAyNC41QzU3LjUgNTggNTggNTcuNSA1OCAzMi4zIDU4IDcuMyA1Ni43IDYgMzIgNmMtMTIuOCAwLTE2LjEuMy0xOSAxLjhtMzcuNiAxNi42YzIuOCAyLjggMy40IDQuMiAzLjQgNy42cy0uNiA0LjgtMy40IDcuNkw0Ny4yIDQzSDE2LjhsLTMuNC0zLjRjLTQuOC00LjgtNC44LTEwLjQgMC0xNS4ybDMuNC0zLjRoMzAuNHoiLz48cGF0aCBkPSJNMTguOSAyNS42Yy0xLjEgMS4zLTEgMS43LjQgMi41LjkuNiAxLjcgMS44IDEuNyAyLjcgMCAxIC43IDIuOCAxLjYgNC4xIDEuNCAxLjkgMS40IDIuNS4zIDMuMi0xIC42LS42LjkgMS40LjkgMS41IDAgMi43LS41IDIuNy0xIDAtLjYgMS4xLS44IDIuNi0uNGwyLjYuNy0xLjgtMi45Yy01LjktOS4zLTkuNC0xMi4zLTExLjUtOS44TTM5IDI2YzAgMS4xLS45IDIuNS0yIDMuMi0yLjQgMS41LTIuNiAzLjQtLjUgNC4yLjguMyAyIDEuNyAyLjUgMy4xLjYgMS41IDEuNCAyLjMgMiAyIDEuNS0uOSAxLjItMy41LS40LTMuNS0yLjEgMC0yLjgtMi44LS44LTMuMyAxLjYtLjQgMS42LS41IDAtLjYtMS4xLS4xLTEuNS0uNi0xLjItMS42LjctMS43IDMuMy0yLjEgMy41LS41LjEuNS4yIDEuNi4zIDIuMiAwIC43LjkgMS40IDEuOSAxLjYgMi4xLjQgMi4zLTIuMy4yLTMuMi0uOC0uMy0yLTEuNy0yLjUtMy4xLTEuMS0zLTMtMy4zLTMtLjUiLz48L3N2Zz4=)](https://langgraph-studio.vercel.app/templates/open?githubUrl=https://github.com/langchain-ai/react-agent)

This template showcases a [ReAct agent](https://arxiv.org/abs/2210.03629) implemented using [LangGraph](https://github.com/langchain-ai/langgraph), designed for [LangGraph Studio](https://github.com/langchain-ai/langgraph-studio). ReAct agents are uncomplicated, prototypical agents that can be flexibly extended to many tools.
Expand Down Expand Up @@ -41,7 +40,7 @@ The primary [search tool](./src/react_agent/tools.py) [^1] used is [Tavily](http
The defaults values for `model` are shown below:

```yaml
model: anthropic/claude-3-5-sonnet-20240620
model: claude-sonnet-4-5-20250929
```

Follow the instructions below to get set up, or pick one of the additional options.
Expand Down
1 change: 1 addition & 0 deletions langgraph.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://langgra.ph/schema.json",
"dependencies": ["."],
"graphs": {
"agent": "./src/react_agent/graph.py:graph"
Expand Down
10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11,<4.0"
dependencies = [
"langgraph>=0.6.0,<0.7.0",
"langgraph>=1.0.0",
"langchain-openai>=0.1.22",
"langchain-anthropic>=0.1.23",
"langchain>=0.2.14",
Expand Down Expand Up @@ -60,8 +60,14 @@ lint.ignore = [
[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.uv]
# CVE-2026-32597: pyjwt < 2.12.0 accepts unknown `crit` header extensions.
# Transitive via langgraph-api -> pyjwt. Remove once langgraph-api requires pyjwt>=2.12.0.
constraint-dependencies = ["pyjwt>=2.12.0"]

[dependency-groups]
dev = [
"langgraph-cli[inmem]>=0.1.71",
"anyio>=4.7.0",
"langgraph-cli[inmem]>=0.4.10",
"pytest>=8.3.5",
]
2 changes: 1 addition & 1 deletion src/react_agent/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Context:
)

model: Annotated[str, {"__template_metadata__": {"kind": "llm"}}] = field(
default="anthropic/claude-3-5-sonnet-20240620",
default="anthropic/claude-sonnet-4-5-20250929",
metadata={
"description": "The name of the language model to use for the agent's main interactions. "
"Should be in the form: provider/model-name."
Expand Down
2 changes: 1 addition & 1 deletion src/react_agent/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def call_model(
)

# Get the model's response
response = cast(
response = cast( # type: ignore[redundant-cast]
AIMessage,
await model.ainvoke(
[{"role": "system", "content": system_message}, *state.messages]
Expand Down
7 changes: 7 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pytest


@pytest.fixture(scope="session")
def anyio_backend():
return "asyncio"

5 changes: 2 additions & 3 deletions tests/integration_tests/test_graph.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import pytest
from langsmith import unit

from react_agent import graph
from react_agent.context import Context

pytestmark = pytest.mark.anyio


@pytest.mark.asyncio
@unit
async def test_react_agent_simple_passthrough() -> None:
res = await graph.ainvoke(
{"messages": [("user", "Who is the founder of LangChain?")]}, # type: ignore
Expand Down
Loading