langgraph-cli 0.2.12__tar.gz → 0.3.1__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 (85) hide show
  1. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/PKG-INFO +1 -1
  2. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/config.py +34 -6
  3. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/pyproject.toml +1 -1
  4. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/cli/test_cli.py +6 -2
  5. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/test_config.py +90 -43
  6. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/uv.lock +1 -1
  7. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/.gitignore +0 -0
  8. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/LICENSE +0 -0
  9. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/Makefile +0 -0
  10. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/README.md +0 -0
  11. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/.env.example +0 -0
  12. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/.gitignore +0 -0
  13. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/Makefile +0 -0
  14. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs/agent.py +0 -0
  15. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs/langgraph.json +0 -0
  16. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs/storm.py +0 -0
  17. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_a/__init__.py +0 -0
  18. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_a/graphs_submod/__init__.py +0 -0
  19. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_a/graphs_submod/agent.py +0 -0
  20. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_a/graphs_submod/subprompt.txt +0 -0
  21. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_a/hello.py +0 -0
  22. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_a/langgraph.json +0 -0
  23. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_a/prompt.txt +0 -0
  24. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_a/requirements.txt +0 -0
  25. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_b/graphs_submod/agent.py +0 -0
  26. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_b/graphs_submod/subprompt.txt +0 -0
  27. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_b/hello.py +0 -0
  28. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_b/langgraph.json +0 -0
  29. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_b/prompt.txt +0 -0
  30. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_b/requirements.txt +0 -0
  31. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_b/utils/__init__.py +0 -0
  32. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/graphs_reqs_b/utils/greeter.py +0 -0
  33. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/langgraph.json +0 -0
  34. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/my_app.py +0 -0
  35. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/pipconf.txt +0 -0
  36. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/poetry.lock +0 -0
  37. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/examples/pyproject.toml +0 -0
  38. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/generate_schema.py +0 -0
  39. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/.dockerignore +0 -0
  40. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/.env.example +0 -0
  41. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/.eslintrc.cjs +0 -0
  42. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/.gitignore +0 -0
  43. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/LICENSE +0 -0
  44. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/README.md +0 -0
  45. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/jest.config.js +0 -0
  46. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/langgraph.json +0 -0
  47. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/package.json +0 -0
  48. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/src/agent/graph.ts +0 -0
  49. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/src/agent/state.ts +0 -0
  50. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/static/studio.png +0 -0
  51. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/tests/agent.test.ts +0 -0
  52. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/tests/graph.int.test.ts +0 -0
  53. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/tsconfig.json +0 -0
  54. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/js-examples/yarn.lock +0 -0
  55. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/__init__.py +0 -0
  56. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/__main__.py +0 -0
  57. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/analytics.py +0 -0
  58. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/cli.py +0 -0
  59. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/constants.py +0 -0
  60. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/docker.py +0 -0
  61. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/exec.py +0 -0
  62. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/progress.py +0 -0
  63. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/py.typed +0 -0
  64. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/templates.py +0 -0
  65. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/util.py +0 -0
  66. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/langgraph_cli/version.py +0 -0
  67. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/schemas/schema.json +0 -0
  68. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/schemas/schema.v0.json +0 -0
  69. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/__init__.py +0 -0
  70. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/integration_tests/__init__.py +0 -0
  71. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/integration_tests/test_cli.py +0 -0
  72. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/__init__.py +0 -0
  73. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/agent.py +0 -0
  74. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/cli/__init__.py +0 -0
  75. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/cli/langgraph.json +0 -0
  76. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/cli/pyproject.toml +0 -0
  77. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/cli/test_templates.py +0 -0
  78. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/conftest.py +0 -0
  79. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/graphs/agent.py +0 -0
  80. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/helpers.py +0 -0
  81. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/multiplatform/js.mts +0 -0
  82. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/multiplatform/python.py +0 -0
  83. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/pipconfig.txt +0 -0
  84. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/test_config.json +0 -0
  85. {langgraph_cli-0.2.12 → langgraph_cli-0.3.1}/tests/unit_tests/test_docker.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langgraph-cli
