langgraph-cli 0.4.43__tar.gz → 0.4.44__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 (158) hide show
  1. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/PKG-INFO +36 -4
  2. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/README.md +35 -3
  3. langgraph_cli-0.4.44/langgraph_cli/__init__.py +1 -0
  4. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/deploy.py +147 -28
  5. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/host_backend.py +200 -38
  6. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/cli/test_cli.py +8 -4
  7. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/cli/test_deploy_command.py +470 -22
  8. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/conftest.py +16 -0
  9. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_deploy_helpers.py +146 -1
  10. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_host_backend.py +287 -2
  11. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv.lock +9 -9
  12. langgraph_cli-0.4.43/langgraph_cli/__init__.py +0 -1
  13. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/.gitignore +0 -0
  14. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/LICENSE +0 -0
  15. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/Makefile +0 -0
  16. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/.env.example +0 -0
  17. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/.gitignore +0 -0
  18. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/Makefile +0 -0
  19. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graph_prerelease_reqs/agent.py +0 -0
  20. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graph_prerelease_reqs/deps/additional_deps/pyproject.toml +0 -0
  21. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graph_prerelease_reqs/deps/zuper_deps/pyproject.toml +0 -0
  22. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graph_prerelease_reqs/langgraph.json +0 -0
  23. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graph_prerelease_reqs/pyproject.toml +0 -0
  24. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graph_prerelease_reqs_fail/agent.py +0 -0
  25. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graph_prerelease_reqs_fail/langgraph.json +0 -0
  26. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graph_prerelease_reqs_fail/pyproject.toml +0 -0
  27. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs/agent.py +0 -0
  28. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs/langgraph.json +0 -0
  29. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs/storm.py +0 -0
  30. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_a/__init__.py +0 -0
  31. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_a/graphs_submod/__init__.py +0 -0
  32. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_a/graphs_submod/agent.py +0 -0
  33. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_a/graphs_submod/subprompt.txt +0 -0
  34. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_a/hello.py +0 -0
  35. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_a/langgraph.json +0 -0
  36. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_a/prompt.txt +0 -0
  37. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_a/requirements.txt +0 -0
  38. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_b/graphs_submod/agent.py +0 -0
  39. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_b/graphs_submod/subprompt.txt +0 -0
  40. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_b/hello.py +0 -0
  41. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_b/langgraph.json +0 -0
  42. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_b/prompt.txt +0 -0
  43. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_b/requirements.txt +0 -0
  44. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_b/utils/__init__.py +0 -0
  45. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/graphs_reqs_b/utils/greeter.py +0 -0
  46. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/langgraph.json +0 -0
  47. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/my_app.py +0 -0
  48. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/pipconf.txt +0 -0
  49. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/examples/pyproject.toml +0 -0
  50. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/generate_schema.py +0 -0
  51. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/.dockerignore +0 -0
  52. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/.editorconfig +0 -0
  53. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/.env.example +0 -0
  54. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/.eslintrc.cjs +0 -0
  55. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/.gitignore +0 -0
  56. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/LICENSE +0 -0
  57. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/README.md +0 -0
  58. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/jest.config.js +0 -0
  59. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/langgraph.json +0 -0
  60. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/package.json +0 -0
  61. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/src/agent/graph.ts +0 -0
  62. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/src/agent/state.ts +0 -0
  63. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/static/studio.png +0 -0
  64. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/tests/agent.test.ts +0 -0
  65. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/tests/graph.int.test.ts +0 -0
  66. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/tsconfig.json +0 -0
  67. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-examples/yarn.lock +0 -0
  68. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/.eslintrc.cjs +0 -0
  69. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/apps/agent/langgraph.json +0 -0
  70. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/apps/agent/package.json +0 -0
  71. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/apps/agent/src/graph.ts +0 -0
  72. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/apps/agent/src/state.ts +0 -0
  73. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/apps/agent/tsconfig.json +0 -0
  74. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/libs/shared/package.json +0 -0
  75. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/libs/shared/src/index.ts +0 -0
  76. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/libs/shared/tsconfig.json +0 -0
  77. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/package.json +0 -0
  78. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/tsconfig.json +0 -0
  79. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/turbo.json +0 -0
  80. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/js-monorepo-example/yarn.lock +0 -0
  81. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/__main__.py +0 -0
  82. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/_ignore.py +0 -0
  83. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/analytics.py +0 -0
  84. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/archive.py +0 -0
  85. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/cli.py +0 -0
  86. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/config.py +0 -0
  87. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/constants.py +0 -0
  88. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/dependency_tracking.py +0 -0
  89. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/deployment_metrics.py +0 -0
  90. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/docker.py +0 -0
  91. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/exec.py +0 -0
  92. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/image_reference.py +0 -0
  93. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/progress.py +0 -0
  94. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/py.typed +0 -0
  95. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/schemas.py +0 -0
  96. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/templates.py +0 -0
  97. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/util.py +0 -0
  98. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/uv_lock.py +0 -0
  99. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/langgraph_cli/version.py +0 -0
  100. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/pyproject.toml +0 -0
  101. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/python-monorepo-example/apps/agent/.env.example +0 -0
  102. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/python-monorepo-example/apps/agent/langgraph.json +0 -0
  103. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/python-monorepo-example/apps/agent/pyproject.toml +0 -0
  104. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/python-monorepo-example/apps/agent/src/agent/__init__.py +0 -0
  105. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/python-monorepo-example/apps/agent/src/agent/graph.py +0 -0
  106. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/python-monorepo-example/apps/agent/src/agent/state.py +0 -0
  107. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/python-monorepo-example/libs/common/__init__.py +0 -0
  108. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/python-monorepo-example/libs/common/helpers.py +0 -0
  109. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/python-monorepo-example/libs/shared/pyproject.toml +0 -0
  110. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/python-monorepo-example/libs/shared/src/shared/__init__.py +0 -0
  111. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/python-monorepo-example/libs/shared/src/shared/utils.py +0 -0
  112. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/python-monorepo-example/pyproject.toml +0 -0
  113. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/schemas/schema.json +0 -0
  114. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/schemas/schema.v0.json +0 -0
  115. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/schemas/version.schema.json +0 -0
  116. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/__init__.py +0 -0
  117. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/integration_tests/__init__.py +0 -0
  118. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/integration_tests/test_cli.py +0 -0
  119. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/__init__.py +0 -0
  120. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/agent.py +0 -0
  121. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/cli/__init__.py +0 -0
  122. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/cli/langgraph.json +0 -0
  123. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/cli/pyproject.toml +0 -0
  124. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/cli/test_deploy_monitoring.py +0 -0
  125. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/cli/test_templates.py +0 -0
  126. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/deployment_metrics.json +0 -0
  127. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/graphs/agent.py +0 -0
  128. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/helpers.py +0 -0
  129. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/multiplatform/js.mts +0 -0
  130. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/multiplatform/python.py +0 -0
  131. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/pipconfig.txt +0 -0
  132. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_archive.py +0 -0
  133. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_config.json +0 -0
  134. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_config.py +0 -0
  135. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_dependency_tracking.py +0 -0
  136. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_deploy_agents.py +0 -0
  137. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_deployment_metrics.py +0 -0
  138. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_docker.py +0 -0
  139. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_exec.py +0 -0
  140. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_image_reference.py +0 -0
  141. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_logs_helpers.py +0 -0
  142. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/tests/unit_tests/test_util.py +0 -0
  143. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/monorepo/apps/agent/.env.example +0 -0
  144. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/monorepo/apps/agent/langgraph.json +0 -0
  145. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/monorepo/apps/agent/pyproject.toml +0 -0
  146. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/monorepo/apps/agent/src/agent/__init__.py +0 -0
  147. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/monorepo/apps/agent/src/agent/graph.py +0 -0
  148. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/monorepo/libs/shared/pyproject.toml +0 -0
  149. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/monorepo/libs/shared/src/shared/__init__.py +0 -0
  150. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/monorepo/libs/shared/src/shared/utils.py +0 -0
  151. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/monorepo/pyproject.toml +0 -0
  152. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/monorepo/uv.lock +0 -0
  153. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/simple/.env.example +0 -0
  154. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/simple/langgraph.json +0 -0
  155. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/simple/pyproject.toml +0 -0
  156. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/simple/src/agent/__init__.py +0 -0
  157. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/simple/src/agent/graph.py +0 -0
  158. {langgraph_cli-0.4.43 → langgraph_cli-0.4.44}/uv-examples/simple/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: langgraph-cli
