langgraph-api 0.4.1__py3-none-any.whl → 0.4.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of langgraph-api might be problematic. Click here for more details.
- langgraph_api/__init__.py +1 -1
- langgraph_api/api/__init__.py +4 -0
- langgraph_api/api/a2a.py +1128 -0
- langgraph_api/api/assistants.py +8 -0
- langgraph_api/api/runs.py +126 -146
- langgraph_api/api/threads.py +64 -14
- langgraph_api/asyncio.py +2 -1
- langgraph_api/feature_flags.py +1 -0
- langgraph_api/logging.py +5 -2
- langgraph_api/models/run.py +10 -67
- langgraph_api/schema.py +2 -0
- langgraph_api/stream.py +9 -1
- langgraph_api/utils/headers.py +76 -2
- {langgraph_api-0.4.1.dist-info → langgraph_api-0.4.9.dist-info}/METADATA +2 -2
- {langgraph_api-0.4.1.dist-info → langgraph_api-0.4.9.dist-info}/RECORD +19 -22
- openapi.json +244 -0
- langgraph_api/js/isolate-0x130008000-46649-46649-v8.log +0 -4430
- langgraph_api/js/isolate-0x138008000-44681-44681-v8.log +0 -4430
- langgraph_api/js/package-lock.json +0 -3308
- langgraph_api/utils.py +0 -0
- {langgraph_api-0.4.1.dist-info → langgraph_api-0.4.9.dist-info}/WHEEL +0 -0
- {langgraph_api-0.4.1.dist-info → langgraph_api-0.4.9.dist-info}/entry_points.txt +0 -0
- {langgraph_api-0.4.1.dist-info → langgraph_api-0.4.9.dist-info}/licenses/LICENSE +0 -0
langgraph_api/models/run.py
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
import contextlib
|
|
3
3
|
import time
|
|
4
|
-
import urllib.parse
|
|
5
4
|
import uuid
|
|
6
5
|
from collections.abc import Mapping, Sequence
|
|
7
6
|
from typing import Any, NamedTuple, cast
|
|
8
7
|
from uuid import UUID
|
|
9
8
|
|
|
10
|
-
import orjson
|
|
11
9
|
import structlog
|
|
12
10
|
from starlette.authentication import BaseUser
|
|
13
11
|
from starlette.exceptions import HTTPException
|
|
@@ -27,7 +25,7 @@ from langgraph_api.schema import (
|
|
|
27
25
|
StreamMode,
|
|
28
26
|
)
|
|
29
27
|
from langgraph_api.utils import AsyncConnectionProto, get_auth_ctx
|
|
30
|
-
from langgraph_api.utils.headers import
|
|
28
|
+
from langgraph_api.utils.headers import get_configurable_headers
|
|
31
29
|
from langgraph_api.utils.uuids import uuid7
|
|
32
30
|
from langgraph_runtime.ops import Runs
|
|
33
31
|
|
|
@@ -106,6 +104,8 @@ class RunCreateDict(TypedDict):
|
|
|
106
104
|
"""Create the thread if it doesn't exist. If False, reply with 404."""
|
|
107
105
|
langsmith_tracer: LangSmithTracer | None
|
|
108
106
|
"""Configuration for additional tracing with LangSmith."""
|
|
107
|
+
durability: str | None
|
|
108
|
+
"""Durability level for the run. Must be one of 'sync', 'async', or 'exit'."""
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
def ensure_ids(
|
|
@@ -178,69 +178,6 @@ def get_user_id(user: BaseUser | None) -> str | None:
|
|
|
178
178
|
pass
|
|
179
179
|
|
|
180
180
|
|
|
181
|
-
LANGSMITH_METADATA = "langsmith-metadata"
|
|
182
|
-
LANGSMITH_TAGS = "langsmith-tags"
|
|
183
|
-
LANGSMITH_PROJECT = "langsmith-project"
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
# Default headers to exclude from run configuration for security
|
|
187
|
-
DEFAULT_RUN_HEADERS_EXCLUDE = {"x-api-key", "x-tenant-id", "x-service-key"}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
def get_configurable_headers(headers: Mapping[str, str]) -> dict[str, str]:
|
|
191
|
-
"""Extract headers that should be added to run configuration.
|
|
192
|
-
|
|
193
|
-
This function handles special cases like langsmith-trace and baggage headers,
|
|
194
|
-
while respecting the configurable header patterns.
|
|
195
|
-
"""
|
|
196
|
-
configurable = {}
|
|
197
|
-
|
|
198
|
-
for key, value in headers.items():
|
|
199
|
-
# First handle tracing stuff - always included regardless of patterns
|
|
200
|
-
if key == "langsmith-trace":
|
|
201
|
-
configurable[key] = value
|
|
202
|
-
if baggage := headers.get("baggage"):
|
|
203
|
-
for item in baggage.split(","):
|
|
204
|
-
baggage_key, baggage_value = item.split("=")
|
|
205
|
-
if (
|
|
206
|
-
baggage_key == LANGSMITH_METADATA
|
|
207
|
-
and baggage_key not in configurable
|
|
208
|
-
):
|
|
209
|
-
configurable[baggage_key] = orjson.loads(
|
|
210
|
-
urllib.parse.unquote(baggage_value)
|
|
211
|
-
)
|
|
212
|
-
elif baggage_key == LANGSMITH_TAGS:
|
|
213
|
-
configurable[baggage_key] = urllib.parse.unquote(
|
|
214
|
-
baggage_value
|
|
215
|
-
).split(",")
|
|
216
|
-
elif baggage_key == LANGSMITH_PROJECT:
|
|
217
|
-
configurable[baggage_key] = urllib.parse.unquote(baggage_value)
|
|
218
|
-
continue
|
|
219
|
-
|
|
220
|
-
# Check if header should be included based on patterns
|
|
221
|
-
# For run configuration, we have specific default behavior for x-* headers
|
|
222
|
-
if key.startswith("x-"):
|
|
223
|
-
# Check against default excludes for x-* headers
|
|
224
|
-
if key in DEFAULT_RUN_HEADERS_EXCLUDE:
|
|
225
|
-
# Check if explicitly included via patterns
|
|
226
|
-
if should_include_header(key):
|
|
227
|
-
configurable[key] = value
|
|
228
|
-
continue
|
|
229
|
-
# Other x-* headers are included by default unless patterns exclude them
|
|
230
|
-
if should_include_header(key):
|
|
231
|
-
configurable[key] = value
|
|
232
|
-
elif key == "user-agent":
|
|
233
|
-
# user-agent is included by default unless excluded by patterns
|
|
234
|
-
if should_include_header(key):
|
|
235
|
-
configurable[key] = value
|
|
236
|
-
else:
|
|
237
|
-
# All other headers only included if patterns allow
|
|
238
|
-
if should_include_header(key):
|
|
239
|
-
configurable[key] = value
|
|
240
|
-
|
|
241
|
-
return configurable
|
|
242
|
-
|
|
243
|
-
|
|
244
181
|
async def create_valid_run(
|
|
245
182
|
conn: AsyncConnectionProto,
|
|
246
183
|
thread_id: str | None,
|
|
@@ -317,11 +254,16 @@ async def create_valid_run(
|
|
|
317
254
|
configurable["__langsmith_example_id__"] = ls_tracing.get("example_id")
|
|
318
255
|
if request_start_time:
|
|
319
256
|
configurable["__request_start_time_ms__"] = request_start_time
|
|
320
|
-
after_seconds = payload.get("after_seconds", 0)
|
|
257
|
+
after_seconds = cast(int, payload.get("after_seconds", 0))
|
|
321
258
|
configurable["__after_seconds__"] = after_seconds
|
|
322
259
|
put_time_start = time.time()
|
|
323
260
|
if_not_exists = payload.get("if_not_exists", "reject")
|
|
324
261
|
|
|
262
|
+
durability = payload.get("durability")
|
|
263
|
+
if durability is None:
|
|
264
|
+
checkpoint_during = payload.get("checkpoint_during")
|
|
265
|
+
durability = "async" if checkpoint_during in (None, True) else "exit"
|
|
266
|
+
|
|
325
267
|
run_coro = Runs.put(
|
|
326
268
|
conn,
|
|
327
269
|
assistant_id,
|
|
@@ -339,6 +281,7 @@ async def create_valid_run(
|
|
|
339
281
|
"subgraphs": payload.get("stream_subgraphs", False),
|
|
340
282
|
"resumable": stream_resumable,
|
|
341
283
|
"checkpoint_during": payload.get("checkpoint_during", True),
|
|
284
|
+
"durability": durability,
|
|
342
285
|
},
|
|
343
286
|
metadata=payload.get("metadata"),
|
|
344
287
|
status="pending",
|
langgraph_api/schema.py
CHANGED
|
@@ -19,6 +19,8 @@ StreamMode = Literal[
|
|
|
19
19
|
"values", "messages", "updates", "events", "debug", "tasks", "checkpoints", "custom"
|
|
20
20
|
]
|
|
21
21
|
|
|
22
|
+
ThreadStreamMode = Literal["lifecycle", "run_modes", "state_update"]
|
|
23
|
+
|
|
22
24
|
MultitaskStrategy = Literal["reject", "rollback", "interrupt", "enqueue"]
|
|
23
25
|
|
|
24
26
|
OnConflictBehavior = Literal["raise", "do_nothing"]
|
langgraph_api/stream.py
CHANGED
|
@@ -30,7 +30,7 @@ from langgraph_api import __version__
|
|
|
30
30
|
from langgraph_api import store as api_store
|
|
31
31
|
from langgraph_api.asyncio import ValueEvent, wait_if_not_done
|
|
32
32
|
from langgraph_api.command import map_cmd
|
|
33
|
-
from langgraph_api.feature_flags import USE_RUNTIME_CONTEXT_API
|
|
33
|
+
from langgraph_api.feature_flags import USE_DURABILITY, USE_RUNTIME_CONTEXT_API
|
|
34
34
|
from langgraph_api.graph import get_graph
|
|
35
35
|
from langgraph_api.js.base import BaseRemotePregel
|
|
36
36
|
from langgraph_api.metadata import HOST, PLAN, USER_API_URL, incr_nodes
|
|
@@ -134,6 +134,14 @@ async def astream_state(
|
|
|
134
134
|
kwargs = run["kwargs"].copy()
|
|
135
135
|
kwargs.pop("webhook", None)
|
|
136
136
|
kwargs.pop("resumable", False)
|
|
137
|
+
if USE_DURABILITY:
|
|
138
|
+
checkpoint_during = kwargs.pop("checkpoint_during")
|
|
139
|
+
if not kwargs.get("durability") and checkpoint_during:
|
|
140
|
+
kwargs["durability"] = "async" if checkpoint_during else "exit"
|
|
141
|
+
else:
|
|
142
|
+
durability = kwargs.pop("durability")
|
|
143
|
+
if not kwargs.get("checkpoint_during") and durability in ("async", "exit"):
|
|
144
|
+
kwargs["checkpoint_during"] = durability == "async"
|
|
137
145
|
subgraphs = kwargs.get("subgraphs", False)
|
|
138
146
|
temporary = kwargs.pop("temporary", False)
|
|
139
147
|
context = kwargs.pop("context", None)
|
langgraph_api/utils/headers.py
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
import functools
|
|
4
4
|
import re
|
|
5
|
+
import urllib.parse
|
|
6
|
+
from collections.abc import Mapping
|
|
7
|
+
|
|
8
|
+
import orjson
|
|
9
|
+
|
|
10
|
+
LANGSMITH_METADATA = "langsmith-metadata"
|
|
11
|
+
LANGSMITH_TAGS = "langsmith-tags"
|
|
12
|
+
LANGSMITH_PROJECT = "langsmith-project"
|
|
13
|
+
# For security, don't include these in configuration
|
|
14
|
+
DEFAULT_RUN_HEADERS_EXCLUDE = {"x-api-key", "x-tenant-id", "x-service-key"}
|
|
5
15
|
|
|
6
16
|
|
|
7
17
|
def translate_pattern(pat: str) -> re.Pattern[str]:
|
|
@@ -23,6 +33,62 @@ def translate_pattern(pat: str) -> re.Pattern[str]:
|
|
|
23
33
|
return re.compile(rf"(?s:{pattern})\Z")
|
|
24
34
|
|
|
25
35
|
|
|
36
|
+
def get_configurable_headers(headers: Mapping[str, str]) -> dict[str, str]:
|
|
37
|
+
"""Extract headers that should be added to run configuration.
|
|
38
|
+
|
|
39
|
+
This function handles special cases like langsmith-trace and baggage headers,
|
|
40
|
+
while respecting the configurable header patterns.
|
|
41
|
+
"""
|
|
42
|
+
configurable = {}
|
|
43
|
+
if not headers:
|
|
44
|
+
return configurable
|
|
45
|
+
|
|
46
|
+
for key, value in headers.items():
|
|
47
|
+
# First handle tracing stuff - always included regardless of patterns
|
|
48
|
+
if key == "langsmith-trace":
|
|
49
|
+
configurable[key] = value
|
|
50
|
+
if baggage := headers.get("baggage"):
|
|
51
|
+
for item in baggage.split(","):
|
|
52
|
+
baggage_key, baggage_value = item.split("=")
|
|
53
|
+
if (
|
|
54
|
+
baggage_key == LANGSMITH_METADATA
|
|
55
|
+
and baggage_key not in configurable
|
|
56
|
+
):
|
|
57
|
+
configurable[baggage_key] = orjson.loads(
|
|
58
|
+
urllib.parse.unquote(baggage_value)
|
|
59
|
+
)
|
|
60
|
+
elif baggage_key == LANGSMITH_TAGS:
|
|
61
|
+
configurable[baggage_key] = urllib.parse.unquote(
|
|
62
|
+
baggage_value
|
|
63
|
+
).split(",")
|
|
64
|
+
elif baggage_key == LANGSMITH_PROJECT:
|
|
65
|
+
configurable[baggage_key] = urllib.parse.unquote(baggage_value)
|
|
66
|
+
continue
|
|
67
|
+
|
|
68
|
+
# Check if header should be included based on patterns
|
|
69
|
+
# For run configuration, we have specific default behavior for x-* headers
|
|
70
|
+
if key.startswith("x-"):
|
|
71
|
+
# Check against default excludes for x-* headers
|
|
72
|
+
if key in DEFAULT_RUN_HEADERS_EXCLUDE:
|
|
73
|
+
# Check if explicitly included via patterns
|
|
74
|
+
if should_include_header(key):
|
|
75
|
+
configurable[key] = value
|
|
76
|
+
continue
|
|
77
|
+
# Other x-* headers are included by default unless patterns exclude them
|
|
78
|
+
if should_include_header(key):
|
|
79
|
+
configurable[key] = value
|
|
80
|
+
elif key == "user-agent":
|
|
81
|
+
# user-agent is included by default unless excluded by patterns
|
|
82
|
+
if should_include_header(key):
|
|
83
|
+
configurable[key] = value
|
|
84
|
+
else:
|
|
85
|
+
# All other headers only included if patterns allow
|
|
86
|
+
if should_include_header(key):
|
|
87
|
+
configurable[key] = value
|
|
88
|
+
|
|
89
|
+
return configurable
|
|
90
|
+
|
|
91
|
+
|
|
26
92
|
@functools.lru_cache(maxsize=1)
|
|
27
93
|
def get_header_patterns(
|
|
28
94
|
key: str,
|
|
@@ -59,6 +125,14 @@ def should_include_header(key: str) -> bool:
|
|
|
59
125
|
Returns:
|
|
60
126
|
True if the header should be included, False otherwise
|
|
61
127
|
"""
|
|
128
|
+
if (
|
|
129
|
+
key == "x-api-key"
|
|
130
|
+
or key == "x-service-key"
|
|
131
|
+
or key == "x-tenant-id"
|
|
132
|
+
or key == "authorization"
|
|
133
|
+
):
|
|
134
|
+
return False
|
|
135
|
+
|
|
62
136
|
include_patterns, exclude_patterns = get_header_patterns("configurable_headers")
|
|
63
137
|
|
|
64
138
|
return pattern_matches(key, include_patterns, exclude_patterns)
|
|
@@ -85,5 +159,5 @@ def pattern_matches(
|
|
|
85
159
|
# If include patterns are specified, only include headers matching them
|
|
86
160
|
return any(pattern.match(key) for pattern in include_patterns)
|
|
87
161
|
|
|
88
|
-
# Default behavior -
|
|
89
|
-
return
|
|
162
|
+
# Default behavior - exclude
|
|
163
|
+
return False
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langgraph-api
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.9
|
|
4
4
|
Author-email: Nuno Campos <nuno@langchain.dev>, Will Fu-Hinthorn <will@langchain.dev>
|
|
5
5
|
License: Elastic-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -11,7 +11,7 @@ Requires-Dist: httpx>=0.25.0
|
|
|
11
11
|
Requires-Dist: jsonschema-rs<0.30,>=0.20.0
|
|
12
12
|
Requires-Dist: langchain-core>=0.3.64
|
|
13
13
|
Requires-Dist: langgraph-checkpoint>=2.0.23
|
|
14
|
-
Requires-Dist: langgraph-runtime-inmem<0.
|
|
14
|
+
Requires-Dist: langgraph-runtime-inmem<0.11.0,>=0.10.0
|
|
15
15
|
Requires-Dist: langgraph-sdk>=0.2.0
|
|
16
16
|
Requires-Dist: langgraph>=0.4.0
|
|
17
17
|
Requires-Dist: langsmith>=0.3.45
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
langgraph_api/__init__.py,sha256=
|
|
1
|
+
langgraph_api/__init__.py,sha256=LdxLMJM_JXsCQBeSvnxCNyGWmINE0yWfna3DQaT41Vs,22
|
|
2
2
|
langgraph_api/asgi_transport.py,sha256=XtiLOu4WWsd-xizagBLzT5xUkxc9ZG9YqwvETBPjBFE,5161
|
|
3
|
-
langgraph_api/asyncio.py,sha256=
|
|
3
|
+
langgraph_api/asyncio.py,sha256=NjHFvZStKryAAfGOrl3-efHtCzibvpDx-dl8PnrE1Tk,9588
|
|
4
4
|
langgraph_api/cli.py,sha256=-ruIeKi1imvS6GriOfRDZY-waV4SbWiJ0BEFAciPVYI,16330
|
|
5
5
|
langgraph_api/command.py,sha256=3O9v3i0OPa96ARyJ_oJbLXkfO8rPgDhLCswgO9koTFA,768
|
|
6
6
|
langgraph_api/config.py,sha256=r9mmbyZlhBuJLpnTkaOLcNH6ufFNqm_2eCiuOmhqRl0,12241
|
|
7
7
|
langgraph_api/cron_scheduler.py,sha256=25wYzEQrhPEivZrAPYOmzLPDOQa-aFogU37mTXc9TJk,2566
|
|
8
8
|
langgraph_api/errors.py,sha256=zlnl3xXIwVG0oGNKKpXf1an9Rn_SBDHSyhe53hU6aLw,1858
|
|
9
9
|
langgraph_api/executor_entrypoint.py,sha256=CaX813ygtf9CpOaBkfkQXJAHjFtmlScCkrOvTDmu4Aw,750
|
|
10
|
-
langgraph_api/feature_flags.py,sha256=
|
|
10
|
+
langgraph_api/feature_flags.py,sha256=x28NwFJXdfuGW2uUmon6lBSh0pGBo27bw_Se72TO4sM,409
|
|
11
11
|
langgraph_api/graph.py,sha256=HTjJNQadrdi1tzJYNJ_iPIR6-zqC4-hj6YTD6zGQHYA,25072
|
|
12
12
|
langgraph_api/http.py,sha256=fyK-H-0UfNy_BzuVW3aWWGvhRavmGAVMkDwDArryJ_4,5659
|
|
13
13
|
langgraph_api/http_metrics.py,sha256=MU9ccXt7aBb0AJ2SWEjwtbtbJEWmeqSdx7-CI51e32o,5594
|
|
14
|
-
langgraph_api/logging.py,sha256=
|
|
14
|
+
langgraph_api/logging.py,sha256=qB6q_cUba31edE4_D6dBGhdiUTpW7sXAOepUjYb_R50,5216
|
|
15
15
|
langgraph_api/metadata.py,sha256=fVsbwxVitAj4LGVYpCcadYeIFANEaNtcx6LBxQLcTqg,6949
|
|
16
16
|
langgraph_api/patch.py,sha256=iLwSd9ZWoVj6MxozMyGyMvWWbE9RIP5eZX1dpCBSlSU,1480
|
|
17
17
|
langgraph_api/queue_entrypoint.py,sha256=yFzVX3_YKTq4w1A5h5nRpVfiWuSOeJ9acHMPAcTIrKY,5282
|
|
18
18
|
langgraph_api/route.py,sha256=EBhELuJ1He-ZYcAnR5YTImcIeDtWthDae5CHELBxPkM,5056
|
|
19
|
-
langgraph_api/schema.py,sha256=
|
|
19
|
+
langgraph_api/schema.py,sha256=AsgF0dIjBvDd_PDy20mGqB_IkBLgVvSj8qRKG_lPlec,8440
|
|
20
20
|
langgraph_api/serde.py,sha256=3GvelKhySjlXaNqpg2GyUxU6-NEkvif7WlMF9if_EgU,6029
|
|
21
21
|
langgraph_api/server.py,sha256=uCAqPgCLJ6ckslLs0i_dacSR8mzuR0Y6PkkJYk0O3bE,7196
|
|
22
22
|
langgraph_api/sse.py,sha256=SLdtZmTdh5D8fbWrQjuY9HYLd2dg8Rmi6ZMmFMVc2iE,4204
|
|
23
23
|
langgraph_api/state.py,sha256=5RTOShiFVnkx-o6t99_x63CGwXw_8Eb-dSTpYirP8ro,4683
|
|
24
24
|
langgraph_api/store.py,sha256=NIoNZojs6NbtG3VLBPQEFNttvp7XPkHAfjbQ3gY7aLY,4701
|
|
25
|
-
langgraph_api/stream.py,sha256=
|
|
25
|
+
langgraph_api/stream.py,sha256=V8jWwA3wBRenMk3WIFkt0OLXm_LhPwg_Yj_tP4Dc6iI,18970
|
|
26
26
|
langgraph_api/thread_ttl.py,sha256=7H3gFlWcUiODPoaEzcwB0LR61uvcuyjD0ew_4BztB7k,1902
|
|
27
27
|
langgraph_api/traceblock.py,sha256=Qq5CUdefnMDaRDnyvBSWGBClEj-f3oO7NbH6fedxOSE,630
|
|
28
|
-
langgraph_api/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
28
|
langgraph_api/validation.py,sha256=86jftgOsMa7tkeshBw6imYe7zyUXPoVuf5Voh6dFiR8,5285
|
|
30
29
|
langgraph_api/webhook.py,sha256=SvSM1rdnNtiH4q3JQYmAqJUk2Sable5xAcwOLuRhtlo,1723
|
|
31
30
|
langgraph_api/worker.py,sha256=M9WQdxEzVGDZqdjz3LHEHhM1g6isPcf3k1V4PEkcSY8,15343
|
|
32
|
-
langgraph_api/api/__init__.py,sha256=
|
|
33
|
-
langgraph_api/api/
|
|
31
|
+
langgraph_api/api/__init__.py,sha256=raFkYH50tsO-KjRmDbGVoHCuxuH58u1lrZbr-MlITIY,6262
|
|
32
|
+
langgraph_api/api/a2a.py,sha256=HralDXn_sbTnZIKfRfC-1Gl2SHX3Z74vYkTkBA-mlyw,35143
|
|
33
|
+
langgraph_api/api/assistants.py,sha256=JFaBYp9BAXGaJ0yfy1SG_Mr-3xjeWSkdCHtmXpiAqP4,17290
|
|
34
34
|
langgraph_api/api/mcp.py,sha256=qe10ZRMN3f-Hli-9TI8nbQyWvMeBb72YB1PZVbyqBQw,14418
|
|
35
35
|
langgraph_api/api/meta.py,sha256=dFD9ZgykbKARLdVSaJD9vO3CShvEyBmGpkjE8tqii0c,4448
|
|
36
36
|
langgraph_api/api/openapi.py,sha256=If-z1ckXt-Yu5bwQytK1LWyX_T7G46UtLfixgEP8hwc,11959
|
|
37
|
-
langgraph_api/api/runs.py,sha256=
|
|
37
|
+
langgraph_api/api/runs.py,sha256=Dzqg3Klnp_7QVHl26J51DpSlMvBhgUdwcKeeMQdqa4Y,22127
|
|
38
38
|
langgraph_api/api/store.py,sha256=xGcPFx4v-VxlK6HRU9uCjzCQ0v66cvc3o_PB5_g7n0Q,5550
|
|
39
|
-
langgraph_api/api/threads.py,sha256=
|
|
39
|
+
langgraph_api/api/threads.py,sha256=5L-NLqCazjxNZYBUWKo8HFYw7BdMVJd87prMVOH4gjE,12824
|
|
40
40
|
langgraph_api/api/ui.py,sha256=_genglTUy5BMHlL0lkQypX524yFv6Z5fraIvnrxp7yE,2639
|
|
41
41
|
langgraph_api/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
42
42
|
langgraph_api/auth/custom.py,sha256=psETw_GpLWClBbd_ESVPRLUz9GLQ0_XNsuUDSVbtZy0,22522
|
|
@@ -55,9 +55,6 @@ langgraph_api/js/client.http.mts,sha256=cvn8JV9go4pUMWkcug8FfSYWsp1wTaT8SgJaskqE
|
|
|
55
55
|
langgraph_api/js/client.mts,sha256=gDvYiW7Qfl4re2YhZ5oNqtuvffnW_Sf7DK5aUbKB3vw,32330
|
|
56
56
|
langgraph_api/js/errors.py,sha256=Cm1TKWlUCwZReDC5AQ6SgNIVGD27Qov2xcgHyf8-GXo,361
|
|
57
57
|
langgraph_api/js/global.d.ts,sha256=j4GhgtQSZ5_cHzjSPcHgMJ8tfBThxrH-pUOrrJGteOU,196
|
|
58
|
-
langgraph_api/js/isolate-0x130008000-46649-46649-v8.log,sha256=s6h4v7ZtOBK9tKJ0zzPojnob7MBV2j-nyLVPGbgotdg,2641826
|
|
59
|
-
langgraph_api/js/isolate-0x138008000-44681-44681-v8.log,sha256=knAbmQTmz2umDoqMXKuThsmgc4Q6b1HBwZ2ZFUcFu40,2644591
|
|
60
|
-
langgraph_api/js/package-lock.json,sha256=bGM4LYdWJxAb5JE6Tap1-WA_IqRE_CzBjxZTCcMt1_U,117589
|
|
61
58
|
langgraph_api/js/package.json,sha256=syy2fEcmTxGQVfz4P9MUTgoTxHr1MUcA1rDXemAig2U,1335
|
|
62
59
|
langgraph_api/js/remote.py,sha256=aeszJ0HGbcL9oExyeWYHb0xLV75U3KgVSxjm3ZK_a48,38403
|
|
63
60
|
langgraph_api/js/schema.py,sha256=M4fLtr50O1jck8H1hm_0W4cZOGYGdkrB7riLyCes4oY,438
|
|
@@ -78,13 +75,13 @@ langgraph_api/middleware/http_logger.py,sha256=2LABfhzTAUtqT8nf1ACy8cYXteatkwraB
|
|
|
78
75
|
langgraph_api/middleware/private_network.py,sha256=eYgdyU8AzU2XJu362i1L8aSFoQRiV7_aLBPw7_EgeqI,2111
|
|
79
76
|
langgraph_api/middleware/request_id.py,sha256=SDj3Yi3WvTbFQ2ewrPQBjAV8sYReOJGeIiuoHeZpR9g,1242
|
|
80
77
|
langgraph_api/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
81
|
-
langgraph_api/models/run.py,sha256=
|
|
78
|
+
langgraph_api/models/run.py,sha256=HAMvpmIVnGcuOaKoDcpEfeRWo00-bmX_Gvp6lqo7VO0,13223
|
|
82
79
|
langgraph_api/tunneling/cloudflare.py,sha256=iKb6tj-VWPlDchHFjuQyep2Dpb-w2NGfJKt-WJG9LH0,3650
|
|
83
80
|
langgraph_api/utils/__init__.py,sha256=yCMq7pOMlmeNmi2Fh8U7KLiljBdOMcF0L2SfpobnKKE,5703
|
|
84
81
|
langgraph_api/utils/cache.py,sha256=SrtIWYibbrNeZzLXLUGBFhJPkMVNQnVxR5giiYGHEfI,1810
|
|
85
82
|
langgraph_api/utils/config.py,sha256=Tbp4tKDSLKXQJ44EKr885wAQupY-9VWNJ6rgUU2oLOY,4162
|
|
86
83
|
langgraph_api/utils/future.py,sha256=lXsRQPhJwY7JUbFFZrK-94JjgsToLu-EWU896hvbUxE,7289
|
|
87
|
-
langgraph_api/utils/headers.py,sha256=
|
|
84
|
+
langgraph_api/utils/headers.py,sha256=NDBmKSSVOOYeYN0HfK1a3xbYtAg35M_JO1G9yklpZsA,5682
|
|
88
85
|
langgraph_api/utils/uuids.py,sha256=AW_9-1iFqK2K5hljmi-jtaNzUIoBshk5QPt8LbpbD2g,2975
|
|
89
86
|
langgraph_license/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
90
87
|
langgraph_license/validation.py,sha256=CU38RUZ5xhP1S8F_y8TNeV6OmtO-tIGjCXbXTwJjJO4,612
|
|
@@ -99,9 +96,9 @@ langgraph_runtime/retry.py,sha256=V0duD01fO7GUQ_btQkp1aoXcEOFhXooGVP6q4yMfuyY,11
|
|
|
99
96
|
langgraph_runtime/store.py,sha256=7mowndlsIroGHv3NpTSOZDJR0lCuaYMBoTnTrewjslw,114
|
|
100
97
|
LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
101
98
|
logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
|
|
102
|
-
openapi.json,sha256=
|
|
103
|
-
langgraph_api-0.4.
|
|
104
|
-
langgraph_api-0.4.
|
|
105
|
-
langgraph_api-0.4.
|
|
106
|
-
langgraph_api-0.4.
|
|
107
|
-
langgraph_api-0.4.
|
|
99
|
+
openapi.json,sha256=N5FnZvLNotTOGU_CU7tTpcX1hOwIVeYdSnFsdFrPKOg,171975
|
|
100
|
+
langgraph_api-0.4.9.dist-info/METADATA,sha256=0RuwP4ixFFYBGR7vkq64zXa_F7CLPoThZVmNtnLW3q0,3892
|
|
101
|
+
langgraph_api-0.4.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
102
|
+
langgraph_api-0.4.9.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
|
|
103
|
+
langgraph_api-0.4.9.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
104
|
+
langgraph_api-0.4.9.dist-info/RECORD,,
|
openapi.json
CHANGED
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
"name": "Store",
|
|
30
30
|
"description": "Store is an API for managing persistent key-value store (long-term memory) that is available from any thread."
|
|
31
31
|
},
|
|
32
|
+
{
|
|
33
|
+
"name": "A2A",
|
|
34
|
+
"description": "Agent-to-Agent Protocol related endpoints for exposing assistants as A2A-compliant agents."
|
|
35
|
+
},
|
|
32
36
|
{
|
|
33
37
|
"name": "MCP",
|
|
34
38
|
"description": "Model Context Protocol related endpoints for exposing an agent as an MCP server."
|
|
@@ -1550,6 +1554,29 @@
|
|
|
1550
1554
|
},
|
|
1551
1555
|
"name": "Last-Event-ID",
|
|
1552
1556
|
"in": "header"
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
"required": false,
|
|
1560
|
+
"schema": {
|
|
1561
|
+
"anyOf": [
|
|
1562
|
+
{
|
|
1563
|
+
"type": "string",
|
|
1564
|
+
"enum": ["lifecycle", "run_modes", "state_update"]
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
"type": "array",
|
|
1568
|
+
"items": {
|
|
1569
|
+
"type": "string",
|
|
1570
|
+
"enum": ["lifecycle", "run_modes", "state_update"]
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
],
|
|
1574
|
+
"default": ["run_modes"],
|
|
1575
|
+
"title": "Stream Modes",
|
|
1576
|
+
"description": "Stream modes to control which events are returned. 'lifecycle' returns only run start/end events, 'run_modes' returns all run events (default behavior), 'state_update' returns only state update events."
|
|
1577
|
+
},
|
|
1578
|
+
"name": "stream_modes",
|
|
1579
|
+
"in": "query"
|
|
1553
1580
|
}
|
|
1554
1581
|
],
|
|
1555
1582
|
"responses": {
|
|
@@ -3159,6 +3186,195 @@
|
|
|
3159
3186
|
}
|
|
3160
3187
|
}
|
|
3161
3188
|
},
|
|
3189
|
+
"/a2a/{assistant_id}": {
|
|
3190
|
+
"post": {
|
|
3191
|
+
"operationId": "post_a2a",
|
|
3192
|
+
"summary": "A2A Post",
|
|
3193
|
+
"description": "Communicate with an assistant using the Agent-to-Agent Protocol.\nSends a JSON-RPC 2.0 message to the assistant.\n\n- **Request**: Provide an object with `jsonrpc`, `id`, `method`, and optional `params`.\n- **Response**: Returns a JSON-RPC response with task information or error.\n\n**Supported Methods:**\n- `message/send`: Send a message to the assistant\n- `tasks/get`: Get the status and result of a task\n\n**Notes:**\n- Supports threaded conversations via thread context\n- Messages can contain text and data parts\n- Tasks run asynchronously and return completion status\n",
|
|
3194
|
+
"parameters": [
|
|
3195
|
+
{
|
|
3196
|
+
"name": "assistant_id",
|
|
3197
|
+
"in": "path",
|
|
3198
|
+
"required": true,
|
|
3199
|
+
"schema": {
|
|
3200
|
+
"type": "string",
|
|
3201
|
+
"format": "uuid"
|
|
3202
|
+
},
|
|
3203
|
+
"description": "The ID of the assistant to communicate with"
|
|
3204
|
+
},
|
|
3205
|
+
{
|
|
3206
|
+
"name": "Accept",
|
|
3207
|
+
"in": "header",
|
|
3208
|
+
"required": true,
|
|
3209
|
+
"schema": {
|
|
3210
|
+
"type": "string",
|
|
3211
|
+
"enum": ["application/json"]
|
|
3212
|
+
},
|
|
3213
|
+
"description": "Must be application/json"
|
|
3214
|
+
}
|
|
3215
|
+
],
|
|
3216
|
+
"requestBody": {
|
|
3217
|
+
"required": true,
|
|
3218
|
+
"content": {
|
|
3219
|
+
"application/json": {
|
|
3220
|
+
"schema": {
|
|
3221
|
+
"type": "object",
|
|
3222
|
+
"properties": {
|
|
3223
|
+
"jsonrpc": {
|
|
3224
|
+
"type": "string",
|
|
3225
|
+
"enum": ["2.0"],
|
|
3226
|
+
"description": "JSON-RPC version"
|
|
3227
|
+
},
|
|
3228
|
+
"id": {
|
|
3229
|
+
"type": "string",
|
|
3230
|
+
"description": "Request identifier"
|
|
3231
|
+
},
|
|
3232
|
+
"method": {
|
|
3233
|
+
"type": "string",
|
|
3234
|
+
"enum": ["message/send", "tasks/get"],
|
|
3235
|
+
"description": "The method to invoke"
|
|
3236
|
+
},
|
|
3237
|
+
"params": {
|
|
3238
|
+
"type": "object",
|
|
3239
|
+
"description": "Method parameters",
|
|
3240
|
+
"oneOf": [
|
|
3241
|
+
{
|
|
3242
|
+
"title": "Message Send Parameters",
|
|
3243
|
+
"properties": {
|
|
3244
|
+
"message": {
|
|
3245
|
+
"type": "object",
|
|
3246
|
+
"properties": {
|
|
3247
|
+
"role": {
|
|
3248
|
+
"type": "string",
|
|
3249
|
+
"enum": ["user", "assistant"],
|
|
3250
|
+
"description": "Message role"
|
|
3251
|
+
},
|
|
3252
|
+
"parts": {
|
|
3253
|
+
"type": "array",
|
|
3254
|
+
"items": {
|
|
3255
|
+
"oneOf": [
|
|
3256
|
+
{
|
|
3257
|
+
"title": "Text Part",
|
|
3258
|
+
"type": "object",
|
|
3259
|
+
"properties": {
|
|
3260
|
+
"kind": {
|
|
3261
|
+
"type": "string",
|
|
3262
|
+
"enum": ["text"]
|
|
3263
|
+
},
|
|
3264
|
+
"text": {
|
|
3265
|
+
"type": "string"
|
|
3266
|
+
}
|
|
3267
|
+
},
|
|
3268
|
+
"required": ["kind", "text"]
|
|
3269
|
+
},
|
|
3270
|
+
{
|
|
3271
|
+
"title": "Data Part",
|
|
3272
|
+
"type": "object",
|
|
3273
|
+
"properties": {
|
|
3274
|
+
"kind": {
|
|
3275
|
+
"type": "string",
|
|
3276
|
+
"enum": ["data"]
|
|
3277
|
+
},
|
|
3278
|
+
"data": {
|
|
3279
|
+
"type": "object"
|
|
3280
|
+
}
|
|
3281
|
+
},
|
|
3282
|
+
"required": ["kind", "data"]
|
|
3283
|
+
}
|
|
3284
|
+
]
|
|
3285
|
+
},
|
|
3286
|
+
"description": "Message parts"
|
|
3287
|
+
},
|
|
3288
|
+
"messageId": {
|
|
3289
|
+
"type": "string",
|
|
3290
|
+
"description": "Unique message identifier"
|
|
3291
|
+
}
|
|
3292
|
+
},
|
|
3293
|
+
"required": ["role", "parts", "messageId"]
|
|
3294
|
+
},
|
|
3295
|
+
"thread": {
|
|
3296
|
+
"type": "object",
|
|
3297
|
+
"properties": {
|
|
3298
|
+
"threadId": {
|
|
3299
|
+
"type": "string",
|
|
3300
|
+
"description": "Thread identifier for conversation context"
|
|
3301
|
+
}
|
|
3302
|
+
},
|
|
3303
|
+
"description": "Optional thread context"
|
|
3304
|
+
}
|
|
3305
|
+
},
|
|
3306
|
+
"required": ["message"]
|
|
3307
|
+
},
|
|
3308
|
+
{
|
|
3309
|
+
"title": "Task Get Parameters",
|
|
3310
|
+
"properties": {
|
|
3311
|
+
"taskId": {
|
|
3312
|
+
"type": "string",
|
|
3313
|
+
"description": "Task identifier to retrieve"
|
|
3314
|
+
}
|
|
3315
|
+
},
|
|
3316
|
+
"required": ["taskId"]
|
|
3317
|
+
}
|
|
3318
|
+
]
|
|
3319
|
+
}
|
|
3320
|
+
},
|
|
3321
|
+
"required": ["jsonrpc", "id", "method"]
|
|
3322
|
+
}
|
|
3323
|
+
}
|
|
3324
|
+
}
|
|
3325
|
+
},
|
|
3326
|
+
"responses": {
|
|
3327
|
+
"200": {
|
|
3328
|
+
"description": "JSON-RPC response",
|
|
3329
|
+
"content": {
|
|
3330
|
+
"application/json": {
|
|
3331
|
+
"schema": {
|
|
3332
|
+
"type": "object",
|
|
3333
|
+
"properties": {
|
|
3334
|
+
"jsonrpc": {
|
|
3335
|
+
"type": "string",
|
|
3336
|
+
"enum": ["2.0"]
|
|
3337
|
+
},
|
|
3338
|
+
"id": {
|
|
3339
|
+
"type": "string"
|
|
3340
|
+
},
|
|
3341
|
+
"result": {
|
|
3342
|
+
"type": "object",
|
|
3343
|
+
"description": "Success result containing task information or task details"
|
|
3344
|
+
},
|
|
3345
|
+
"error": {
|
|
3346
|
+
"type": "object",
|
|
3347
|
+
"properties": {
|
|
3348
|
+
"code": {
|
|
3349
|
+
"type": "integer"
|
|
3350
|
+
},
|
|
3351
|
+
"message": {
|
|
3352
|
+
"type": "string"
|
|
3353
|
+
}
|
|
3354
|
+
},
|
|
3355
|
+
"description": "Error information if request failed"
|
|
3356
|
+
}
|
|
3357
|
+
},
|
|
3358
|
+
"required": ["jsonrpc", "id"]
|
|
3359
|
+
}
|
|
3360
|
+
}
|
|
3361
|
+
}
|
|
3362
|
+
},
|
|
3363
|
+
"400": {
|
|
3364
|
+
"description": "Bad request - invalid JSON-RPC or missing Accept header"
|
|
3365
|
+
},
|
|
3366
|
+
"404": {
|
|
3367
|
+
"description": "Assistant not found"
|
|
3368
|
+
},
|
|
3369
|
+
"500": {
|
|
3370
|
+
"description": "Internal server error"
|
|
3371
|
+
}
|
|
3372
|
+
},
|
|
3373
|
+
"tags": [
|
|
3374
|
+
"A2A"
|
|
3375
|
+
]
|
|
3376
|
+
}
|
|
3377
|
+
},
|
|
3162
3378
|
"/mcp/": {
|
|
3163
3379
|
"post": {
|
|
3164
3380
|
"operationId": "post_mcp",
|
|
@@ -4413,6 +4629,17 @@
|
|
|
4413
4629
|
"title": "Checkpoint During",
|
|
4414
4630
|
"description": "Whether to checkpoint during the run.",
|
|
4415
4631
|
"default": false
|
|
4632
|
+
},
|
|
4633
|
+
"durability": {
|
|
4634
|
+
"type": "string",
|
|
4635
|
+
"enum": [
|
|
4636
|
+
"sync",
|
|
4637
|
+
"async",
|
|
4638
|
+
"exit"
|
|
4639
|
+
],
|
|
4640
|
+
"title": "Durability",
|
|
4641
|
+
"description": "Durability level for the run. Must be one of 'sync', 'async', or 'exit'.",
|
|
4642
|
+
"default": "async"
|
|
4416
4643
|
}
|
|
4417
4644
|
},
|
|
4418
4645
|
"type": "object",
|
|
@@ -4649,6 +4876,17 @@
|
|
|
4649
4876
|
"title": "Checkpoint During",
|
|
4650
4877
|
"description": "Whether to checkpoint during the run.",
|
|
4651
4878
|
"default": false
|
|
4879
|
+
},
|
|
4880
|
+
"durability": {
|
|
4881
|
+
"type": "string",
|
|
4882
|
+
"enum": [
|
|
4883
|
+
"sync",
|
|
4884
|
+
"async",
|
|
4885
|
+
"exit"
|
|
4886
|
+
],
|
|
4887
|
+
"title": "Durability",
|
|
4888
|
+
"description": "Durability level for the run. Must be one of 'sync', 'async', or 'exit'.",
|
|
4889
|
+
"default": "async"
|
|
4652
4890
|
}
|
|
4653
4891
|
},
|
|
4654
4892
|
"type": "object",
|
|
@@ -4777,6 +5015,12 @@
|
|
|
4777
5015
|
},
|
|
4778
5016
|
"ThreadSearchRequest": {
|
|
4779
5017
|
"properties": {
|
|
5018
|
+
"ids": {
|
|
5019
|
+
"type": "array",
|
|
5020
|
+
"items": {"type": "string", "format": "uuid"},
|
|
5021
|
+
"title": "Ids",
|
|
5022
|
+
"description": "List of thread IDs to include. Others are excluded."
|
|
5023
|
+
},
|
|
4780
5024
|
"metadata": {
|
|
4781
5025
|
"type": "object",
|
|
4782
5026
|
"title": "Metadata",
|