langgraph-cli 0.4.4__tar.gz → 0.4.5__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.
Files changed (122) hide show
  1. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/PKG-INFO +1 -1
  2. {langgraph_cli-0.4.4/examples/graph_prerelease_reqs_fail → langgraph_cli-0.4.5/examples/graph_prerelease_reqs}/agent.py +1 -2
  3. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graph_prerelease_reqs/deps/additional_deps/pyproject.toml +1 -1
  4. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graph_prerelease_reqs/deps/zuper_deps/pyproject.toml +1 -1
  5. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graph_prerelease_reqs/pyproject.toml +3 -3
  6. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/generate_schema.py +3 -1
  7. langgraph_cli-0.4.5/langgraph_cli/__init__.py +1 -0
  8. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/langgraph_cli/config.py +3 -499
  9. langgraph_cli-0.4.5/langgraph_cli/schemas.py +558 -0
  10. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/pyproject.toml +10 -4
  11. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/python-monorepo-example/pyproject.toml +1 -1
  12. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/schemas/schema.json +43 -0
  13. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/schemas/schema.v0.json +43 -0
  14. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/uv.lock +187 -121
  15. langgraph_cli-0.4.4/langgraph_cli/__init__.py +0 -1
  16. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/.gitignore +0 -0
  17. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/LICENSE +0 -0
  18. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/Makefile +0 -0
  19. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/README.md +0 -0
  20. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/.env.example +0 -0
  21. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/.gitignore +0 -0
  22. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/Makefile +0 -0
  23. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graph_prerelease_reqs/langgraph.json +0 -0
  24. {langgraph_cli-0.4.4/examples/graph_prerelease_reqs → langgraph_cli-0.4.5/examples/graph_prerelease_reqs_fail}/agent.py +0 -0
  25. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graph_prerelease_reqs_fail/langgraph.json +0 -0
  26. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graph_prerelease_reqs_fail/pyproject.toml +0 -0
  27. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs/agent.py +0 -0
  28. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs/langgraph.json +0 -0
  29. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs/storm.py +0 -0
  30. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/__init__.py +0 -0
  31. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/graphs_submod/__init__.py +0 -0
  32. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/graphs_submod/agent.py +0 -0
  33. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/graphs_submod/subprompt.txt +0 -0
  34. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/hello.py +0 -0
  35. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/langgraph.json +0 -0
  36. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/prompt.txt +0 -0
  37. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_a/requirements.txt +0 -0
  38. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/graphs_submod/agent.py +0 -0
  39. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/graphs_submod/subprompt.txt +0 -0
  40. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/hello.py +0 -0
  41. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/langgraph.json +0 -0
  42. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/prompt.txt +0 -0
  43. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/requirements.txt +0 -0
  44. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/utils/__init__.py +0 -0
  45. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/graphs_reqs_b/utils/greeter.py +0 -0
  46. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/langgraph.json +0 -0
  47. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/my_app.py +0 -0
  48. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/pipconf.txt +0 -0
  49. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/poetry.lock +0 -0
  50. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/examples/pyproject.toml +0 -0
  51. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/.dockerignore +0 -0
  52. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/.env.example +0 -0
  53. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/.eslintrc.cjs +0 -0
  54. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/.gitignore +0 -0
  55. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/LICENSE +0 -0
  56. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/README.md +0 -0
  57. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/jest.config.js +0 -0
  58. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/langgraph.json +0 -0
  59. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/package.json +0 -0
  60. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/src/agent/graph.ts +0 -0
  61. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/src/agent/state.ts +0 -0
  62. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/static/studio.png +0 -0
  63. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/tests/agent.test.ts +0 -0
  64. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/tests/graph.int.test.ts +0 -0
  65. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/tsconfig.json +0 -0
  66. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-examples/yarn.lock +0 -0
  67. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/.eslintrc.cjs +0 -0
  68. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/apps/agent/langgraph.json +0 -0
  69. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/apps/agent/package.json +0 -0
  70. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/apps/agent/src/graph.ts +0 -0
  71. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/apps/agent/src/state.ts +0 -0
  72. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/apps/agent/tsconfig.json +0 -0
  73. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/libs/shared/package.json +0 -0
  74. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/libs/shared/src/index.ts +0 -0
  75. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/libs/shared/tsconfig.json +0 -0
  76. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/package.json +0 -0
  77. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/tsconfig.json +0 -0
  78. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/turbo.json +0 -0
  79. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/js-monorepo-example/yarn.lock +0 -0
  80. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/langgraph_cli/__main__.py +0 -0
  81. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/langgraph_cli/analytics.py +0 -0
  82. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/langgraph_cli/cli.py +0 -0
  83. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/langgraph_cli/constants.py +0 -0
  84. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/langgraph_cli/docker.py +0 -0
  85. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/langgraph_cli/exec.py +0 -0
  86. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/langgraph_cli/progress.py +0 -0
  87. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/langgraph_cli/py.typed +0 -0
  88. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/langgraph_cli/templates.py +0 -0
  89. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/langgraph_cli/util.py +0 -0
  90. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/langgraph_cli/version.py +0 -0
  91. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/python-monorepo-example/apps/agent/.env.example +0 -0
  92. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/python-monorepo-example/apps/agent/langgraph.json +0 -0
  93. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/python-monorepo-example/apps/agent/pyproject.toml +0 -0
  94. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/python-monorepo-example/apps/agent/src/agent/__init__.py +0 -0
  95. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/python-monorepo-example/apps/agent/src/agent/graph.py +0 -0
  96. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/python-monorepo-example/apps/agent/src/agent/state.py +0 -0
  97. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/python-monorepo-example/libs/common/__init__.py +0 -0
  98. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/python-monorepo-example/libs/common/helpers.py +0 -0
  99. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/python-monorepo-example/libs/shared/pyproject.toml +0 -0
  100. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/python-monorepo-example/libs/shared/src/shared/__init__.py +0 -0
  101. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/python-monorepo-example/libs/shared/src/shared/utils.py +0 -0
  102. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/schemas/version.schema.json +0 -0
  103. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/__init__.py +0 -0
  104. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/integration_tests/__init__.py +0 -0
  105. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/integration_tests/test_cli.py +0 -0
  106. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/__init__.py +0 -0
  107. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/agent.py +0 -0
  108. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/cli/__init__.py +0 -0
  109. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/cli/langgraph.json +0 -0
  110. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/cli/pyproject.toml +0 -0
  111. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/cli/test_cli.py +0 -0
  112. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/cli/test_templates.py +0 -0
  113. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/conftest.py +0 -0
  114. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/graphs/agent.py +0 -0
  115. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/helpers.py +0 -0
  116. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/multiplatform/js.mts +0 -0
  117. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/multiplatform/python.py +0 -0
  118. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/pipconfig.txt +0 -0
  119. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/test_config.json +0 -0
  120. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/test_config.py +0 -0
  121. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/test_docker.py +0 -0
  122. {langgraph_cli-0.4.4 → langgraph_cli-0.4.5}/tests/unit_tests/test_util.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-cli