3
- Version: 0.4.43
3
+ Version: 0.4.44
4
4
  Summary: CLI for interacting with LangGraph API
5
5
  Project-URL: Source, https://github.com/langchain-ai/langgraph/tree/main/libs/cli
6
6
  Project-URL: Twitter, https://x.com/langchain_oss
@@ -117,11 +117,43 @@ as hidden compatibility aliases, with no removal scheduled. Older Python CLI
117
117
  versions and the JavaScript CLI may still require the legacy spellings; check
118
118
  command help for your installed version.
119
119
 
120
+ #### Where `deploy` sends requests
121
+
122
+ All `deploy` commands need only a LangSmith API key (`LANGSMITH_API_KEY`). The CLI
123
+ asks the LangSmith API (`LANGSMITH_ENDPOINT`, or `https://api.smith.langchain.com`
124
+ by default) which workspaces the key can use. If the workspace runs on a
125
+ LangSmith data plane in your own cloud (BYOC on AWS, Azure, or GCP), the CLI
126
+ talks to that data plane's host API and sets the workspace for you. The data
127
+ plane URL must use https, since the API key is sent there. Status links still
128
+ point at the LangSmith UI. If the key's workspaces sit on different data planes,
129
+ set `LANGSMITH_TENANT_ID` to the workspace ID to reach its data plane; without
130
+ it, the CLI starts on the LangSmith control plane, and the workspace ID you
131
+ enter when asked picks the data plane. A `LANGSMITH_TENANT_ID` the key can't
132
+ use is an error. If the workspace lookup fails, the CLI says so and uses the
133
+ LangSmith control plane.
134
+
135
+ `--host-url` (or `LANGGRAPH_HOST_URL`) sends every request to the given host
136
+ backend URL instead and skips this lookup.
137
+
138
+ #### What a data plane supports
139
+
140
+ On a BYOC data plane, the data plane decides which deployments `deploy` can make:
141
+
142
+ - Building with `deploy` (a local Docker build, or `--remote`) needs a data plane
143
+ that supports CLI builds. Otherwise, push to a registry you manage with
144
+ `--push-to <registry>/<repository>`, or deploy an existing image with
145
+ `--image-uri`. Both work on every data plane.
146
+ - `--agent-server-type` defaults to `serverless`, or to `dev` on a data plane
147
+ without scale to zero. Asking for `serverless` or `dedicated` on a data plane
148
+ that doesn't support it fails before anything is created.
149
+
120
150
  ### `langgraph deploy metrics`