3
- Version: 0.2.12
3
+ Version: 0.3.1
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,6 +1,7 @@
1
1
  import json
2
2
  import os
3
3
  import pathlib
4
+ import re
4
5
  import textwrap
5
6
  from collections import Counter
6
7
  from typing import Any, Literal, NamedTuple, Optional, TypedDict, Union
@@ -461,7 +462,7 @@ class Config(TypedDict, total=False):
461
462
  PIP_CLEANUP_LINES = """# -- Ensure user deps didn't inadvertently overwrite langgraph-api
462
463
  RUN mkdir -p /api/langgraph_api /api/langgraph_runtime /api/langgraph_license && \
463
464
  touch /api/langgraph_api/__init__.py /api/langgraph_runtime/__init__.py /api/langgraph_license/__init__.py
464
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir --no-deps -e /api
465
+ RUN PYTHONDONTWRITEBYTECODE=1 {install_cmd} --no-cache-dir --no-deps -e /api
465
466
  # -- End of ensuring user deps didn't inadvertently overwrite langgraph-api --
466
467
  # -- Removing pip from the final image ~<:===~~~ --
467
468
  RUN pip uninstall -y pip setuptools wheel && \
@@ -470,6 +471,7 @@ RUN pip uninstall -y pip setuptools wheel && \
470
471
  # pip removal for wolfi
471
472
  RUN rm -rf /usr/lib/python*/site-packages/pip* /usr/lib/python*/site-packages/setuptools* /usr/lib/python*/site-packages/wheel* && \
472
473
  find /usr/bin -name "pip*" -delete || true
474
+ {uv_removal}
473
475
  # -- End of pip removal --"""
474
476
 
475
477
 
@@ -1089,16 +1091,38 @@ def _get_node_pm_install_cmd(config_path: pathlib.Path, config: Config) -> str:
1089
1091
  return install_cmd
1090
1092
 
1091
1093
 
1094
+ semver_pattern = re.compile(r":(\d+(?:\.\d+)?(?:\.\d+)?)(?:-|$)")
1095
+
1096
+
1097
+ def _image_supports_uv(base_image: str) -> bool:
1098
+ if base_image == "langchain/langgraph-trial":
1099
+ return False
1100
+ match = semver_pattern.search(base_image)
1101
+ if not match:
1102
+ # Default image (langchain/langgraph-api) supports it.
1103
+ return True
1104
+
1105
+ version_str = match.group(1)
1106
+ version = tuple(map(int, version_str.split(".")))
1107
+ min_uv = (0, 2, 47)
1108
+ return version >= min_uv
1109
+
1110
+
1092
1111
  def python_config_to_docker(
1093
1112
  config_path: pathlib.Path,
1094
1113
  config: Config,
1095
1114
  base_image: str,
1096
1115
  ) -> tuple[str, dict[str, str]]:
1097
1116
  """Generate a Dockerfile from the configuration."""
1117
+ if _image_supports_uv(base_image):
1118
+ install_cmd = "uv pip install --system"
1119
+ uv_removal = "RUN uv pip uninstall --system pip setuptools wheel && rm /usr/bin/uv /usr/bin/uvx"
1120
+ else:
1121
+ install_cmd = "pip install"
1122
+ uv_removal = ""
1123
+
1098
1124
  # configure pip
1099
- pip_install = (
1100
- "PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt"
1101
- )
1125
+ pip_install = f"PYTHONDONTWRITEBYTECODE=1 {install_cmd} --no-cache-dir -c /api/constraints.txt"
1102
1126
  if config.get("pip_config_file"):
1103
1127
  pip_install = f"PIP_CONFIG_FILE=/pipconfig.txt {pip_install}"