3
- Version: 0.4.4
3
+ Version: 0.4.5
4
4
  Summary: CLI for interacting with LangGraph API
5
5
  Project-URL: Repository, https://www.github.com/langchain-ai/langgraph
6
6
  License-Expression: MIT
@@ -1,13 +1,12 @@
1
1
  from collections.abc import Sequence
2
2
  from typing import Annotated, Literal, TypedDict
3
3
 
4
- from langchain_community.tools.tavily_search import TavilySearchResults
5
4
  from langchain_core.messages import BaseMessage
6
5
  from langchain_openai import ChatOpenAI
7
6
  from langgraph.graph import END, StateGraph, add_messages
8
7
  from langgraph.prebuilt import ToolNode
9
8
 
10
- tools = [TavilySearchResults(max_results=1)]
9
+ tools = []
11
10
 
12
11
  model_oai = ChatOpenAI(temperature=0)
13
12
 
@@ -5,5 +5,5 @@ description = "Test for prerelease stuff"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
7
7
  dependencies = [
8
- "langgraph==0.6.0"
8
+ "langgraph==1.0.2"
9
9
  ]
@@ -5,5 +5,5 @@ description = "Test for prerelease stuff"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
7
7
  dependencies = [
8
- "langchain-openai==0.3.0"
8
+ "langchain-openai==1.0.1"
9
9
  ]
@@ -6,9 +6,9 @@ readme = "README.md"
6
6
  requires-python = ">=3.10"
