langgraph-api 0.6.13__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of langgraph-api might be problematic. Click here for more details.

Files changed (191) hide show
  1. langgraph_api-0.6.13/.gitignore +7 -0
  2. langgraph_api-0.6.13/LICENSE +93 -0
  3. langgraph_api-0.6.13/Makefile +256 -0
  4. langgraph_api-0.6.13/PKG-INFO +136 -0
  5. langgraph_api-0.6.13/README.md +101 -0
  6. langgraph_api-0.6.13/benchmark/.gitignore +10 -0
  7. langgraph_api-0.6.13/benchmark/Makefile +89 -0
  8. langgraph_api-0.6.13/benchmark/README.md +74 -0
  9. langgraph_api-0.6.13/benchmark/benchmark-runners/assistant.js +88 -0
  10. langgraph_api-0.6.13/benchmark/benchmark-runners/benchmark-runner.js +34 -0
  11. langgraph_api-0.6.13/benchmark/benchmark-runners/benchmarks.js +21 -0
  12. langgraph_api-0.6.13/benchmark/benchmark-runners/stream_write.js +98 -0
  13. langgraph_api-0.6.13/benchmark/benchmark-runners/thread.js +87 -0
  14. langgraph_api-0.6.13/benchmark/benchmark-runners/wait_write.js +65 -0
  15. langgraph_api-0.6.13/benchmark/burst.js +219 -0
  16. langgraph_api-0.6.13/benchmark/capacity_k6.js +220 -0
  17. langgraph_api-0.6.13/benchmark/capacity_runner.mjs +371 -0
  18. langgraph_api-0.6.13/benchmark/capacity_urls.mjs +8 -0
  19. langgraph_api-0.6.13/benchmark/clean.js +151 -0
  20. langgraph_api-0.6.13/benchmark/continuous/README.md +38 -0
  21. langgraph_api-0.6.13/benchmark/continuous/pyproject.toml +13 -0
  22. langgraph_api-0.6.13/benchmark/continuous/runner.py +699 -0
  23. langgraph_api-0.6.13/benchmark/continuous/uv.lock +228 -0
  24. langgraph_api-0.6.13/benchmark/graphs.js +238 -0
  25. langgraph_api-0.6.13/benchmark/mixed_workload_k6.js +290 -0
  26. langgraph_api-0.6.13/benchmark/mixed_workload_runner.mjs +171 -0
  27. langgraph_api-0.6.13/benchmark/package.json +17 -0
  28. langgraph_api-0.6.13/benchmark/ramp.js +193 -0
  29. langgraph_api-0.6.13/benchmark/reporting/dd_reporting.py +88 -0
  30. langgraph_api-0.6.13/benchmark/reporting/slack_slowest_runs.py +244 -0
  31. langgraph_api-0.6.13/benchmark/reporting/slack_summary.py +311 -0
  32. langgraph_api-0.6.13/benchmark/run_local.sh +27 -0
  33. langgraph_api-0.6.13/benchmark/update-revision.js +149 -0
  34. langgraph_api-0.6.13/benchmark/weather.js +75 -0
  35. langgraph_api-0.6.13/constraints.txt +22 -0
  36. langgraph_api-0.6.13/forbidden.txt +2 -0
  37. langgraph_api-0.6.13/healthcheck.py +49 -0
  38. langgraph_api-0.6.13/langgraph_api/__init__.py +1 -0
  39. langgraph_api-0.6.13/langgraph_api/api/__init__.py +202 -0
  40. langgraph_api-0.6.13/langgraph_api/api/a2a.py +1605 -0
  41. langgraph_api-0.6.13/langgraph_api/api/assistants.py +572 -0
  42. langgraph_api-0.6.13/langgraph_api/api/encryption_middleware.py +596 -0
  43. langgraph_api-0.6.13/langgraph_api/api/mcp.py +496 -0
  44. langgraph_api-0.6.13/langgraph_api/api/meta.py +125 -0
  45. langgraph_api-0.6.13/langgraph_api/api/openapi.py +346 -0
  46. langgraph_api-0.6.13/langgraph_api/api/profile.py +108 -0
  47. langgraph_api-0.6.13/langgraph_api/api/runs.py +814 -0
  48. langgraph_api-0.6.13/langgraph_api/api/store.py +186 -0
  49. langgraph_api-0.6.13/langgraph_api/api/threads.py +461 -0
  50. langgraph_api-0.6.13/langgraph_api/api/ui.py +83 -0
  51. langgraph_api-0.6.13/langgraph_api/asgi_transport.py +176 -0
  52. langgraph_api-0.6.13/langgraph_api/asyncio.py +299 -0
  53. langgraph_api-0.6.13/langgraph_api/auth/__init__.py +0 -0
  54. langgraph_api-0.6.13/langgraph_api/auth/custom.py +707 -0
  55. langgraph_api-0.6.13/langgraph_api/auth/langsmith/__init__.py +0 -0
  56. langgraph_api-0.6.13/langgraph_api/auth/langsmith/backend.py +101 -0
  57. langgraph_api-0.6.13/langgraph_api/auth/langsmith/client.py +144 -0
  58. langgraph_api-0.6.13/langgraph_api/auth/middleware.py +54 -0
  59. langgraph_api-0.6.13/langgraph_api/auth/noop.py +22 -0
  60. langgraph_api-0.6.13/langgraph_api/auth/studio_user.py +15 -0
  61. langgraph_api-0.6.13/langgraph_api/cli.py +572 -0
  62. langgraph_api-0.6.13/langgraph_api/command.py +31 -0
  63. langgraph_api-0.6.13/langgraph_api/config/__init__.py +443 -0
  64. langgraph_api-0.6.13/langgraph_api/config/_parse.py +47 -0
  65. langgraph_api-0.6.13/langgraph_api/config/schemas.py +422 -0
  66. langgraph_api-0.6.13/langgraph_api/cron_scheduler.py +82 -0
  67. langgraph_api-0.6.13/langgraph_api/encryption/__init__.py +13 -0
  68. langgraph_api-0.6.13/langgraph_api/encryption/context.py +35 -0
  69. langgraph_api-0.6.13/langgraph_api/encryption/custom.py +133 -0
  70. langgraph_api-0.6.13/langgraph_api/errors.py +58 -0
  71. langgraph_api-0.6.13/langgraph_api/executor_entrypoint.py +31 -0
  72. langgraph_api-0.6.13/langgraph_api/feature_flags.py +32 -0
  73. langgraph_api-0.6.13/langgraph_api/graph.py +708 -0
  74. langgraph_api-0.6.13/langgraph_api/grpc/__init__.py +0 -0
  75. langgraph_api-0.6.13/langgraph_api/grpc/client.py +190 -0
  76. langgraph_api-0.6.13/langgraph_api/grpc/config_conversion.py +228 -0
  77. langgraph_api-0.6.13/langgraph_api/grpc/generated/__init__.py +23 -0
  78. langgraph_api-0.6.13/langgraph_api/grpc/generated/core_api_pb2.py +201 -0
  79. langgraph_api-0.6.13/langgraph_api/grpc/generated/core_api_pb2.pyi +850 -0
  80. langgraph_api-0.6.13/langgraph_api/grpc/generated/core_api_pb2_grpc.py +1488 -0
  81. langgraph_api-0.6.13/langgraph_api/grpc/generated/engine_common_pb2.py +215 -0
  82. langgraph_api-0.6.13/langgraph_api/grpc/generated/engine_common_pb2.pyi +706 -0
  83. langgraph_api-0.6.13/langgraph_api/grpc/generated/engine_common_pb2_grpc.py +24 -0
  84. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_cancel_run_action_pb2.py +37 -0
  85. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_cancel_run_action_pb2.pyi +12 -0
  86. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_cancel_run_action_pb2_grpc.py +24 -0
  87. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_durability_pb2.py +37 -0
  88. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_durability_pb2.pyi +16 -0
  89. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_durability_pb2_grpc.py +24 -0
  90. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_multitask_strategy_pb2.py +37 -0
  91. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_multitask_strategy_pb2.pyi +16 -0
  92. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_multitask_strategy_pb2_grpc.py +24 -0
  93. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_run_status_pb2.py +37 -0
  94. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_run_status_pb2.pyi +22 -0
  95. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_run_status_pb2_grpc.py +24 -0
  96. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_stream_mode_pb2.py +37 -0
  97. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_stream_mode_pb2.pyi +28 -0
  98. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_stream_mode_pb2_grpc.py +24 -0
  99. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_thread_status_pb2.py +37 -0
  100. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_thread_status_pb2.pyi +16 -0
  101. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_thread_status_pb2_grpc.py +24 -0
  102. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_thread_stream_mode_pb2.py +37 -0
  103. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_thread_stream_mode_pb2.pyi +16 -0
  104. langgraph_api-0.6.13/langgraph_api/grpc/generated/enum_thread_stream_mode_pb2_grpc.py +24 -0
  105. langgraph_api-0.6.13/langgraph_api/grpc/generated/errors_pb2.py +39 -0
  106. langgraph_api-0.6.13/langgraph_api/grpc/generated/errors_pb2.pyi +21 -0
  107. langgraph_api-0.6.13/langgraph_api/grpc/generated/errors_pb2_grpc.py +24 -0
  108. langgraph_api-0.6.13/langgraph_api/grpc/ops/__init__.py +319 -0
  109. langgraph_api-0.6.13/langgraph_api/grpc/ops/assistants.py +421 -0
  110. langgraph_api-0.6.13/langgraph_api/grpc/ops/threads.py +511 -0
  111. langgraph_api-0.6.13/langgraph_api/http.py +190 -0
  112. langgraph_api-0.6.13/langgraph_api/http_metrics.py +149 -0
  113. langgraph_api-0.6.13/langgraph_api/http_metrics_utils.py +38 -0
  114. langgraph_api-0.6.13/langgraph_api/js/.gitignore +4 -0
  115. langgraph_api-0.6.13/langgraph_api/js/.prettierrc +3 -0
  116. langgraph_api-0.6.13/langgraph_api/js/__init__.py +0 -0
  117. langgraph_api-0.6.13/langgraph_api/js/base.py +59 -0
  118. langgraph_api-0.6.13/langgraph_api/js/build.mts +114 -0
  119. langgraph_api-0.6.13/langgraph_api/js/client.http.mts +156 -0
  120. langgraph_api-0.6.13/langgraph_api/js/client.mts +1155 -0
  121. langgraph_api-0.6.13/langgraph_api/js/errors.py +11 -0
  122. langgraph_api-0.6.13/langgraph_api/js/global.d.ts +9 -0
  123. langgraph_api-0.6.13/langgraph_api/js/package.json +47 -0
  124. langgraph_api-0.6.13/langgraph_api/js/remote.py +1133 -0
  125. langgraph_api-0.6.13/langgraph_api/js/schema.py +31 -0
  126. langgraph_api-0.6.13/langgraph_api/js/src/graph.mts +110 -0
  127. langgraph_api-0.6.13/langgraph_api/js/src/load.hooks.mjs +61 -0
  128. langgraph_api-0.6.13/langgraph_api/js/src/preload.mjs +29 -0
  129. langgraph_api-0.6.13/langgraph_api/js/src/utils/files.mts +7 -0
  130. langgraph_api-0.6.13/langgraph_api/js/src/utils/importMap.mts +85 -0
  131. langgraph_api-0.6.13/langgraph_api/js/src/utils/pythonSchemas.mts +28 -0
  132. langgraph_api-0.6.13/langgraph_api/js/src/utils/serde.mts +28 -0
  133. langgraph_api-0.6.13/langgraph_api/js/sse.py +137 -0
  134. langgraph_api-0.6.13/langgraph_api/js/traceblock.mts +25 -0
  135. langgraph_api-0.6.13/langgraph_api/js/tsconfig.json +15 -0
  136. langgraph_api-0.6.13/langgraph_api/js/ui.py +94 -0
  137. langgraph_api-0.6.13/langgraph_api/js/yarn.lock +1671 -0
  138. langgraph_api-0.6.13/langgraph_api/logging.py +206 -0
  139. langgraph_api-0.6.13/langgraph_api/metadata.py +259 -0
  140. langgraph_api-0.6.13/langgraph_api/middleware/__init__.py +0 -0
  141. langgraph_api-0.6.13/langgraph_api/middleware/http_logger.py +129 -0
  142. langgraph_api-0.6.13/langgraph_api/middleware/private_network.py +53 -0
  143. langgraph_api-0.6.13/langgraph_api/middleware/request_id.py +35 -0
  144. langgraph_api-0.6.13/langgraph_api/models/__init__.py +0 -0
  145. langgraph_api-0.6.13/langgraph_api/models/run.py +390 -0
  146. langgraph_api-0.6.13/langgraph_api/patch.py +50 -0
  147. langgraph_api-0.6.13/langgraph_api/queue_entrypoint.py +251 -0
  148. langgraph_api-0.6.13/langgraph_api/route.py +186 -0
  149. langgraph_api-0.6.13/langgraph_api/schema.py +382 -0
  150. langgraph_api-0.6.13/langgraph_api/self_hosted_logs.py +124 -0
  151. langgraph_api-0.6.13/langgraph_api/self_hosted_metrics.py +446 -0
  152. langgraph_api-0.6.13/langgraph_api/serde.py +240 -0
  153. langgraph_api-0.6.13/langgraph_api/server.py +293 -0
  154. langgraph_api-0.6.13/langgraph_api/sse.py +123 -0
  155. langgraph_api-0.6.13/langgraph_api/state.py +122 -0
  156. langgraph_api-0.6.13/langgraph_api/store.py +139 -0
  157. langgraph_api-0.6.13/langgraph_api/stream.py +526 -0
  158. langgraph_api-0.6.13/langgraph_api/thread_ttl.py +53 -0
  159. langgraph_api-0.6.13/langgraph_api/timing/__init__.py +25 -0
  160. langgraph_api-0.6.13/langgraph_api/timing/profiler.py +200 -0
  161. langgraph_api-0.6.13/langgraph_api/timing/timer.py +318 -0
  162. langgraph_api-0.6.13/langgraph_api/traceblock.py +22 -0
  163. langgraph_api-0.6.13/langgraph_api/tunneling/cloudflare.py +119 -0
  164. langgraph_api-0.6.13/langgraph_api/utils/__init__.py +211 -0
  165. langgraph_api-0.6.13/langgraph_api/utils/cache.py +95 -0
  166. langgraph_api-0.6.13/langgraph_api/utils/config.py +150 -0
  167. langgraph_api-0.6.13/langgraph_api/utils/errors.py +77 -0
  168. langgraph_api-0.6.13/langgraph_api/utils/future.py +224 -0
  169. langgraph_api-0.6.13/langgraph_api/utils/headers.py +163 -0
  170. langgraph_api-0.6.13/langgraph_api/utils/retriable_client.py +74 -0
  171. langgraph_api-0.6.13/langgraph_api/utils/stream_codec.py +315 -0
  172. langgraph_api-0.6.13/langgraph_api/utils/uuids.py +54 -0
  173. langgraph_api-0.6.13/langgraph_api/validation.py +169 -0
  174. langgraph_api-0.6.13/langgraph_api/webhook.py +163 -0
  175. langgraph_api-0.6.13/langgraph_api/worker.py +420 -0
  176. langgraph_api-0.6.13/langgraph_license/__init__.py +0 -0
  177. langgraph_api-0.6.13/langgraph_license/validation.py +27 -0
  178. langgraph_api-0.6.13/langgraph_runtime/__init__.py +39 -0
  179. langgraph_api-0.6.13/langgraph_runtime/checkpoint.py +4 -0
  180. langgraph_api-0.6.13/langgraph_runtime/database.py +4 -0
  181. langgraph_api-0.6.13/langgraph_runtime/lifespan.py +4 -0
  182. langgraph_api-0.6.13/langgraph_runtime/metrics.py +4 -0
  183. langgraph_api-0.6.13/langgraph_runtime/ops.py +4 -0
  184. langgraph_api-0.6.13/langgraph_runtime/queue.py +4 -0
  185. langgraph_api-0.6.13/langgraph_runtime/retry.py +4 -0
  186. langgraph_api-0.6.13/langgraph_runtime/store.py +4 -0
  187. langgraph_api-0.6.13/logging.json +20 -0
  188. langgraph_api-0.6.13/openapi.json +5672 -0
  189. langgraph_api-0.6.13/pyproject.toml +149 -0
  190. langgraph_api-0.6.13/scripts/create_license.py +62 -0
  191. langgraph_api-0.6.13/uv.lock +2024 -0
