langgraph-api 0.2.132__py3-none-any.whl → 0.2.135__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/assistants.py +26 -1
- langgraph_api/api/runs.py +38 -1
- langgraph_api/api/threads.py +27 -1
- langgraph_api/js/package.json +2 -2
- langgraph_api/js/yarn.lock +9 -9
- langgraph_api/route.py +2 -1
- langgraph_api/schema.py +70 -5
- langgraph_api/utils/__init__.py +19 -0
- langgraph_api/validation.py +9 -0
- {langgraph_api-0.2.132.dist-info → langgraph_api-0.2.135.dist-info}/METADATA +2 -2
- {langgraph_api-0.2.132.dist-info → langgraph_api-0.2.135.dist-info}/RECORD +16 -16
- openapi.json +331 -1
- {langgraph_api-0.2.132.dist-info → langgraph_api-0.2.135.dist-info}/WHEEL +0 -0
- {langgraph_api-0.2.132.dist-info → langgraph_api-0.2.135.dist-info}/entry_points.txt +0 -0
- {langgraph_api-0.2.132.dist-info → langgraph_api-0.2.135.dist-info}/licenses/LICENSE +0 -0
langgraph_api/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
1
|
+
__version__ = "0.2.135"
|
langgraph_api/api/assistants.py
CHANGED
|
@@ -16,9 +16,16 @@ from langgraph_api.feature_flags import USE_RUNTIME_CONTEXT_API
|
|
|
16
16
|
from langgraph_api.graph import get_assistant_id, get_graph
|
|
17
17
|
from langgraph_api.js.base import BaseRemotePregel
|
|
18
18
|
from langgraph_api.route import ApiRequest, ApiResponse, ApiRoute
|
|
19
|
+
from langgraph_api.schema import ASSISTANT_FIELDS
|
|
19
20
|
from langgraph_api.serde import ajson_loads
|
|
20
|
-
from langgraph_api.utils import
|
|
21
|
+
from langgraph_api.utils import (
|
|
22
|
+
fetchone,
|
|
23
|
+
get_pagination_headers,
|
|
24
|
+
validate_select_columns,
|
|
25
|
+
validate_uuid,
|
|
26
|
+
)
|
|
21
27
|
from langgraph_api.validation import (
|
|
28
|
+
AssistantCountRequest,
|
|
22
29
|
AssistantCreate,
|
|
23
30
|
AssistantPatch,
|
|
24
31
|
AssistantSearchRequest,
|
|
@@ -173,6 +180,7 @@ async def search_assistants(
|
|
|
173
180
|
) -> ApiResponse:
|
|
174
181
|
"""List assistants."""
|
|
175
182
|
payload = await request.json(AssistantSearchRequest)
|
|
183
|
+
select = validate_select_columns(payload.get("select") or None, ASSISTANT_FIELDS)
|
|
176
184
|
offset = int(payload.get("offset") or 0)
|
|
177
185
|
async with connect() as conn:
|
|
178
186
|
assistants_iter, next_offset = await Assistants.search(
|
|
@@ -183,6 +191,7 @@ async def search_assistants(
|
|
|
183
191
|
offset=offset,
|
|
184
192
|
sort_by=payload.get("sort_by"),
|
|
185
193
|
sort_order=payload.get("sort_order"),
|
|
194
|
+
select=select,
|
|
186
195
|
)
|
|
187
196
|
assistants, response_headers = await get_pagination_headers(
|
|
188
197
|
assistants_iter, next_offset, offset
|
|
@@ -190,6 +199,21 @@ async def search_assistants(
|
|
|
190
199
|
return ApiResponse(assistants, headers=response_headers)
|
|
191
200
|
|
|
192
201
|
|
|
202
|
+
@retry_db
|
|
203
|
+
async def count_assistants(
|
|
204
|
+
request: ApiRequest,
|
|
205
|
+
) -> ApiResponse:
|
|
206
|
+
"""Count assistants."""
|
|
207
|
+
payload = await request.json(AssistantCountRequest)
|
|
208
|
+
async with connect() as conn:
|
|
209
|
+
count = await Assistants.count(
|
|
210
|
+
conn,
|
|
211
|
+
graph_id=payload.get("graph_id"),
|
|
212
|
+
metadata=payload.get("metadata"),
|
|
213
|
+
)
|
|
214
|
+
return ApiResponse(count)
|
|
215
|
+
|
|
216
|
+
|
|
193
217
|
@retry_db
|
|
194
218
|
async def get_assistant(
|
|
195
219
|
request: ApiRequest,
|
|
@@ -415,6 +439,7 @@ async def set_latest_assistant_version(request: ApiRequest) -> ApiResponse:
|
|
|
415
439
|
assistants_routes: list[BaseRoute] = [
|
|
416
440
|
ApiRoute("/assistants", create_assistant, methods=["POST"]),
|
|
417
441
|
ApiRoute("/assistants/search", search_assistants, methods=["POST"]),
|
|
442
|
+
ApiRoute("/assistants/count", count_assistants, methods=["POST"]),
|
|
418
443
|
ApiRoute(
|
|
419
444
|
"/assistants/{assistant_id}/latest",
|
|
420
445
|
set_latest_assistant_version,
|
langgraph_api/api/runs.py
CHANGED
|
@@ -10,9 +10,17 @@ from langgraph_api import config
|
|
|
10
10
|
from langgraph_api.asyncio import ValueEvent, aclosing
|
|
11
11
|
from langgraph_api.models.run import create_valid_run
|
|
12
12
|
from langgraph_api.route import ApiRequest, ApiResponse, ApiRoute
|
|
13
|
+
from langgraph_api.schema import CRON_FIELDS, RUN_FIELDS
|
|
13
14
|
from langgraph_api.sse import EventSourceResponse
|
|
14
|
-
from langgraph_api.utils import
|
|
15
|
+
from langgraph_api.utils import (
|
|
16
|
+
fetchone,
|
|
17
|
+
get_pagination_headers,
|
|
18
|
+
uuid7,
|
|
19
|
+
validate_select_columns,
|
|
20
|
+
validate_uuid,
|
|
21
|
+
)
|
|
15
22
|
from langgraph_api.validation import (
|
|
23
|
+
CronCountRequest,
|
|
16
24
|
CronCreate,
|
|
17
25
|
CronSearch,
|
|
18
26
|
RunBatchCreate,
|
|
@@ -337,6 +345,9 @@ async def list_runs(
|
|
|
337
345
|
limit = int(request.query_params.get("limit", 10))
|
|
338
346
|
offset = int(request.query_params.get("offset", 0))
|
|
339
347
|
status = request.query_params.get("status")
|
|
348
|
+
select = validate_select_columns(
|
|
349
|
+
request.query_params.getlist("select") or None, RUN_FIELDS
|
|
350
|
+
)
|
|
340
351
|
|
|
341
352
|
async with connect() as conn, conn.pipeline():
|
|
342
353
|
thread, runs = await asyncio.gather(
|
|
@@ -347,6 +358,7 @@ async def list_runs(
|
|
|
347
358
|
limit=limit,
|
|
348
359
|
offset=offset,
|
|
349
360
|
status=status,
|
|
361
|
+
select=select,
|
|
350
362
|
),
|
|
351
363
|
)
|
|
352
364
|
await fetchone(thread)
|
|
@@ -560,6 +572,7 @@ async def delete_cron(request: ApiRequest):
|
|
|
560
572
|
async def search_crons(request: ApiRequest):
|
|
561
573
|
"""List all cron jobs for an assistant"""
|
|
562
574
|
payload = await request.json(CronSearch)
|
|
575
|
+
select = validate_select_columns(payload.get("select") or None, CRON_FIELDS)
|
|
563
576
|
if assistant_id := payload.get("assistant_id"):
|
|
564
577
|
validate_uuid(assistant_id, "Invalid assistant ID: must be a UUID")
|
|
565
578
|
if thread_id := payload.get("thread_id"):
|
|
@@ -575,6 +588,7 @@ async def search_crons(request: ApiRequest):
|
|
|
575
588
|
offset=offset,
|
|
576
589
|
sort_by=payload.get("sort_by"),
|
|
577
590
|
sort_order=payload.get("sort_order"),
|
|
591
|
+
select=select,
|
|
578
592
|
)
|
|
579
593
|
crons, response_headers = await get_pagination_headers(
|
|
580
594
|
crons_iter, next_offset, offset
|
|
@@ -582,6 +596,24 @@ async def search_crons(request: ApiRequest):
|
|
|
582
596
|
return ApiResponse(crons, headers=response_headers)
|
|
583
597
|
|
|
584
598
|
|
|
599
|
+
@retry_db
|
|
600
|
+
async def count_crons(request: ApiRequest):
|
|
601
|
+
"""Count cron jobs."""
|
|
602
|
+
payload = await request.json(CronCountRequest)
|
|
603
|
+
if assistant_id := payload.get("assistant_id"):
|
|
604
|
+
validate_uuid(assistant_id, "Invalid assistant ID: must be a UUID")
|
|
605
|
+
if thread_id := payload.get("thread_id"):
|
|
606
|
+
validate_uuid(thread_id, "Invalid thread ID: must be a UUID")
|
|
607
|
+
|
|
608
|
+
async with connect() as conn:
|
|
609
|
+
count = await Crons.count(
|
|
610
|
+
conn,
|
|
611
|
+
assistant_id=assistant_id,
|
|
612
|
+
thread_id=thread_id,
|
|
613
|
+
)
|
|
614
|
+
return ApiResponse(count)
|
|
615
|
+
|
|
616
|
+
|
|
585
617
|
runs_routes = [
|
|
586
618
|
ApiRoute("/runs/stream", stream_run_stateless, methods=["POST"]),
|
|
587
619
|
ApiRoute("/runs/wait", wait_run_stateless, methods=["POST"]),
|
|
@@ -598,6 +630,11 @@ runs_routes = [
|
|
|
598
630
|
if config.FF_CRONS_ENABLED and plus_features_enabled()
|
|
599
631
|
else None
|
|
600
632
|
),
|
|
633
|
+
(
|
|
634
|
+
ApiRoute("/runs/crons/count", count_crons, methods=["POST"])
|
|
635
|
+
if config.FF_CRONS_ENABLED and plus_features_enabled()
|
|
636
|
+
else None
|
|
637
|
+
),
|
|
601
638
|
ApiRoute("/threads/{thread_id}/runs/{run_id}/join", join_run, methods=["GET"]),
|
|
602
639
|
ApiRoute(
|
|
603
640
|
"/threads/{thread_id}/runs/{run_id}/stream",
|
langgraph_api/api/threads.py
CHANGED
|
@@ -5,9 +5,16 @@ from starlette.responses import Response
|
|
|
5
5
|
from starlette.routing import BaseRoute
|
|
6
6
|
|
|
7
7
|
from langgraph_api.route import ApiRequest, ApiResponse, ApiRoute
|
|
8
|
+
from langgraph_api.schema import THREAD_FIELDS
|
|
8
9
|
from langgraph_api.state import state_snapshot_to_thread_state
|
|
9
|
-
from langgraph_api.utils import
|
|
10
|
+
from langgraph_api.utils import (
|
|
11
|
+
fetchone,
|
|
12
|
+
get_pagination_headers,
|
|
13
|
+
validate_select_columns,
|
|
14
|
+
validate_uuid,
|
|
15
|
+
)
|
|
10
16
|
from langgraph_api.validation import (
|
|
17
|
+
ThreadCountRequest,
|
|
11
18
|
ThreadCreate,
|
|
12
19
|
ThreadPatch,
|
|
13
20
|
ThreadSearchRequest,
|
|
@@ -58,6 +65,7 @@ async def search_threads(
|
|
|
58
65
|
):
|
|
59
66
|
"""List threads."""
|
|
60
67
|
payload = await request.json(ThreadSearchRequest)
|
|
68
|
+
select = validate_select_columns(payload.get("select") or None, THREAD_FIELDS)
|
|
61
69
|
limit = int(payload.get("limit") or 10)
|
|
62
70
|
offset = int(payload.get("offset") or 0)
|
|
63
71
|
async with connect() as conn:
|
|
@@ -70,6 +78,7 @@ async def search_threads(
|
|
|
70
78
|
offset=offset,
|
|
71
79
|
sort_by=payload.get("sort_by"),
|
|
72
80
|
sort_order=payload.get("sort_order"),
|
|
81
|
+
select=select,
|
|
73
82
|
)
|
|
74
83
|
threads, response_headers = await get_pagination_headers(
|
|
75
84
|
threads_iter, next_offset, offset
|
|
@@ -77,6 +86,22 @@ async def search_threads(
|
|
|
77
86
|
return ApiResponse(threads, headers=response_headers)
|
|
78
87
|
|
|
79
88
|
|
|
89
|
+
@retry_db
|
|
90
|
+
async def count_threads(
|
|
91
|
+
request: ApiRequest,
|
|
92
|
+
):
|
|
93
|
+
"""Count threads."""
|
|
94
|
+
payload = await request.json(ThreadCountRequest)
|
|
95
|
+
async with connect() as conn:
|
|
96
|
+
count = await Threads.count(
|
|
97
|
+
conn,
|
|
98
|
+
status=payload.get("status"),
|
|
99
|
+
values=payload.get("values"),
|
|
100
|
+
metadata=payload.get("metadata"),
|
|
101
|
+
)
|
|
102
|
+
return ApiResponse(count)
|
|
103
|
+
|
|
104
|
+
|
|
80
105
|
@retry_db
|
|
81
106
|
async def get_thread_state(
|
|
82
107
|
request: ApiRequest,
|
|
@@ -260,6 +285,7 @@ async def copy_thread(request: ApiRequest):
|
|
|
260
285
|
threads_routes: list[BaseRoute] = [
|
|
261
286
|
ApiRoute("/threads", endpoint=create_thread, methods=["POST"]),
|
|
262
287
|
ApiRoute("/threads/search", endpoint=search_threads, methods=["POST"]),
|
|
288
|
+
ApiRoute("/threads/count", endpoint=count_threads, methods=["POST"]),
|
|
263
289
|
ApiRoute("/threads/{thread_id}", endpoint=get_thread, methods=["GET"]),
|
|
264
290
|
ApiRoute("/threads/{thread_id}", endpoint=patch_thread, methods=["PATCH"]),
|
|
265
291
|
ApiRoute("/threads/{thread_id}", endpoint=delete_thread, methods=["DELETE"]),
|
langgraph_api/js/package.json
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"@hono/zod-validator": "^0.2.2",
|
|
12
12
|
"@langchain/core": "^0.3.59",
|
|
13
13
|
"@langchain/langgraph": "^0.2.65",
|
|
14
|
-
"@langchain/langgraph-api": "~0.0.
|
|
15
|
-
"@langchain/langgraph-ui": "~0.0.
|
|
14
|
+
"@langchain/langgraph-api": "~0.0.59",
|
|
15
|
+
"@langchain/langgraph-ui": "~0.0.59",
|
|
16
16
|
"@langchain/langgraph-checkpoint": "~0.0.18",
|
|
17
17
|
"@types/json-schema": "^7.0.15",
|
|
18
18
|
"@typescript/vfs": "^1.6.0",
|
langgraph_api/js/yarn.lock
CHANGED
|
@@ -203,15 +203,15 @@
|
|
|
203
203
|
zod "^3.25.32"
|
|
204
204
|
zod-to-json-schema "^3.22.3"
|
|
205
205
|
|
|
206
|
-
"@langchain/langgraph-api@~0.0.
|
|
207
|
-
version "0.0.
|
|
208
|
-
resolved "https://registry.yarnpkg.com/@langchain/langgraph-api/-/langgraph-api-0.0.
|
|
209
|
-
integrity sha512-
|
|
206
|
+
"@langchain/langgraph-api@~0.0.59":
|
|
207
|
+
version "0.0.59"
|
|
208
|
+
resolved "https://registry.yarnpkg.com/@langchain/langgraph-api/-/langgraph-api-0.0.59.tgz#a3d69b8cc68ceebd8a8d86b77abd03924ddcd02c"
|
|
209
|
+
integrity sha512-pUt3yKB2z1nsXdhqpRQgVefYg5MdJVsqH64gTNzSb/JYJBPIUj2h8XttRx9+3mHtVqCzvL2bb+HVIterNFOKtw==
|
|
210
210
|
dependencies:
|
|
211
211
|
"@babel/code-frame" "^7.26.2"
|
|
212
212
|
"@hono/node-server" "^1.12.0"
|
|
213
213
|
"@hono/zod-validator" "^0.2.2"
|
|
214
|
-
"@langchain/langgraph-ui" "0.0.
|
|
214
|
+
"@langchain/langgraph-ui" "0.0.59"
|
|
215
215
|
"@types/json-schema" "^7.0.15"
|
|
216
216
|
"@typescript/vfs" "^1.6.0"
|
|
217
217
|
dedent "^1.5.3"
|
|
@@ -256,10 +256,10 @@
|
|
|
256
256
|
p-retry "4"
|
|
257
257
|
uuid "^9.0.0"
|
|
258
258
|
|
|
259
|
-
"@langchain/langgraph-ui@0.0.
|
|
260
|
-
version "0.0.
|
|
261
|
-
resolved "https://registry.yarnpkg.com/@langchain/langgraph-ui/-/langgraph-ui-0.0.
|
|
262
|
-
integrity sha512-
|
|
259
|
+
"@langchain/langgraph-ui@0.0.59", "@langchain/langgraph-ui@~0.0.59":
|
|
260
|
+
version "0.0.59"
|
|
261
|
+
resolved "https://registry.yarnpkg.com/@langchain/langgraph-ui/-/langgraph-ui-0.0.59.tgz#41988eae48c7520c5ebfa9bcdda65ddadfe1aab9"
|
|
262
|
+
integrity sha512-x6Jqt7TZRfHGU0MyxVbz7ugucT/oJQm9kM+DlGdmfAEm2JrNqgy1W85E589xJCJjpuRiDLpP7NiqSwnp8lCEqg==
|
|
263
263
|
dependencies:
|
|
264
264
|
"@commander-js/extra-typings" "^13.0.0"
|
|
265
265
|
commander "^13.0.0"
|
langgraph_api/route.py
CHANGED
|
@@ -97,7 +97,8 @@ class ApiRoute(Route):
|
|
|
97
97
|
include_in_schema: bool = True,
|
|
98
98
|
middleware: typing.Sequence[Middleware] | None = None,
|
|
99
99
|
) -> None:
|
|
100
|
-
|
|
100
|
+
if not path.startswith("/"):
|
|
101
|
+
raise ValueError("Routed paths must start with '/'")
|
|
101
102
|
self.path = path
|
|
102
103
|
self.endpoint = endpoint
|
|
103
104
|
self.name = get_name(endpoint) if name is None else name
|
langgraph_api/schema.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from collections.abc import Sequence
|
|
2
2
|
from datetime import datetime
|
|
3
|
-
from typing import Any, Literal, Optional, TypeAlias
|
|
3
|
+
from typing import Any, Literal, NotRequired, Optional, TypeAlias
|
|
4
4
|
from uuid import UUID
|
|
5
5
|
|
|
6
6
|
from langchain_core.runnables.config import RunnableConfig
|
|
@@ -121,6 +121,8 @@ class Thread(TypedDict):
|
|
|
121
121
|
"""The thread metadata."""
|
|
122
122
|
config: Fragment
|
|
123
123
|
"""The thread config."""
|
|
124
|
+
context: Fragment
|
|
125
|
+
"""The thread context."""
|
|
124
126
|
status: ThreadStatus
|
|
125
127
|
"""The status of the thread. One of 'idle', 'busy', 'interrupted', "error"."""
|
|
126
128
|
values: Fragment
|
|
@@ -223,16 +225,16 @@ class Cron(TypedDict):
|
|
|
223
225
|
"""The time the cron was created."""
|
|
224
226
|
updated_at: datetime
|
|
225
227
|
"""The last time the cron was updated."""
|
|
226
|
-
user_id:
|
|
227
|
-
"""The ID of the user."""
|
|
228
|
+
user_id: str | None
|
|
229
|
+
"""The ID of the user (string identity)."""
|
|
228
230
|
payload: Fragment
|
|
229
231
|
"""The run payload to use for creating new run."""
|
|
230
232
|
next_run_date: datetime
|
|
231
233
|
"""The next run date of the cron."""
|
|
232
234
|
metadata: Fragment
|
|
233
235
|
"""The cron metadata."""
|
|
234
|
-
now: datetime
|
|
235
|
-
"""The current time."""
|
|
236
|
+
now: NotRequired[datetime]
|
|
237
|
+
"""The current time (present in internal next() only)."""
|
|
236
238
|
|
|
237
239
|
|
|
238
240
|
class ThreadUpdateResponse(TypedDict):
|
|
@@ -246,3 +248,66 @@ class QueueStats(TypedDict):
|
|
|
246
248
|
n_running: int
|
|
247
249
|
max_age_secs: datetime | None
|
|
248
250
|
med_age_secs: datetime | None
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
# Canonical field sets for select= validation and type aliases for ops
|
|
254
|
+
|
|
255
|
+
# Assistant select fields (intentionally excludes 'context')
|
|
256
|
+
AssistantSelectField = Literal[
|
|
257
|
+
"assistant_id",
|
|
258
|
+
"graph_id",
|
|
259
|
+
"name",
|
|
260
|
+
"description",
|
|
261
|
+
"config",
|
|
262
|
+
"context",
|
|
263
|
+
"created_at",
|
|
264
|
+
"updated_at",
|
|
265
|
+
"metadata",
|
|
266
|
+
"version",
|
|
267
|
+
]
|
|
268
|
+
ASSISTANT_FIELDS: set[str] = set(AssistantSelectField.__args__) # type: ignore[attr-defined]
|
|
269
|
+
|
|
270
|
+
# Thread select fields
|
|
271
|
+
ThreadSelectField = Literal[
|
|
272
|
+
"thread_id",
|
|
273
|
+
"created_at",
|
|
274
|
+
"updated_at",
|
|
275
|
+
"metadata",
|
|
276
|
+
"config",
|
|
277
|
+
"context",
|
|
278
|
+
"status",
|
|
279
|
+
"values",
|
|
280
|
+
"interrupts",
|
|
281
|
+
]
|
|
282
|
+
THREAD_FIELDS: set[str] = set(ThreadSelectField.__args__) # type: ignore[attr-defined]
|
|
283
|
+
|
|
284
|
+
# Run select fields
|
|
285
|
+
RunSelectField = Literal[
|
|
286
|
+
"run_id",
|
|
287
|
+
"thread_id",
|
|
288
|
+
"assistant_id",
|
|
289
|
+
"created_at",
|
|
290
|
+
"updated_at",
|
|
291
|
+
"status",
|
|
292
|
+
"metadata",
|
|
293
|
+
"kwargs",
|
|
294
|
+
"multitask_strategy",
|
|
295
|
+
]
|
|
296
|
+
RUN_FIELDS: set[str] = set(RunSelectField.__args__) # type: ignore[attr-defined]
|
|
297
|
+
|
|
298
|
+
# Cron select fields
|
|
299
|
+
CronSelectField = Literal[
|
|
300
|
+
"cron_id",
|
|
301
|
+
"assistant_id",
|
|
302
|
+
"thread_id",
|
|
303
|
+
"end_time",
|
|
304
|
+
"schedule",
|
|
305
|
+
"created_at",
|
|
306
|
+
"updated_at",
|
|
307
|
+
"user_id",
|
|
308
|
+
"payload",
|
|
309
|
+
"next_run_date",
|
|
310
|
+
"metadata",
|
|
311
|
+
"now",
|
|
312
|
+
]
|
|
313
|
+
CRON_FIELDS: set[str] = set(CronSelectField.__args__) # type: ignore[attr-defined]
|
langgraph_api/utils/__init__.py
CHANGED
|
@@ -148,6 +148,24 @@ async def get_pagination_headers(
|
|
|
148
148
|
return resources, response_headers
|
|
149
149
|
|
|
150
150
|
|
|
151
|
+
def validate_select_columns(
|
|
152
|
+
select: list[str] | None, allowed: set[str]
|
|
153
|
+
) -> list[str] | None:
|
|
154
|
+
"""Validate select columns against an allowed set.
|
|
155
|
+
|
|
156
|
+
Returns the input list (or None) if valid, otherwise raises HTTP 422.
|
|
157
|
+
"""
|
|
158
|
+
if not select:
|
|
159
|
+
return None
|
|
160
|
+
invalid = [col for col in select if col not in allowed]
|
|
161
|
+
if invalid:
|
|
162
|
+
raise HTTPException(
|
|
163
|
+
status_code=422,
|
|
164
|
+
detail=f"Invalid select columns: {invalid}. Expected: {allowed}",
|
|
165
|
+
)
|
|
166
|
+
return select
|
|
167
|
+
|
|
168
|
+
|
|
151
169
|
__all__ = [
|
|
152
170
|
"AsyncCursorProto",
|
|
153
171
|
"AsyncPipelineProto",
|
|
@@ -158,4 +176,5 @@ __all__ = [
|
|
|
158
176
|
"SchemaGenerator",
|
|
159
177
|
"get_pagination_headers",
|
|
160
178
|
"uuid7",
|
|
179
|
+
"validate_select_columns",
|
|
161
180
|
]
|
langgraph_api/validation.py
CHANGED
|
@@ -14,9 +14,15 @@ AssistantVersionsSearchRequest = jsonschema_rs.validator_for(
|
|
|
14
14
|
AssistantSearchRequest = jsonschema_rs.validator_for(
|
|
15
15
|
openapi["components"]["schemas"]["AssistantSearchRequest"]
|
|
16
16
|
)
|
|
17
|
+
AssistantCountRequest = jsonschema_rs.validator_for(
|
|
18
|
+
openapi["components"]["schemas"]["AssistantCountRequest"]
|
|
19
|
+
)
|
|
17
20
|
ThreadSearchRequest = jsonschema_rs.validator_for(
|
|
18
21
|
openapi["components"]["schemas"]["ThreadSearchRequest"]
|
|
19
22
|
)
|
|
23
|
+
ThreadCountRequest = jsonschema_rs.validator_for(
|
|
24
|
+
openapi["components"]["schemas"]["ThreadCountRequest"]
|
|
25
|
+
)
|
|
20
26
|
AssistantCreate = jsonschema_rs.validator_for(
|
|
21
27
|
openapi["components"]["schemas"]["AssistantCreate"]
|
|
22
28
|
)
|
|
@@ -116,6 +122,9 @@ RunCreateStateful = jsonschema_rs.validator_for(
|
|
|
116
122
|
RunsCancel = jsonschema_rs.validator_for(openapi["components"]["schemas"]["RunsCancel"])
|
|
117
123
|
CronCreate = jsonschema_rs.validator_for(openapi["components"]["schemas"]["CronCreate"])
|
|
118
124
|
CronSearch = jsonschema_rs.validator_for(openapi["components"]["schemas"]["CronSearch"])
|
|
125
|
+
CronCountRequest = jsonschema_rs.validator_for(
|
|
126
|
+
openapi["components"]["schemas"]["CronCountRequest"]
|
|
127
|
+
)
|
|
119
128
|
|
|
120
129
|
|
|
121
130
|
# Stuff around storage/BaseStore API
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: langgraph-api
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.135
|
|
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.9.0,>=0.8.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,4 +1,4 @@
|
|
|
1
|
-
langgraph_api/__init__.py,sha256=
|
|
1
|
+
langgraph_api/__init__.py,sha256=EI8dPBQX_KEje0C_yiwGFf1oJ65gVj2GXRmDyafg6MM,24
|
|
2
2
|
langgraph_api/asgi_transport.py,sha256=XtiLOu4WWsd-xizagBLzT5xUkxc9ZG9YqwvETBPjBFE,5161
|
|
3
3
|
langgraph_api/asyncio.py,sha256=l4fVoYIcczMqC2Wrj4LTk50nKV29AXwweiehOwaeC4Y,9754
|
|
4
4
|
langgraph_api/cli.py,sha256=-ruIeKi1imvS6GriOfRDZY-waV4SbWiJ0BEFAciPVYI,16330
|
|
@@ -15,8 +15,8 @@ langgraph_api/logging.py,sha256=v7TOQt_YuZ_lTQ4rp_9hE6pLtSKxObkuFxyAdHW0y5c,4862
|
|
|
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=KDLpQtBu3amZTbNHS-RGFLR0DphuVQN6kUZm3ZGLe9g,5991
|
|
18
|
-
langgraph_api/route.py,sha256=
|
|
19
|
-
langgraph_api/schema.py,sha256=
|
|
18
|
+
langgraph_api/route.py,sha256=EBhELuJ1He-ZYcAnR5YTImcIeDtWthDae5CHELBxPkM,5056
|
|
19
|
+
langgraph_api/schema.py,sha256=6gabS4_1IeRWV5lyuDV-2i__8brXl89elAlmD5BmEII,8370
|
|
20
20
|
langgraph_api/serde.py,sha256=5F4xMTRY3kNwpdkAzM48KzxFEUmVD1I3CaVWzp_syT8,6067
|
|
21
21
|
langgraph_api/server.py,sha256=uCAqPgCLJ6ckslLs0i_dacSR8mzuR0Y6PkkJYk0O3bE,7196
|
|
22
22
|
langgraph_api/sse.py,sha256=SLdtZmTdh5D8fbWrQjuY9HYLd2dg8Rmi6ZMmFMVc2iE,4204
|
|
@@ -26,17 +26,17 @@ langgraph_api/stream.py,sha256=P82M1yVbn1N20ZRSLb6_F1wbkfQLVU1OGEHF2ES-Nvg,18199
|
|
|
26
26
|
langgraph_api/thread_ttl.py,sha256=7H3gFlWcUiODPoaEzcwB0LR61uvcuyjD0ew_4BztB7k,1902
|
|
27
27
|
langgraph_api/traceblock.py,sha256=Qq5CUdefnMDaRDnyvBSWGBClEj-f3oO7NbH6fedxOSE,630
|
|
28
28
|
langgraph_api/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
29
|
-
langgraph_api/validation.py,sha256=
|
|
29
|
+
langgraph_api/validation.py,sha256=86jftgOsMa7tkeshBw6imYe7zyUXPoVuf5Voh6dFiR8,5285
|
|
30
30
|
langgraph_api/webhook.py,sha256=SvSM1rdnNtiH4q3JQYmAqJUk2Sable5xAcwOLuRhtlo,1723
|
|
31
31
|
langgraph_api/worker.py,sha256=0ztx8AbggDdEjnW40Fai85S2jVGtFcNLU1kGWdN_w24,15198
|
|
32
32
|
langgraph_api/api/__init__.py,sha256=WHy6oNLWtH1K7AxmmsU9RD-Vm6WP-Ov16xS8Ey9YCmQ,6090
|
|
33
|
-
langgraph_api/api/assistants.py,sha256=
|
|
33
|
+
langgraph_api/api/assistants.py,sha256=ffXBUTTs6bBxDISuOs1KVfcjBJuaS8R_j5S6Omzp1i4,16848
|
|
34
34
|
langgraph_api/api/mcp.py,sha256=qe10ZRMN3f-Hli-9TI8nbQyWvMeBb72YB1PZVbyqBQw,14418
|
|
35
35
|
langgraph_api/api/meta.py,sha256=w88TK1Wu4xOhgCfs04LBfL4pZkWhUW6QRwwAWdFby5A,4245
|
|
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=Y52LiXsEtMOF05WhgK00g0CsYrqUUcWxVaUVCsoujtM,21760
|
|
38
38
|
langgraph_api/api/store.py,sha256=TSeMiuMfrifmEnEbL0aObC2DPeseLlmZvAMaMzPgG3Y,5535
|
|
39
|
-
langgraph_api/api/threads.py,sha256=
|
|
39
|
+
langgraph_api/api/threads.py,sha256=Ap5zUcYqK5GJqwEc-q4QY6qCkmbLxfMmEvQZm0MCFxk,10427
|
|
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=b2NOPqBFUQiFkwlfFg4agZo3YfskTZMJyolv52suCeI,22433
|
|
@@ -55,14 +55,14 @@ 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/package.json,sha256=
|
|
58
|
+
langgraph_api/js/package.json,sha256=syy2fEcmTxGQVfz4P9MUTgoTxHr1MUcA1rDXemAig2U,1335
|
|
59
59
|
langgraph_api/js/remote.py,sha256=x2gO12HBriCb4bFXf4lt6uqDgoOKFihy95kHFSBz7bA,38374
|
|
60
60
|
langgraph_api/js/schema.py,sha256=M4fLtr50O1jck8H1hm_0W4cZOGYGdkrB7riLyCes4oY,438
|
|
61
61
|
langgraph_api/js/sse.py,sha256=tVcAGVz5jOKWsESxoqm0Nk1B9yP2A7cRcVDNnR1bUv4,4144
|
|
62
62
|
langgraph_api/js/traceblock.mts,sha256=QtGSN5VpzmGqDfbArrGXkMiONY94pMQ5CgzetT_bKYg,761
|
|
63
63
|
langgraph_api/js/tsconfig.json,sha256=imCYqVnqFpaBoZPx8k1nO4slHIWBFsSlmCYhO73cpBs,341
|
|
64
64
|
langgraph_api/js/ui.py,sha256=XNT8iBcyT8XmbIqSQUWd-j_00HsaWB2vRTVabwFBkik,2439
|
|
65
|
-
langgraph_api/js/yarn.lock,sha256=
|
|
65
|
+
langgraph_api/js/yarn.lock,sha256=M-XjLAvW6cz56lc-IwNPbjLw8KNIKVS_k-haRP4QmRE,84904
|
|
66
66
|
langgraph_api/js/src/graph.mts,sha256=9zTQNdtanI_CFnOwNRoamoCVHHQHGbNlbm91aRxDeOc,2675
|
|
67
67
|
langgraph_api/js/src/load.hooks.mjs,sha256=xNVHq75W0Lk6MUKl1pQYrx-wtQ8_neiUyI6SO-k0ecM,2235
|
|
68
68
|
langgraph_api/js/src/preload.mjs,sha256=8m3bYkf9iZLCQzKAYAdU8snxUwAG3dVLwGvAjfGfgIc,959
|
|
@@ -77,7 +77,7 @@ langgraph_api/middleware/request_id.py,sha256=SDj3Yi3WvTbFQ2ewrPQBjAV8sYReOJGeIi
|
|
|
77
77
|
langgraph_api/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
78
78
|
langgraph_api/models/run.py,sha256=p5F7npi9TFcMUyyn81_InljCg8LE8jKoFSWVl4XtbZ4,15434
|
|
79
79
|
langgraph_api/tunneling/cloudflare.py,sha256=iKb6tj-VWPlDchHFjuQyep2Dpb-w2NGfJKt-WJG9LH0,3650
|
|
80
|
-
langgraph_api/utils/__init__.py,sha256=
|
|
80
|
+
langgraph_api/utils/__init__.py,sha256=kj3uCnO2Md9EEhabm331Tg4Jx9qXcxbACMh2T2P-FYw,5028
|
|
81
81
|
langgraph_api/utils/cache.py,sha256=SrtIWYibbrNeZzLXLUGBFhJPkMVNQnVxR5giiYGHEfI,1810
|
|
82
82
|
langgraph_api/utils/config.py,sha256=Tbp4tKDSLKXQJ44EKr885wAQupY-9VWNJ6rgUU2oLOY,4162
|
|
83
83
|
langgraph_api/utils/future.py,sha256=lXsRQPhJwY7JUbFFZrK-94JjgsToLu-EWU896hvbUxE,7289
|
|
@@ -96,9 +96,9 @@ langgraph_runtime/retry.py,sha256=V0duD01fO7GUQ_btQkp1aoXcEOFhXooGVP6q4yMfuyY,11
|
|
|
96
96
|
langgraph_runtime/store.py,sha256=7mowndlsIroGHv3NpTSOZDJR0lCuaYMBoTnTrewjslw,114
|
|
97
97
|
LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
98
98
|
logging.json,sha256=3RNjSADZmDq38eHePMm1CbP6qZ71AmpBtLwCmKU9Zgo,379
|
|
99
|
-
openapi.json,sha256=
|
|
100
|
-
langgraph_api-0.2.
|
|
101
|
-
langgraph_api-0.2.
|
|
102
|
-
langgraph_api-0.2.
|
|
103
|
-
langgraph_api-0.2.
|
|
104
|
-
langgraph_api-0.2.
|
|
99
|
+
openapi.json,sha256=h1LbSeGqr2Oor6vO8d3m67XJ1lHhVYVyt2ULvyhf_Ks,160215
|
|
100
|
+
langgraph_api-0.2.135.dist-info/METADATA,sha256=rQuOdto6JZPKYdzkN_TJF1rK2xjaiXnQ_Pck-Aa1seQ,3892
|
|
101
|
+
langgraph_api-0.2.135.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
102
|
+
langgraph_api-0.2.135.dist-info/entry_points.txt,sha256=hGedv8n7cgi41PypMfinwS_HfCwA7xJIfS0jAp8htV8,78
|
|
103
|
+
langgraph_api-0.2.135.dist-info/licenses/LICENSE,sha256=ZPwVR73Biwm3sK6vR54djCrhaRiM4cAD2zvOQZV8Xis,3859
|
|
104
|
+
langgraph_api-0.2.135.dist-info/RECORD,,
|
openapi.json
CHANGED
|
@@ -157,6 +157,59 @@
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
|
+
"/assistants/count": {
|
|
161
|
+
"post": {
|
|
162
|
+
"tags": [
|
|
163
|
+
"Assistants"
|
|
164
|
+
],
|
|
165
|
+
"summary": "Count Assistants",
|
|
166
|
+
"description": "Get the count of assistants matching the specified criteria.",
|
|
167
|
+
"operationId": "count_assistants_assistants_count_post",
|
|
168
|
+
"requestBody": {
|
|
169
|
+
"content": {
|
|
170
|
+
"application/json": {
|
|
171
|
+
"schema": {
|
|
172
|
+
"$ref": "#/components/schemas/AssistantCountRequest"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"required": true
|
|
177
|
+
},
|
|
178
|
+
"responses": {
|
|
179
|
+
"200": {
|
|
180
|
+
"description": "Success",
|
|
181
|
+
"content": {
|
|
182
|
+
"application/json": {
|
|
183
|
+
"schema": {
|
|
184
|
+
"type": "integer",
|
|
185
|
+
"title": "Count"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"404": {
|
|
191
|
+
"description": "Not Found",
|
|
192
|
+
"content": {
|
|
193
|
+
"application/json": {
|
|
194
|
+
"schema": {
|
|
195
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"422": {
|
|
201
|
+
"description": "Validation Error",
|
|
202
|
+
"content": {
|
|
203
|
+
"application/json": {
|
|
204
|
+
"schema": {
|
|
205
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
160
213
|
"/assistants/{assistant_id}": {
|
|
161
214
|
"get": {
|
|
162
215
|
"tags": [
|
|
@@ -813,6 +866,59 @@
|
|
|
813
866
|
}
|
|
814
867
|
}
|
|
815
868
|
},
|
|
869
|
+
"/threads/count": {
|
|
870
|
+
"post": {
|
|
871
|
+
"tags": [
|
|
872
|
+
"Threads"
|
|
873
|
+
],
|
|
874
|
+
"summary": "Count Threads",
|
|
875
|
+
"description": "Get the count of threads matching the specified criteria.",
|
|
876
|
+
"operationId": "count_threads_threads_count_post",
|
|
877
|
+
"requestBody": {
|
|
878
|
+
"content": {
|
|
879
|
+
"application/json": {
|
|
880
|
+
"schema": {
|
|
881
|
+
"$ref": "#/components/schemas/ThreadCountRequest"
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
},
|
|
885
|
+
"required": true
|
|
886
|
+
},
|
|
887
|
+
"responses": {
|
|
888
|
+
"200": {
|
|
889
|
+
"description": "Success",
|
|
890
|
+
"content": {
|
|
891
|
+
"application/json": {
|
|
892
|
+
"schema": {
|
|
893
|
+
"type": "integer",
|
|
894
|
+
"title": "Count"
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
"404": {
|
|
900
|
+
"description": "Not Found",
|
|
901
|
+
"content": {
|
|
902
|
+
"application/json": {
|
|
903
|
+
"schema": {
|
|
904
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
},
|
|
909
|
+
"422": {
|
|
910
|
+
"description": "Validation Error",
|
|
911
|
+
"content": {
|
|
912
|
+
"application/json": {
|
|
913
|
+
"schema": {
|
|
914
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
},
|
|
816
922
|
"/threads/{thread_id}/state": {
|
|
817
923
|
"get": {
|
|
818
924
|
"tags": [
|
|
@@ -1469,6 +1575,30 @@
|
|
|
1469
1575
|
},
|
|
1470
1576
|
"name": "status",
|
|
1471
1577
|
"in": "query"
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
"required": false,
|
|
1581
|
+
"schema": {
|
|
1582
|
+
"type": "array",
|
|
1583
|
+
"items": {
|
|
1584
|
+
"type": "string",
|
|
1585
|
+
"enum": [
|
|
1586
|
+
"run_id",
|
|
1587
|
+
"thread_id",
|
|
1588
|
+
"assistant_id",
|
|
1589
|
+
"created_at",
|
|
1590
|
+
"updated_at",
|
|
1591
|
+
"status",
|
|
1592
|
+
"metadata",
|
|
1593
|
+
"kwargs",
|
|
1594
|
+
"multitask_strategy"
|
|
1595
|
+
]
|
|
1596
|
+
},
|
|
1597
|
+
"title": "Select",
|
|
1598
|
+
"description": "Specify which fields to return. If not provided, all fields are returned."
|
|
1599
|
+
},
|
|
1600
|
+
"name": "select",
|
|
1601
|
+
"in": "query"
|
|
1472
1602
|
}
|
|
1473
1603
|
],
|
|
1474
1604
|
"responses": {
|
|
@@ -2320,6 +2450,59 @@
|
|
|
2320
2450
|
}
|
|
2321
2451
|
}
|
|
2322
2452
|
},
|
|
2453
|
+
"/runs/crons/count": {
|
|
2454
|
+
"post": {
|
|
2455
|
+
"tags": [
|
|
2456
|
+
"Crons (Plus tier)"
|
|
2457
|
+
],
|
|
2458
|
+
"summary": "Count Crons",
|
|
2459
|
+
"description": "Get the count of crons matching the specified criteria.",
|
|
2460
|
+
"operationId": "count_crons_runs_crons_count_post",
|
|
2461
|
+
"requestBody": {
|
|
2462
|
+
"content": {
|
|
2463
|
+
"application/json": {
|
|
2464
|
+
"schema": {
|
|
2465
|
+
"$ref": "#/components/schemas/CronCountRequest"
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
},
|
|
2469
|
+
"required": true
|
|
2470
|
+
},
|
|
2471
|
+
"responses": {
|
|
2472
|
+
"200": {
|
|
2473
|
+
"description": "Success",
|
|
2474
|
+
"content": {
|
|
2475
|
+
"application/json": {
|
|
2476
|
+
"schema": {
|
|
2477
|
+
"type": "integer",
|
|
2478
|
+
"title": "Count"
|
|
2479
|
+
}
|
|
2480
|
+
}
|
|
2481
|
+
}
|
|
2482
|
+
},
|
|
2483
|
+
"404": {
|
|
2484
|
+
"description": "Not Found",
|
|
2485
|
+
"content": {
|
|
2486
|
+
"application/json": {
|
|
2487
|
+
"schema": {
|
|
2488
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
},
|
|
2493
|
+
"422": {
|
|
2494
|
+
"description": "Validation Error",
|
|
2495
|
+
"content": {
|
|
2496
|
+
"application/json": {
|
|
2497
|
+
"schema": {
|
|
2498
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
},
|
|
2323
2506
|
"/runs/stream": {
|
|
2324
2507
|
"post": {
|
|
2325
2508
|
"tags": [
|
|
@@ -3379,6 +3562,12 @@
|
|
|
3379
3562
|
"title": "Cron Id",
|
|
3380
3563
|
"description": "The ID of the cron."
|
|
3381
3564
|
},
|
|
3565
|
+
"assistant_id": {
|
|
3566
|
+
"type": ["string", "null"],
|
|
3567
|
+
"format": "uuid",
|
|
3568
|
+
"title": "Assistant Id",
|
|
3569
|
+
"description": "The ID of the assistant."
|
|
3570
|
+
},
|
|
3382
3571
|
"thread_id": {
|
|
3383
3572
|
"type": "string",
|
|
3384
3573
|
"format": "uuid",
|
|
@@ -3408,10 +3597,26 @@
|
|
|
3408
3597
|
"title": "Updated At",
|
|
3409
3598
|
"description": "The last time the cron was updated."
|
|
3410
3599
|
},
|
|
3600
|
+
"user_id": {
|
|
3601
|
+
"type": ["string", "null"],
|
|
3602
|
+
"title": "User Id",
|
|
3603
|
+
"description": "The ID of the user."
|
|
3604
|
+
},
|
|
3411
3605
|
"payload": {
|
|
3412
3606
|
"type": "object",
|
|
3413
3607
|
"title": "Payload",
|
|
3414
3608
|
"description": "The run payload to use for creating new run."
|
|
3609
|
+
},
|
|
3610
|
+
"next_run_date": {
|
|
3611
|
+
"type": ["string", "null"],
|
|
3612
|
+
"format": "date-time",
|
|
3613
|
+
"title": "Next Run Date",
|
|
3614
|
+
"description": "The next run date of the cron."
|
|
3615
|
+
},
|
|
3616
|
+
"metadata": {
|
|
3617
|
+
"type": "object",
|
|
3618
|
+
"title": "Metadata",
|
|
3619
|
+
"description": "The cron metadata."
|
|
3415
3620
|
}
|
|
3416
3621
|
},
|
|
3417
3622
|
"type": "object",
|
|
@@ -3572,7 +3777,7 @@
|
|
|
3572
3777
|
"type": "string",
|
|
3573
3778
|
"format": "uuid",
|
|
3574
3779
|
"title": "Assistant Id",
|
|
3575
|
-
"description": "The assistant ID or graph name to
|
|
3780
|
+
"description": "The assistant ID or graph name to filter by using exact match."
|
|
3576
3781
|
},
|
|
3577
3782
|
"thread_id": {
|
|
3578
3783
|
"type": "string",
|
|
@@ -3608,6 +3813,28 @@
|
|
|
3608
3813
|
"description": "The order to sort by.",
|
|
3609
3814
|
"default": "desc",
|
|
3610
3815
|
"enum": ["asc", "desc"]
|
|
3816
|
+
},
|
|
3817
|
+
"select": {
|
|
3818
|
+
"type": "array",
|
|
3819
|
+
"items": {
|
|
3820
|
+
"type": "string",
|
|
3821
|
+
"enum": [
|
|
3822
|
+
"cron_id",
|
|
3823
|
+
"assistant_id",
|
|
3824
|
+
"thread_id",
|
|
3825
|
+
"end_time",
|
|
3826
|
+
"schedule",
|
|
3827
|
+
"created_at",
|
|
3828
|
+
"updated_at",
|
|
3829
|
+
"user_id",
|
|
3830
|
+
"payload",
|
|
3831
|
+
"next_run_date",
|
|
3832
|
+
"metadata",
|
|
3833
|
+
"now"
|
|
3834
|
+
]
|
|
3835
|
+
},
|
|
3836
|
+
"title": "Select",
|
|
3837
|
+
"description": "Specify which fields to return. If not provided, all fields are returned."
|
|
3611
3838
|
}
|
|
3612
3839
|
},
|
|
3613
3840
|
"type": "object",
|
|
@@ -3615,6 +3842,25 @@
|
|
|
3615
3842
|
"title": "CronSearch",
|
|
3616
3843
|
"description": "Payload for listing crons"
|
|
3617
3844
|
},
|
|
3845
|
+
"CronCountRequest": {
|
|
3846
|
+
"properties": {
|
|
3847
|
+
"assistant_id": {
|
|
3848
|
+
"type": "string",
|
|
3849
|
+
"format": "uuid",
|
|
3850
|
+
"title": "Assistant Id",
|
|
3851
|
+
"description": "The assistant ID or graph name to search for."
|
|
3852
|
+
},
|
|
3853
|
+
"thread_id": {
|
|
3854
|
+
"type": "string",
|
|
3855
|
+
"format": "uuid",
|
|
3856
|
+
"title": "Thread Id",
|
|
3857
|
+
"description": "The thread ID to search for."
|
|
3858
|
+
}
|
|
3859
|
+
},
|
|
3860
|
+
"type": "object",
|
|
3861
|
+
"title": "CronCountRequest",
|
|
3862
|
+
"description": "Payload for counting crons"
|
|
3863
|
+
},
|
|
3618
3864
|
"GraphSchema": {
|
|
3619
3865
|
"properties": {
|
|
3620
3866
|
"graph_id": {
|
|
@@ -4392,12 +4638,49 @@
|
|
|
4392
4638
|
],
|
|
4393
4639
|
"title": "Sort Order",
|
|
4394
4640
|
"description": "The order to sort by."
|
|
4641
|
+
},
|
|
4642
|
+
"select": {
|
|
4643
|
+
"type": "array",
|
|
4644
|
+
"items": {
|
|
4645
|
+
"type": "string",
|
|
4646
|
+
"enum": [
|
|
4647
|
+
"assistant_id",
|
|
4648
|
+
"graph_id",
|
|
4649
|
+
"name",
|
|
4650
|
+
"description",
|
|
4651
|
+
"config",
|
|
4652
|
+
"context",
|
|
4653
|
+
"created_at",
|
|
4654
|
+
"updated_at",
|
|
4655
|
+
"metadata",
|
|
4656
|
+
"version"
|
|
4657
|
+
]
|
|
4658
|
+
},
|
|
4659
|
+
"title": "Select",
|
|
4660
|
+
"description": "Specify which fields to return. If not provided, all fields are returned."
|
|
4395
4661
|
}
|
|
4396
4662
|
},
|
|
4397
4663
|
"type": "object",
|
|
4398
4664
|
"title": "AssistantSearchRequest",
|
|
4399
4665
|
"description": "Payload for listing assistants."
|
|
4400
4666
|
},
|
|
4667
|
+
"AssistantCountRequest": {
|
|
4668
|
+
"properties": {
|
|
4669
|
+
"metadata": {
|
|
4670
|
+
"type": "object",
|
|
4671
|
+
"title": "Metadata",
|
|
4672
|
+
"description": "Metadata to filter by. Exact match filter for each KV pair."
|
|
4673
|
+
},
|
|
4674
|
+
"graph_id": {
|
|
4675
|
+
"type": "string",
|
|
4676
|
+
"title": "Graph Id",
|
|
4677
|
+
"description": "The ID of the graph to filter by. The graph ID is normally set in your langgraph.json configuration."
|
|
4678
|
+
}
|
|
4679
|
+
},
|
|
4680
|
+
"type": "object",
|
|
4681
|
+
"title": "AssistantCountRequest",
|
|
4682
|
+
"description": "Payload for counting assistants."
|
|
4683
|
+
},
|
|
4401
4684
|
"AssistantVersionsSearchRequest": {
|
|
4402
4685
|
"properties": {
|
|
4403
4686
|
"metadata": {
|
|
@@ -4482,12 +4765,59 @@
|
|
|
4482
4765
|
],
|
|
4483
4766
|
"title": "Sort Order",
|
|
4484
4767
|
"description": "Sort order."
|
|
4768
|
+
},
|
|
4769
|
+
"select": {
|
|
4770
|
+
"type": "array",
|
|
4771
|
+
"items": {
|
|
4772
|
+
"type": "string",
|
|
4773
|
+
"enum": [
|
|
4774
|
+
"thread_id",
|
|
4775
|
+
"created_at",
|
|
4776
|
+
"updated_at",
|
|
4777
|
+
"metadata",
|
|
4778
|
+
"config",
|
|
4779
|
+
"context",
|
|
4780
|
+
"status",
|
|
4781
|
+
"values",
|
|
4782
|
+
"interrupts"
|
|
4783
|
+
]
|
|
4784
|
+
},
|
|
4785
|
+
"title": "Select",
|
|
4786
|
+
"description": "Specify which fields to return. If not provided, all fields are returned."
|
|
4485
4787
|
}
|
|
4486
4788
|
},
|
|
4487
4789
|
"type": "object",
|
|
4488
4790
|
"title": "ThreadSearchRequest",
|
|
4489
4791
|
"description": "Payload for listing threads."
|
|
4490
4792
|
},
|
|
4793
|
+
"ThreadCountRequest": {
|
|
4794
|
+
"properties": {
|
|
4795
|
+
"metadata": {
|
|
4796
|
+
"type": "object",
|
|
4797
|
+
"title": "Metadata",
|
|
4798
|
+
"description": "Thread metadata to filter on."
|
|
4799
|
+
},
|
|
4800
|
+
"values": {
|
|
4801
|
+
"type": "object",
|
|
4802
|
+
"title": "Values",
|
|
4803
|
+
"description": "State values to filter on."
|
|
4804
|
+
},
|
|
4805
|
+
"status": {
|
|
4806
|
+
"type": "string",
|
|
4807
|
+
"enum": [
|
|
4808
|
+
"idle",
|
|
4809
|
+
"busy",
|
|
4810
|
+
"interrupted",
|
|
4811
|
+
"error"
|
|
4812
|
+
],
|
|
4813
|
+
"title": "Status",
|
|
4814
|
+
"description": "Thread status to filter on."
|
|
4815
|
+
}
|
|
4816
|
+
},
|
|
4817
|
+
"type": "object",
|
|
4818
|
+
"title": "ThreadCountRequest",
|
|
4819
|
+
"description": "Payload for counting threads."
|
|
4820
|
+
},
|
|
4491
4821
|
"Thread": {
|
|
4492
4822
|
"properties": {
|
|
4493
4823
|
"thread_id": {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|