121
151
 
122
- Fetch Agent Server monitoring time series as JSON through the LangSmith control plane.
123
- Use `langgraph deploy list` to find the Agent Server ID. Authentication uses the same
124
- API key and workspace configuration as the other `deploy` commands.
152
+ Fetch Agent Server monitoring time series as JSON. Like the other `deploy`
153
+ commands, it finds the API key's workspace and sends the request to that
154
+ workspace's control plane or data plane (see
155
+ [Where `deploy` sends requests](#where-deploy-sends-requests)). Use
156
+ `langgraph deploy list` to find the Agent Server ID.
125
157
 
126
158
  ```bash
127
159
  langgraph deploy metrics AGENT_SERVER_ID \
@@ -95,11 +95,43 @@ as hidden compatibility aliases, with no removal scheduled. Older Python CLI
95
95
  versions and the JavaScript CLI may still require the legacy spellings; check
96
96
  command help for your installed version.
97
97
 
98
+ #### Where `deploy` sends requests
99
+
100
+ All `deploy` commands need only a LangSmith API key (`LANGSMITH_API_KEY`). The CLI
101
+ asks the LangSmith API (`LANGSMITH_ENDPOINT`, or `https://api.smith.langchain.com`
102
+ by default) which workspaces the key can use. If the workspace runs on a
103
+ LangSmith data plane in your own cloud (BYOC on AWS, Azure, or GCP), the CLI
104
+ talks to that data plane's host API and sets the workspace for you. The data
105
+ plane URL must use https, since the API key is sent there. Status links still
106
+ point at the LangSmith UI. If the key's workspaces sit on different data planes,
107
+ set `LANGSMITH_TENANT_ID` to the workspace ID to reach its data plane; without
108
+ it, the CLI starts on the LangSmith control plane, and the workspace ID you
109
+ enter when asked picks the data plane. A `LANGSMITH_TENANT_ID` the key can't
110
+ use is an error. If the workspace lookup fails, the CLI says so and uses the
111
+ LangSmith control plane.
112
+
113
+ `--host-url` (or `LANGGRAPH_HOST_URL`) sends every request to the given host
114
+ backend URL instead and skips this lookup.
115
+
116
+ #### What a data plane supports
117
+
118
+ On a BYOC data plane, the data plane decides which deployments `deploy` can make:
119
+
120
+ - Building with `deploy` (a local Docker build, or `--remote`) needs a data plane
121
+ that supports CLI builds. Otherwise, push to a registry you manage with
122
+ `--push-to <registry>/<repository>`, or deploy an existing image with
123
+ `--image-uri`. Both work on every data plane.
124
+ - `--agent-server-type` defaults to `serverless`, or to `dev` on a data plane
125
+ without scale to zero. Asking for `serverless` or `dedicated` on a data plane
126
+ that doesn't support it fails before anything is created.
127
+
98
128
  ### `langgraph deploy metrics`