1104
1128
  pip_config_file_str = (
@@ -1151,7 +1175,10 @@ RUN set -ex && \\
1151
1175
  'name = "{fullpath.name}"' \\
1152
1176
  'version = "0.1"' \\
1153
1177
  '[tool.setuptools.package-data]' \\
1154
- '"*" = ["**/*"]'; do \\
1178
+ '"*" = ["**/*"]' \\
1179
+ '[build-system]' \\
1180
+ 'requires = ["setuptools>=61"]' \\
1181
+ 'build-backend = "setuptools.build_meta"'; do \\
1155
1182
  echo "$line" >> /deps/__outer_{fullpath.name}/pyproject.toml; \\
1156
1183
  done
1157
1184
  # -- End of non-package dependency {fullpath.name} --"""
@@ -1240,7 +1267,8 @@ ADD {relpath} /deps/{name}
1240
1267
  "",
1241
1268
  js_inst_str,
1242
1269
  "",
1243
- PIP_CLEANUP_LINES, # Add pip cleanup after all installations are complete
1270
+ # Add pip cleanup after all installations are complete
1271
+ PIP_CLEANUP_LINES.format(install_cmd=install_cmd, uv_removal=uv_removal),
1244
1272
  "",
1245
1273
  f"WORKDIR {local_deps.working_dir}" if local_deps.working_dir else "",
1246
1274
  ]
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "langgraph-cli"
7
- version = "0.2.12"
7
+ version = "0.3.1"
8
8
  description = "CLI for interacting with LangGraph API"
9
9
  authors = []
10
10
  requires-python = ">=3.9"
@@ -14,6 +14,10 @@ from langgraph_cli.config import PIP_CLEANUP_LINES, Config, validate_config
14
14
  from langgraph_cli.docker import DEFAULT_POSTGRES_URI, DockerCapabilities, Version
15
15
  from langgraph_cli.util import clean_empty_lines
16
16
 
