Skip to content

Commit 72a05ce

Browse files
authored
feat(llmobs): langgraph submits agent manifest (#13904)
Annotates LangGraph agents (compiled state graphs, even those created through `create_react_agent`) with the following agent metadata information: - name (always) - tools (always - best effort, depending on the presence of `ToolNode`s within the agent) - instructions (if done through `create_react_agent`) - model name, provider, & settings (if done through `create_react_agent`) - handoffs (always - assuming the agent is directly a part of a supergraph) - framework (always) - dependencies (since state should always be passed in, always) - max_iterations (always, defaulting to 25 if not provided explicitly) Additionally, to help accomplish this, we patch the `create_react_agent` function to record agent manifest data on agent instance creation, should it be invoked. The means of doing this is a bit strange, as it is in completely different submodule (`langgraph.prebuilt`), and it required me to do what I think are some pretty not normal things for patching 😅 so, happy to discuss/change as needed! MLOB-3102 ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
1 parent c1c0b67 commit 72a05ce

31 files changed

+941
-152
lines changed

.riot/requirements/1f9e62b.txt renamed to .riot/requirements/1014e75.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,33 @@
22
# This file is autogenerated by pip-compile with Python 3.13
33
# by the following command:
44
#
5-
# pip-compile --allow-unsafe --no-annotate .riot/requirements/1f9e62b.in
5+
# pip-compile --allow-unsafe --no-annotate .riot/requirements/1014e75.in
66
#
77
annotated-types==0.7.0
8-
anyio==4.9.0
8+
anyio==4.10.0
99
attrs==25.3.0
10-
certifi==2025.7.14
10+
certifi==2025.8.3
1111
charset-normalizer==3.4.2
12-
coverage[toml]==7.10.1
12+
coverage[toml]==7.10.2
13+
distro==1.9.0
1314
h11==0.16.0
1415
httpcore==1.0.9
1516
httpx==0.28.1
1617
hypothesis==6.45.0
1718
idna==3.10
1819
iniconfig==2.1.0
20+
jiter==0.10.0
1921
jsonpatch==1.33
2022
jsonpointer==3.0.0
2123
langchain-core==0.3.72
24+
langchain-openai==0.3.28
2225
langgraph==0.3.22
2326
langgraph-checkpoint==2.1.1
2427
langgraph-prebuilt==0.1.8
2528
langgraph-sdk==0.1.74
26-
langsmith==0.4.8
29+
langsmith==0.4.10
2730
mock==5.2.0
31+
openai==1.98.0
2832
opentracing==2.4.0
2933
orjson==3.11.1
3034
ormsgpack==1.10.0
@@ -38,11 +42,14 @@ pytest-asyncio==1.1.0
3842
pytest-cov==6.2.1
3943
pytest-mock==3.14.1
4044
pyyaml==6.0.2
45+
regex==2025.7.34
4146
requests==2.32.4
4247
requests-toolbelt==1.0.0
4348
sniffio==1.3.1
4449
sortedcontainers==2.4.0
4550
tenacity==9.1.2
51+
tiktoken==0.9.0
52+
tqdm==4.67.1
4653
typing-extensions==4.14.1
4754
typing-inspection==0.4.1
4855
urllib3==2.5.0

.riot/requirements/1d59ef9.txt renamed to .riot/requirements/1053c1c.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,32 @@
22
# This file is autogenerated by pip-compile with Python 3.13
33
# by the following command:
44
#
5-
# pip-compile --allow-unsafe --no-annotate .riot/requirements/1d59ef9.in
5+
# pip-compile --allow-unsafe --no-annotate .riot/requirements/1053c1c.in
66
#
77
annotated-types==0.7.0
8-
anyio==4.9.0
8+
anyio==4.10.0
99
attrs==25.3.0
10-
certifi==2025.7.14
10+
certifi==2025.8.3
1111
charset-normalizer==3.4.2
12-
coverage[toml]==7.10.1
12+
coverage[toml]==7.10.2
13+
distro==1.9.0
1314
h11==0.16.0
1415
httpcore==1.0.9
1516
httpx==0.28.1
1617
hypothesis==6.45.0
1718
idna==3.10
1819
iniconfig==2.1.0
20+
jiter==0.10.0
1921
jsonpatch==1.33
2022
jsonpointer==3.0.0
2123
langchain-core==0.3.72
24+
langchain-openai==0.3.28
2225
langgraph==0.2.23
2326
langgraph-checkpoint==1.0.12
24-
langsmith==0.4.8
27+
langsmith==0.4.10
2528
mock==5.2.0
2629
msgpack==1.1.1
30+
openai==1.98.0
2731
opentracing==2.4.0
2832
orjson==3.11.1
2933
packaging==25.0
@@ -36,11 +40,14 @@ pytest-asyncio==1.1.0
3640
pytest-cov==6.2.1
3741
pytest-mock==3.14.1
3842
pyyaml==6.0.2
43+
regex==2025.7.34
3944
requests==2.32.4
4045
requests-toolbelt==1.0.0
4146
sniffio==1.3.1
4247
sortedcontainers==2.4.0
4348
tenacity==9.1.2
49+
tiktoken==0.9.0
50+
tqdm==4.67.1
4451
typing-extensions==4.14.1
4552
typing-inspection==0.4.1
4653
urllib3==2.5.0

.riot/requirements/f1266b6.txt renamed to .riot/requirements/12698b3.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,32 @@
22
# This file is autogenerated by pip-compile with Python 3.12
33
# by the following command:
44
#
5-
# pip-compile --allow-unsafe --no-annotate .riot/requirements/f1266b6.in
5+
# pip-compile --allow-unsafe --no-annotate .riot/requirements/12698b3.in
66
#
77
annotated-types==0.7.0
8-
anyio==4.9.0
8+
anyio==4.10.0
99
attrs==25.3.0
10-
certifi==2025.7.14
10+
certifi==2025.8.3
1111
charset-normalizer==3.4.2
12-
coverage[toml]==7.10.1
12+
coverage[toml]==7.10.2
13+
distro==1.9.0
1314
h11==0.16.0
1415
httpcore==1.0.9
1516
httpx==0.28.1
1617
hypothesis==6.45.0
1718
idna==3.10
1819
iniconfig==2.1.0
20+
jiter==0.10.0
1921
jsonpatch==1.33
2022
jsonpointer==3.0.0
2123
langchain-core==0.3.72
24+
langchain-openai==0.3.28
2225
langgraph==0.2.23
2326
langgraph-checkpoint==1.0.12
24-
langsmith==0.4.8
27+
langsmith==0.4.10
2528
mock==5.2.0
2629
msgpack==1.1.1
30+
openai==1.98.0
2731
opentracing==2.4.0
2832
orjson==3.11.1
2933
packaging==25.0
@@ -36,11 +40,14 @@ pytest-asyncio==1.1.0
3640
pytest-cov==6.2.1
3741
pytest-mock==3.14.1
3842
pyyaml==6.0.2
43+
regex==2025.7.34
3944
requests==2.32.4
4045
requests-toolbelt==1.0.0
4146
sniffio==1.3.1
4247
sortedcontainers==2.4.0
4348
tenacity==9.1.2
49+
tiktoken==0.9.0
50+
tqdm==4.67.1
4451
typing-extensions==4.14.1
4552
typing-inspection==0.4.1
4653
urllib3==2.5.0

.riot/requirements/125dc45.txt renamed to .riot/requirements/1a0fb10.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,35 @@
22
# This file is autogenerated by pip-compile with Python 3.9
33
# by the following command:
44
#
5-
# pip-compile --allow-unsafe --no-annotate .riot/requirements/125dc45.in
5+
# pip-compile --allow-unsafe --no-annotate .riot/requirements/1a0fb10.in
66
#
77
annotated-types==0.7.0
8-
anyio==4.9.0
8+
anyio==4.10.0
99
attrs==25.3.0
1010
backports-asyncio-runner==1.2.0
11-
certifi==2025.7.14
11+
certifi==2025.8.3
1212
charset-normalizer==3.4.2
13-
coverage[toml]==7.10.1
13+
coverage[toml]==7.10.2
14+
distro==1.9.0
1415
exceptiongroup==1.3.0
1516
h11==0.16.0
1617
httpcore==1.0.9
1718
httpx==0.28.1
1819
hypothesis==6.45.0
1920
idna==3.10
2021
iniconfig==2.1.0
22+
jiter==0.10.0
2123
jsonpatch==1.33
2224
jsonpointer==3.0.0
2325
langchain-core==0.3.72
26+
langchain-openai==0.3.28
2427
langgraph==0.3.21
2528
langgraph-checkpoint==2.1.1
2629
langgraph-prebuilt==0.1.8
2730
langgraph-sdk==0.1.74
28-
langsmith==0.4.8
31+
langsmith==0.4.10
2932
mock==5.2.0
33+
openai==1.98.0
3034
opentracing==2.4.0
3135
orjson==3.11.1
3236
ormsgpack==1.10.0
@@ -40,12 +44,15 @@ pytest-asyncio==1.1.0
4044
pytest-cov==6.2.1
4145
pytest-mock==3.14.1
4246
pyyaml==6.0.2
47+
regex==2025.7.34
4348
requests==2.32.4
4449
requests-toolbelt==1.0.0
4550
sniffio==1.3.1
4651
sortedcontainers==2.4.0
4752
tenacity==9.1.2
53+
tiktoken==0.9.0
4854
tomli==2.2.1
55+
tqdm==4.67.1
4956
typing-extensions==4.14.1
5057
typing-inspection==0.4.1
5158
urllib3==2.5.0

.riot/requirements/18eaa2d.txt renamed to .riot/requirements/1af577c.txt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,35 @@
22
# This file is autogenerated by pip-compile with Python 3.9
33
# by the following command:
44
#
5-
# pip-compile --allow-unsafe --no-annotate .riot/requirements/18eaa2d.in
5+
# pip-compile --allow-unsafe --no-annotate .riot/requirements/1af577c.in
66
#
77
annotated-types==0.7.0
8-
anyio==4.9.0
8+
anyio==4.10.0
99
attrs==25.3.0
1010
backports-asyncio-runner==1.2.0
11-
certifi==2025.7.14
11+
certifi==2025.8.3
1212
charset-normalizer==3.4.2
13-
coverage[toml]==7.10.1
13+
coverage[toml]==7.10.2
14+
distro==1.9.0
1415
exceptiongroup==1.3.0
1516
h11==0.16.0
1617
httpcore==1.0.9
1718
httpx==0.28.1
1819
hypothesis==6.45.0
1920
idna==3.10
2021
iniconfig==2.1.0
22+
jiter==0.10.0
2123
jsonpatch==1.33
2224
jsonpointer==3.0.0
2325
langchain-core==0.3.72
24-
langgraph==0.6.1
26+
langchain-openai==0.3.28
27+
langgraph==0.6.3
2528
langgraph-checkpoint==2.1.1
26-
langgraph-prebuilt==0.6.1
29+
langgraph-prebuilt==0.6.3
2730
langgraph-sdk==0.2.0
28-
langsmith==0.4.8
31+
langsmith==0.4.10
2932
mock==5.2.0
33+
openai==1.98.0
3034
opentracing==2.4.0
3135
orjson==3.11.1
3236
ormsgpack==1.10.0
@@ -40,12 +44,15 @@ pytest-asyncio==1.1.0
4044
pytest-cov==6.2.1
4145
pytest-mock==3.14.1
4246
pyyaml==6.0.2
47+
regex==2025.7.34
4348
requests==2.32.4
4449
requests-toolbelt==1.0.0
4550
sniffio==1.3.1
4651
sortedcontainers==2.4.0
4752
tenacity==9.1.2
53+
tiktoken==0.9.0
4854
tomli==2.2.1
55+
tqdm==4.67.1
4956
typing-extensions==4.14.1
5057
typing-inspection==0.4.1
5158
urllib3==2.5.0

.riot/requirements/a950a7b.txt renamed to .riot/requirements/1eac0e7.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,34 @@
22
# This file is autogenerated by pip-compile with Python 3.9
33
# by the following command:
44
#
5-
# pip-compile --allow-unsafe --no-annotate .riot/requirements/a950a7b.in
5+
# pip-compile --allow-unsafe --no-annotate .riot/requirements/1eac0e7.in
66
#
77
annotated-types==0.7.0
8-
anyio==4.9.0
8+
anyio==4.10.0
99
attrs==25.3.0
1010
backports-asyncio-runner==1.2.0
11-
certifi==2025.7.14
11+
certifi==2025.8.3
1212
charset-normalizer==3.4.2
13-
coverage[toml]==7.10.1
13+
coverage[toml]==7.10.2
14+
distro==1.9.0
1415
exceptiongroup==1.3.0
1516
h11==0.16.0
1617
httpcore==1.0.9
1718
httpx==0.28.1
1819
hypothesis==6.45.0
1920
idna==3.10
2021
iniconfig==2.1.0
22+
jiter==0.10.0
2123
jsonpatch==1.33
2224
jsonpointer==3.0.0
2325
langchain-core==0.3.72
26+
langchain-openai==0.3.28
2427
langgraph==0.2.23
2528
langgraph-checkpoint==1.0.12
26-
langsmith==0.4.8
29+
langsmith==0.4.10
2730
mock==5.2.0
2831
msgpack==1.1.1
32+
openai==1.98.0
2933
opentracing==2.4.0
3034
orjson==3.11.1
3135
packaging==25.0
@@ -38,12 +42,15 @@ pytest-asyncio==1.1.0
3842
pytest-cov==6.2.1
3943
pytest-mock==3.14.1
4044
pyyaml==6.0.2
45+
regex==2025.7.34
4146
requests==2.32.4
4247
requests-toolbelt==1.0.0
4348
sniffio==1.3.1
4449
sortedcontainers==2.4.0
4550
tenacity==9.1.2
51+
tiktoken==0.9.0
4652
tomli==2.2.1
53+
tqdm==4.67.1
4754
typing-extensions==4.14.1
4855
typing-inspection==0.4.1
4956
urllib3==2.5.0

.riot/requirements/a331a88.txt renamed to .riot/requirements/1fc16e5.txt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,33 @@
22
# This file is autogenerated by pip-compile with Python 3.11
33
# by the following command:
44
#
5-
# pip-compile --allow-unsafe --no-annotate .riot/requirements/a331a88.in
5+
# pip-compile --allow-unsafe --no-annotate .riot/requirements/1fc16e5.in
66
#
77
annotated-types==0.7.0
8-
anyio==4.9.0
8+
anyio==4.10.0
99
attrs==25.3.0
10-
certifi==2025.7.14
10+
certifi==2025.8.3
1111
charset-normalizer==3.4.2
12-
coverage[toml]==7.10.1
12+
coverage[toml]==7.10.2
13+
distro==1.9.0
1314
h11==0.16.0
1415
httpcore==1.0.9
1516
httpx==0.28.1
1617
hypothesis==6.45.0
1718
idna==3.10
1819
iniconfig==2.1.0
20+
jiter==0.10.0
1921
jsonpatch==1.33
2022
jsonpointer==3.0.0
2123
langchain-core==0.3.72
22-
langgraph==0.6.1
24+
langchain-openai==0.3.28
25+
langgraph==0.6.3
2326
langgraph-checkpoint==2.1.1
24-
langgraph-prebuilt==0.6.1
27+
langgraph-prebuilt==0.6.3
2528
langgraph-sdk==0.2.0
26-
langsmith==0.4.8
29+
langsmith==0.4.10
2730
mock==5.2.0
31+
openai==1.98.0
2832
opentracing==2.4.0
2933
orjson==3.11.1
3034
ormsgpack==1.10.0
@@ -38,11 +42,14 @@ pytest-asyncio==1.1.0
3842
pytest-cov==6.2.1
3943
pytest-mock==3.14.1
4044
pyyaml==6.0.2
45+
regex==2025.7.34
4146
requests==2.32.4
4247
requests-toolbelt==1.0.0
4348
sniffio==1.3.1
4449
sortedcontainers==2.4.0
4550
tenacity==9.1.2
51+
tiktoken==0.9.0
52+
tqdm==4.67.1
4653
typing-extensions==4.14.1
4754
typing-inspection==0.4.1
4855
urllib3==2.5.0

0 commit comments

Comments
 (0)