@@ -0,0 +1,7 @@
1
+ .envrc
2
+ .env_queue
3
+ .env
4
+ .ipynb_checkpoints
5
+ .langgraph-data
6
+ *.sock
7
+ langgraph_api.duckdb*
@@ -0,0 +1,93 @@
1
+ Elastic License 2.0
2
+
3
+ URL: https://www.elastic.co/licensing/elastic-license
4
+
5
+ ## Acceptance
6
+
7
+ By using the software, you agree to all of the terms and conditions below.
8
+
9
+ ## Copyright License
10
+
11
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
12
+ non-sublicensable, non-transferable license to use, copy, distribute, make
13
+ available, and prepare derivative works of the software, in each case subject to
14
+ the limitations and conditions below.
15
+
16
+ ## Limitations
17
+
18
+ You may not provide the software to third parties as a hosted or managed
19
+ service, where the service provides users with access to any substantial set of
20
+ the features or functionality of the software.
21
+
22
+ You may not move, change, disable, or circumvent the license key functionality
23
+ in the software, and you may not remove or obscure any functionality in the
24
+ software that is protected by the license key.
25
+
26
+ You may not alter, remove, or obscure any licensing, copyright, or other notices
27
+ of the licensor in the software. Any use of the licensor’s trademarks is subject
28
+ to applicable law.
29
+
30
+ ## Patents
31
+
32
+ The licensor grants you a license, under any patent claims the licensor can
33
+ license, or becomes able to license, to make, have made, use, sell, offer for
34
+ sale, import and have imported the software, in each case subject to the
35
+ limitations and conditions in this license. This license does not cover any
36
+ patent claims that you cause to be infringed by modifications or additions to
37
+ the software. If you or your company make any written claim that the software
38
+ infringes or contributes to infringement of any patent, your patent license for
39
+ the software granted under these terms ends immediately. If your company makes
40
+ such a claim, your patent license ends immediately for work on behalf of your
41
+ company.
42
+
43
+ ## Notices
44
+
45
+ You must ensure that anyone who gets a copy of any part of the software from you
46
+ also gets a copy of these terms.
47
+
48
+ If you modify the software, you must include in any modified copies of the
49
+ software prominent notices stating that you have modified the software.
50
+
51
+ ## No Other Rights
52
+
53
+ These terms do not imply any licenses other than those expressly granted in
54
+ these terms.
55
+
56
+ ## Termination
57
+
58
+ If you use the software in violation of these terms, such use is not licensed,
59
+ and your licenses will automatically terminate. If the licensor provides you
60
+ with a notice of your violation, and you cease all violation of this license no
61
+ later than 30 days after you receive that notice, your licenses will be
62
+ reinstated retroactively. However, if you violate these terms after such
63
+ reinstatement, any additional violation of these terms will cause your licenses
64
+ to terminate automatically and permanently.
65
+
66
+ ## No Liability
67
+
68
+ *As far as the law allows, the software comes as is, without any warranty or
69
+ condition, and the licensor will not be liable to you for any damages arising
70
+ out of these terms or the use or nature of the software, under any kind of
71
+ legal claim.*
72
+
73
+ ## Definitions
74
+
75
+ The **licensor** is the entity offering these terms, and the **software** is the
76
+ software the licensor makes available under these terms, including any portion
77
+ of it.
78
+
79
+ **you** refers to the individual or entity agreeing to these terms.
80
+
81
+ **your company** is any legal entity, sole proprietorship, or other kind of
82
+ organization that you work for, plus all organizations that have control over,
83
+ are under the control of, or are under common control with that
84
+ organization. **control** means ownership of substantially all the assets of an
85
+ entity, or the power to direct its management and policies by vote, contract, or
86
+ otherwise. Control can be direct or indirect.
87
+
88
+ **your licenses** are all the licenses granted to you for the software under
89
+ these terms.
90
+
91
+ **use** means anything you do with the software requiring one of your licenses.
92
+
93
+ **trademark** means trademarks, service marks, and similar rights.
@@ -0,0 +1,256 @@
1
+ .PHONY: build release lint format test test_watch start start-inmem start-inmem-license-oss start start-js-server build-go-server start-go-server stop-go-server check-version check-base-imports
2
+
3
+ # Environment variables
4
+ FF_USE_CORE_API ?= false
5
+ LANGSERVE_GRAPHS_ALL = '{"agent": {"path": "./tests/graphs/agent.py:graph", "description": "agent"}, "custom_lifespan": "./tests/graphs/my_router.py:graph", "single_node": "./tests/graphs/single_node.py:graph", "benchmark": "./tests/graphs/benchmark.py:graph", "config_graph": "./tests/graphs/config_graph.py:graph", "other": "./tests/graphs/other.py:make_graph", "weather": "./tests/graphs/weather.py:mk_weather_graph", "searchy": "./tests/graphs/searchy.py:graph", "agent_simple": "./tests/graphs/agent_simple.py:graph", "simple_runtime": "./tests/graphs/simple_runtime.py:graph", "agent_interrupt": "./tests/graphs/agent_interrupt.py:graph", "message_type_test": "./tests/graphs/message_type_test.py:graph", "remote_subgraph_parent": "./tests/graphs/remote_subgraph_parent.py:graph", "simple_remote": "./tests/graphs/simple_remote.py:graph", "nested_subgraphs": "./tests/graphs/nested_subgraphs.py:graph", "functional_fibonacci": "./tests/graphs/functional_fibonacci.py:fibonacci", "state_graph_fibonacci": "./tests/graphs/state_graph_fibonacci.py:fibonacci"}'
6
+ LANGSERVE_GRAPHS_AUTH = '{"agent": {"path": "./tests/graphs/agent.py:graph", "description": "agent"}, "config_graph": "./tests/graphs/config_graph.py:graph", "other": "./tests/graphs/other.py:make_graph", "weather": "./tests/graphs/weather.py:mk_weather_graph", "searchy": "./tests/graphs/searchy.py:graph", "agent_simple": "./tests/graphs/agent_simple.py:graph", "simple_runtime": "./tests/graphs/simple_runtime.py:graph", "functional_fibonacci": "./tests/graphs/functional_fibonacci.py:fibonacci", "state_graph_fibonacci": "./tests/graphs/state_graph_fibonacci.py:fibonacci"}'
7
+
8
+ # Go server management
9
+ build-go-server:
10
+ @echo "Building core-server..."
11
+ $(MAKE) -C ../core build-core-server
12
+
13
+ start-go-server: # NOTE: core server will start with sqlite if no DATABASE_URI is provided
14
+ @echo "Starting Core API (SQLite) gRPC server on port 50051..."
15
+ cd ../core && \
16
+ FF_USE_CORE_API=true \
17
+ LANGSERVE_GRAPHS=$(LANGSERVE_GRAPHS_ALL) \
18
+ DATABASE_URI= \
19
+ REDIS_URI= \
20
+ ./bin/core-server \
21
+ -service core-api \
22
+ -apply-db-schema &
23
+ @sleep 2
24
+
25
+ stop-go-server:
26
+ @echo "Stopping Core API gRPC server on port 50051..."
27
+ @lsof -ti:50051 | xargs -r kill -9 || echo "No process found on port 50051"
28
+
29
+ # lint commands
30
+
31
+ lint:
32
+ uv run ruff check . --exclude "**/generated/**"
33
+ uv run ruff format . --diff --exclude "**/generated/**"
34
+ uv run ty check --exclude "**/pb/**" --exclude "**/*_test.py" --exclude "**/test_*.py" --exclude "**/tests/**" --exclude "venv/**" --exclude ".venv/**" --exclude "build/**" --exclude "dist/**" --exclude "**/generated/**" .
35
+
36
+ format:
37
+ uv run ruff check --fix . --exclude "**/generated/**"
38
+ uv run ruff format . --exclude "**/generated/**"
39
+
40
+ check-base-imports:
41
+ LANGGRAPH_RUNTIME_EDITION=inmem DATABASE_URI=:memory: REDIS_URI=_FAKE uv run python -c "from langgraph_api.config import *; from langgraph_runtime import *"
42
+
43
+ # test commands
44
+
45
+ TEST ?= tests/ ../runtime_inmem/tests/
46
+ AUTH_TEST ?= "tests/integration_tests/test_custom_auth.py"
47
+ LANGGRAPH_HTTP ?= {"disable_mcp": false, "disable_a2a": false}
48
+ LANGGRAPH_AES_KEY ?= '1234567890123456'
49
+ BG_JOB_TIMEOUT_SECS ?= 3600
50
+
51
+ ifeq ($(LANGGRAPH_HTTP),fastapi)
52
+ HTTP_CONFIG := {"app": "./tests/graphs/my_router.py:app", "disable_mcp": false, "disable_a2a": false, "mount_prefix": "/my-cool/api"}
53
+ else
54
+ HTTP_CONFIG := $(LANGGRAPH_HTTP)
55
+ endif
56
+
57
+ LANGGRAPH_STORE ?= ""
58
+ ifeq ($(LANGGRAPH_STORE),custom)
59
+ STORE_CONFIG := {"path": "./tests/graphs/custom_store.py:generate_store"}
60
+ else
61
+ STORE_CONFIG := {"index": {"dims": 500, "embed": "./tests/graphs/test_utils/embeddings.py:embeddings"}}
62
+ endif
63
+
64
+ REVISION ?= $(shell git rev-parse --short HEAD)
65
+ LANGGRAPH_ENCRYPTION ?=
66
+
67
+ test-license-oss:
68
+ @if [ "$(FF_USE_CORE_API)" = "true" ]; then \
69
+ LANGGRAPH_RUNTIME_EDITION=inmem LANGGRAPH_HTTP='$(HTTP_CONFIG)' LANGGRAPH_STORE='$(STORE_CONFIG)' LANGGRAPH_ENCRYPTION='$(LANGGRAPH_ENCRYPTION)' REDIS_URI=_FAKE DATABASE_URI=:memory: MIGRATIONS_PATH=__inmem__ FF_USE_CORE_API=true uv run pytest -m sqlite_grpc -v $(TEST); \
70
+ else \
71
+ LANGGRAPH_RUNTIME_EDITION=inmem LANGGRAPH_HTTP='$(HTTP_CONFIG)' LANGGRAPH_STORE='$(STORE_CONFIG)' LANGGRAPH_ENCRYPTION='$(LANGGRAPH_ENCRYPTION)' REDIS_URI=_FAKE DATABASE_URI=:memory: MIGRATIONS_PATH=__inmem__ uv run pytest -v $(TEST); \
72
+ fi
73
+
74
+ test-watch-oss:
75
+ LANGGRAPH_RUNTIME_EDITION=inmem LANGGRAPH_HTTP='$(HTTP_CONFIG)' LANGGRAPH_ENCRYPTION='$(LANGGRAPH_ENCRYPTION)' REDIS_URI=_FAKE DATABASE_URI=:memory: MIGRATIONS_PATH=__inmem__ uv run --no-sync ptw . -- -x -vv --ff --capture=no $(TEST)
76
+
77
+ test: test-license-oss
78
+ test-watch: test-watch-oss
79
+ unit-test:
80
+ DATABASE_URI="test" REDIS_URI="test" uv run pytest tests/unit_tests
81
+
82
+ test-auth:
83
+ LANGGRAPH_RUNTIME_EDITION=inmem LANGGRAPH_AUTH='{"path": "./tests/graphs/fastapi_jwt_auth.py:get_current_active_user"}' REDIS_URI=_FAKE DATABASE_URI=:memory: MIGRATIONS_PATH=__inmem__ uv run pytest -v $(AUTH_TEST)
84
+
85
+
86
+ define FASTAPI_JWT_AUTH_TEST
87
+ LANGGRAPH_RUNTIME_EDITION=inmem \
88
+ LANGGRAPH_AUTH='{"path": "./tests/graphs/fastapi_jwt_middleware_ordering.py:auth"}' \
89
+ REDIS_URI=_FAKE \
90
+ DATABASE_URI=:memory: \
91
+ MIGRATIONS_PATH=__inmem__ \
92
+ LANGGRAPH_HTTP='{"app": "./tests/graphs/fastapi_jwt_middleware_ordering.py:app", "middleware_order": "$(1)", "enable_custom_route_auth": $(2)}' \
93
+ uv run pytest -v $(AUTH_TEST)
94
+ endef
95
+
96
+ test-auth-fastapi-jwt--before-custom-middleware--no-custom-route-auth:
97
+ $(call FASTAPI_JWT_AUTH_TEST,auth_first,false)
98
+
99
+ test-auth-fastapi-jwt--after-custom-middleware--no-custom-route-auth:
100
+ $(call FASTAPI_JWT_AUTH_TEST,middleware_first,false)
101
+
102
+ test-auth-fastapi-jwt--before-custom-middleware--custom-route-auth:
103
+ $(call FASTAPI_JWT_AUTH_TEST,auth_first,true)
104
+
105
+ test-auth-fastapi-jwt--after-custom-middleware--custom-route-auth:
106
+ $(call FASTAPI_JWT_AUTH_TEST,middleware_first, true)
107
+
108
+
109
+ test-auth-watch:
110
+ LANGGRAPH_RUNTIME_EDITION=inmem LANGGRAPH_AUTH='{"path": "./tests/graphs/fastapi_jwt_auth.py:get_current_active_user"}' REDIS_URI=_FAKE DATABASE_URI=:memory: MIGRATIONS_PATH=__inmem__ uv run ptw . -- -x -vv --ff --capture=no $(AUTH_TEST)
111
+
112
+ # dev commands
113
+
114
+ start:
115
+ @if [ "$(FF_USE_CORE_API)" = "true" ]; then \
116
+ $(MAKE) build-go-server && $(MAKE) start-go-server; \
117
+ trap '$(MAKE) stop-go-server' INT TERM EXIT; \
118
+ fi; \
119
+ sleep 3 && \
120
+ LANGGRAPH_HTTP='$(HTTP_CONFIG)' \
121
+ LANGGRAPH_RUNTIME_EDITION=inmem \
122
+ LANGGRAPH_AES_KEY='$(LANGGRAPH_AES_KEY)' \
123
+ N_JOBS_PER_WORKER=2 \
124
+ LANGSERVE_GRAPHS=$(LANGSERVE_GRAPHS_ALL) \
125
+ LANGGRAPH_STORE='$(STORE_CONFIG)' \
126
+ LANGGRAPH_CONFIG='{"agent": {"configurable": {"model_name": "openai"}}}' \
127
+ LANGSMITH_LANGGRAPH_API_VARIANT=test \
128
+ FF_USE_CORE_API=$(FF_USE_CORE_API) \
129
+ BG_JOB_TIMEOUT_SECS=$(BG_JOB_TIMEOUT_SECS) \
130
+ REDIS_URI=fake \
131
+ DATABASE_URI=:memory: \
132
+ MIGRATIONS_PATH=__inmem \
133
+ uv run uvicorn \
134
+ "langgraph_api.server:app" \
135
+ --reload \
136
+ --port 9123 \
137
+ --reload-dir langgraph_api \
138
+ --reload-dir ../runtime_inmem \
139
+ --no-access-log
140
+
141
+
142
+ start-license-oss: start
143
+
144
+ start-encrypt:
145
+ LANGGRAPH_HTTP='$(HTTP_CONFIG)' \
146
+ LANGGRAPH_RUNTIME_EDITION=inmem \
147
+ LANGGRAPH_AES_KEY='$(LANGGRAPH_AES_KEY)' \
148
+ N_JOBS_PER_WORKER=2 \
149
+ LANGSERVE_GRAPHS=$(LANGSERVE_GRAPHS_ALL) \
150
+ LANGGRAPH_STORE='$(STORE_CONFIG)' \
151
+ LANGGRAPH_ENCRYPTION='{"path": "./tests/graphs/custom_encryption.py:encryption"}' \
152
+ LANGGRAPH_CONFIG='{"agent": {"configurable": {"model_name": "openai"}}}' \
153
+ LANGSMITH_LANGGRAPH_API_VARIANT=test \
154
+ BG_JOB_TIMEOUT_SECS=$(BG_JOB_TIMEOUT_SECS) \
155
+ REDIS_URI=fake \
156
+ DATABASE_URI=:memory: \
157
+ MIGRATIONS_PATH=__inmem \
158
+ uv run uvicorn \
159
+ "langgraph_api.server:app" \
160
+ --reload \
161
+ --port 9123 \
162
+ --reload-dir langgraph_api \
163
+ --reload-dir ../runtime_inmem \
164
+ --no-access-log
165
+
166
+
167
+ start-auth-jwt:
168
+ LANGGRAPH_RUNTIME_EDITION=inmem LANGGRAPH_HTTP='$(HTTP_CONFIG)' \
169
+ LANGGRAPH_AES_KEY='$(LANGGRAPH_AES_KEY)' \
170
+ N_JOBS_PER_WORKER=2 \
171
+ LANGSERVE_GRAPHS=$(LANGSERVE_GRAPHS_AUTH) \
172
+ LANGGRAPH_STORE='$(STORE_CONFIG)' \
173
+ LANGGRAPH_AUTH='{"path": "tests/graphs/jwt_auth.py:auth"}' \
174
+ LANGSMITH_LANGGRAPH_API_VARIANT=test \
175
+ REDIS_URI=fake \
176
+ DATABASE_URI=:memory: \
177
+ MIGRATIONS_PATH=__inmem \
178
+ uv run uvicorn \
179
+ "langgraph_api.server:app" \
180
+ --reload \
181
+ --port 9123 \
182
+ --reload-dir langgraph_api \
183
+ --reload-dir ../runtime_inmem \
184
+ --no-access-log
185
+
186
+ start-auth-fastapi-jwt:
187
+ LANGGRAPH_RUNTIME_EDITION=inmem LANGGRAPH_HTTP='$(HTTP_CONFIG)' \
188
+ N_JOBS_PER_WORKER=2 \
189
+ LANGSERVE_GRAPHS=$(LANGSERVE_GRAPHS_AUTH) \
190
+ LANGGRAPH_STORE='$(STORE_CONFIG)' \
191
+ LANGGRAPH_AUTH='{"path": "./tests/graphs/fastapi_jwt_auth.py:auth"}' \
192
+ LANGSMITH_LANGGRAPH_API_VARIANT=test \
193
+ REDIS_URI=fake \
194
+ DATABASE_URI=:memory: \
195
+ MIGRATIONS_PATH=__inmem \
196
+ uv run uvicorn \
197
+ "langgraph_api.server:app" \
198
+ --reload \
199
+ --port 9123 \
200
+ --reload-dir langgraph_api \
201
+ --reload-dir ../runtime_inmem \
202
+ --no-access-log
203
+
204
+ define RUN_FASTAPI_JWT_MW_ORDERING
205
+ LANGGRAPH_RUNTIME_EDITION=inmem \
206
+ LANGGRAPH_HTTP='{"app": "./tests/graphs/fastapi_jwt_middleware_ordering.py:app", "middleware_order": "$(1)", "enable_custom_route_auth": $(2)}' \
207
+ N_JOBS_PER_WORKER=2 \
208
+ LANGSERVE_GRAPHS=$(LANGSERVE_GRAPHS_AUTH) \
209
+ LANGGRAPH_STORE='$(STORE_CONFIG)' \
210
+ LANGGRAPH_AUTH='{"path": "./tests/graphs/fastapi_jwt_middleware_ordering.py:auth"}' \
211
+ LANGSMITH_LANGGRAPH_API_VARIANT=test \
212
+ REDIS_URI=fake \
213
+ DATABASE_URI=:memory: \
214
+ MIGRATIONS_PATH=__inmem \
215
+ uv run uvicorn \
216
+ "langgraph_api.server:app" \
217
+ --reload \
218
+ --port 9123 \
219
+ --reload-dir langgraph_api \
220
+ --reload-dir ../runtime_inmem \
221
+ --no-access-log
222
+ endef
223
+
224
+ start-auth-fastapi-jwt--before-custom-middleware--no-custom-route-auth:
225
+ $(call RUN_FASTAPI_JWT_MW_ORDERING,auth_first,false)
226
+
227
+ start-auth-fastapi-jwt--after-custom-middleware--no-custom-route-auth:
228
+ $(call RUN_FASTAPI_JWT_MW_ORDERING,middleware_first,false)
229
+
230
+ start-auth-fastapi-jwt--before-custom-middleware--custom-route-auth:
231
+ $(call RUN_FASTAPI_JWT_MW_ORDERING,auth_first,true)
232
+
233
+ start-auth-fastapi-jwt--after-custom-middleware--custom-route-auth:
234
+ $(call RUN_FASTAPI_JWT_MW_ORDERING,middleware_first,true)
235
+
236
+
237
+ start-js-server:
238
+ @echo "Building and starting Go gRPC server..."
239
+ $(MAKE) build-go-server
240
+ $(MAKE) start-go-server
241
+ @trap '$(MAKE) -C $(CURDIR) stop-go-server' INT TERM EXIT; \
242
+ echo "Installing JS server dependencies..."; \
243
+ cd ../public-api-server-js && yarn install; \
244
+ echo "Building JS server..."; \
245
+ cd ../public-api-server-js && yarn run build; \
246
+ echo "Starting JS server on port 9123..."; \
247
+ cd ../public-api-server-js && FF_USE_CORE_API=true \
248
+ LANGSERVE_GRAPHS=$(LANGSERVE_GRAPHS_ALL) \
249
+ LANGGRAPH_CONFIG='{"agent": {"configurable": {"model_name": "openai"}}}' \
250
+ FF_USE_JS_API=true \
251
+ PORT=9123 yarn start
252
+
253
+ VERSION_KIND ?= patch
254
+
255
+ bump-version:
256
+ uv run --with hatch hatch version $(VERSION_KIND)
@@ -0,0 +1,136 @@
1
+ Metadata-Version: 2.4
2
+ Name: langgraph-api
3
+ Version: 0.6.13
4
+ Author-email: Will Fu-Hinthorn <will@langchain.dev>, Josh Rogers <josh@langchain.dev>, Parker Rule <parker@langchain.dev>
5
+ License: Elastic-2.0
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.11
8
+ Requires-Dist: cloudpickle>=3.0.0
9
+ Requires-Dist: cryptography<47.0,>=42.0.0
10
+ Requires-Dist: grpcio-tools==1.75.1
11
+ Requires-Dist: grpcio<2.0.0,>=1.75.0
12
+ Requires-Dist: httpx>=0.25.0
13
+ Requires-Dist: jsonschema-rs<0.30,>=0.20.0
14
+ Requires-Dist: langchain-core>=0.3.64
15
+ Requires-Dist: langgraph-checkpoint<5,>=3.0.1
16
+ Requires-Dist: langgraph-runtime-inmem<0.21.0,>=0.20.0
17
+ Requires-Dist: langgraph-sdk>=0.3.0
18
+ Requires-Dist: langgraph<2,>=0.4.10
19
+ Requires-Dist: langsmith>=0.3.45
20
+ Requires-Dist: opentelemetry-api>=1.37.0
21
+ Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.37.0
22
+ Requires-Dist: opentelemetry-sdk>=1.37.0
23
+ Requires-Dist: orjson>=3.9.7
24
+ Requires-Dist: protobuf<7.0.0,>=6.32.1
25
+ Requires-Dist: pyjwt>=2.9.0
26
+ Requires-Dist: sse-starlette<2.2.0,>=2.1.0
27
+ Requires-Dist: starlette>=0.38.6
28
+ Requires-Dist: structlog<26,>=24.1.0
29
+ Requires-Dist: tenacity>=8.0.0
30
+ Requires-Dist: truststore>=0.1
31
+ Requires-Dist: uuid-utils>=0.12.0
32
+ Requires-Dist: uvicorn>=0.26.0
33
+ Requires-Dist: watchfiles>=0.13
34
+ Description-Content-Type: text/markdown
35
+
36
+ # LangGraph API
37
+
38
+ This package implements the LangGraph API for rapid development and testing. Build and iterate on LangGraph agents with a tight feedback loop. The server is backed by a predominently in-memory data store that is persisted to local disk when the server is restarted.
39
+
40
+ For production use, see the various [deployment options](https://langchain-ai.github.io/langgraph/concepts/deployment_options/) for the LangGraph API, which are backed by a production-grade database.
41
+
42
+ ## Installation
43
+
44
+ Install the `langgraph-cli` package with the `inmem` extra. Your CLI version must be no lower than `0.1.55`.
45
+
46
+ ```bash
47
+ pip install -U langgraph-cli[inmem]
48
+ ```
49
+
50
+ ## Quickstart
51
+
52
+ 1. (Optional) Clone a starter template:
53
+
54
+ ```bash
55
+ langgraph new --template new-langgraph-project-python ./my-project
56
+ cd my-project
57
+ ```
58
+
59
+ (Recommended) Use a virtual environment and install dependencies:
60
+
61
+ ```bash
62
+ python -m venv .venv
63
+ source .venv/bin/activate
64
+ python -m pip install .
65
+ ```
66
+
67
+ 2. Start the development server:
68
+
69
+ ```shell
70
+ langgraph dev --config ./langgraph.json
71
+ ```
72
+
73
+ 3. The server will launch, opening a browser window with the graph UI. Interact with your graph or make code edits; the server automatically reloads on changes.
74
+
75
+ ## Usage
76
+
77
+ Start the development server:
78
+
79
+ ```bash
80
+ langgraph dev
81
+ ```
82
+
83
+ Your agent's state (threads, runs, assistants) persists in memory while the server is running - perfect for development and testing. Each run's state is tracked and can be inspected, making it easy to debug and improve your agent's behavior.
84
+
85
+ ## How-To
86
+
87
+ #### Attaching a debugger
88
+ Debug mode lets you attach your IDE's debugger to the LangGraph API server to set breakpoints and step through your code line-by-line.
89
+
90
+ 1. Install debugpy:
91
+
92
+ ```bash
93
+ pip install debugpy
94
+ ```
95
+
96
+ 2. Start the server in debug mode:
97
+
98
+ ```bash
99
+ langgraph dev --debug-port 5678
100
+ ```
101
+
102
+ 3. Configure your IDE:
103
+
104
+ - **VS Code**: Add this launch configuration:
105
+ ```json
106
+ {
107
+ "name": "Attach to LangGraph",
108
+ "type": "debugpy",
109
+ "request": "attach",
110
+ "connect": {
111
+ "host": "0.0.0.0",
112
+ "port": 5678
113
+ },
114
+ }
115
+ ```
116
+ - **PyCharm**: Use "Attach to Process" and select the langgraph process
117
+
118
+ 4. Set breakpoints in your graph code and start debugging.
119
+
120
+ ## CLI options
121
+
122
+ ```bash
123
+ langgraph dev [OPTIONS]
124
+ Options:
125
+ --debug-port INTEGER Enable remote debugging on specified port
126
+ --no-browser Skip opening browser on startup
127
+ --n-jobs-per-worker INTEGER Maximum concurrent jobs per worker process
128
+ --config PATH Custom configuration file path
129
+ --no-reload Disable code hot reloading
130
+ --port INTEGER HTTP server port (default: 8000)
131
+ --host TEXT HTTP server host (default: localhost)
132
+ ```
133
+
134
+ ## License
135
+
136
+ This project is licensed under the Elastic License 2.0 - see the [LICENSE](./LICENSE) file for details.
@@ -0,0 +1,101 @@
1
+ # LangGraph API
2
+
3
+ This package implements the LangGraph API for rapid development and testing. Build and iterate on LangGraph agents with a tight feedback loop. The server is backed by a predominently in-memory data store that is persisted to local disk when the server is restarted.
4
+
5
+ For production use, see the various [deployment options](https://langchain-ai.github.io/langgraph/concepts/deployment_options/) for the LangGraph API, which are backed by a production-grade database.
6
+
7
+ ## Installation
8
+
9
+ Install the `langgraph-cli` package with the `inmem` extra. Your CLI version must be no lower than `0.1.55`.
10
+
11
+ ```bash
12
+ pip install -U langgraph-cli[inmem]
13
+ ```
14
+
15
+ ## Quickstart
16
+
17
+ 1. (Optional) Clone a starter template:
18
+
19
+ ```bash
20
+ langgraph new --template new-langgraph-project-python ./my-project
21
+ cd my-project
22
+ ```
23
+
24
+ (Recommended) Use a virtual environment and install dependencies:
25
+
26
+ ```bash
27
+ python -m venv .venv
28
+ source .venv/bin/activate
29
+ python -m pip install .
30
+ ```
31
+
32
+ 2. Start the development server:
33
+
34
+ ```shell
35
+ langgraph dev --config ./langgraph.json
36
+ ```
37
+
38
+ 3. The server will launch, opening a browser window with the graph UI. Interact with your graph or make code edits; the server automatically reloads on changes.
39
+
40
+ ## Usage
41
+
42
+ Start the development server:
43
+
44
+ ```bash
45
+ langgraph dev
46
+ ```
47
+
48
+ Your agent's state (threads, runs, assistants) persists in memory while the server is running - perfect for development and testing. Each run's state is tracked and can be inspected, making it easy to debug and improve your agent's behavior.
49
+
50
+ ## How-To
51
+
52
+ #### Attaching a debugger
53
+ Debug mode lets you attach your IDE's debugger to the LangGraph API server to set breakpoints and step through your code line-by-line.
54
+
55
+ 1. Install debugpy:
56
+
57
+ ```bash
58
+ pip install debugpy
59
+ ```
60
+
61
+ 2. Start the server in debug mode:
62
+
63
+ ```bash
64
+ langgraph dev --debug-port 5678
65
+ ```
66
+
67
+ 3. Configure your IDE:
68
+
69
+ - **VS Code**: Add this launch configuration:
70
+ ```json
71
+ {
72
+ "name": "Attach to LangGraph",
73
+ "type": "debugpy",
74
+ "request": "attach",
75
+ "connect": {
76
+ "host": "0.0.0.0",
77
+ "port": 5678
78
+ },
79
+ }
80
+ ```
81
+ - **PyCharm**: Use "Attach to Process" and select the langgraph process
82
+
83
+ 4. Set breakpoints in your graph code and start debugging.
84
+
85
+ ## CLI options
86
+
87
+ ```bash
88
+ langgraph dev [OPTIONS]
89
+ Options:
90
+ --debug-port INTEGER Enable remote debugging on specified port
91
+ --no-browser Skip opening browser on startup
92
+ --n-jobs-per-worker INTEGER Maximum concurrent jobs per worker process
93
+ --config PATH Custom configuration file path
94
+ --no-reload Disable code hot reloading
95
+ --port INTEGER HTTP server port (default: 8000)
96
+ --host TEXT HTTP server host (default: localhost)
97
+ ```
98
+
99
+ ## License
100
+
101
+ This project is licensed under the Elastic License 2.0 - see the [LICENSE](./LICENSE) file for details.
@@ -0,0 +1,10 @@
1
+ # K6 summary and results files
2
+ results_*.json
3
+ summary_*.json
4
+ raw_data_*.json
5
+
6
+ # Generated chart files
7
+ *_chart_*.png
8
+
9
+ # Node.js dependencies
10
+ node_modules/
@@ -0,0 +1,89 @@
1
+ # Benchmark commands
2
+ BASE_URL ?= https://benchmark-dr-s-2799835ad04b501a95044223ae72ced7.staging.langgraph.app
3
+ SLOWEST_N ?= 2
4
+ RAMP_START ?= 40
5
+ RAMP_END ?= 1000
6
+ RAMP_MULTIPLIER ?= 2
7
+ WAIT_SECONDS ?= 60
8
+ CLEAR_BETWEEN_STEPS ?= true
9
+ CLEAR_DELAY_SECONDS ?= 5
10
+ DATA_SIZE ?= 1000
11
+ DELAY ?= 0
12
+ EXPAND ?= 1
13
+ STEPS ?= 100
14
+
15
+ benchmark-burst:
16
+ make benchmark-reset
17
+ k6 run burst.js
18
+
19
+ benchmark-ramp:
20
+ make benchmark-reset
21
+ k6 run --out json=raw_data_$(shell date +%Y-%m-%dT%H-%M-%S).json --system-tags=[] ramp.js
22
+
23
+ benchmark-capacity:
24
+ rm -f capacity_summary_t*.json capacity_raw_t*.json capacity_histogram_*.json
25
+ npm install
26
+ BASE_URL=$(BASE_URL) \
27
+ SLOWEST_N=$(SLOWEST_N) \
28
+ RAMP_START=$(RAMP_START) \
29
+ RAMP_END=$(RAMP_END) \
30
+ RAMP_MULTIPLIER=$(RAMP_MULTIPLIER) \
31
+ WAIT_SECONDS=$(WAIT_SECONDS) \
32
+ CLEAR_BETWEEN_STEPS=$(CLEAR_BETWEEN_STEPS) \
33
+ CLEAR_DELAY_SECONDS=$(CLEAR_DELAY_SECONDS) \
34
+ DATA_SIZE=$(DATA_SIZE) \
35
+ DELAY=$(DELAY) \
36
+ EXPAND=$(EXPAND) \
37
+ STEPS=$(STEPS) \
38
+ node capacity_runner.mjs
39
+
40
+ benchmark-charts:
41
+ npm install
42
+ node graphs.js $(shell ls -t raw_data_*.json | head -1) true
43
+
44
+ benchmark-reset:
45
+ node clean.js
46
+
47
+ benchmark-new-revision:
48
+ node update-revision.js
49
+
50
+ benchmark-clean:
51
+ rm -f results_*.json summary_*.json raw_data_*.json *_chart_*.png
52
+
53
+ benchmark-clean-charts:
54
+ rm -f *_chart_*.png
55
+
56
+ # Mixed workload benchmark - tests quick runs competing with long runs
57
+ QUICK_VUS ?= 250
58
+ QUICK_ITERATIONS ?= 1000
59
+ QUICK_STEPS ?= 5
60
+ QUICK_DATA_SIZE ?= 100
61
+ QUICK_MAX_WAIT_SECONDS ?= 120
62
+ QUICK_POLL_INTERVAL ?= 2
63
+ LONG_VUS ?= 5
64
+ LONG_ITERATIONS ?= 10
65
+ LONG_STEPS ?= 50
66
+ LONG_DELAY ?= 1
67
+ LONG_DATA_SIZE ?= 10000
68
+ LONG_MAX_WAIT_SECONDS ?= 200
69
+ LONG_POLL_INTERVAL ?= 5
70
+
71
+ benchmark-mixed:
72
+ rm -f mixed_workload_*.json
73
+ npm install
74
+ BASE_URL=$(BASE_URL) \
75
+ SLOWEST_N=$(SLOWEST_N) \
76
+ QUICK_VUS=$(QUICK_VUS) \
77
+ QUICK_ITERATIONS=$(QUICK_ITERATIONS) \
78
+ QUICK_STEPS=$(QUICK_STEPS) \
79
+ QUICK_DATA_SIZE=$(QUICK_DATA_SIZE) \
80
+ QUICK_MAX_WAIT_SECONDS=$(QUICK_MAX_WAIT_SECONDS) \
81
+ QUICK_POLL_INTERVAL=$(QUICK_POLL_INTERVAL) \
82
+ LONG_VUS=$(LONG_VUS) \
83
+ LONG_ITERATIONS=$(LONG_ITERATIONS) \
84
+ LONG_STEPS=$(LONG_STEPS) \
85
+ LONG_DELAY=$(LONG_DELAY) \
86
+ LONG_DATA_SIZE=$(LONG_DATA_SIZE) \
87
+ LONG_MAX_WAIT_SECONDS=$(LONG_MAX_WAIT_SECONDS) \
88
+ LONG_POLL_INTERVAL=$(LONG_POLL_INTERVAL) \
89
+ node mixed_workload_runner.mjs