7
7
  dependencies = [
8
8
  "langchain-openai==1.0.0a2",
9
- "langgraph==1.0.0a2",
10
- "langchain_community>=0.3.0",
9
+ "langchain-anthropic==1.0.0a5",
10
+ "langgraph==1.0.2"
11
11
  ]
12
12
 
13
13
  [tool.uv]
14
- prerelease = "allow"
14
+ prerelease = "allow"
@@ -13,7 +13,7 @@ from pathlib import Path
13
13
 
14
14
  import msgspec
15
15
 
16
- from langgraph_cli.config import (
16
+ from langgraph_cli.schemas import (
17
17
  AuthConfig,
18
18
  CheckpointerConfig,
19
19
  Config,
@@ -22,6 +22,7 @@ from langgraph_cli.config import (
22
22
  HttpConfig,
23
23
  IndexConfig,
24
24
  SecurityConfig,
25
+ SerdeConfig,
25
26
  StoreConfig,
26
27
  ThreadTTLConfig,
27
28
  TTLConfig,
@@ -112,6 +113,7 @@ def add_descriptions_to_schema(schema, cls):
112
113
  CorsConfig,
113
114
  ThreadTTLConfig,
114
115
  CheckpointerConfig,
116
+ SerdeConfig,
115
117
  TTLConfig,
116
118
  ConfigurableHeaderConfig,
117
119
  ]:
@@ -0,0 +1 @@
1
+ __version__ = "0.4.5"
@@ -4,10 +4,12 @@ import pathlib
4
4
  import re
5
5
  import textwrap
6
6
  from collections import Counter
7
- from typing import Any, Literal, NamedTuple, TypedDict
7
+ from typing import Literal, NamedTuple
8
8
 
9
9
  import click
10
10
 
11
+ from langgraph_cli.schemas import Config, Distros
12
+
11
13
  MIN_NODE_VERSION = "20"
12
14
  DEFAULT_NODE_VERSION = "20"
13
15
 
@@ -17,504 +19,6 @@ DEFAULT_PYTHON_VERSION = "3.11"
17
19
  DEFAULT_IMAGE_DISTRO = "debian"
18
20
 
19
21
 
20
- Distros = Literal["debian", "wolfi", "bullseye", "bookworm"]
21
- MiddlewareOrders = Literal["auth_first", "middleware_first"]
22
-
23
-
24
- class TTLConfig(TypedDict, total=False):
25
- """Configuration for TTL (time-to-live) behavior in the store."""
26
-
27
- refresh_on_read: bool
28
- """Default behavior for refreshing TTLs on read operations (`GET` and `SEARCH`).
29
-
30
- If `True`, TTLs will be refreshed on read operations (get/search) by default.
31
- This can be overridden per-operation by explicitly setting `refresh_ttl`.
32
- Defaults to `True` if not configured.
33
- """
34
- default_ttl: float | None
35
- """Optional. Default TTL (time-to-live) in minutes for new items.
36
-
37
- If provided, all new items will have this TTL unless explicitly overridden.
38
- If omitted, items will have no TTL by default.
39
- """
40
- sweep_interval_minutes: int | None
41
- """Optional. Interval in minutes between TTL sweep iterations.
42
-
43
- If provided, the store will periodically delete expired items based on the TTL.
44
- If omitted, no automatic sweeping will occur.
45
- """
46
-
47
-
48
- class IndexConfig(TypedDict, total=False):
49
- """Configuration for indexing documents for semantic search in the store.
50
-
51
- This governs how text is converted into embeddings and stored for vector-based lookups.
52
- """
53
-
54
- dims: int
55
- """Required. Dimensionality of the embedding vectors you will store.
56
-
57
- Must match the output dimension of your selected embedding model or custom embed function.
58
- If mismatched, you will likely encounter shape/size errors when inserting or querying vectors.
59
-
60
- Common embedding model output dimensions:
61
- - openai:text-embedding-3-large: 3072
62
- - openai:text-embedding-3-small: 1536
63
- - openai:text-embedding-ada-002: 1536
64
- - cohere:embed-english-v3.0: 1024
65
- - cohere:embed-english-light-v3.0: 384
66
- - cohere:embed-multilingual-v3.0: 1024
67
- - cohere:embed-multilingual-light-v3.0: 384
68
- """
69
-
70
- embed: str
71
- """Required. Identifier or reference to the embedding model or a custom embedding function.
72
-
73
- The format can vary:
74
- - "<provider>:<model_name>" for recognized providers (e.g., "openai:text-embedding-3-large")
75
- - "path/to/module.py:function_name" for your own local embedding function
76
- - "my_custom_embed" if it's a known alias in your system
77
-
78
- Examples:
79
- - "openai:text-embedding-3-large"
80
- - "cohere:embed-multilingual-v3.0"
81
- - "src/app.py:embeddings"
82
-
83
- Note: Must return embeddings of dimension `dims`.
84
- """
85
-
86
- fields: list[str] | None
87
- """Optional. List of JSON fields to extract before generating embeddings.
88
-
89
- Defaults to ["$"], which means the entire JSON object is embedded as one piece of text.
90
- If you provide multiple fields (e.g. ["title", "content"]), each is extracted and embedded separately,
91
- often saving token usage if you only care about certain parts of the data.
92
-
93
- Example:
94
- fields=["title", "abstract", "author.biography"]
95
- """
96
-
97
-
98
- class StoreConfig(TypedDict, total=False):
99
- """Configuration for the built-in long-term memory store.
100
-
101
- This store can optionally perform semantic search. If you omit `index`,
102
- the store will just handle traditional (non-embedded) data without vector lookups.
103
- """
104
-
105
- index: IndexConfig | None
106
- """Optional. Defines the vector-based semantic search configuration.
107
-
108
- If provided, the store will:
109
- - Generate embeddings according to `index.embed`
110
- - Enforce the embedding dimension given by `index.dims`
111
- - Embed only specified JSON fields (if any) from `index.fields`
112
-
113
- If omitted, no vector index is initialized.
114
- """
115
-
116
- ttl: TTLConfig | None
117
- """Optional. Defines the TTL (time-to-live) behavior configuration.
118
-
119
- If provided, the store will apply TTL settings according to the configuration.
120
- If omitted, no TTL behavior is configured.
121
- """
122
-
123
-
124
- class ThreadTTLConfig(TypedDict, total=False):
125
- """Configure a default TTL for checkpointed data within threads."""
126
-
127
- strategy: Literal["delete"]
128
- """Strategy to use for deleting checkpointed data.
129
-
130
- Choices:
131
- - "delete": Delete all checkpoints for a thread after TTL expires.
132
- """
133
- default_ttl: float | None
134
- """Default TTL (time-to-live) in minutes for checkpointed data."""
135
- sweep_interval_minutes: int | None
136
- """Interval in minutes between sweep iterations.
137
- If omitted, a default interval will be used (typically ~ 5 minutes)."""
138
-
139
-
140
- class CheckpointerConfig(TypedDict, total=False):
141
- """Configuration for the built-in checkpointer, which handles checkpointing of state.
142
-
143
- If omitted, no checkpointer is set up (the object store will still be present, however).
144
- """
145
-
146
- ttl: ThreadTTLConfig | None
147
- """Optional. Defines the TTL (time-to-live) behavior configuration.
148
-
149
- If provided, the checkpointer will apply TTL settings according to the configuration.
150
- If omitted, no TTL behavior is configured.
151
- """
152
-
153
-
154
- class SecurityConfig(TypedDict, total=False):
155
- """Configuration for OpenAPI security definitions and requirements.
156
-
157
- Useful for specifying global or path-level authentication and authorization flows
158
- (e.g., OAuth2, API key headers, etc.).
159
- """
160
-
161
- securitySchemes: dict[str, dict[str, Any]]
162
- """Describe each security scheme recognized by your OpenAPI spec.
163
-
164
- Keys are scheme names (e.g. "OAuth2", "ApiKeyAuth") and values are their definitions.
165
- Example:
166
- {
167
- "OAuth2": {
168
- "type": "oauth2",
169
- "flows": {
170
- "password": {
171
- "tokenUrl": "/token",
172
- "scopes": {"read": "Read data", "write": "Write data"}
173
- }
174
- }
175
- }
176
- }
177
- """
178
- security: list[dict[str, list[str]]]
179
- """Global security requirements across all endpoints.
180
-
181
- Each element in the list maps a security scheme (e.g. "OAuth2") to a list of scopes (e.g. ["read", "write"]).
182
- Example:
183
- [
184
- {"OAuth2": ["read", "write"]},
185
- {"ApiKeyAuth": []}
186
- ]
187
- """
188
- # path => {method => security}
189
- paths: dict[str, dict[str, list[dict[str, list[str]]]]]
190
- """Path-specific security overrides.
191
-
192
- Keys are path templates (e.g., "/items/{item_id}"), mapping to:
193
- - Keys that are HTTP methods (e.g., "GET", "POST"),
194
- - Values are lists of security definitions (just like `security`) for that method.
195
-
196
- Example:
197
- {
198
- "/private_data": {
199
- "GET": [{"OAuth2": ["read"]}],
200
- "POST": [{"OAuth2": ["write"]}]
201
- }
202
- }
203
- """
204
-
205
-
206
- class AuthConfig(TypedDict, total=False):
207
- """Configuration for custom authentication logic and how it integrates into the OpenAPI spec."""
208
-
209
- path: str
210
- """Required. Path to an instance of the Auth() class that implements custom authentication.
211
-
212
- Format: "path/to/file.py:my_auth"
213
- """
214
- disable_studio_auth: bool
215
- """Optional. Whether to disable LangSmith API-key authentication for requests originating the Studio.
216
-
217
- Defaults to False, meaning that if a particular header is set, the server will verify the `x-api-key` header
218
- value is a valid API key for the deployment's workspace. If `True`, all requests will go through your custom
219
- authentication logic, regardless of origin of the request.
220
- """
221
- openapi: SecurityConfig
222
- """The security configuration to include in your server's OpenAPI spec.
223
-
224
- Example (OAuth2):
225
- {
226
- "securitySchemes": {
227
- "OAuth2": {
228
- "type": "oauth2",
229
- "flows": {
230
- "password": {
231
- "tokenUrl": "/token",
232
- "scopes": {"me": "Read user info", "items": "Manage items"}
233
- }
234
- }
235
- }
236
- },
237
- "security": [
238
- {"OAuth2": ["me"]}
239
- ]
240
- }
241
- """
242
-
243
-
244
- class CorsConfig(TypedDict, total=False):
245
- """Specifies Cross-Origin Resource Sharing (CORS) rules for your server.
246
-
247
- If omitted, defaults are typically very restrictive (often no cross-origin requests).
248
- Configure carefully if you want to allow usage from browsers hosted on other domains.
249
- """
250
-
251
- allow_origins: list[str]
252
- """Optional. List of allowed origins (e.g., "https://example.com").
253
-
254
- Default is often an empty list (no external origins).
255
- Use "*" only if you trust all origins, as that bypasses most restrictions.
256
- """
257
- allow_methods: list[str]
258
- """Optional. HTTP methods permitted for cross-origin requests (e.g. ["GET", "POST"]).
259
-
260
- Default might be ["GET", "POST", "OPTIONS"] depending on your server framework.
261
- """
262
- allow_headers: list[str]
263
- """Optional. HTTP headers that can be used in cross-origin requests (e.g. ["Content-Type", "Authorization"])."""
264
- allow_credentials: bool
265
- """Optional. If `True`, cross-origin requests can include credentials (cookies, auth headers).
266
-
267
- Default False to avoid accidentally exposing secured endpoints to untrusted sites.
268
- """
269
- allow_origin_regex: str
270
- """Optional. A regex pattern for matching allowed origins, used if you have dynamic subdomains.
271
-
272
- Example: "^https://.*\\.mycompany\\.com$"
273
- """
274
- expose_headers: list[str]
275
- """Optional. List of headers that browsers are allowed to read from the response in cross-origin contexts."""
276
- max_age: int
277
- """Optional. How many seconds the browser may cache preflight responses.
278
-
279
- Default might be 600 (10 minutes). Larger values reduce preflight requests but can cause stale configurations.
280
- """
281
-
282
-
283
- class ConfigurableHeaderConfig(TypedDict):
284
- """Customize which headers to include as configurable values in your runs.
285
-
286
- By default, omits x-api-key, x-tenant-id, and x-service-key.
287
-
288
- Exclusions (if provided) take precedence.
289
-
290
- Each value can be a raw string with an optional wildcard.
291
- """
292
-
293
- includes: list[str] | None
294
- """Headers to include (if not also matches against an 'exludes' pattern.
295
-
296
- Examples:
297
- - 'user-agent'
298
- - 'x-configurable-*'
299
- """
300
- excludes: list[str] | None
301
- """Headers to exclude. Applied before the 'includes' checks.
302
-
303
- Examples:
304
- - 'x-api-key'
305
- - '*key*'
306
- - '*token*'
307
- """
308
-
309
-
310
- class HttpConfig(TypedDict, total=False):
311
- """Configuration for the built-in HTTP server that powers your deployment's routes and endpoints."""
312
-
313
- app: str
314
- """Optional. Import path to a custom Starlette/FastAPI application to mount.
315
-
316
- Format: "path/to/module.py:app_var"
317
- If provided, it can override or extend the default routes.
318
- """
319
- disable_assistants: bool
320
- """Optional. If `True`, /assistants routes are removed from the server.
321
-
322
- Default is False (meaning /assistants is enabled).
323
- """
324
- disable_threads: bool
325
- """Optional. If `True`, /threads routes are removed.
326
-
327
- Default is False.
328
- """
329
- disable_runs: bool
330
- """Optional. If `True`, /runs routes are removed.
331
-
332
- Default is False.
333
- """
334
- disable_store: bool
335
- """Optional. If `True`, /store routes are removed, disabling direct store interactions via HTTP.
336
-
337
- Default is False.
338
- """
339
- disable_mcp: bool
340
- """Optional. If `True`, /mcp routes are removed, disabling the MCP server.
341
-
342
- Default is False.
343
- """
344
- disable_meta: bool
345
- """Optional. Remove meta endpoints.
346
-
347
- Set to True to disable the following endpoints: /openapi.json, /info, /metrics, /docs.
348
- This will also make the /ok endpoint skip any DB or other checks, always returning {"ok": True}.
349
-
350
- Default is False.
351
- """
352
- cors: CorsConfig | None
353
- """Optional. Defines CORS restrictions. If omitted, no special rules are set and
354
- cross-origin behavior depends on default server settings.
355
- """
356
- configurable_headers: ConfigurableHeaderConfig | None
357
- """Optional. Defines how headers are treated for a run's configuration.
358
-
359
- You can include or exclude headers as configurable values to condition your
360
- agent's behavior or permissions on a request's headers."""
361
- logging_headers: ConfigurableHeaderConfig | None
362
- """Optional. Defines which headers are excluded from logging."""
363
- middleware_order: MiddlewareOrders | None
364
- """Optional. Defines the order in which to apply server customizations.
365
-
366
- Choices:
367
- - "auth_first": Authentication hooks (custom or default) are evaluated
368
- before custom middleware.
369
- - "middleware_first": Custom middleware is evaluated
370
- before authentication hooks (custom or default).
371
-
372
- Default is `middleware_first`.
373
- """
374
- enable_custom_route_auth: bool
375
- """Optional. If `True`, authentication is enabled for custom routes,
376
- not just the routes that are protected by default.
377
- (Routes protected by default include /assistants, /threads, and /runs).
378
-
379
- Default is False. This flag only affects authentication behavior
380
- if `app` is provided and contains custom routes.
381
- """
382
-
383
-
384
- class Config(TypedDict, total=False):
385
- """Top-level config for langgraph-cli or similar deployment tooling."""
386
-
387
- python_version: str
388
- """Optional. Python version in 'major.minor' format (e.g. '3.11').
389
- Must be at least 3.11 or greater for this deployment to function properly.
390
- """
391
-
392
- node_version: str | None
393
- """Optional. Node.js version as a major version (e.g. '20'), if your deployment needs Node.
394
- Must be >= 20 if provided.
395
- """
396
-
397
- api_version: str | None
398
- """Optional. Which semantic version of the LangGraph API server to use.
399
-
400
- Defaults to latest. Check the
401
- [changelog](https://docs.langchain.com/langgraph-platform/langgraph-server-changelog)
402
- for more information."""
403
-
404
- _INTERNAL_docker_tag: str | None
405
- """Optional. Internal use only.
406
- """
407
-
408
- base_image: str | None
409
- """Optional. Base image to use for the LangGraph API server.
410
-
411
- Defaults to langchain/langgraph-api or langchain/langgraphjs-api."""
412
-
413
- image_distro: Distros | None
414
- """Optional. Linux distribution for the base image.
415
-
416
- Must be one of 'wolfi', 'debian', 'bullseye', or 'bookworm'.
417
- If omitted, defaults to 'debian' ('latest').
418
- """
419
-
420
- pip_config_file: str | None
421
- """Optional. Path to a pip config file (e.g., "/etc/pip.conf" or "pip.ini") for controlling
422
- package installation (custom indices, credentials, etc.).
423
-
424
- Only relevant if Python dependencies are installed via pip. If omitted, default pip settings are used.
425
- """
426
-
427
- pip_installer: str | None
428
- """Optional. Python package installer to use ('auto', 'pip', 'uv').
429
-
430
- - 'auto' (default): Use uv for supported base images, otherwise pip
431
- - 'pip': Force use of pip regardless of base image support
432
- - 'uv': Force use of uv (will fail if base image doesn't support it)
433
- """
434
-
435
- dockerfile_lines: list[str]
436
- """Optional. Additional Docker instructions that will be appended to your base Dockerfile.
437
-
438
- Useful for installing OS packages, setting environment variables, etc.
439
- Example:
440
- dockerfile_lines=[
441
- "RUN apt-get update && apt-get install -y libmagic-dev",
442
- "ENV MY_CUSTOM_VAR=hello_world"
443
- ]
444
- """
445
-
446
- dependencies: list[str]
447
- """List of Python dependencies to install, either from PyPI or local paths.
448
-
449
- Examples:
450
- - "." or "./src" if you have a local Python package
451
- - str (aka "anthropic") for a PyPI package
452
- - "git+https://github.com/org/repo.git@main" for a Git-based package
453
- Defaults to an empty list, meaning no additional packages installed beyond your base environment.
454
- """
455
-
456
- graphs: dict[str, str]
457
- """Optional. Named definitions of graphs, each pointing to a Python object.
458
-
459
-
460
- Graphs can be StateGraph, @entrypoint, or any other Pregel object OR they can point to (async) context
461
- managers that accept a single configuration argument (of type RunnableConfig) and return a pregel object
462
- (instance of Stategraph, etc.).
463
-
464
- Keys are graph names, values are "path/to/file.py:object_name".
465
- Example:
466
- {
467
- "mygraph": "graphs/my_graph.py:graph_definition",
468
- "anothergraph": "graphs/another.py:get_graph"
469
- }
470
- """
471
-
472
- env: dict[str, str] | str
473
- """Optional. Environment variables to set for your deployment.
474
-
475
- - If given as a dict, keys are variable names and values are their values.
476
- - If given as a string, it must be a path to a file containing lines in KEY=VALUE format.
477
-
478
- Example as a dict:
479
- env={"API_TOKEN": "abc123", "DEBUG": "true"}
480
- Example as a file path:
481
- env=".env"
482
- """
483
-
484
- store: StoreConfig | None
485
- """Optional. Configuration for the built-in long-term memory store, including semantic search indexing.
486
-
487
- If omitted, no vector index is set up (the object store will still be present, however).
488
- """
489
-
490
- checkpointer: CheckpointerConfig | None
491
- """Optional. Configuration for the built-in checkpointer, which handles checkpointing of state.
492
-
493
- If omitted, no checkpointer is set up (the object store will still be present, however).
494
- """
495
-
496
- auth: AuthConfig | None
497
- """Optional. Custom authentication config, including the path to your Python auth logic and
498
- the OpenAPI security definitions it uses.
499
- """
500
-
501
- http: HttpConfig | None
502
- """Optional. Configuration for the built-in HTTP server, controlling which custom routes are exposed
503
- and how cross-origin requests are handled.
504
- """
505
-
506
- ui: dict[str, str] | None
507
- """Optional. Named definitions of UI components emitted by the agent, each pointing to a JS/TS file.
508
- """
509
-
510
- keep_pkg_tools: bool | list[str] | None
511
- """Optional. Control whether to retain Python packaging tools in the final image.
512
-
513
- Allowed tools are: "pip", "setuptools", "wheel".
514
- You can also set to true to include all packaging tools.
515
- """
516
-
517
-
518
22
  _BUILD_TOOLS = ("pip", "setuptools", "wheel")
519
23
 
520
24