99
129
 
100
- Fetch Agent Server monitoring time series as JSON through the LangSmith control plane.
101
- Use `langgraph deploy list` to find the Agent Server ID. Authentication uses the same
102
- API key and workspace configuration as the other `deploy` commands.
130
+ Fetch Agent Server monitoring time series as JSON. Like the other `deploy`
131
+ commands, it finds the API key's workspace and sends the request to that
132
+ workspace's control plane or data plane (see
133
+ [Where `deploy` sends requests](#where-deploy-sends-requests)). Use
134
+ `langgraph deploy list` to find the Agent Server ID.
103
135
 
104
136
  ```bash
105
137
  langgraph deploy metrics AGENT_SERVER_ID \
@@ -0,0 +1 @@
1
+ __version__ = "0.4.44"
@@ -31,7 +31,12 @@ from langgraph_cli.host_backend import (
31
31
  ControlPlaneEndpoints,
32
32
  HostBackendClient,
33
33
  HostBackendError,
34
+ InstanceFlags,
35
+ LangSmithApiClient,
34
36
  SourceName,
37
+ Workspace,
38
+ WorkspaceRouter,
39
+ langsmith_api_url,
35
40
  )
36
41
  from langgraph_cli.image_reference import DIGEST_SEPARATOR, ImageReference
37
42
  from langgraph_cli.progress import Progress
@@ -108,6 +113,20 @@ _LISTENER_REQUIRED_MARKER = "listener_id' is required"
108
113
  _LISTENERS_SHOWN = 10
109
114
  _LISTENER_NOT_FOUND_STATUSES = frozenset({404, 422})
110
115
  _LISTENERS_DOCS_URL = "https://docs.langchain.com/langsmith/control-plane#listeners"
116
+ _DEFAULT_AGENT_SERVER_TYPE = "serverless"
117
+ _WIRE_DEPLOYMENT_TYPES = {"serverless": "dev_zero", "dedicated": "prod"}
118
+ _SOURCE_REJECTED_PREFIX = "'source' must be"
119
+ _RESOURCE_SPEC_REQUIRED_MARKER = "'source_config.resource_spec' is required"
120
+ _HOST_URL_ON_A_DATA_PLANE = (
121
+ "If --host-url or LANGGRAPH_HOST_URL points at a BYOC data plane, drop it so "
122
+ "'langgraph deploy' finds the data plane from your API key."
123
+ )
124
+ _CLI_BUILDS_UNSUPPORTED = (
125
+ "This LangSmith data plane does not build images for 'langgraph deploy'. "
126
+ "Push the image to a registry you manage with --push-to "
127
+ "<registry>/<repository>, or deploy an image that is already there with "
128
+ "--image-uri."
129
+ )
111
130
  _NO_LISTENERS = (
112
131
  "This workspace has no listeners, so --listener-id and --k8s-namespace "
113
132
  "do not apply."
@@ -651,7 +670,7 @@ class DeploymentRow:
651
670
  return (self.id, self.name, self.url)
652
671
 
653
672
  def as_json(self) -> dict[str, str | None]:
654
- return {"id": self.id, "name": self.name}
673
+ return {"id": self.id, "name": self.name, "url": self.url}
655
674
 
656
675
 
657
676
  DEPLOYMENTS_TABLE = Table(
@@ -1512,11 +1531,10 @@ def _run_remote_build(
1512
1531
  @dataclass(frozen=True, slots=True)
1513
1532
  class DeployContext:
1514
1533
  client: HostBackendClient
1515
- endpoints: ControlPlaneEndpoints
1516
1534
  spec: BuildSpec
1517
1535
  verbose: bool
1518
1536
  selector: DeploymentSelector
1519
- deployment_type: str
1537
+ agent_server_type: str | None
1520
1538
  secrets: list[dict[str, str]]
1521
1539
  tracked_packages: list[str] | None
1522
1540
 
@@ -1531,17 +1549,70 @@ class DeploymentSource(Protocol):
1531
1549
  def run(self, ctx: DeployContext) -> DeployOutcome: ...
1532
1550
 
1533
1551
 
1552
+ def _unsupported_agent_server_type(label: str) -> click.UsageError:
1553
+ return click.UsageError(
1554
+ f"This LangSmith data plane does not support {label} Agent Servers. "
1555
+ "Use --agent-server-type dev instead."
1556
+ )
1557
+
1558
+
1559
+ def _require_cli_builds(client: HostBackendClient) -> InstanceFlags | None:
1560
+ flags = client.instance_flags()
1561
+ if flags is not None and not flags.cli_builds:
1562
+ raise click.UsageError(_CLI_BUILDS_UNSUPPORTED)
1563
+ return flags
1564
+
1565
+
1566
+ def _data_plane_source_config(
1567
+ flags: InstanceFlags, agent_server_type: str | None
1568
+ ) -> dict[str, object]:
1569
+ requested = agent_server_type or (
1570
+ _DEFAULT_AGENT_SERVER_TYPE if flags.scale_to_zero else "dev"
1571
+ )
1572
+ if requested == "dev":
1573
+ return {"resource_spec": _OPERATOR_DEFAULT_RESOURCE_SPEC}
1574
+ if requested == "serverless":
1575
+ if not flags.scale_to_zero:
1576
+ raise _unsupported_agent_server_type("serverless (scale to zero)")
1577
+ return {
1578
+ "resource_spec": _OPERATOR_DEFAULT_RESOURCE_SPEC,
1579
+ "deployment_type": _WIRE_DEPLOYMENT_TYPES["serverless"],
1580
+ }
1581
+ if not flags.dedicated:
1582
+ raise _unsupported_agent_server_type("dedicated")
1583
+ return {
1584
+ "resource_spec": None,
1585
+ "deployment_type": _WIRE_DEPLOYMENT_TYPES["dedicated"],
1586
+ }
1587
+
1588
+
1589
+ def _new_deployment_source_config(
1590
+ flags: InstanceFlags | None, agent_server_type: str | None
1591
+ ) -> dict[str, object]:
1592
+ if flags is not None:
1593
+ return _data_plane_source_config(flags, agent_server_type)
1594
+ requested = agent_server_type or _DEFAULT_AGENT_SERVER_TYPE
1595
+ return {"deployment_type": _WIRE_DEPLOYMENT_TYPES.get(requested, requested)}
1596
+
1597
+
1598
+ def _with_hint(err: HostBackendError, hint: str) -> HostBackendError:
1599
+ return HostBackendError(
1600
+ f"{err.message}\n{hint}", status_code=err.status_code, detail=err.detail
1601
+ )
1602
+
1603
+
1534
1604
  def _resolve_or_create(
1535
1605
  ctx: DeployContext, *, source: SourceName, not_found_message: str
1536
1606
  ) -> tuple[str, int]:
1537
1607
  if isinstance(ctx.selector, ById):
1538
1608
  existing, step = _fetch_deployment(ctx.client, 1, ctx.selector)
1609
+ else:
1610
+ existing, step = _find_deployment(
1611
+ ctx.client, 1, ctx.selector, not_found_message=not_found_message
1612
+ )
1613
+ flags = _require_cli_builds(ctx.client)
1614
+ if existing is not None:
1539
1615
  return existing.id, step
1540
- found, step = _find_deployment(
1541
- ctx.client, 1, ctx.selector, not_found_message=not_found_message
1542
- )
1543
- if found is not None:
1544
- return found.id, step
1545
1616
  try:
1546
1617
  created, step = _create_deployment(
1547
1618
  ctx.client,
@@ -1549,7 +1620,7 @@ def _resolve_or_create(
1549
1620
  name=ctx.selector.name if isinstance(ctx.selector, ByName) else None,
1550
1621
  agent=asdict(ctx.selector) if isinstance(ctx.selector, ByAgent) else None,
1551
1622
  source=source,
1552
- source_config={"deployment_type": ctx.deployment_type},
1623
+ source_config=_new_deployment_source_config(flags, ctx.agent_server_type),
1553
1624
  source_revision_config={},
1554
1625
  secrets=ctx.secrets,
1555
1626
  )
@@ -1557,11 +1628,15 @@ def _resolve_or_create(
1557
1628
  if err.status_code == 400 and err.detail == (
1558
1629
  "Scale to zero deployments are not supported in AWS environments"
1559
1630
  ):
1560
- raise HostBackendError(
1561
- f"{err.message}\nUse --agent-server-type dev instead.",
1562
- status_code=err.status_code,
1563
- detail=err.detail,
1564
- ) from None
1631
+ raise _with_hint(err, "Use --agent-server-type dev instead.") from None
1632
+ if err.status_code == 400 and (err.detail or "").startswith(
1633
+ _SOURCE_REJECTED_PREFIX
1634
+ ):
1635
+ raise _with_hint(err, _CLI_BUILDS_UNSUPPORTED) from None
1636
+ if err.status_code == 400 and _RESOURCE_SPEC_REQUIRED_MARKER in (
1637
+ err.detail or ""
1638
+ ):
1639
+ raise _with_hint(err, _HOST_URL_ON_A_DATA_PLANE) from None
1565
1640
  if _needs_a_listener(err):
1566
1641
  raise ListenerRequiredError(
1567
1642
  "The image has to come from a registry you manage, so re-run with "
@@ -1787,7 +1862,7 @@ class CustomerRegistrySource:
1787
1862
  requested = self.create_only.placement
1788
1863
  if requested.listener_id is not None:
1789
1864
  return requested.on(_requested_listener(ctx.client, requested.listener_id))
1790
- if not (ctx.endpoints.is_cloud or requested.requested):
1865
+ if not (ctx.client.endpoints.is_cloud or requested.requested):
1791
1866
  return Unplaced()
1792
1867
  return requested.among(_available_listeners(ctx.client))
1793
1868
 
@@ -1995,18 +2070,62 @@ def _create_host_backend_client(
1995
2070
  fg="yellow",
1996
2071
  )
1997
2072
  resolved_api_key = click.prompt("Enter LangSmith API key", hide_input=True)
1998
- tenant_id = env_vars.get("LANGSMITH_TENANT_ID") or os.environ.get(
1999
- "LANGSMITH_TENANT_ID"
2073
+ tenant_id = (
2074
+ env_vars.get("LANGSMITH_TENANT_ID")
2075
+ or os.environ.get("LANGSMITH_TENANT_ID")
2076
+ or None
2000
2077
  )
2001
2078
  langsmith_endpoint = env_vars.get("LANGSMITH_ENDPOINT") or os.environ.get(
2002
2079
  "LANGSMITH_ENDPOINT"
2003
2080
  )
2004
- endpoints = ControlPlaneEndpoints.resolve(host_url, langsmith_endpoint)
2081
+ if host_url:
2082
+ return HostBackendClient(host_url, resolved_api_key, tenant_id)
2083
+ workspaces = _list_workspaces(
2084
+ LangSmithApiClient(langsmith_api_url(langsmith_endpoint), resolved_api_key)
2085
+ )
2086
+ target = _discover_target(workspaces, tenant_id)
2005
2087
  return HostBackendClient(
2006
- endpoints.control_plane_url, resolved_api_key, tenant_id=tenant_id
2088
+ ControlPlaneEndpoints.for_workspace(target.data_plane_url, langsmith_endpoint),
2089
+ resolved_api_key,
2090
+ target.tenant_id,
2091
+ router=WorkspaceRouter(workspaces, langsmith_endpoint),
2007
2092
  )
2008
2093
 
2009
2094
 
2095
+ @dataclass(frozen=True, slots=True)
2096
+ class HostTarget:
2097
+ tenant_id: str | None
2098
+ data_plane_url: str | None = None
2099
+
2100
+
2101
+ def _list_workspaces(langsmith: LangSmithApiClient) -> list[Workspace]:
2102
+ try:
2103
+ return langsmith.list_workspaces()
2104
+ except HostBackendError:
2105
+ click.secho(
2106
+ "Could not look up this API key's LangSmith workspaces; "
2107
+ "using the default LangSmith control plane.",
2108
+ fg="yellow",
2109
+ err=True,
2110
+ )
2111
+ return []
2112
+
2113
+
2114
+ def _discover_target(workspaces: list[Workspace], tenant_id: str | None) -> HostTarget:
2115
+ if tenant_id is not None and workspaces:
2116
+ workspaces = [w for w in workspaces if w.has_id(tenant_id)]
2117
+ if not workspaces:
2118
+ raise click.ClickException(
2119
+ f"This API key has no access to workspace {tenant_id}. "
2120
+ "Check LANGSMITH_TENANT_ID."
2121
+ )
2122
+ data_plane_urls = {w.data_plane_url for w in workspaces}
2123
+ if len(data_plane_urls) != 1 or None in data_plane_urls:
2124
+ return HostTarget(tenant_id)
2125
+ only_workspace_id = workspaces[0].id if len(workspaces) == 1 else None
2126
+ return HostTarget(only_workspace_id, data_plane_urls.pop())
2127
+
2128
+
2010
2129
  def _call_host_backend_with_optional_tenant(
2011
2130
  client: HostBackendClient,
2012
2131
  operation: Callable[[HostBackendClient], _T],
@@ -2227,12 +2346,13 @@ def _deploy_base_options(
2227
2346
  "--agent-server-type",
2228
2347
  "deployment_type",
2229
2348
  type=click.Choice(["serverless", "dedicated", "dev", "prod"]),
2230
- default="serverless",
2231
- show_default=True,
2349
+ default=None,
2350
+ show_default=_DEFAULT_AGENT_SERVER_TYPE,
2232
2351
  help=(
2233
2352
  "Agent Server type (used when creating a new Agent Server): "
2234
2353
  "serverless (scale to zero) or dedicated (prod); "
2235
- "legacy dev and prod are also accepted. "
2354
+ "legacy dev and prod are also accepted. Defaults to dev on "
2355
+ "a LangSmith data plane without scale to zero. "
2236
2356
  "Ignored with --push-to."
2237
2357
  ),
2238
2358
  ),
@@ -2417,7 +2537,7 @@ def _deploy_cmd(
2417
2537
  host_url: str | None,
2418
2538
  api_key: str | None,
2419
2539
  deployment_id: str | None,
2420
- deployment_type: str,
2540
+ deployment_type: str | None,
2421
2541
  name: str | None,
2422
2542
  agent_id: str | None,
2423
2543
  environment: str | None,
@@ -2517,7 +2637,6 @@ def _deploy_cmd(
2517
2637
  outcome = source.run(
2518
2638
  DeployContext(
2519
2639
  client=client,
2520
- endpoints=client.endpoints,
2521
2640
  spec=BuildSpec(
2522
2641
  config=config,
2523
2642
  config_json=config_json,
@@ -2530,9 +2649,7 @@ def _deploy_cmd(
2530
2649
  ),
2531
2650
  verbose=verbose,
2532
2651
  selector=selector,
2533
- deployment_type={"serverless": "dev_zero", "dedicated": "prod"}.get(
2534
- deployment_type, deployment_type
2535
- ),
2652
+ agent_server_type=deployment_type,
2536
2653
  secrets=secrets,
2537
2654
  tracked_packages=tracked_packages,
2538
2655
  )
@@ -2611,7 +2728,9 @@ def _deploy_cmd(
2611
2728
  "json_output",
2612
2729
  is_flag=True,
2613
2730
  default=False,
2614
- help="Print the Agent Servers as a JSON array of {id, name} instead of a table.",
2731
+ help=(
2732
+ "Print the Agent Servers as a JSON array of {id, name, url} instead of a table."
2733
+ ),
2615
2734
  )
2616
2735
  @deploy.command("list", help="[Beta] List Agent Servers.")
2617
2736
  def deploy_list(