17
+ FORMATTED_CLEANUP_LINES = PIP_CLEANUP_LINES.format(
18
+ install_cmd="uv pip install --system",
19
+ uv_removal="RUN uv pip uninstall --system pip setuptools wheel && rm /usr/bin/uv /usr/bin/uvx",
20
+ )
17
21
  DEFAULT_DOCKER_CAPABILITIES = DockerCapabilities(
18
22
  version_docker=Version(26, 1, 1),
19
23
  version_compose=Version(2, 27, 0),
@@ -144,10 +148,10 @@ services:
144
148
  COPY --from=cli_1 . /deps/cli_1
145
149
  # -- End of local package ../../.. --
146
150
  # -- Installing all local dependencies --
147
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
151
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
148
152
  # -- End of local dependencies install --
149
153
  ENV LANGSERVE_GRAPHS='{{"agent": "agent.py:graph"}}'
150
- {textwrap.indent(textwrap.dedent(PIP_CLEANUP_LINES), " ")}
154
+ {textwrap.indent(textwrap.dedent(FORMATTED_CLEANUP_LINES), " ")}
151
155
  WORKDIR /deps/cli
152
156
 
153
157
  develop:
@@ -17,6 +17,11 @@ from langgraph_cli.config import (
17
17
  )
18
18
  from langgraph_cli.util import clean_empty_lines
19
19
 
20
+ FORMATTED_CLEANUP_LINES = PIP_CLEANUP_LINES.format(
21
+ install_cmd="uv pip install --system",
22
+ uv_removal="RUN uv pip uninstall --system pip setuptools wheel && rm /usr/bin/uv /usr/bin/uvx",
23
+ )
24
+
20
25
  PATH_TO_CONFIG = pathlib.Path(__file__).parent / "test_config.json"
21
26
 
22
27
 
@@ -345,7 +350,7 @@ def test_config_to_docker_simple():
345
350
  FROM langchain/langgraph-api:3.11
346
351
  # -- Installing local requirements --
347
352
  COPY --from=__outer_requirements.txt requirements.txt /deps/__outer_graphs_reqs_a/graphs_reqs_a/requirements.txt
348
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -r /deps/__outer_graphs_reqs_a/graphs_reqs_a/requirements.txt
353
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -r /deps/__outer_graphs_reqs_a/graphs_reqs_a/requirements.txt
349
354
  # -- End of local requirements install --
350
355
  # -- Adding local package ../../examples --
351
356
  COPY --from=examples . /deps/examples
@@ -357,7 +362,10 @@ RUN set -ex && \\
357
362
  'name = "unit_tests"' \\
358
363
  'version = "0.1"' \\
359
364
  '[tool.setuptools.package-data]' \\
360
- '"*" = ["**/*"]'; do \\
365
+ '"*" = ["**/*"]' \\
366
+ '[build-system]' \\
367
+ 'requires = ["setuptools>=61"]' \\
368
+ 'build-backend = "setuptools.build_meta"'; do \\
361
369
  echo "$line" >> /deps/__outer_unit_tests/pyproject.toml; \\
362
370
  done
363
371
  # -- End of non-package dependency unit_tests --
@@ -368,16 +376,19 @@ RUN set -ex && \\
368
376
  'name = "graphs_reqs_a"' \\
369
377
  'version = "0.1"' \\
370
378
  '[tool.setuptools.package-data]' \\
371
- '"*" = ["**/*"]'; do \\
379
+ '"*" = ["**/*"]' \\
380
+ '[build-system]' \\
381
+ 'requires = ["setuptools>=61"]' \\
382
+ 'build-backend = "setuptools.build_meta"'; do \\
372
383
  echo "$line" >> /deps/__outer_graphs_reqs_a/pyproject.toml; \\
373
384
  done
374
385
  # -- End of non-package dependency graphs_reqs_a --
375
386
  # -- Installing all local dependencies --
376
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
387
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
377
388
  # -- End of local dependencies install --
378
389
  ENV LANGGRAPH_HTTP='{{"app": "/deps/examples/my_app.py:app"}}'
379
390
  ENV LANGSERVE_GRAPHS='{{"agent": "/deps/__outer_unit_tests/unit_tests/agent.py:graph"}}'
380
- {PIP_CLEANUP_LINES}
391
+ {FORMATTED_CLEANUP_LINES}
381
392
  WORKDIR /deps/__outer_unit_tests/unit_tests\
382
393
  """
383
394
  assert clean_empty_lines(actual_docker_stdin) == expected_docker_stdin
@@ -407,7 +418,10 @@ RUN set -ex && \\
407
418
  'name = "unit_tests"' \\
408
419
  'version = "0.1"' \\
409
420
  '[tool.setuptools.package-data]' \\
410
- '"*" = ["**/*"]'; do \\
421
+ '"*" = ["**/*"]' \\
422
+ '[build-system]' \\
423
+ 'requires = ["setuptools>=61"]' \\
424
+ 'build-backend = "setuptools.build_meta"'; do \\
411
425
  echo "$line" >> /deps/__outer_unit_tests/pyproject.toml; \\
412
426
  done
413
427
  # -- End of non-package dependency unit_tests --
@@ -418,16 +432,19 @@ RUN set -ex && \\
418
432
  'name = "tests"' \\
419
433
  'version = "0.1"' \\
420
434
  '[tool.setuptools.package-data]' \\
421
- '"*" = ["**/*"]'; do \\
435
+ '"*" = ["**/*"]' \\
436
+ '[build-system]' \\
437
+ 'requires = ["setuptools>=61"]' \\
438
+ 'build-backend = "setuptools.build_meta"'; do \\
422
439
  echo "$line" >> /deps/__outer_tests/pyproject.toml; \\
423
440
  done
424
441
  # -- End of non-package dependency tests --
425
442
  # -- Installing all local dependencies --
426
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
443
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
427
444
  # -- End of local dependencies install --
428
445
  ENV LANGSERVE_GRAPHS='{"agent": "/deps/__outer_unit_tests/unit_tests/agent.py:graph"}'
429
446
  """
430
- + PIP_CLEANUP_LINES
447
+ + FORMATTED_CLEANUP_LINES
431
448
  + """
432
449
  WORKDIR /deps/__outer_unit_tests/unit_tests\
433
450
  """
@@ -462,16 +479,19 @@ RUN set -ex && \\
462
479
  'name = "unit_tests"' \\
463
480
  'version = "0.1"' \\
464
481
  '[tool.setuptools.package-data]' \\
465
- '"*" = ["**/*"]'; do \\
482
+ '"*" = ["**/*"]' \\
483
+ '[build-system]' \\
484
+ 'requires = ["setuptools>=61"]' \\
485
+ 'build-backend = "setuptools.build_meta"'; do \\
466
486
  echo "$line" >> /deps/__outer_unit_tests/pyproject.toml; \\
467
487
  done
468
488
  # -- End of non-package dependency unit_tests --
469
489
  # -- Installing all local dependencies --
470
- RUN PIP_CONFIG_FILE=/pipconfig.txt PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
490
+ RUN PIP_CONFIG_FILE=/pipconfig.txt PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
471
491
  # -- End of local dependencies install --
472
492
  ENV LANGSERVE_GRAPHS='{"agent": "/deps/__outer_unit_tests/unit_tests/agent.py:graph"}'
473
493
  """
474
- + PIP_CLEANUP_LINES
494
+ + FORMATTED_CLEANUP_LINES
475
495
  + """
476
496
  WORKDIR /deps/__outer_unit_tests/unit_tests\
477
497
  """
@@ -521,15 +541,18 @@ RUN set -ex && \\
521
541
  'name = "graphs"' \\
522
542
  'version = "0.1"' \\
523
543
  '[tool.setuptools.package-data]' \\
524
- '"*" = ["**/*"]'; do \\
544
+ '"*" = ["**/*"]' \\
545
+ '[build-system]' \\
546
+ 'requires = ["setuptools>=61"]' \\
547
+ 'build-backend = "setuptools.build_meta"'; do \\
525
548
  echo "$line" >> /deps/__outer_graphs/pyproject.toml; \\
526
549
  done
527
550
  # -- End of non-package dependency graphs --
528
551
  # -- Installing all local dependencies --
529
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
552
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
530
553
  # -- End of local dependencies install --
531
554
  ENV LANGSERVE_GRAPHS='{{"agent": "/deps/__outer_graphs/src/agent.py:graph"}}'
532
- {PIP_CLEANUP_LINES}\
555
+ {FORMATTED_CLEANUP_LINES}\
533
556
  """
534
557
  assert clean_empty_lines(actual_docker_stdin) == expected_docker_stdin
535
558
  assert additional_contexts == {}
@@ -562,11 +585,11 @@ dependencies = ["langchain"]"""
562
585
  ADD . /deps/unit_tests
563
586
  # -- End of local package . --
564
587
  # -- Installing all local dependencies --
565
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
588
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
566
589
  # -- End of local dependencies install --
567
590
  ENV LANGSERVE_GRAPHS='{"agent": "/deps/unit_tests/graphs/agent.py:graph"}'
568
591
  """
569
- + PIP_CLEANUP_LINES
592
+ + FORMATTED_CLEANUP_LINES
570
593
  + "\n"
571
594
  + "WORKDIR /deps/unit_tests"
572
595
  ""
@@ -594,7 +617,7 @@ def test_config_to_docker_end_to_end():
594
617
  ARG meow
595
618
  ARG foo
596
619
  ADD pipconfig.txt /pipconfig.txt
597
- RUN PIP_CONFIG_FILE=/pipconfig.txt PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt langchain langchain_openai
620
+ RUN PIP_CONFIG_FILE=/pipconfig.txt PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt langchain langchain_openai
598
621
  # -- Adding non-package dependency graphs --
599
622
  ADD ./graphs/ /deps/__outer_graphs/src
600
623
  RUN set -ex && \\
@@ -602,15 +625,18 @@ RUN set -ex && \\
602
625
  'name = "graphs"' \\
603
626
  'version = "0.1"' \\
604
627
  '[tool.setuptools.package-data]' \\
605
- '"*" = ["**/*"]'; do \\
628
+ '"*" = ["**/*"]' \\
629
+ '[build-system]' \\
630
+ 'requires = ["setuptools>=61"]' \\
631
+ 'build-backend = "setuptools.build_meta"'; do \\
606
632
  echo "$line" >> /deps/__outer_graphs/pyproject.toml; \\
607
633
  done
608
634
  # -- End of non-package dependency graphs --
609
635
  # -- Installing all local dependencies --
610
- RUN PIP_CONFIG_FILE=/pipconfig.txt PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
636
+ RUN PIP_CONFIG_FILE=/pipconfig.txt PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
611
637
  # -- End of local dependencies install --
612
638
  ENV LANGSERVE_GRAPHS='{{"agent": "/deps/__outer_graphs/src/agent.py:graph"}}'
613
- {PIP_CLEANUP_LINES}"""
639
+ {FORMATTED_CLEANUP_LINES}"""
614
640
  assert clean_empty_lines(actual_docker_stdin) == expected_docker_stdin
615
641
  assert additional_contexts == {}
616
642
 
@@ -705,12 +731,15 @@ RUN set -ex && \\
705
731
  'name = "unit_tests"' \\
706
732
  'version = "0.1"' \\
707
733
  '[tool.setuptools.package-data]' \\
708
- '"*" = ["**/*"]'; do \\
734
+ '"*" = ["**/*"]' \\
735
+ '[build-system]' \\
736
+ 'requires = ["setuptools>=61"]' \\
737
+ 'build-backend = "setuptools.build_meta"'; do \\
709
738
  echo "$line" >> /deps/__outer_unit_tests/pyproject.toml; \\
710
739
  done
711
740
  # -- End of non-package dependency unit_tests --
712
741
  # -- Installing all local dependencies --
713
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
742
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
714
743
  # -- End of local dependencies install --
715
744
  ENV LANGGRAPH_UI='{{"agent": "./graphs/agent.ui.jsx"}}'
716
745
  ENV LANGGRAPH_UI_CONFIG='{{"shared": ["nuqs"]}}'
@@ -719,7 +748,7 @@ ENV LANGSERVE_GRAPHS='{{"agent": "/deps/__outer_unit_tests/unit_tests/agent.py:g
719
748
  ENV NODE_VERSION=20
720
749
  RUN cd /deps/__outer_unit_tests/unit_tests && npm i && tsx /api/langgraph_api/js/build.mts
721
750
  # -- End of JS dependencies install --
722
- {PIP_CLEANUP_LINES}
751
+ {FORMATTED_CLEANUP_LINES}
723
752
  WORKDIR /deps/__outer_unit_tests/unit_tests"""
724
753
 
725
754
  assert clean_empty_lines(actual_docker_stdin) == expected_docker_stdin
@@ -748,19 +777,22 @@ RUN set -ex && \\
748
777
  'name = "unit_tests"' \\
749
778
  'version = "0.1"' \\
750
779
  '[tool.setuptools.package-data]' \\
751
- '"*" = ["**/*"]'; do \\
780
+ '"*" = ["**/*"]' \\
781
+ '[build-system]' \\
782
+ 'requires = ["setuptools>=61"]' \\
783
+ 'build-backend = "setuptools.build_meta"'; do \\
752
784
  echo "$line" >> /deps/__outer_unit_tests/pyproject.toml; \\
753
785
  done
754
786
  # -- End of non-package dependency unit_tests --
755
787
  # -- Installing all local dependencies --
756
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
788
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
757
789
  # -- End of local dependencies install --
758
790
  ENV LANGSERVE_GRAPHS='{{"python": "/deps/__outer_unit_tests/unit_tests/multiplatform/python.py:graph", "js": "/deps/__outer_unit_tests/unit_tests/multiplatform/js.mts:graph"}}'
759
791
  # -- Installing JS dependencies --
760
792
  ENV NODE_VERSION=22
761
793
  RUN cd /deps/__outer_unit_tests/unit_tests && npm i && tsx /api/langgraph_api/js/build.mts
762
794
  # -- End of JS dependencies install --
763
- {PIP_CLEANUP_LINES}
795
+ {FORMATTED_CLEANUP_LINES}
764
796
  WORKDIR /deps/__outer_unit_tests/unit_tests"""
765
797
 
766
798
  assert clean_empty_lines(actual_docker_stdin) == expected_docker_stdin
@@ -770,7 +802,7 @@ WORKDIR /deps/__outer_unit_tests/unit_tests"""
770
802
  # config_to_compose
771
803
  def test_config_to_compose_simple_config():
772
804
  graphs = {"agent": "./agent.py:graph"}
773
- # Create a properly indented version of PIP_CLEANUP_LINES for compose files
805
+ # Create a properly indented version of FORMATTED_CLEANUP_LINES for compose files
774
806
  expected_compose_stdin = f"""
775
807
  pull_policy: build
776
808
  build:
@@ -784,15 +816,18 @@ def test_config_to_compose_simple_config():
784
816
  'name = "unit_tests"' \\
785
817
  'version = "0.1"' \\
786
818
  '[tool.setuptools.package-data]' \\
787
- '"*" = ["**/*"]'; do \\
819
+ '"*" = ["**/*"]' \\
820
+ '[build-system]' \\
821
+ 'requires = ["setuptools>=61"]' \\
822
+ 'build-backend = "setuptools.build_meta"'; do \\
788
823
  echo "$line" >> /deps/__outer_unit_tests/pyproject.toml; \\
789
824
  done
790
825
  # -- End of non-package dependency unit_tests --
791
826
  # -- Installing all local dependencies --
792
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
827
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
793
828
  # -- End of local dependencies install --
794
829
  ENV LANGSERVE_GRAPHS='{{"agent": "/deps/__outer_unit_tests/unit_tests/agent.py:graph"}}'
795
- {textwrap.indent(textwrap.dedent(PIP_CLEANUP_LINES), " ")}
830
+ {textwrap.indent(textwrap.dedent(FORMATTED_CLEANUP_LINES), " ")}
796
831
  WORKDIR /deps/__outer_unit_tests/unit_tests
797
832
  """
798
833
  actual_compose_stdin = config_to_compose(
@@ -822,15 +857,18 @@ def test_config_to_compose_env_vars():
822
857
  'name = "unit_tests"' \\
823
858
  'version = "0.1"' \\
824
859
  '[tool.setuptools.package-data]' \\
825
- '"*" = ["**/*"]'; do \\
860
+ '"*" = ["**/*"]' \\
861
+ '[build-system]' \\
862
+ 'requires = ["setuptools>=61"]' \\
863
+ 'build-backend = "setuptools.build_meta"'; do \\
826
864
  echo "$line" >> /deps/__outer_unit_tests/pyproject.toml; \\
827
865
  done
828
866
  # -- End of non-package dependency unit_tests --
829
867
  # -- Installing all local dependencies --
830
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
868
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
831
869
  # -- End of local dependencies install --
832
870
  ENV LANGSERVE_GRAPHS='{{"agent": "/deps/__outer_unit_tests/unit_tests/agent.py:graph"}}'
833
- {textwrap.indent(textwrap.dedent(PIP_CLEANUP_LINES), " ")}
871
+ {textwrap.indent(textwrap.dedent(FORMATTED_CLEANUP_LINES), " ")}
834
872
  WORKDIR /deps/__outer_unit_tests/unit_tests
835
873
  """
836
874
  openai_api_key = "key"
@@ -864,15 +902,18 @@ def test_config_to_compose_env_file():
864
902
  'name = "unit_tests"' \\
865
903
  'version = "0.1"' \\
866
904
  '[tool.setuptools.package-data]' \\
867
- '"*" = ["**/*"]'; do \\
905
+ '"*" = ["**/*"]' \\
906
+ '[build-system]' \\
907
+ 'requires = ["setuptools>=61"]' \\
908
+ 'build-backend = "setuptools.build_meta"'; do \\
868
909
  echo "$line" >> /deps/__outer_unit_tests/pyproject.toml; \\
869
910
  done
870
911
  # -- End of non-package dependency unit_tests --
871
912
  # -- Installing all local dependencies --
872
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
913
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
873
914
  # -- End of local dependencies install --
874
915
  ENV LANGSERVE_GRAPHS='{{"agent": "/deps/__outer_unit_tests/unit_tests/agent.py:graph"}}'
875
- {textwrap.indent(textwrap.dedent(PIP_CLEANUP_LINES), " ")}
916
+ {textwrap.indent(textwrap.dedent(FORMATTED_CLEANUP_LINES), " ")}
876
917
  WORKDIR /deps/__outer_unit_tests/unit_tests
877
918
  """
878
919
  actual_compose_stdin = config_to_compose(
@@ -899,15 +940,18 @@ def test_config_to_compose_watch():
899
940
  'name = "unit_tests"' \\
900
941
  'version = "0.1"' \\
901
942
  '[tool.setuptools.package-data]' \\
902
- '"*" = ["**/*"]'; do \\
943
+ '"*" = ["**/*"]' \\
944
+ '[build-system]' \\
945
+ 'requires = ["setuptools>=61"]' \\
946
+ 'build-backend = "setuptools.build_meta"'; do \\
903
947
  echo "$line" >> /deps/__outer_unit_tests/pyproject.toml; \\
904
948
  done
905
949
  # -- End of non-package dependency unit_tests --
906
950
  # -- Installing all local dependencies --
907
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
951
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
908
952
  # -- End of local dependencies install --
909
953
  ENV LANGSERVE_GRAPHS='{{"agent": "/deps/__outer_unit_tests/unit_tests/agent.py:graph"}}'
910
- {textwrap.indent(textwrap.dedent(PIP_CLEANUP_LINES), " ")}
954
+ {textwrap.indent(textwrap.dedent(FORMATTED_CLEANUP_LINES), " ")}
911
955
  WORKDIR /deps/__outer_unit_tests/unit_tests
912
956
 
913
957
  develop:
@@ -943,15 +987,18 @@ def test_config_to_compose_end_to_end():
943
987
  'name = "unit_tests"' \\
944
988
  'version = "0.1"' \\
945
989
  '[tool.setuptools.package-data]' \\
946
- '"*" = ["**/*"]'; do \\
990
+ '"*" = ["**/*"]' \\
991
+ '[build-system]' \\
992
+ 'requires = ["setuptools>=61"]' \\
993
+ 'build-backend = "setuptools.build_meta"'; do \\
947
994
  echo "$line" >> /deps/__outer_unit_tests/pyproject.toml; \\
948
995
  done
949
996
  # -- End of non-package dependency unit_tests --
950
997
  # -- Installing all local dependencies --
951
- RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -c /api/constraints.txt -e /deps/*
998
+ RUN PYTHONDONTWRITEBYTECODE=1 uv pip install --system --no-cache-dir -c /api/constraints.txt -e /deps/*
952
999
  # -- End of local dependencies install --
953
1000
  ENV LANGSERVE_GRAPHS='{{"agent": "/deps/__outer_unit_tests/unit_tests/agent.py:graph"}}'
954
- {textwrap.indent(textwrap.dedent(PIP_CLEANUP_LINES), " ")}
1001
+ {textwrap.indent(textwrap.dedent(FORMATTED_CLEANUP_LINES), " ")}
955
1002
  WORKDIR /deps/__outer_unit_tests/unit_tests
956
1003
 
957
1004
  develop:
@@ -501,7 +501,7 @@ wheels = [
501
501
 
502
502
  [[package]]
503
503
  name = "langgraph-cli"
504
- version = "0.2.12"
504
+ version = "0.3.1"
505
505
  source = { editable = "." }
506
506
  dependencies = [
507
507
  { name = "click" },
File without changes
File without changes
File without changes
File without changes