langgraph-api 0.0.30__tar.gz → 0.0.31__tar.gz
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-0.0.30 → langgraph_api-0.0.31}/PKG-INFO +4 -4
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/api/assistants.py +2 -1
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/api/runs.py +1 -1
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/cli.py +2 -36
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/config.py +83 -2
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/api.test.mts +1 -1
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/lifespan.py +3 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_storage/store.py +4 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/pyproject.toml +5 -4
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/LICENSE +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/README.md +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/__init__.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/api/__init__.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/api/meta.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/api/openapi.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/api/store.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/api/threads.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/api/ui.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/asyncio.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/auth/__init__.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/auth/custom.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/auth/langsmith/__init__.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/auth/langsmith/backend.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/auth/langsmith/client.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/auth/middleware.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/auth/noop.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/auth/studio_user.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/cron_scheduler.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/errors.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/graph.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/http.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/.gitignore +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/base.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/build.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/client.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/errors.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/global.d.ts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/package.json +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/remote.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/schema.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/src/graph.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/src/hooks.mjs +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/src/parser/parser.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/src/parser/parser.worker.mjs +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/src/schema/types.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/src/schema/types.template.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/src/utils/importMap.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/src/utils/pythonSchemas.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/src/utils/serde.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/sse.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/compose-postgres.yml +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/graphs/.gitignore +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/graphs/agent.css +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/graphs/agent.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/graphs/agent.ui.tsx +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/graphs/delay.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/graphs/error.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/graphs/langgraph.json +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/graphs/nested.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/graphs/package.json +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/graphs/weather.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/graphs/yarn.lock +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/parser.test.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/tests/utils.mts +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/yarn.lock +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/logging.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/metadata.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/middleware/__init__.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/middleware/http_logger.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/middleware/private_network.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/models/__init__.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/models/run.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/patch.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/queue_entrypoint.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/route.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/schema.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/serde.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/server.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/sse.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/state.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/stream.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/utils.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/validation.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/webhook.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/worker.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_license/__init__.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_license/middleware.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_license/validation.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_storage/__init__.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_storage/checkpoint.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_storage/database.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_storage/inmem_stream.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_storage/ops.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_storage/queue.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_storage/retry.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_storage/ttl_dict.py +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/logging.json +0 -0
- {langgraph_api-0.0.30 → langgraph_api-0.0.31}/openapi.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: langgraph-api
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.31
|
|
4
4
|
Summary:
|
|
5
5
|
License: Elastic-2.0
|
|
6
6
|
Author: Nuno Campos
|
|
@@ -12,11 +12,11 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
13
|
Requires-Dist: cryptography (>=43.0.3,<44.0.0)
|
|
14
14
|
Requires-Dist: httpx (>=0.25.0)
|
|
15
|
-
Requires-Dist: jsonschema-rs (>=0.20.0,<0.
|
|
15
|
+
Requires-Dist: jsonschema-rs (>=0.20.0,<0.30)
|
|
16
16
|
Requires-Dist: langchain-core (>=0.2.38,<0.4.0)
|
|
17
17
|
Requires-Dist: langgraph (>=0.2.56,<0.4.0)
|
|
18
|
-
Requires-Dist: langgraph-checkpoint (>=2.0.
|
|
19
|
-
Requires-Dist: langgraph-sdk (>=0.1.
|
|
18
|
+
Requires-Dist: langgraph-checkpoint (>=2.0.21,<3.0)
|
|
19
|
+
Requires-Dist: langgraph-sdk (>=0.1.57,<0.2.0)
|
|
20
20
|
Requires-Dist: langsmith (>=0.1.63,<0.4.0)
|
|
21
21
|
Requires-Dist: orjson (>=3.9.7)
|
|
22
22
|
Requires-Dist: pyjwt (>=2.9.0,<3.0.0)
|
|
@@ -184,7 +184,8 @@ async def get_assistant_graph(
|
|
|
184
184
|
return ApiResponse(drawable_graph.to_json())
|
|
185
185
|
|
|
186
186
|
try:
|
|
187
|
-
|
|
187
|
+
drawable_graph = await graph.aget_graph(xray=xray)
|
|
188
|
+
return ApiResponse(drawable_graph.to_json())
|
|
188
189
|
except NotImplementedError:
|
|
189
190
|
raise HTTPException(
|
|
190
191
|
422, detail="The graph does not support visualization"
|
|
@@ -354,7 +354,7 @@ async def join_run_stream_endpoint(request: ApiRequest):
|
|
|
354
354
|
cancel_on_disconnect = cancel_on_disconnect_str.lower() in {"true", "yes", "1"}
|
|
355
355
|
validate_uuid(thread_id, "Invalid thread ID: must be a UUID")
|
|
356
356
|
validate_uuid(run_id, "Invalid run ID: must be a UUID")
|
|
357
|
-
stream_mode = request.query_params.get("stream_mode")
|
|
357
|
+
stream_mode = request.query_params.get("stream_mode") or None
|
|
358
358
|
return EventSourceResponse(
|
|
359
359
|
Runs.Stream.join(
|
|
360
360
|
run_id,
|
|
@@ -10,7 +10,7 @@ from collections.abc import Mapping, Sequence
|
|
|
10
10
|
from typing_extensions import TypedDict
|
|
11
11
|
|
|
12
12
|
if typing.TYPE_CHECKING:
|
|
13
|
-
from langgraph_api.config import HttpConfig
|
|
13
|
+
from langgraph_api.config import HttpConfig, StoreConfig
|
|
14
14
|
|
|
15
15
|
logging.basicConfig(level=logging.INFO)
|
|
16
16
|
logger = logging.getLogger(__name__)
|
|
@@ -75,40 +75,6 @@ def patch_environment(**kwargs):
|
|
|
75
75
|
os.environ[key] = value
|
|
76
76
|
|
|
77
77
|
|
|
78
|
-
class IndexConfig(TypedDict, total=False):
|
|
79
|
-
"""Configuration for indexing documents for semantic search in the store."""
|
|
80
|
-
|
|
81
|
-
dims: int
|
|
82
|
-
"""Number of dimensions in the embedding vectors.
|
|
83
|
-
|
|
84
|
-
Common embedding models have the following dimensions:
|
|
85
|
-
- OpenAI text-embedding-3-large: 256, 1024, or 3072
|
|
86
|
-
- OpenAI text-embedding-3-small: 512 or 1536
|
|
87
|
-
- OpenAI text-embedding-ada-002: 1536
|
|
88
|
-
- Cohere embed-english-v3.0: 1024
|
|
89
|
-
- Cohere embed-english-light-v3.0: 384
|
|
90
|
-
- Cohere embed-multilingual-v3.0: 1024
|
|
91
|
-
- Cohere embed-multilingual-light-v3.0: 384
|
|
92
|
-
"""
|
|
93
|
-
|
|
94
|
-
embed: str
|
|
95
|
-
"""Either a path to an embedding model (./path/to/file.py:embedding_model)
|
|
96
|
-
or a name of an embedding model (openai:text-embedding-3-small)
|
|
97
|
-
|
|
98
|
-
Note: LangChain is required to use the model format specification.
|
|
99
|
-
"""
|
|
100
|
-
|
|
101
|
-
fields: list[str] | None
|
|
102
|
-
"""Fields to extract text from for embedding generation.
|
|
103
|
-
|
|
104
|
-
Defaults to the root ["$"], which embeds the json object as a whole.
|
|
105
|
-
"""
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
class StoreConfig(TypedDict, total=False):
|
|
109
|
-
index: IndexConfig
|
|
110
|
-
|
|
111
|
-
|
|
112
78
|
class SecurityConfig(TypedDict, total=False):
|
|
113
79
|
securitySchemes: dict
|
|
114
80
|
security: list
|
|
@@ -160,7 +126,7 @@ def run_server(
|
|
|
160
126
|
env: str | pathlib.Path | Mapping[str, str] | None = None,
|
|
161
127
|
reload_includes: Sequence[str] | None = None,
|
|
162
128
|
reload_excludes: Sequence[str] | None = None,
|
|
163
|
-
store: StoreConfig
|
|
129
|
+
store: typing.Optional["StoreConfig"] = None,
|
|
164
130
|
auth: AuthConfig | None = None,
|
|
165
131
|
http: typing.Optional["HttpConfig"] = None,
|
|
166
132
|
**kwargs: typing.Any,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from os import environ, getenv
|
|
2
|
-
from typing import TypedDict
|
|
2
|
+
from typing import Literal, TypedDict
|
|
3
3
|
|
|
4
4
|
import orjson
|
|
5
5
|
from starlette.config import Config, undefined
|
|
@@ -34,6 +34,66 @@ class HttpConfig(TypedDict, total=False):
|
|
|
34
34
|
cors: CorsConfig | None
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
class IndexConfig(TypedDict, total=False):
|
|
38
|
+
"""Configuration for indexing documents for semantic search in the store."""
|
|
39
|
+
|
|
40
|
+
dims: int
|
|
41
|
+
"""Number of dimensions in the embedding vectors.
|
|
42
|
+
|
|
43
|
+
Common embedding models have the following dimensions:
|
|
44
|
+
- OpenAI text-embedding-3-large: 256, 1024, or 3072
|
|
45
|
+
- OpenAI text-embedding-3-small: 512 or 1536
|
|
46
|
+
- OpenAI text-embedding-ada-002: 1536
|
|
47
|
+
- Cohere embed-english-v3.0: 1024
|
|
48
|
+
- Cohere embed-english-light-v3.0: 384
|
|
49
|
+
- Cohere embed-multilingual-v3.0: 1024
|
|
50
|
+
- Cohere embed-multilingual-light-v3.0: 384
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
embed: str
|
|
54
|
+
"""Either a path to an embedding model (./path/to/file.py:embedding_model)
|
|
55
|
+
or a name of an embedding model (openai:text-embedding-3-small)
|
|
56
|
+
|
|
57
|
+
Note: LangChain is required to use the model format specification.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
fields: list[str] | None
|
|
61
|
+
"""Fields to extract text from for embedding generation.
|
|
62
|
+
|
|
63
|
+
Defaults to the root ["$"], which embeds the json object as a whole.
|
|
64
|
+
"""
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class TTLConfig(TypedDict, total=False):
|
|
68
|
+
"""Configuration for TTL (time-to-live) behavior in the store."""
|
|
69
|
+
|
|
70
|
+
refresh_on_read: bool
|
|
71
|
+
"""Default behavior for refreshing TTLs on read operations (GET and SEARCH).
|
|
72
|
+
|
|
73
|
+
If True, TTLs will be refreshed on read operations (get/search) by default.
|
|
74
|
+
This can be overridden per-operation by explicitly setting refresh_ttl.
|
|
75
|
+
Defaults to True if not configured.
|
|
76
|
+
"""
|
|
77
|
+
default_ttl: float | None
|
|
78
|
+
"""Default TTL (time-to-live) in minutes for new items.
|
|
79
|
+
|
|
80
|
+
If provided, new items will expire after this many minutes after their last access.
|
|
81
|
+
The expiration timer refreshes on both read and write operations.
|
|
82
|
+
Defaults to None (no expiration).
|
|
83
|
+
"""
|
|
84
|
+
sweep_interval_minutes: int | None
|
|
85
|
+
"""Interval in minutes between TTL sweep operations.
|
|
86
|
+
|
|
87
|
+
If provided, the store will periodically delete expired items based on TTL.
|
|
88
|
+
Defaults to None (no sweeping).
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class StoreConfig(TypedDict, total=False):
|
|
93
|
+
index: IndexConfig
|
|
94
|
+
ttl: TTLConfig
|
|
95
|
+
|
|
96
|
+
|
|
37
97
|
# env
|
|
38
98
|
|
|
39
99
|
env = Config()
|
|
@@ -55,6 +115,18 @@ STATS_INTERVAL_SECS = env("STATS_INTERVAL_SECS", cast=int, default=60)
|
|
|
55
115
|
DATABASE_URI = env("DATABASE_URI", cast=str, default=getenv("POSTGRES_URI", undefined))
|
|
56
116
|
MIGRATIONS_PATH = env("MIGRATIONS_PATH", cast=str, default="/storage/migrations")
|
|
57
117
|
|
|
118
|
+
|
|
119
|
+
def _get_encryption_key(key_str: str | None):
|
|
120
|
+
if not key_str:
|
|
121
|
+
return None
|
|
122
|
+
key = key_str.encode(encoding="utf-8")
|
|
123
|
+
if len(key) not in (16, 24, 32):
|
|
124
|
+
raise ValueError("LANGGRAPH_AES_KEY must be 16, 24, or 32 bytes long.")
|
|
125
|
+
return key
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
LANGGRAPH_AES_KEY = env("LANGGRAPH_AES_KEY", default=None, cast=_get_encryption_key)
|
|
129
|
+
|
|
58
130
|
# redis
|
|
59
131
|
REDIS_URI = env("REDIS_URI", cast=str)
|
|
60
132
|
REDIS_CLUSTER = env("REDIS_CLUSTER", cast=bool, default=False)
|
|
@@ -69,7 +141,9 @@ See https://developer.chrome.com/blog/private-network-access-update-2024-03
|
|
|
69
141
|
"""
|
|
70
142
|
|
|
71
143
|
HTTP_CONFIG: HttpConfig | None = env("LANGGRAPH_HTTP", cast=_parse_json, default=None)
|
|
72
|
-
STORE_CONFIG:
|
|
144
|
+
STORE_CONFIG: StoreConfig | None = env(
|
|
145
|
+
"LANGGRAPH_STORE", cast=_parse_json, default=None
|
|
146
|
+
)
|
|
73
147
|
CORS_ALLOW_ORIGINS = env("CORS_ALLOW_ORIGINS", cast=CommaSeparatedStrings, default="*")
|
|
74
148
|
if HTTP_CONFIG and HTTP_CONFIG.get("cors"):
|
|
75
149
|
CORS_CONFIG = HTTP_CONFIG["cors"]
|
|
@@ -132,6 +206,13 @@ FF_CRONS_ENABLED = env("FF_CRONS_ENABLED", cast=bool, default=True)
|
|
|
132
206
|
# auth
|
|
133
207
|
|
|
134
208
|
LANGGRAPH_AUTH_TYPE = env("LANGGRAPH_AUTH_TYPE", cast=str, default="noop")
|
|
209
|
+
LANGGRAPH_POSTGRES_EXTENSIONS: Literal["standard", "lite"] = env(
|
|
210
|
+
"LANGGRAPH_POSTGRES_EXTENSIONS", cast=str, default="standard"
|
|
211
|
+
)
|
|
212
|
+
if LANGGRAPH_POSTGRES_EXTENSIONS not in ("standard", "lite"):
|
|
213
|
+
raise ValueError(
|
|
214
|
+
f"Unknown LANGGRAPH_POSTGRES_EXTENSIONS value: {LANGGRAPH_POSTGRES_EXTENSIONS}"
|
|
215
|
+
)
|
|
135
216
|
LANGGRAPH_AUTH = env("LANGGRAPH_AUTH", cast=_parse_json, default=None)
|
|
136
217
|
LANGSMITH_TENANT_ID = env("LANGSMITH_TENANT_ID", cast=str, default=None)
|
|
137
218
|
LANGSMITH_AUTH_VERIFY_TENANT_ID = env(
|
|
@@ -765,7 +765,7 @@ describe("runs", () => {
|
|
|
765
765
|
|
|
766
766
|
it.concurrent(
|
|
767
767
|
"human in the loop - no modification",
|
|
768
|
-
{ retry:
|
|
768
|
+
{ retry: 3 },
|
|
769
769
|
async () => {
|
|
770
770
|
const assistant = await client.assistants.create({ graphId: "agent" });
|
|
771
771
|
const thread = await client.threads.create();
|
|
@@ -12,6 +12,7 @@ from langgraph_api.metadata import metadata_loop
|
|
|
12
12
|
from langgraph_license.validation import get_license_status, plus_features_enabled
|
|
13
13
|
from langgraph_storage.database import start_pool, stop_pool
|
|
14
14
|
from langgraph_storage.queue import queue
|
|
15
|
+
from langgraph_storage.store import Store
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
@asynccontextmanager
|
|
@@ -44,6 +45,8 @@ async def lifespan(
|
|
|
44
45
|
and plus_features_enabled()
|
|
45
46
|
):
|
|
46
47
|
tg.create_task(cron_scheduler())
|
|
48
|
+
if config.STORE_CONFIG and config.STORE_CONFIG.get("ttl"):
|
|
49
|
+
tg.create_task(Store().start_ttl_sweeper())
|
|
47
50
|
yield
|
|
48
51
|
finally:
|
|
49
52
|
await stop_remote_graphs()
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import asyncio
|
|
1
2
|
import os
|
|
2
3
|
import threading
|
|
3
4
|
from collections import defaultdict
|
|
@@ -42,6 +43,9 @@ class DiskBackedInMemStore(InMemoryStore):
|
|
|
42
43
|
f"Unexpected error loading store {which} from {container.filename}: {str(e)}"
|
|
43
44
|
) from e
|
|
44
45
|
|
|
46
|
+
async def start_ttl_sweeper(self) -> asyncio.Task[None]:
|
|
47
|
+
return asyncio.create_task(asyncio.sleep(0))
|
|
48
|
+
|
|
45
49
|
def close(self) -> None:
|
|
46
50
|
self._data.close()
|
|
47
51
|
self._vectors.close()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "langgraph-api"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.31"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = [
|
|
6
6
|
"Nuno Campos <nuno@langchain.dev>",
|
|
@@ -24,18 +24,18 @@ sse-starlette = ">=2.1.0,<2.2.0"
|
|
|
24
24
|
starlette = ">=0.38.6"
|
|
25
25
|
watchfiles = ">=0.13"
|
|
26
26
|
langgraph = ">=0.2.56,<0.4.0"
|
|
27
|
-
langgraph-checkpoint = ">=2.0.
|
|
27
|
+
langgraph-checkpoint = ">=2.0.21,<3.0"
|
|
28
28
|
orjson = ">=3.9.7"
|
|
29
29
|
uvicorn = ">=0.26.0"
|
|
30
30
|
langsmith = ">=0.1.63,<0.4.0"
|
|
31
31
|
httpx = ">=0.25.0"
|
|
32
32
|
langchain-core = ">=0.2.38,<0.4.0"
|
|
33
33
|
tenacity = ">=8.0.0"
|
|
34
|
-
jsonschema-rs = "
|
|
34
|
+
jsonschema-rs = ">=0.20.0,<0.30"
|
|
35
35
|
structlog = ">=24.1.0,<26"
|
|
36
36
|
pyjwt = "^2.9.0"
|
|
37
37
|
cryptography = "^43.0.3"
|
|
38
|
-
langgraph-sdk = "^0.1.
|
|
38
|
+
langgraph-sdk = "^0.1.57"
|
|
39
39
|
|
|
40
40
|
[tool.poetry.group.dev.dependencies]
|
|
41
41
|
ruff = "^0.6.2"
|
|
@@ -49,6 +49,7 @@ pytest-retry = "^1.6.3"
|
|
|
49
49
|
pytest-httpserver = "^1.1.0"
|
|
50
50
|
fastapi = "^0.115.8"
|
|
51
51
|
langgraph = ">=0.3.9"
|
|
52
|
+
pycryptodome = "^3.22.0"
|
|
52
53
|
|
|
53
54
|
[tool.pytest.ini_options]
|
|
54
55
|
# --strict-markers will raise errors on unknown marks.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{langgraph_api-0.0.30 → langgraph_api-0.0.31}/langgraph_api/js/src/schema/types.template.mts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|