agenta 0.48.8__py3-none-any.whl → 0.48.10__py3-none-any.whl

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 agenta might be problematic. Click here for more details.

Files changed (297) hide show
  1. agenta/__init__.py +3 -2
  2. agenta/client/Readme.md +258 -80
  3. agenta/client/__init__.py +205 -29
  4. agenta/client/backend/__init__.py +461 -0
  5. agenta/client/backend/access_control/__init__.py +2 -0
  6. agenta/client/backend/access_control/client.py +53 -73
  7. agenta/client/backend/access_control/raw_client.py +180 -0
  8. agenta/client/backend/admin/__init__.py +2 -0
  9. agenta/client/backend/admin/client.py +473 -268
  10. agenta/client/backend/admin/raw_client.py +1017 -0
  11. agenta/client/backend/api_keys/__init__.py +2 -0
  12. agenta/client/backend/api_keys/client.py +43 -276
  13. agenta/client/backend/api_keys/raw_client.py +364 -0
  14. agenta/client/backend/apps/__init__.py +2 -0
  15. agenta/client/backend/apps/client.py +132 -895
  16. agenta/client/backend/apps/raw_client.py +1516 -0
  17. agenta/client/backend/bases/__init__.py +2 -0
  18. agenta/client/backend/bases/client.py +33 -73
  19. agenta/client/backend/bases/raw_client.py +179 -0
  20. agenta/client/backend/billing/__init__.py +3 -0
  21. agenta/client/backend/billing/client.py +564 -0
  22. agenta/client/backend/billing/raw_client.py +805 -0
  23. agenta/client/backend/client.py +1268 -0
  24. agenta/client/backend/configs/__init__.py +2 -0
  25. agenta/client/backend/configs/client.py +49 -361
  26. agenta/client/backend/configs/raw_client.py +402 -0
  27. agenta/client/backend/containers/__init__.py +1 -3
  28. agenta/client/backend/containers/client.py +25 -548
  29. agenta/client/backend/containers/raw_client.py +112 -0
  30. agenta/client/backend/core/__init__.py +5 -0
  31. agenta/client/backend/core/api_error.py +12 -6
  32. agenta/client/backend/core/client_wrapper.py +4 -4
  33. agenta/client/backend/core/file.py +1 -3
  34. agenta/client/backend/core/force_multipart.py +16 -0
  35. agenta/client/backend/core/http_client.py +78 -34
  36. agenta/client/backend/core/http_response.py +55 -0
  37. agenta/client/backend/core/jsonable_encoder.py +0 -1
  38. agenta/client/backend/core/pydantic_utilities.py +88 -113
  39. agenta/client/backend/core/serialization.py +9 -3
  40. agenta/client/backend/environment.py +7 -0
  41. agenta/client/backend/environments/__init__.py +2 -0
  42. agenta/client/backend/environments/client.py +43 -79
  43. agenta/client/backend/environments/raw_client.py +193 -0
  44. agenta/client/backend/errors/__init__.py +2 -0
  45. agenta/client/backend/errors/unprocessable_entity_error.py +8 -2
  46. agenta/client/backend/evals/__init__.py +3 -0
  47. agenta/client/backend/evals/client.py +1042 -0
  48. agenta/client/backend/evals/raw_client.py +1549 -0
  49. agenta/client/backend/evaluations/__init__.py +2 -0
  50. agenta/client/backend/evaluations/client.py +106 -590
  51. agenta/client/backend/evaluations/raw_client.py +1344 -0
  52. agenta/client/backend/evaluators/__init__.py +2 -0
  53. agenta/client/backend/evaluators/client.py +99 -516
  54. agenta/client/backend/evaluators/raw_client.py +1182 -0
  55. agenta/client/backend/human_evaluations/__init__.py +2 -0
  56. agenta/client/backend/human_evaluations/client.py +120 -680
  57. agenta/client/backend/human_evaluations/raw_client.py +1577 -0
  58. agenta/client/backend/observability/__init__.py +14 -2
  59. agenta/client/backend/observability/client.py +185 -341
  60. agenta/client/backend/observability/raw_client.py +943 -0
  61. agenta/client/backend/observability/types/__init__.py +10 -2
  62. agenta/client/backend/observability/types/{format.py → fetch_trace_by_id_request_trace_id.py} +1 -1
  63. agenta/client/backend/observability/types/fetch_trace_by_id_response.py +15 -0
  64. agenta/client/backend/observability/types/query_analytics_response.py +2 -1
  65. agenta/client/backend/observability/types/query_traces_response.py +7 -3
  66. agenta/client/backend/organization/__init__.py +2 -0
  67. agenta/client/backend/organization/client.py +105 -361
  68. agenta/client/backend/organization/raw_client.py +774 -0
  69. agenta/client/backend/raw_client.py +1432 -0
  70. agenta/client/backend/scopes/__init__.py +2 -0
  71. agenta/client/backend/scopes/client.py +31 -45
  72. agenta/client/backend/scopes/raw_client.py +105 -0
  73. agenta/client/backend/testsets/__init__.py +14 -0
  74. agenta/client/backend/testsets/client.py +1098 -653
  75. agenta/client/backend/testsets/raw_client.py +2348 -0
  76. agenta/client/backend/testsets/types/__init__.py +17 -0
  77. agenta/client/backend/testsets/types/create_testset_from_file_request_file_type.py +7 -0
  78. agenta/client/backend/testsets/types/fetch_testset_to_file_request_file_type.py +7 -0
  79. agenta/client/backend/testsets/types/update_testset_from_file_request_file_type.py +7 -0
  80. agenta/client/backend/tracing/__init__.py +7 -0
  81. agenta/client/backend/tracing/client.py +782 -0
  82. agenta/client/backend/tracing/raw_client.py +1223 -0
  83. agenta/client/backend/tracing/types/__init__.py +8 -0
  84. agenta/client/backend/{types/variant_action_enum.py → tracing/types/fetch_trace_request_trace_id.py} +1 -1
  85. agenta/client/backend/tracing/types/remove_trace_request_trace_id.py +5 -0
  86. agenta/client/backend/types/__init__.py +153 -26
  87. agenta/client/backend/types/account_request.py +24 -0
  88. agenta/client/backend/types/account_response.py +5 -7
  89. agenta/client/backend/types/agenta_node_dto.py +13 -13
  90. agenta/client/backend/types/agenta_node_dto_nodes_value.py +1 -0
  91. agenta/client/backend/types/agenta_nodes_response.py +14 -8
  92. agenta/client/backend/types/agenta_root_dto.py +16 -8
  93. agenta/client/backend/types/agenta_roots_response.py +16 -8
  94. agenta/client/backend/types/agenta_tree_dto.py +16 -8
  95. agenta/client/backend/types/agenta_trees_response.py +16 -8
  96. agenta/client/backend/types/aggregated_result.py +5 -7
  97. agenta/client/backend/types/aggregated_result_evaluator_config.py +1 -0
  98. agenta/client/backend/types/analytics_response.py +4 -6
  99. agenta/client/backend/types/annotation.py +50 -0
  100. agenta/client/backend/types/annotation_create.py +39 -0
  101. agenta/client/backend/types/annotation_edit.py +31 -0
  102. agenta/client/backend/types/annotation_kind.py +5 -0
  103. agenta/client/backend/types/{uri.py → annotation_link.py} +6 -7
  104. agenta/client/backend/types/{provider_key_dto.py → annotation_link_response.py} +6 -7
  105. agenta/client/backend/types/annotation_query.py +40 -0
  106. agenta/client/backend/types/annotation_query_request.py +20 -0
  107. agenta/client/backend/types/annotation_reference.py +21 -0
  108. agenta/client/backend/types/annotation_references.py +22 -0
  109. agenta/client/backend/types/{docker_env_vars.py → annotation_response.py} +6 -7
  110. agenta/client/backend/types/annotation_source.py +5 -0
  111. agenta/client/backend/types/annotations_response.py +24 -0
  112. agenta/client/backend/types/app.py +3 -5
  113. agenta/client/backend/types/app_variant_response.py +3 -6
  114. agenta/client/backend/types/app_variant_revision.py +5 -6
  115. agenta/client/backend/types/artifact.py +44 -0
  116. agenta/client/backend/types/base_output.py +3 -5
  117. agenta/client/backend/types/body_fetch_workflow_revision.py +21 -0
  118. agenta/client/backend/types/body_import_testset.py +3 -5
  119. agenta/client/backend/types/bucket_dto.py +4 -6
  120. agenta/client/backend/types/collect_status_response.py +3 -5
  121. agenta/client/backend/types/config_db.py +3 -5
  122. agenta/client/backend/types/config_dto.py +5 -7
  123. agenta/client/backend/types/config_response_model.py +5 -7
  124. agenta/client/backend/types/correct_answer.py +3 -5
  125. agenta/client/backend/types/create_app_output.py +3 -5
  126. agenta/client/backend/types/custom_model_settings_dto.py +3 -5
  127. agenta/client/backend/types/custom_provider_dto.py +6 -9
  128. agenta/client/backend/types/custom_provider_kind.py +5 -5
  129. agenta/client/backend/types/custom_provider_settings_dto.py +3 -5
  130. agenta/client/backend/types/data.py +2 -1
  131. agenta/client/backend/types/delete_evaluation.py +3 -5
  132. agenta/client/backend/types/environment_output.py +3 -5
  133. agenta/client/backend/types/environment_output_extended.py +4 -6
  134. agenta/client/backend/types/environment_revision.py +5 -5
  135. agenta/client/backend/types/error.py +3 -5
  136. agenta/client/backend/types/evaluation.py +6 -8
  137. agenta/client/backend/types/evaluation_scenario.py +5 -7
  138. agenta/client/backend/types/evaluation_scenario_input.py +3 -5
  139. agenta/client/backend/types/evaluation_scenario_output.py +4 -6
  140. agenta/client/backend/types/evaluation_scenario_result.py +4 -6
  141. agenta/client/backend/types/evaluator.py +31 -12
  142. agenta/client/backend/types/evaluator_config.py +3 -5
  143. agenta/client/backend/types/evaluator_flags.py +21 -0
  144. agenta/client/backend/types/evaluator_mapping_output_interface.py +3 -5
  145. agenta/client/backend/types/evaluator_output_interface.py +3 -5
  146. agenta/client/backend/types/evaluator_query.py +32 -0
  147. agenta/client/backend/types/evaluator_query_request.py +30 -0
  148. agenta/client/backend/types/evaluator_request.py +20 -0
  149. agenta/client/backend/types/evaluator_response.py +21 -0
  150. agenta/client/backend/types/evaluators_response.py +21 -0
  151. agenta/client/backend/types/exception_dto.py +3 -5
  152. agenta/client/backend/types/{o_tel_spans_response.py → extended_o_tel_tracing_response.py} +5 -7
  153. agenta/client/backend/types/focus.py +5 -0
  154. agenta/client/backend/types/format.py +5 -0
  155. agenta/client/backend/types/full_json_input.py +34 -0
  156. agenta/client/backend/types/full_json_output.py +29 -0
  157. agenta/client/backend/types/get_config_response.py +3 -5
  158. agenta/client/backend/types/{header_dto.py → header.py} +4 -6
  159. agenta/client/backend/types/http_validation_error.py +4 -6
  160. agenta/client/backend/types/human_evaluation.py +3 -5
  161. agenta/client/backend/types/human_evaluation_scenario.py +4 -6
  162. agenta/client/backend/types/human_evaluation_scenario_input.py +3 -5
  163. agenta/client/backend/types/human_evaluation_scenario_output.py +3 -5
  164. agenta/client/backend/types/invite_request.py +4 -6
  165. agenta/client/backend/types/legacy_analytics_response.py +4 -6
  166. agenta/client/backend/types/legacy_data_point.py +3 -5
  167. agenta/client/backend/types/legacy_evaluator.py +26 -0
  168. agenta/client/backend/types/legacy_scope_request.py +4 -6
  169. agenta/client/backend/types/legacy_scopes_response.py +3 -5
  170. agenta/client/backend/types/legacy_subscription_request.py +19 -0
  171. agenta/client/backend/types/legacy_user_request.py +5 -7
  172. agenta/client/backend/types/legacy_user_response.py +3 -5
  173. agenta/client/backend/types/lifecycle_dto.py +3 -5
  174. agenta/client/backend/types/link_dto.py +4 -6
  175. agenta/client/backend/types/list_api_keys_response.py +3 -5
  176. agenta/client/backend/types/llm_run_rate_limit.py +3 -5
  177. agenta/client/backend/types/meta_request.py +30 -0
  178. agenta/client/backend/types/metrics_dto.py +3 -5
  179. agenta/client/backend/types/new_testset.py +3 -5
  180. agenta/client/backend/types/node_dto.py +4 -6
  181. agenta/client/backend/types/o_tel_context_dto.py +3 -5
  182. agenta/client/backend/types/o_tel_event.py +35 -0
  183. agenta/client/backend/types/o_tel_event_dto.py +3 -5
  184. agenta/client/backend/types/o_tel_extra_dto.py +4 -6
  185. agenta/client/backend/types/o_tel_flat_span.py +56 -0
  186. agenta/client/backend/types/o_tel_flat_span_input_end_time.py +6 -0
  187. agenta/client/backend/types/o_tel_flat_span_input_start_time.py +6 -0
  188. agenta/client/backend/types/o_tel_flat_span_output_end_time.py +6 -0
  189. agenta/client/backend/types/o_tel_flat_span_output_start_time.py +6 -0
  190. agenta/client/backend/types/o_tel_link.py +34 -0
  191. agenta/client/backend/types/o_tel_link_dto.py +4 -6
  192. agenta/client/backend/types/o_tel_links_response.py +22 -0
  193. agenta/client/backend/types/o_tel_span.py +58 -0
  194. agenta/client/backend/types/o_tel_span_dto.py +8 -10
  195. agenta/client/backend/types/o_tel_span_input_end_time.py +6 -0
  196. agenta/client/backend/types/o_tel_span_input_spans_value.py +7 -0
  197. agenta/client/backend/types/o_tel_span_input_start_time.py +6 -0
  198. agenta/client/backend/types/o_tel_span_output_end_time.py +6 -0
  199. agenta/client/backend/types/o_tel_span_output_spans_value.py +30 -0
  200. agenta/client/backend/types/o_tel_span_output_start_time.py +6 -0
  201. agenta/client/backend/types/o_tel_spans_tree.py +22 -0
  202. agenta/client/backend/types/o_tel_spans_tree_input_spans_value.py +7 -0
  203. agenta/client/backend/types/o_tel_spans_tree_output_spans_value.py +5 -0
  204. agenta/client/backend/types/o_tel_status_code.py +1 -1
  205. agenta/client/backend/types/o_tel_tracing_data_response.py +22 -0
  206. agenta/client/backend/types/o_tel_tracing_request.py +22 -0
  207. agenta/client/backend/types/o_tel_tracing_response.py +27 -0
  208. agenta/client/backend/types/organization.py +3 -5
  209. agenta/client/backend/types/organization_details.py +3 -5
  210. agenta/client/backend/types/organization_membership_request.py +5 -7
  211. agenta/client/backend/types/organization_output.py +3 -5
  212. agenta/client/backend/types/organization_request.py +3 -5
  213. agenta/client/backend/types/parent_dto.py +3 -5
  214. agenta/client/backend/types/permission.py +11 -0
  215. agenta/client/backend/types/plan.py +14 -0
  216. agenta/client/backend/types/project_membership_request.py +5 -7
  217. agenta/client/backend/types/project_request.py +4 -6
  218. agenta/client/backend/types/project_scope.py +5 -7
  219. agenta/client/backend/types/projects_response.py +3 -5
  220. agenta/client/backend/types/recursive_types.py +23 -0
  221. agenta/client/backend/types/reference.py +18 -5
  222. agenta/client/backend/types/reference_dto.py +4 -5
  223. agenta/client/backend/types/reference_request_model.py +4 -5
  224. agenta/client/backend/types/result.py +4 -6
  225. agenta/client/backend/types/root_dto.py +3 -5
  226. agenta/client/backend/types/scopes_response_model.py +4 -6
  227. agenta/client/backend/types/secret_dto.py +5 -7
  228. agenta/client/backend/types/secret_response_dto.py +11 -11
  229. agenta/client/backend/types/simple_evaluation_output.py +4 -6
  230. agenta/client/backend/types/span_dto.py +18 -14
  231. agenta/client/backend/types/span_dto_nodes_value.py +1 -1
  232. agenta/client/backend/types/standard_provider_dto.py +5 -7
  233. agenta/client/backend/types/standard_provider_settings_dto.py +3 -5
  234. agenta/client/backend/types/status_dto.py +4 -6
  235. agenta/client/backend/types/tags_request.py +30 -0
  236. agenta/client/backend/types/test_set_output_response.py +5 -7
  237. agenta/client/backend/types/test_set_simple_response.py +3 -5
  238. agenta/client/backend/types/testcase_response.py +33 -0
  239. agenta/client/backend/types/testset.py +46 -0
  240. agenta/client/backend/types/testset_request.py +20 -0
  241. agenta/client/backend/types/testset_response.py +21 -0
  242. agenta/client/backend/types/testsets_response.py +21 -0
  243. agenta/client/backend/types/time_dto.py +3 -5
  244. agenta/client/backend/types/timestamp.py +6 -0
  245. agenta/client/backend/types/tree_dto.py +4 -6
  246. agenta/client/backend/types/update_app_output.py +3 -5
  247. agenta/client/backend/types/user_request.py +3 -5
  248. agenta/client/backend/types/validation_error.py +4 -6
  249. agenta/client/backend/types/workflow_artifact.py +45 -0
  250. agenta/client/backend/types/workflow_data.py +20 -0
  251. agenta/client/backend/types/workflow_flags.py +21 -0
  252. agenta/client/backend/types/workflow_request.py +20 -0
  253. agenta/client/backend/types/workflow_response.py +21 -0
  254. agenta/client/backend/types/workflow_revision.py +57 -0
  255. agenta/client/backend/types/workflow_revision_request.py +20 -0
  256. agenta/client/backend/types/workflow_revision_response.py +21 -0
  257. agenta/client/backend/types/workflow_revisions_response.py +21 -0
  258. agenta/client/backend/types/workflow_variant.py +48 -0
  259. agenta/client/backend/types/workflow_variant_request.py +20 -0
  260. agenta/client/backend/types/workflow_variant_response.py +21 -0
  261. agenta/client/backend/types/workflow_variants_response.py +21 -0
  262. agenta/client/backend/types/workflows_response.py +21 -0
  263. agenta/client/backend/types/workspace.py +3 -5
  264. agenta/client/backend/types/workspace_member_response.py +4 -6
  265. agenta/client/backend/types/workspace_membership_request.py +5 -7
  266. agenta/client/backend/types/workspace_permission.py +5 -7
  267. agenta/client/backend/types/workspace_request.py +4 -6
  268. agenta/client/backend/types/workspace_response.py +4 -6
  269. agenta/client/backend/variants/__init__.py +2 -0
  270. agenta/client/backend/variants/client.py +306 -1651
  271. agenta/client/backend/variants/raw_client.py +2482 -0
  272. agenta/client/backend/variants/types/__init__.py +2 -0
  273. agenta/client/backend/variants/types/add_variant_from_base_and_config_response.py +1 -0
  274. agenta/client/backend/vault/__init__.py +2 -0
  275. agenta/client/backend/vault/client.py +69 -323
  276. agenta/client/backend/vault/raw_client.py +616 -0
  277. agenta/client/backend/workflows/__init__.py +3 -0
  278. agenta/client/backend/workflows/client.py +2398 -0
  279. agenta/client/backend/workflows/raw_client.py +3639 -0
  280. agenta/client/backend/workspace/__init__.py +2 -0
  281. agenta/client/backend/workspace/client.py +46 -147
  282. agenta/client/backend/workspace/raw_client.py +376 -0
  283. agenta/client/types.py +4 -0
  284. agenta/sdk/decorators/tracing.py +2 -4
  285. agenta/sdk/tracing/processors.py +26 -39
  286. agenta/sdk/types.py +28 -1
  287. {agenta-0.48.8.dist-info → agenta-0.48.10.dist-info}/METADATA +1 -1
  288. agenta-0.48.10.dist-info/RECORD +362 -0
  289. agenta/client/backend/containers/types/__init__.py +0 -5
  290. agenta/client/backend/containers/types/container_templates_response.py +0 -6
  291. agenta/client/backend/types/image.py +0 -25
  292. agenta/client/backend/types/provider_kind.py +0 -21
  293. agenta/client/backend/types/template.py +0 -23
  294. agenta/client/backend/types/template_image_info.py +0 -29
  295. agenta/client/backend/types/variant_action.py +0 -22
  296. agenta-0.48.8.dist-info/RECORD +0 -255
  297. {agenta-0.48.8.dist-info → agenta-0.48.10.dist-info}/WHEEL +0 -0
@@ -0,0 +1,2398 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
+ from ..core.request_options import RequestOptions
7
+ from ..types.reference import Reference
8
+ from ..types.workflow_artifact import WorkflowArtifact
9
+ from ..types.workflow_response import WorkflowResponse
10
+ from ..types.workflow_revision import WorkflowRevision
11
+ from ..types.workflow_revision_response import WorkflowRevisionResponse
12
+ from ..types.workflow_revisions_response import WorkflowRevisionsResponse
13
+ from ..types.workflow_variant import WorkflowVariant
14
+ from ..types.workflow_variant_response import WorkflowVariantResponse
15
+ from ..types.workflow_variants_response import WorkflowVariantsResponse
16
+ from ..types.workflows_response import WorkflowsResponse
17
+ from .raw_client import AsyncRawWorkflowsClient, RawWorkflowsClient
18
+
19
+ # this is used as the default value for optional parameters
20
+ OMIT = typing.cast(typing.Any, ...)
21
+
22
+
23
+ class WorkflowsClient:
24
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
25
+ self._raw_client = RawWorkflowsClient(client_wrapper=client_wrapper)
26
+
27
+ @property
28
+ def with_raw_response(self) -> RawWorkflowsClient:
29
+ """
30
+ Retrieves a raw implementation of this client that returns raw responses.
31
+
32
+ Returns
33
+ -------
34
+ RawWorkflowsClient
35
+ """
36
+ return self._raw_client
37
+
38
+ def list_workflows(
39
+ self,
40
+ *,
41
+ workflow_ref: typing.Optional[str] = None,
42
+ workflow_flags: typing.Optional[str] = None,
43
+ workflow_meta: typing.Optional[str] = None,
44
+ include_archived: typing.Optional[bool] = None,
45
+ request_options: typing.Optional[RequestOptions] = None,
46
+ ) -> WorkflowsResponse:
47
+ """
48
+ Parameters
49
+ ----------
50
+ workflow_ref : typing.Optional[str]
51
+ JSON string of ref, e.g. {"key": value}
52
+
53
+ workflow_flags : typing.Optional[str]
54
+ JSON string of flags, e.g. {"key": value}
55
+
56
+ workflow_meta : typing.Optional[str]
57
+ JSON string of meta, e.g. {"key": value}
58
+
59
+ include_archived : typing.Optional[bool]
60
+
61
+ request_options : typing.Optional[RequestOptions]
62
+ Request-specific configuration.
63
+
64
+ Returns
65
+ -------
66
+ WorkflowsResponse
67
+ Successful Response
68
+
69
+ Examples
70
+ --------
71
+ from agenta import AgentaApi
72
+
73
+ client = AgentaApi(
74
+ api_key="YOUR_API_KEY",
75
+ )
76
+ client.workflows.list_workflows()
77
+ """
78
+ _response = self._raw_client.list_workflows(
79
+ workflow_ref=workflow_ref,
80
+ workflow_flags=workflow_flags,
81
+ workflow_meta=workflow_meta,
82
+ include_archived=include_archived,
83
+ request_options=request_options,
84
+ )
85
+ return _response.data
86
+
87
+ def create_workflow(
88
+ self,
89
+ *,
90
+ workflow: WorkflowArtifact,
91
+ request_options: typing.Optional[RequestOptions] = None,
92
+ ) -> WorkflowResponse:
93
+ """
94
+ Parameters
95
+ ----------
96
+ workflow : WorkflowArtifact
97
+
98
+ request_options : typing.Optional[RequestOptions]
99
+ Request-specific configuration.
100
+
101
+ Returns
102
+ -------
103
+ WorkflowResponse
104
+ Successful Response
105
+
106
+ Examples
107
+ --------
108
+ from agenta import AgentaApi, WorkflowArtifact
109
+
110
+ client = AgentaApi(
111
+ api_key="YOUR_API_KEY",
112
+ )
113
+ client.workflows.create_workflow(
114
+ workflow=WorkflowArtifact(),
115
+ )
116
+ """
117
+ _response = self._raw_client.create_workflow(
118
+ workflow=workflow, request_options=request_options
119
+ )
120
+ return _response.data
121
+
122
+ def fetch_workflow(
123
+ self,
124
+ workflow_id: str,
125
+ *,
126
+ artifact_id: str,
127
+ request_options: typing.Optional[RequestOptions] = None,
128
+ ) -> WorkflowResponse:
129
+ """
130
+ Parameters
131
+ ----------
132
+ workflow_id : str
133
+
134
+ artifact_id : str
135
+
136
+ request_options : typing.Optional[RequestOptions]
137
+ Request-specific configuration.
138
+
139
+ Returns
140
+ -------
141
+ WorkflowResponse
142
+ Successful Response
143
+
144
+ Examples
145
+ --------
146
+ from agenta import AgentaApi
147
+
148
+ client = AgentaApi(
149
+ api_key="YOUR_API_KEY",
150
+ )
151
+ client.workflows.fetch_workflow(
152
+ workflow_id="workflow_id",
153
+ artifact_id="artifact_id",
154
+ )
155
+ """
156
+ _response = self._raw_client.fetch_workflow(
157
+ workflow_id, artifact_id=artifact_id, request_options=request_options
158
+ )
159
+ return _response.data
160
+
161
+ def edit_workflow(
162
+ self,
163
+ workflow_id: str,
164
+ *,
165
+ workflow: WorkflowArtifact,
166
+ request_options: typing.Optional[RequestOptions] = None,
167
+ ) -> WorkflowResponse:
168
+ """
169
+ Parameters
170
+ ----------
171
+ workflow_id : str
172
+
173
+ workflow : WorkflowArtifact
174
+
175
+ request_options : typing.Optional[RequestOptions]
176
+ Request-specific configuration.
177
+
178
+ Returns
179
+ -------
180
+ WorkflowResponse
181
+ Successful Response
182
+
183
+ Examples
184
+ --------
185
+ from agenta import AgentaApi, WorkflowArtifact
186
+
187
+ client = AgentaApi(
188
+ api_key="YOUR_API_KEY",
189
+ )
190
+ client.workflows.edit_workflow(
191
+ workflow_id="workflow_id",
192
+ workflow=WorkflowArtifact(),
193
+ )
194
+ """
195
+ _response = self._raw_client.edit_workflow(
196
+ workflow_id, workflow=workflow, request_options=request_options
197
+ )
198
+ return _response.data
199
+
200
+ def archive_workflow(
201
+ self,
202
+ workflow_id: str,
203
+ *,
204
+ artifact_id: str,
205
+ request_options: typing.Optional[RequestOptions] = None,
206
+ ) -> WorkflowResponse:
207
+ """
208
+ Parameters
209
+ ----------
210
+ workflow_id : str
211
+
212
+ artifact_id : str
213
+
214
+ request_options : typing.Optional[RequestOptions]
215
+ Request-specific configuration.
216
+
217
+ Returns
218
+ -------
219
+ WorkflowResponse
220
+ Successful Response
221
+
222
+ Examples
223
+ --------
224
+ from agenta import AgentaApi
225
+
226
+ client = AgentaApi(
227
+ api_key="YOUR_API_KEY",
228
+ )
229
+ client.workflows.archive_workflow(
230
+ workflow_id="workflow_id",
231
+ artifact_id="artifact_id",
232
+ )
233
+ """
234
+ _response = self._raw_client.archive_workflow(
235
+ workflow_id, artifact_id=artifact_id, request_options=request_options
236
+ )
237
+ return _response.data
238
+
239
+ def unarchive_workflow(
240
+ self,
241
+ workflow_id: str,
242
+ *,
243
+ artifact_id: str,
244
+ request_options: typing.Optional[RequestOptions] = None,
245
+ ) -> WorkflowResponse:
246
+ """
247
+ Parameters
248
+ ----------
249
+ workflow_id : str
250
+
251
+ artifact_id : str
252
+
253
+ request_options : typing.Optional[RequestOptions]
254
+ Request-specific configuration.
255
+
256
+ Returns
257
+ -------
258
+ WorkflowResponse
259
+ Successful Response
260
+
261
+ Examples
262
+ --------
263
+ from agenta import AgentaApi
264
+
265
+ client = AgentaApi(
266
+ api_key="YOUR_API_KEY",
267
+ )
268
+ client.workflows.unarchive_workflow(
269
+ workflow_id="workflow_id",
270
+ artifact_id="artifact_id",
271
+ )
272
+ """
273
+ _response = self._raw_client.unarchive_workflow(
274
+ workflow_id, artifact_id=artifact_id, request_options=request_options
275
+ )
276
+ return _response.data
277
+
278
+ def query_workflows(
279
+ self,
280
+ *,
281
+ workflow_ref: typing.Optional[str] = None,
282
+ workflow_flags: typing.Optional[str] = None,
283
+ workflow_meta: typing.Optional[str] = None,
284
+ include_archived: typing.Optional[bool] = None,
285
+ request_options: typing.Optional[RequestOptions] = None,
286
+ ) -> WorkflowsResponse:
287
+ """
288
+ Parameters
289
+ ----------
290
+ workflow_ref : typing.Optional[str]
291
+ JSON string of ref, e.g. {"key": value}
292
+
293
+ workflow_flags : typing.Optional[str]
294
+ JSON string of flags, e.g. {"key": value}
295
+
296
+ workflow_meta : typing.Optional[str]
297
+ JSON string of meta, e.g. {"key": value}
298
+
299
+ include_archived : typing.Optional[bool]
300
+
301
+ request_options : typing.Optional[RequestOptions]
302
+ Request-specific configuration.
303
+
304
+ Returns
305
+ -------
306
+ WorkflowsResponse
307
+ Successful Response
308
+
309
+ Examples
310
+ --------
311
+ from agenta import AgentaApi
312
+
313
+ client = AgentaApi(
314
+ api_key="YOUR_API_KEY",
315
+ )
316
+ client.workflows.query_workflows()
317
+ """
318
+ _response = self._raw_client.query_workflows(
319
+ workflow_ref=workflow_ref,
320
+ workflow_flags=workflow_flags,
321
+ workflow_meta=workflow_meta,
322
+ include_archived=include_archived,
323
+ request_options=request_options,
324
+ )
325
+ return _response.data
326
+
327
+ def list_workflow_variants(
328
+ self,
329
+ *,
330
+ workflow_ref: typing.Optional[str] = None,
331
+ variant_ref: typing.Optional[str] = None,
332
+ variant_meta: typing.Optional[str] = None,
333
+ variant_flags: typing.Optional[str] = None,
334
+ include_archived: typing.Optional[bool] = None,
335
+ request_options: typing.Optional[RequestOptions] = None,
336
+ ) -> WorkflowVariantsResponse:
337
+ """
338
+ Parameters
339
+ ----------
340
+ workflow_ref : typing.Optional[str]
341
+ JSON string of reference, e.g. {"key": value}
342
+
343
+ variant_ref : typing.Optional[str]
344
+ JSON string of reference, e.g. {"key": value}
345
+
346
+ variant_meta : typing.Optional[str]
347
+ JSON string of meta, e.g. {"key": value}
348
+
349
+ variant_flags : typing.Optional[str]
350
+ JSON string of flags, e.g. {"key": value}
351
+
352
+ include_archived : typing.Optional[bool]
353
+
354
+ request_options : typing.Optional[RequestOptions]
355
+ Request-specific configuration.
356
+
357
+ Returns
358
+ -------
359
+ WorkflowVariantsResponse
360
+ Successful Response
361
+
362
+ Examples
363
+ --------
364
+ from agenta import AgentaApi
365
+
366
+ client = AgentaApi(
367
+ api_key="YOUR_API_KEY",
368
+ )
369
+ client.workflows.list_workflow_variants()
370
+ """
371
+ _response = self._raw_client.list_workflow_variants(
372
+ workflow_ref=workflow_ref,
373
+ variant_ref=variant_ref,
374
+ variant_meta=variant_meta,
375
+ variant_flags=variant_flags,
376
+ include_archived=include_archived,
377
+ request_options=request_options,
378
+ )
379
+ return _response.data
380
+
381
+ def create_workflow_variant(
382
+ self,
383
+ *,
384
+ variant: WorkflowVariant,
385
+ request_options: typing.Optional[RequestOptions] = None,
386
+ ) -> WorkflowVariantResponse:
387
+ """
388
+ Parameters
389
+ ----------
390
+ variant : WorkflowVariant
391
+
392
+ request_options : typing.Optional[RequestOptions]
393
+ Request-specific configuration.
394
+
395
+ Returns
396
+ -------
397
+ WorkflowVariantResponse
398
+ Successful Response
399
+
400
+ Examples
401
+ --------
402
+ from agenta import AgentaApi, WorkflowVariant
403
+
404
+ client = AgentaApi(
405
+ api_key="YOUR_API_KEY",
406
+ )
407
+ client.workflows.create_workflow_variant(
408
+ variant=WorkflowVariant(),
409
+ )
410
+ """
411
+ _response = self._raw_client.create_workflow_variant(
412
+ variant=variant, request_options=request_options
413
+ )
414
+ return _response.data
415
+
416
+ def fetch_workflow_variant(
417
+ self,
418
+ variant_id: str,
419
+ *,
420
+ request_options: typing.Optional[RequestOptions] = None,
421
+ ) -> WorkflowVariantResponse:
422
+ """
423
+ Parameters
424
+ ----------
425
+ variant_id : str
426
+
427
+ request_options : typing.Optional[RequestOptions]
428
+ Request-specific configuration.
429
+
430
+ Returns
431
+ -------
432
+ WorkflowVariantResponse
433
+ Successful Response
434
+
435
+ Examples
436
+ --------
437
+ from agenta import AgentaApi
438
+
439
+ client = AgentaApi(
440
+ api_key="YOUR_API_KEY",
441
+ )
442
+ client.workflows.fetch_workflow_variant(
443
+ variant_id="variant_id",
444
+ )
445
+ """
446
+ _response = self._raw_client.fetch_workflow_variant(
447
+ variant_id, request_options=request_options
448
+ )
449
+ return _response.data
450
+
451
+ def edit_workflow_variant(
452
+ self,
453
+ variant_id: str,
454
+ *,
455
+ variant: WorkflowVariant,
456
+ request_options: typing.Optional[RequestOptions] = None,
457
+ ) -> WorkflowVariantResponse:
458
+ """
459
+ Parameters
460
+ ----------
461
+ variant_id : str
462
+
463
+ variant : WorkflowVariant
464
+
465
+ request_options : typing.Optional[RequestOptions]
466
+ Request-specific configuration.
467
+
468
+ Returns
469
+ -------
470
+ WorkflowVariantResponse
471
+ Successful Response
472
+
473
+ Examples
474
+ --------
475
+ from agenta import AgentaApi, WorkflowVariant
476
+
477
+ client = AgentaApi(
478
+ api_key="YOUR_API_KEY",
479
+ )
480
+ client.workflows.edit_workflow_variant(
481
+ variant_id="variant_id",
482
+ variant=WorkflowVariant(),
483
+ )
484
+ """
485
+ _response = self._raw_client.edit_workflow_variant(
486
+ variant_id, variant=variant, request_options=request_options
487
+ )
488
+ return _response.data
489
+
490
+ def archive_workflow_variant(
491
+ self,
492
+ variant_id: str,
493
+ *,
494
+ request_options: typing.Optional[RequestOptions] = None,
495
+ ) -> WorkflowVariantResponse:
496
+ """
497
+ Parameters
498
+ ----------
499
+ variant_id : str
500
+
501
+ request_options : typing.Optional[RequestOptions]
502
+ Request-specific configuration.
503
+
504
+ Returns
505
+ -------
506
+ WorkflowVariantResponse
507
+ Successful Response
508
+
509
+ Examples
510
+ --------
511
+ from agenta import AgentaApi
512
+
513
+ client = AgentaApi(
514
+ api_key="YOUR_API_KEY",
515
+ )
516
+ client.workflows.archive_workflow_variant(
517
+ variant_id="variant_id",
518
+ )
519
+ """
520
+ _response = self._raw_client.archive_workflow_variant(
521
+ variant_id, request_options=request_options
522
+ )
523
+ return _response.data
524
+
525
+ def unarchive_workflow_variant(
526
+ self,
527
+ variant_id: str,
528
+ *,
529
+ request_options: typing.Optional[RequestOptions] = None,
530
+ ) -> WorkflowVariantResponse:
531
+ """
532
+ Parameters
533
+ ----------
534
+ variant_id : str
535
+
536
+ request_options : typing.Optional[RequestOptions]
537
+ Request-specific configuration.
538
+
539
+ Returns
540
+ -------
541
+ WorkflowVariantResponse
542
+ Successful Response
543
+
544
+ Examples
545
+ --------
546
+ from agenta import AgentaApi
547
+
548
+ client = AgentaApi(
549
+ api_key="YOUR_API_KEY",
550
+ )
551
+ client.workflows.unarchive_workflow_variant(
552
+ variant_id="variant_id",
553
+ )
554
+ """
555
+ _response = self._raw_client.unarchive_workflow_variant(
556
+ variant_id, request_options=request_options
557
+ )
558
+ return _response.data
559
+
560
+ def query_workflow_variants(
561
+ self,
562
+ *,
563
+ workflow_ref: typing.Optional[str] = None,
564
+ variant_ref: typing.Optional[str] = None,
565
+ variant_meta: typing.Optional[str] = None,
566
+ variant_flags: typing.Optional[str] = None,
567
+ include_archived: typing.Optional[bool] = None,
568
+ request_options: typing.Optional[RequestOptions] = None,
569
+ ) -> WorkflowVariantsResponse:
570
+ """
571
+ Parameters
572
+ ----------
573
+ workflow_ref : typing.Optional[str]
574
+ JSON string of reference, e.g. {"key": value}
575
+
576
+ variant_ref : typing.Optional[str]
577
+ JSON string of reference, e.g. {"key": value}
578
+
579
+ variant_meta : typing.Optional[str]
580
+ JSON string of meta, e.g. {"key": value}
581
+
582
+ variant_flags : typing.Optional[str]
583
+ JSON string of flags, e.g. {"key": value}
584
+
585
+ include_archived : typing.Optional[bool]
586
+
587
+ request_options : typing.Optional[RequestOptions]
588
+ Request-specific configuration.
589
+
590
+ Returns
591
+ -------
592
+ WorkflowVariantsResponse
593
+ Successful Response
594
+
595
+ Examples
596
+ --------
597
+ from agenta import AgentaApi
598
+
599
+ client = AgentaApi(
600
+ api_key="YOUR_API_KEY",
601
+ )
602
+ client.workflows.query_workflow_variants()
603
+ """
604
+ _response = self._raw_client.query_workflow_variants(
605
+ workflow_ref=workflow_ref,
606
+ variant_ref=variant_ref,
607
+ variant_meta=variant_meta,
608
+ variant_flags=variant_flags,
609
+ include_archived=include_archived,
610
+ request_options=request_options,
611
+ )
612
+ return _response.data
613
+
614
+ def commit_workflow_revision_by_variant_id(
615
+ self,
616
+ variant_id: typing.Optional[str],
617
+ *,
618
+ revision: WorkflowRevision,
619
+ request_options: typing.Optional[RequestOptions] = None,
620
+ ) -> WorkflowRevisionResponse:
621
+ """
622
+ Parameters
623
+ ----------
624
+ variant_id : typing.Optional[str]
625
+
626
+ revision : WorkflowRevision
627
+
628
+ request_options : typing.Optional[RequestOptions]
629
+ Request-specific configuration.
630
+
631
+ Returns
632
+ -------
633
+ WorkflowRevisionResponse
634
+ Successful Response
635
+
636
+ Examples
637
+ --------
638
+ from agenta import AgentaApi, WorkflowRevision
639
+
640
+ client = AgentaApi(
641
+ api_key="YOUR_API_KEY",
642
+ )
643
+ client.workflows.commit_workflow_revision_by_variant_id(
644
+ revision=WorkflowRevision(),
645
+ )
646
+ """
647
+ _response = self._raw_client.commit_workflow_revision_by_variant_id(
648
+ variant_id, revision=revision, request_options=request_options
649
+ )
650
+ return _response.data
651
+
652
+ def fork_workflow_variant(
653
+ self,
654
+ variant_id: typing.Optional[str],
655
+ *,
656
+ revision: WorkflowRevision,
657
+ revision_id: typing.Optional[str] = None,
658
+ request_options: typing.Optional[RequestOptions] = None,
659
+ ) -> WorkflowVariantResponse:
660
+ """
661
+ Parameters
662
+ ----------
663
+ variant_id : typing.Optional[str]
664
+
665
+ revision : WorkflowRevision
666
+
667
+ revision_id : typing.Optional[str]
668
+
669
+ request_options : typing.Optional[RequestOptions]
670
+ Request-specific configuration.
671
+
672
+ Returns
673
+ -------
674
+ WorkflowVariantResponse
675
+ Successful Response
676
+
677
+ Examples
678
+ --------
679
+ from agenta import AgentaApi, WorkflowRevision
680
+
681
+ client = AgentaApi(
682
+ api_key="YOUR_API_KEY",
683
+ )
684
+ client.workflows.fork_workflow_variant(
685
+ revision=WorkflowRevision(),
686
+ )
687
+ """
688
+ _response = self._raw_client.fork_workflow_variant(
689
+ variant_id,
690
+ revision=revision,
691
+ revision_id=revision_id,
692
+ request_options=request_options,
693
+ )
694
+ return _response.data
695
+
696
+ def list_workflow_revisions(
697
+ self,
698
+ *,
699
+ variant_ref: typing.Optional[str] = None,
700
+ revision_ref: typing.Optional[str] = None,
701
+ revision_meta: typing.Optional[str] = None,
702
+ revision_flags: typing.Optional[str] = None,
703
+ include_archived: typing.Optional[bool] = None,
704
+ request_options: typing.Optional[RequestOptions] = None,
705
+ ) -> WorkflowRevisionsResponse:
706
+ """
707
+ Parameters
708
+ ----------
709
+ variant_ref : typing.Optional[str]
710
+ JSON string of ref, e.g. {"key": value}
711
+
712
+ revision_ref : typing.Optional[str]
713
+ JSON string of ref, e.g. {"key": value}
714
+
715
+ revision_meta : typing.Optional[str]
716
+ JSON string of meta, e.g. {"key": value}
717
+
718
+ revision_flags : typing.Optional[str]
719
+ JSON string of flags, e.g. {"key": value}
720
+
721
+ include_archived : typing.Optional[bool]
722
+
723
+ request_options : typing.Optional[RequestOptions]
724
+ Request-specific configuration.
725
+
726
+ Returns
727
+ -------
728
+ WorkflowRevisionsResponse
729
+ Successful Response
730
+
731
+ Examples
732
+ --------
733
+ from agenta import AgentaApi
734
+
735
+ client = AgentaApi(
736
+ api_key="YOUR_API_KEY",
737
+ )
738
+ client.workflows.list_workflow_revisions()
739
+ """
740
+ _response = self._raw_client.list_workflow_revisions(
741
+ variant_ref=variant_ref,
742
+ revision_ref=revision_ref,
743
+ revision_meta=revision_meta,
744
+ revision_flags=revision_flags,
745
+ include_archived=include_archived,
746
+ request_options=request_options,
747
+ )
748
+ return _response.data
749
+
750
+ def create_workflow_revision(
751
+ self,
752
+ *,
753
+ revision: WorkflowRevision,
754
+ request_options: typing.Optional[RequestOptions] = None,
755
+ ) -> WorkflowRevisionResponse:
756
+ """
757
+ Parameters
758
+ ----------
759
+ revision : WorkflowRevision
760
+
761
+ request_options : typing.Optional[RequestOptions]
762
+ Request-specific configuration.
763
+
764
+ Returns
765
+ -------
766
+ WorkflowRevisionResponse
767
+ Successful Response
768
+
769
+ Examples
770
+ --------
771
+ from agenta import AgentaApi, WorkflowRevision
772
+
773
+ client = AgentaApi(
774
+ api_key="YOUR_API_KEY",
775
+ )
776
+ client.workflows.create_workflow_revision(
777
+ revision=WorkflowRevision(),
778
+ )
779
+ """
780
+ _response = self._raw_client.create_workflow_revision(
781
+ revision=revision, request_options=request_options
782
+ )
783
+ return _response.data
784
+
785
+ def fetch_workflow_revision(
786
+ self,
787
+ revision_id: str,
788
+ *,
789
+ request_options: typing.Optional[RequestOptions] = None,
790
+ ) -> WorkflowRevisionResponse:
791
+ """
792
+ Parameters
793
+ ----------
794
+ revision_id : str
795
+
796
+ request_options : typing.Optional[RequestOptions]
797
+ Request-specific configuration.
798
+
799
+ Returns
800
+ -------
801
+ WorkflowRevisionResponse
802
+ Successful Response
803
+
804
+ Examples
805
+ --------
806
+ from agenta import AgentaApi
807
+
808
+ client = AgentaApi(
809
+ api_key="YOUR_API_KEY",
810
+ )
811
+ client.workflows.fetch_workflow_revision(
812
+ revision_id="revision_id",
813
+ )
814
+ """
815
+ _response = self._raw_client.fetch_workflow_revision(
816
+ revision_id, request_options=request_options
817
+ )
818
+ return _response.data
819
+
820
+ def edit_workflow_revision(
821
+ self,
822
+ revision_id: str,
823
+ *,
824
+ revision: WorkflowRevision,
825
+ request_options: typing.Optional[RequestOptions] = None,
826
+ ) -> WorkflowRevisionResponse:
827
+ """
828
+ Parameters
829
+ ----------
830
+ revision_id : str
831
+
832
+ revision : WorkflowRevision
833
+
834
+ request_options : typing.Optional[RequestOptions]
835
+ Request-specific configuration.
836
+
837
+ Returns
838
+ -------
839
+ WorkflowRevisionResponse
840
+ Successful Response
841
+
842
+ Examples
843
+ --------
844
+ from agenta import AgentaApi, WorkflowRevision
845
+
846
+ client = AgentaApi(
847
+ api_key="YOUR_API_KEY",
848
+ )
849
+ client.workflows.edit_workflow_revision(
850
+ revision_id="revision_id",
851
+ revision=WorkflowRevision(),
852
+ )
853
+ """
854
+ _response = self._raw_client.edit_workflow_revision(
855
+ revision_id, revision=revision, request_options=request_options
856
+ )
857
+ return _response.data
858
+
859
+ def archive_workflow_revision_rpc(
860
+ self,
861
+ revision_id: str,
862
+ *,
863
+ request_options: typing.Optional[RequestOptions] = None,
864
+ ) -> WorkflowRevisionResponse:
865
+ """
866
+ Parameters
867
+ ----------
868
+ revision_id : str
869
+
870
+ request_options : typing.Optional[RequestOptions]
871
+ Request-specific configuration.
872
+
873
+ Returns
874
+ -------
875
+ WorkflowRevisionResponse
876
+ Successful Response
877
+
878
+ Examples
879
+ --------
880
+ from agenta import AgentaApi
881
+
882
+ client = AgentaApi(
883
+ api_key="YOUR_API_KEY",
884
+ )
885
+ client.workflows.archive_workflow_revision_rpc(
886
+ revision_id="revision_id",
887
+ )
888
+ """
889
+ _response = self._raw_client.archive_workflow_revision_rpc(
890
+ revision_id, request_options=request_options
891
+ )
892
+ return _response.data
893
+
894
+ def unarchive_workflow_revision_rpc(
895
+ self,
896
+ revision_id: str,
897
+ *,
898
+ request_options: typing.Optional[RequestOptions] = None,
899
+ ) -> WorkflowRevisionResponse:
900
+ """
901
+ Parameters
902
+ ----------
903
+ revision_id : str
904
+
905
+ request_options : typing.Optional[RequestOptions]
906
+ Request-specific configuration.
907
+
908
+ Returns
909
+ -------
910
+ WorkflowRevisionResponse
911
+ Successful Response
912
+
913
+ Examples
914
+ --------
915
+ from agenta import AgentaApi
916
+
917
+ client = AgentaApi(
918
+ api_key="YOUR_API_KEY",
919
+ )
920
+ client.workflows.unarchive_workflow_revision_rpc(
921
+ revision_id="revision_id",
922
+ )
923
+ """
924
+ _response = self._raw_client.unarchive_workflow_revision_rpc(
925
+ revision_id, request_options=request_options
926
+ )
927
+ return _response.data
928
+
929
+ def query_workflow_revisions(
930
+ self,
931
+ *,
932
+ variant_ref: typing.Optional[str] = None,
933
+ revision_ref: typing.Optional[str] = None,
934
+ revision_meta: typing.Optional[str] = None,
935
+ revision_flags: typing.Optional[str] = None,
936
+ include_archived: typing.Optional[bool] = None,
937
+ request_options: typing.Optional[RequestOptions] = None,
938
+ ) -> WorkflowRevisionsResponse:
939
+ """
940
+ Parameters
941
+ ----------
942
+ variant_ref : typing.Optional[str]
943
+ JSON string of ref, e.g. {"key": value}
944
+
945
+ revision_ref : typing.Optional[str]
946
+ JSON string of ref, e.g. {"key": value}
947
+
948
+ revision_meta : typing.Optional[str]
949
+ JSON string of meta, e.g. {"key": value}
950
+
951
+ revision_flags : typing.Optional[str]
952
+ JSON string of flags, e.g. {"key": value}
953
+
954
+ include_archived : typing.Optional[bool]
955
+
956
+ request_options : typing.Optional[RequestOptions]
957
+ Request-specific configuration.
958
+
959
+ Returns
960
+ -------
961
+ WorkflowRevisionsResponse
962
+ Successful Response
963
+
964
+ Examples
965
+ --------
966
+ from agenta import AgentaApi
967
+
968
+ client = AgentaApi(
969
+ api_key="YOUR_API_KEY",
970
+ )
971
+ client.workflows.query_workflow_revisions()
972
+ """
973
+ _response = self._raw_client.query_workflow_revisions(
974
+ variant_ref=variant_ref,
975
+ revision_ref=revision_ref,
976
+ revision_meta=revision_meta,
977
+ revision_flags=revision_flags,
978
+ include_archived=include_archived,
979
+ request_options=request_options,
980
+ )
981
+ return _response.data
982
+
983
+ def fork_workflow_variant_by_revision_id(
984
+ self,
985
+ revision_id: typing.Optional[str],
986
+ *,
987
+ revision: WorkflowRevision,
988
+ variant_id: typing.Optional[str] = None,
989
+ request_options: typing.Optional[RequestOptions] = None,
990
+ ) -> WorkflowVariantResponse:
991
+ """
992
+ Parameters
993
+ ----------
994
+ revision_id : typing.Optional[str]
995
+
996
+ revision : WorkflowRevision
997
+
998
+ variant_id : typing.Optional[str]
999
+
1000
+ request_options : typing.Optional[RequestOptions]
1001
+ Request-specific configuration.
1002
+
1003
+ Returns
1004
+ -------
1005
+ WorkflowVariantResponse
1006
+ Successful Response
1007
+
1008
+ Examples
1009
+ --------
1010
+ from agenta import AgentaApi, WorkflowRevision
1011
+
1012
+ client = AgentaApi(
1013
+ api_key="YOUR_API_KEY",
1014
+ )
1015
+ client.workflows.fork_workflow_variant_by_revision_id(
1016
+ revision=WorkflowRevision(),
1017
+ )
1018
+ """
1019
+ _response = self._raw_client.fork_workflow_variant_by_revision_id(
1020
+ revision_id,
1021
+ revision=revision,
1022
+ variant_id=variant_id,
1023
+ request_options=request_options,
1024
+ )
1025
+ return _response.data
1026
+
1027
+ def commit_workflow_revision(
1028
+ self,
1029
+ *,
1030
+ revision: WorkflowRevision,
1031
+ variant_id: typing.Optional[str] = None,
1032
+ request_options: typing.Optional[RequestOptions] = None,
1033
+ ) -> WorkflowRevisionResponse:
1034
+ """
1035
+ Parameters
1036
+ ----------
1037
+ revision : WorkflowRevision
1038
+
1039
+ variant_id : typing.Optional[str]
1040
+
1041
+ request_options : typing.Optional[RequestOptions]
1042
+ Request-specific configuration.
1043
+
1044
+ Returns
1045
+ -------
1046
+ WorkflowRevisionResponse
1047
+ Successful Response
1048
+
1049
+ Examples
1050
+ --------
1051
+ from agenta import AgentaApi, WorkflowRevision
1052
+
1053
+ client = AgentaApi(
1054
+ api_key="YOUR_API_KEY",
1055
+ )
1056
+ client.workflows.commit_workflow_revision(
1057
+ revision=WorkflowRevision(),
1058
+ )
1059
+ """
1060
+ _response = self._raw_client.commit_workflow_revision(
1061
+ revision=revision, variant_id=variant_id, request_options=request_options
1062
+ )
1063
+ return _response.data
1064
+
1065
+ def log_workflow_revisions(
1066
+ self,
1067
+ *,
1068
+ depth: typing.Optional[int] = None,
1069
+ variant_ref: typing.Optional[Reference] = OMIT,
1070
+ revision_ref: typing.Optional[Reference] = OMIT,
1071
+ request_options: typing.Optional[RequestOptions] = None,
1072
+ ) -> WorkflowRevisionsResponse:
1073
+ """
1074
+ Parameters
1075
+ ----------
1076
+ depth : typing.Optional[int]
1077
+
1078
+ variant_ref : typing.Optional[Reference]
1079
+
1080
+ revision_ref : typing.Optional[Reference]
1081
+
1082
+ request_options : typing.Optional[RequestOptions]
1083
+ Request-specific configuration.
1084
+
1085
+ Returns
1086
+ -------
1087
+ WorkflowRevisionsResponse
1088
+ Successful Response
1089
+
1090
+ Examples
1091
+ --------
1092
+ from agenta import AgentaApi
1093
+
1094
+ client = AgentaApi(
1095
+ api_key="YOUR_API_KEY",
1096
+ )
1097
+ client.workflows.log_workflow_revisions()
1098
+ """
1099
+ _response = self._raw_client.log_workflow_revisions(
1100
+ depth=depth,
1101
+ variant_ref=variant_ref,
1102
+ revision_ref=revision_ref,
1103
+ request_options=request_options,
1104
+ )
1105
+ return _response.data
1106
+
1107
+
1108
+ class AsyncWorkflowsClient:
1109
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
1110
+ self._raw_client = AsyncRawWorkflowsClient(client_wrapper=client_wrapper)
1111
+
1112
+ @property
1113
+ def with_raw_response(self) -> AsyncRawWorkflowsClient:
1114
+ """
1115
+ Retrieves a raw implementation of this client that returns raw responses.
1116
+
1117
+ Returns
1118
+ -------
1119
+ AsyncRawWorkflowsClient
1120
+ """
1121
+ return self._raw_client
1122
+
1123
+ async def list_workflows(
1124
+ self,
1125
+ *,
1126
+ workflow_ref: typing.Optional[str] = None,
1127
+ workflow_flags: typing.Optional[str] = None,
1128
+ workflow_meta: typing.Optional[str] = None,
1129
+ include_archived: typing.Optional[bool] = None,
1130
+ request_options: typing.Optional[RequestOptions] = None,
1131
+ ) -> WorkflowsResponse:
1132
+ """
1133
+ Parameters
1134
+ ----------
1135
+ workflow_ref : typing.Optional[str]
1136
+ JSON string of ref, e.g. {"key": value}
1137
+
1138
+ workflow_flags : typing.Optional[str]
1139
+ JSON string of flags, e.g. {"key": value}
1140
+
1141
+ workflow_meta : typing.Optional[str]
1142
+ JSON string of meta, e.g. {"key": value}
1143
+
1144
+ include_archived : typing.Optional[bool]
1145
+
1146
+ request_options : typing.Optional[RequestOptions]
1147
+ Request-specific configuration.
1148
+
1149
+ Returns
1150
+ -------
1151
+ WorkflowsResponse
1152
+ Successful Response
1153
+
1154
+ Examples
1155
+ --------
1156
+ import asyncio
1157
+
1158
+ from agenta import AsyncAgentaApi
1159
+
1160
+ client = AsyncAgentaApi(
1161
+ api_key="YOUR_API_KEY",
1162
+ )
1163
+
1164
+
1165
+ async def main() -> None:
1166
+ await client.workflows.list_workflows()
1167
+
1168
+
1169
+ asyncio.run(main())
1170
+ """
1171
+ _response = await self._raw_client.list_workflows(
1172
+ workflow_ref=workflow_ref,
1173
+ workflow_flags=workflow_flags,
1174
+ workflow_meta=workflow_meta,
1175
+ include_archived=include_archived,
1176
+ request_options=request_options,
1177
+ )
1178
+ return _response.data
1179
+
1180
+ async def create_workflow(
1181
+ self,
1182
+ *,
1183
+ workflow: WorkflowArtifact,
1184
+ request_options: typing.Optional[RequestOptions] = None,
1185
+ ) -> WorkflowResponse:
1186
+ """
1187
+ Parameters
1188
+ ----------
1189
+ workflow : WorkflowArtifact
1190
+
1191
+ request_options : typing.Optional[RequestOptions]
1192
+ Request-specific configuration.
1193
+
1194
+ Returns
1195
+ -------
1196
+ WorkflowResponse
1197
+ Successful Response
1198
+
1199
+ Examples
1200
+ --------
1201
+ import asyncio
1202
+
1203
+ from agenta import AsyncAgentaApi, WorkflowArtifact
1204
+
1205
+ client = AsyncAgentaApi(
1206
+ api_key="YOUR_API_KEY",
1207
+ )
1208
+
1209
+
1210
+ async def main() -> None:
1211
+ await client.workflows.create_workflow(
1212
+ workflow=WorkflowArtifact(),
1213
+ )
1214
+
1215
+
1216
+ asyncio.run(main())
1217
+ """
1218
+ _response = await self._raw_client.create_workflow(
1219
+ workflow=workflow, request_options=request_options
1220
+ )
1221
+ return _response.data
1222
+
1223
+ async def fetch_workflow(
1224
+ self,
1225
+ workflow_id: str,
1226
+ *,
1227
+ artifact_id: str,
1228
+ request_options: typing.Optional[RequestOptions] = None,
1229
+ ) -> WorkflowResponse:
1230
+ """
1231
+ Parameters
1232
+ ----------
1233
+ workflow_id : str
1234
+
1235
+ artifact_id : str
1236
+
1237
+ request_options : typing.Optional[RequestOptions]
1238
+ Request-specific configuration.
1239
+
1240
+ Returns
1241
+ -------
1242
+ WorkflowResponse
1243
+ Successful Response
1244
+
1245
+ Examples
1246
+ --------
1247
+ import asyncio
1248
+
1249
+ from agenta import AsyncAgentaApi
1250
+
1251
+ client = AsyncAgentaApi(
1252
+ api_key="YOUR_API_KEY",
1253
+ )
1254
+
1255
+
1256
+ async def main() -> None:
1257
+ await client.workflows.fetch_workflow(
1258
+ workflow_id="workflow_id",
1259
+ artifact_id="artifact_id",
1260
+ )
1261
+
1262
+
1263
+ asyncio.run(main())
1264
+ """
1265
+ _response = await self._raw_client.fetch_workflow(
1266
+ workflow_id, artifact_id=artifact_id, request_options=request_options
1267
+ )
1268
+ return _response.data
1269
+
1270
+ async def edit_workflow(
1271
+ self,
1272
+ workflow_id: str,
1273
+ *,
1274
+ workflow: WorkflowArtifact,
1275
+ request_options: typing.Optional[RequestOptions] = None,
1276
+ ) -> WorkflowResponse:
1277
+ """
1278
+ Parameters
1279
+ ----------
1280
+ workflow_id : str
1281
+
1282
+ workflow : WorkflowArtifact
1283
+
1284
+ request_options : typing.Optional[RequestOptions]
1285
+ Request-specific configuration.
1286
+
1287
+ Returns
1288
+ -------
1289
+ WorkflowResponse
1290
+ Successful Response
1291
+
1292
+ Examples
1293
+ --------
1294
+ import asyncio
1295
+
1296
+ from agenta import AsyncAgentaApi, WorkflowArtifact
1297
+
1298
+ client = AsyncAgentaApi(
1299
+ api_key="YOUR_API_KEY",
1300
+ )
1301
+
1302
+
1303
+ async def main() -> None:
1304
+ await client.workflows.edit_workflow(
1305
+ workflow_id="workflow_id",
1306
+ workflow=WorkflowArtifact(),
1307
+ )
1308
+
1309
+
1310
+ asyncio.run(main())
1311
+ """
1312
+ _response = await self._raw_client.edit_workflow(
1313
+ workflow_id, workflow=workflow, request_options=request_options
1314
+ )
1315
+ return _response.data
1316
+
1317
+ async def archive_workflow(
1318
+ self,
1319
+ workflow_id: str,
1320
+ *,
1321
+ artifact_id: str,
1322
+ request_options: typing.Optional[RequestOptions] = None,
1323
+ ) -> WorkflowResponse:
1324
+ """
1325
+ Parameters
1326
+ ----------
1327
+ workflow_id : str
1328
+
1329
+ artifact_id : str
1330
+
1331
+ request_options : typing.Optional[RequestOptions]
1332
+ Request-specific configuration.
1333
+
1334
+ Returns
1335
+ -------
1336
+ WorkflowResponse
1337
+ Successful Response
1338
+
1339
+ Examples
1340
+ --------
1341
+ import asyncio
1342
+
1343
+ from agenta import AsyncAgentaApi
1344
+
1345
+ client = AsyncAgentaApi(
1346
+ api_key="YOUR_API_KEY",
1347
+ )
1348
+
1349
+
1350
+ async def main() -> None:
1351
+ await client.workflows.archive_workflow(
1352
+ workflow_id="workflow_id",
1353
+ artifact_id="artifact_id",
1354
+ )
1355
+
1356
+
1357
+ asyncio.run(main())
1358
+ """
1359
+ _response = await self._raw_client.archive_workflow(
1360
+ workflow_id, artifact_id=artifact_id, request_options=request_options
1361
+ )
1362
+ return _response.data
1363
+
1364
+ async def unarchive_workflow(
1365
+ self,
1366
+ workflow_id: str,
1367
+ *,
1368
+ artifact_id: str,
1369
+ request_options: typing.Optional[RequestOptions] = None,
1370
+ ) -> WorkflowResponse:
1371
+ """
1372
+ Parameters
1373
+ ----------
1374
+ workflow_id : str
1375
+
1376
+ artifact_id : str
1377
+
1378
+ request_options : typing.Optional[RequestOptions]
1379
+ Request-specific configuration.
1380
+
1381
+ Returns
1382
+ -------
1383
+ WorkflowResponse
1384
+ Successful Response
1385
+
1386
+ Examples
1387
+ --------
1388
+ import asyncio
1389
+
1390
+ from agenta import AsyncAgentaApi
1391
+
1392
+ client = AsyncAgentaApi(
1393
+ api_key="YOUR_API_KEY",
1394
+ )
1395
+
1396
+
1397
+ async def main() -> None:
1398
+ await client.workflows.unarchive_workflow(
1399
+ workflow_id="workflow_id",
1400
+ artifact_id="artifact_id",
1401
+ )
1402
+
1403
+
1404
+ asyncio.run(main())
1405
+ """
1406
+ _response = await self._raw_client.unarchive_workflow(
1407
+ workflow_id, artifact_id=artifact_id, request_options=request_options
1408
+ )
1409
+ return _response.data
1410
+
1411
+ async def query_workflows(
1412
+ self,
1413
+ *,
1414
+ workflow_ref: typing.Optional[str] = None,
1415
+ workflow_flags: typing.Optional[str] = None,
1416
+ workflow_meta: typing.Optional[str] = None,
1417
+ include_archived: typing.Optional[bool] = None,
1418
+ request_options: typing.Optional[RequestOptions] = None,
1419
+ ) -> WorkflowsResponse:
1420
+ """
1421
+ Parameters
1422
+ ----------
1423
+ workflow_ref : typing.Optional[str]
1424
+ JSON string of ref, e.g. {"key": value}
1425
+
1426
+ workflow_flags : typing.Optional[str]
1427
+ JSON string of flags, e.g. {"key": value}
1428
+
1429
+ workflow_meta : typing.Optional[str]
1430
+ JSON string of meta, e.g. {"key": value}
1431
+
1432
+ include_archived : typing.Optional[bool]
1433
+
1434
+ request_options : typing.Optional[RequestOptions]
1435
+ Request-specific configuration.
1436
+
1437
+ Returns
1438
+ -------
1439
+ WorkflowsResponse
1440
+ Successful Response
1441
+
1442
+ Examples
1443
+ --------
1444
+ import asyncio
1445
+
1446
+ from agenta import AsyncAgentaApi
1447
+
1448
+ client = AsyncAgentaApi(
1449
+ api_key="YOUR_API_KEY",
1450
+ )
1451
+
1452
+
1453
+ async def main() -> None:
1454
+ await client.workflows.query_workflows()
1455
+
1456
+
1457
+ asyncio.run(main())
1458
+ """
1459
+ _response = await self._raw_client.query_workflows(
1460
+ workflow_ref=workflow_ref,
1461
+ workflow_flags=workflow_flags,
1462
+ workflow_meta=workflow_meta,
1463
+ include_archived=include_archived,
1464
+ request_options=request_options,
1465
+ )
1466
+ return _response.data
1467
+
1468
+ async def list_workflow_variants(
1469
+ self,
1470
+ *,
1471
+ workflow_ref: typing.Optional[str] = None,
1472
+ variant_ref: typing.Optional[str] = None,
1473
+ variant_meta: typing.Optional[str] = None,
1474
+ variant_flags: typing.Optional[str] = None,
1475
+ include_archived: typing.Optional[bool] = None,
1476
+ request_options: typing.Optional[RequestOptions] = None,
1477
+ ) -> WorkflowVariantsResponse:
1478
+ """
1479
+ Parameters
1480
+ ----------
1481
+ workflow_ref : typing.Optional[str]
1482
+ JSON string of reference, e.g. {"key": value}
1483
+
1484
+ variant_ref : typing.Optional[str]
1485
+ JSON string of reference, e.g. {"key": value}
1486
+
1487
+ variant_meta : typing.Optional[str]
1488
+ JSON string of meta, e.g. {"key": value}
1489
+
1490
+ variant_flags : typing.Optional[str]
1491
+ JSON string of flags, e.g. {"key": value}
1492
+
1493
+ include_archived : typing.Optional[bool]
1494
+
1495
+ request_options : typing.Optional[RequestOptions]
1496
+ Request-specific configuration.
1497
+
1498
+ Returns
1499
+ -------
1500
+ WorkflowVariantsResponse
1501
+ Successful Response
1502
+
1503
+ Examples
1504
+ --------
1505
+ import asyncio
1506
+
1507
+ from agenta import AsyncAgentaApi
1508
+
1509
+ client = AsyncAgentaApi(
1510
+ api_key="YOUR_API_KEY",
1511
+ )
1512
+
1513
+
1514
+ async def main() -> None:
1515
+ await client.workflows.list_workflow_variants()
1516
+
1517
+
1518
+ asyncio.run(main())
1519
+ """
1520
+ _response = await self._raw_client.list_workflow_variants(
1521
+ workflow_ref=workflow_ref,
1522
+ variant_ref=variant_ref,
1523
+ variant_meta=variant_meta,
1524
+ variant_flags=variant_flags,
1525
+ include_archived=include_archived,
1526
+ request_options=request_options,
1527
+ )
1528
+ return _response.data
1529
+
1530
+ async def create_workflow_variant(
1531
+ self,
1532
+ *,
1533
+ variant: WorkflowVariant,
1534
+ request_options: typing.Optional[RequestOptions] = None,
1535
+ ) -> WorkflowVariantResponse:
1536
+ """
1537
+ Parameters
1538
+ ----------
1539
+ variant : WorkflowVariant
1540
+
1541
+ request_options : typing.Optional[RequestOptions]
1542
+ Request-specific configuration.
1543
+
1544
+ Returns
1545
+ -------
1546
+ WorkflowVariantResponse
1547
+ Successful Response
1548
+
1549
+ Examples
1550
+ --------
1551
+ import asyncio
1552
+
1553
+ from agenta import AsyncAgentaApi, WorkflowVariant
1554
+
1555
+ client = AsyncAgentaApi(
1556
+ api_key="YOUR_API_KEY",
1557
+ )
1558
+
1559
+
1560
+ async def main() -> None:
1561
+ await client.workflows.create_workflow_variant(
1562
+ variant=WorkflowVariant(),
1563
+ )
1564
+
1565
+
1566
+ asyncio.run(main())
1567
+ """
1568
+ _response = await self._raw_client.create_workflow_variant(
1569
+ variant=variant, request_options=request_options
1570
+ )
1571
+ return _response.data
1572
+
1573
+ async def fetch_workflow_variant(
1574
+ self,
1575
+ variant_id: str,
1576
+ *,
1577
+ request_options: typing.Optional[RequestOptions] = None,
1578
+ ) -> WorkflowVariantResponse:
1579
+ """
1580
+ Parameters
1581
+ ----------
1582
+ variant_id : str
1583
+
1584
+ request_options : typing.Optional[RequestOptions]
1585
+ Request-specific configuration.
1586
+
1587
+ Returns
1588
+ -------
1589
+ WorkflowVariantResponse
1590
+ Successful Response
1591
+
1592
+ Examples
1593
+ --------
1594
+ import asyncio
1595
+
1596
+ from agenta import AsyncAgentaApi
1597
+
1598
+ client = AsyncAgentaApi(
1599
+ api_key="YOUR_API_KEY",
1600
+ )
1601
+
1602
+
1603
+ async def main() -> None:
1604
+ await client.workflows.fetch_workflow_variant(
1605
+ variant_id="variant_id",
1606
+ )
1607
+
1608
+
1609
+ asyncio.run(main())
1610
+ """
1611
+ _response = await self._raw_client.fetch_workflow_variant(
1612
+ variant_id, request_options=request_options
1613
+ )
1614
+ return _response.data
1615
+
1616
+ async def edit_workflow_variant(
1617
+ self,
1618
+ variant_id: str,
1619
+ *,
1620
+ variant: WorkflowVariant,
1621
+ request_options: typing.Optional[RequestOptions] = None,
1622
+ ) -> WorkflowVariantResponse:
1623
+ """
1624
+ Parameters
1625
+ ----------
1626
+ variant_id : str
1627
+
1628
+ variant : WorkflowVariant
1629
+
1630
+ request_options : typing.Optional[RequestOptions]
1631
+ Request-specific configuration.
1632
+
1633
+ Returns
1634
+ -------
1635
+ WorkflowVariantResponse
1636
+ Successful Response
1637
+
1638
+ Examples
1639
+ --------
1640
+ import asyncio
1641
+
1642
+ from agenta import AsyncAgentaApi, WorkflowVariant
1643
+
1644
+ client = AsyncAgentaApi(
1645
+ api_key="YOUR_API_KEY",
1646
+ )
1647
+
1648
+
1649
+ async def main() -> None:
1650
+ await client.workflows.edit_workflow_variant(
1651
+ variant_id="variant_id",
1652
+ variant=WorkflowVariant(),
1653
+ )
1654
+
1655
+
1656
+ asyncio.run(main())
1657
+ """
1658
+ _response = await self._raw_client.edit_workflow_variant(
1659
+ variant_id, variant=variant, request_options=request_options
1660
+ )
1661
+ return _response.data
1662
+
1663
+ async def archive_workflow_variant(
1664
+ self,
1665
+ variant_id: str,
1666
+ *,
1667
+ request_options: typing.Optional[RequestOptions] = None,
1668
+ ) -> WorkflowVariantResponse:
1669
+ """
1670
+ Parameters
1671
+ ----------
1672
+ variant_id : str
1673
+
1674
+ request_options : typing.Optional[RequestOptions]
1675
+ Request-specific configuration.
1676
+
1677
+ Returns
1678
+ -------
1679
+ WorkflowVariantResponse
1680
+ Successful Response
1681
+
1682
+ Examples
1683
+ --------
1684
+ import asyncio
1685
+
1686
+ from agenta import AsyncAgentaApi
1687
+
1688
+ client = AsyncAgentaApi(
1689
+ api_key="YOUR_API_KEY",
1690
+ )
1691
+
1692
+
1693
+ async def main() -> None:
1694
+ await client.workflows.archive_workflow_variant(
1695
+ variant_id="variant_id",
1696
+ )
1697
+
1698
+
1699
+ asyncio.run(main())
1700
+ """
1701
+ _response = await self._raw_client.archive_workflow_variant(
1702
+ variant_id, request_options=request_options
1703
+ )
1704
+ return _response.data
1705
+
1706
+ async def unarchive_workflow_variant(
1707
+ self,
1708
+ variant_id: str,
1709
+ *,
1710
+ request_options: typing.Optional[RequestOptions] = None,
1711
+ ) -> WorkflowVariantResponse:
1712
+ """
1713
+ Parameters
1714
+ ----------
1715
+ variant_id : str
1716
+
1717
+ request_options : typing.Optional[RequestOptions]
1718
+ Request-specific configuration.
1719
+
1720
+ Returns
1721
+ -------
1722
+ WorkflowVariantResponse
1723
+ Successful Response
1724
+
1725
+ Examples
1726
+ --------
1727
+ import asyncio
1728
+
1729
+ from agenta import AsyncAgentaApi
1730
+
1731
+ client = AsyncAgentaApi(
1732
+ api_key="YOUR_API_KEY",
1733
+ )
1734
+
1735
+
1736
+ async def main() -> None:
1737
+ await client.workflows.unarchive_workflow_variant(
1738
+ variant_id="variant_id",
1739
+ )
1740
+
1741
+
1742
+ asyncio.run(main())
1743
+ """
1744
+ _response = await self._raw_client.unarchive_workflow_variant(
1745
+ variant_id, request_options=request_options
1746
+ )
1747
+ return _response.data
1748
+
1749
+ async def query_workflow_variants(
1750
+ self,
1751
+ *,
1752
+ workflow_ref: typing.Optional[str] = None,
1753
+ variant_ref: typing.Optional[str] = None,
1754
+ variant_meta: typing.Optional[str] = None,
1755
+ variant_flags: typing.Optional[str] = None,
1756
+ include_archived: typing.Optional[bool] = None,
1757
+ request_options: typing.Optional[RequestOptions] = None,
1758
+ ) -> WorkflowVariantsResponse:
1759
+ """
1760
+ Parameters
1761
+ ----------
1762
+ workflow_ref : typing.Optional[str]
1763
+ JSON string of reference, e.g. {"key": value}
1764
+
1765
+ variant_ref : typing.Optional[str]
1766
+ JSON string of reference, e.g. {"key": value}
1767
+
1768
+ variant_meta : typing.Optional[str]
1769
+ JSON string of meta, e.g. {"key": value}
1770
+
1771
+ variant_flags : typing.Optional[str]
1772
+ JSON string of flags, e.g. {"key": value}
1773
+
1774
+ include_archived : typing.Optional[bool]
1775
+
1776
+ request_options : typing.Optional[RequestOptions]
1777
+ Request-specific configuration.
1778
+
1779
+ Returns
1780
+ -------
1781
+ WorkflowVariantsResponse
1782
+ Successful Response
1783
+
1784
+ Examples
1785
+ --------
1786
+ import asyncio
1787
+
1788
+ from agenta import AsyncAgentaApi
1789
+
1790
+ client = AsyncAgentaApi(
1791
+ api_key="YOUR_API_KEY",
1792
+ )
1793
+
1794
+
1795
+ async def main() -> None:
1796
+ await client.workflows.query_workflow_variants()
1797
+
1798
+
1799
+ asyncio.run(main())
1800
+ """
1801
+ _response = await self._raw_client.query_workflow_variants(
1802
+ workflow_ref=workflow_ref,
1803
+ variant_ref=variant_ref,
1804
+ variant_meta=variant_meta,
1805
+ variant_flags=variant_flags,
1806
+ include_archived=include_archived,
1807
+ request_options=request_options,
1808
+ )
1809
+ return _response.data
1810
+
1811
+ async def commit_workflow_revision_by_variant_id(
1812
+ self,
1813
+ variant_id: typing.Optional[str],
1814
+ *,
1815
+ revision: WorkflowRevision,
1816
+ request_options: typing.Optional[RequestOptions] = None,
1817
+ ) -> WorkflowRevisionResponse:
1818
+ """
1819
+ Parameters
1820
+ ----------
1821
+ variant_id : typing.Optional[str]
1822
+
1823
+ revision : WorkflowRevision
1824
+
1825
+ request_options : typing.Optional[RequestOptions]
1826
+ Request-specific configuration.
1827
+
1828
+ Returns
1829
+ -------
1830
+ WorkflowRevisionResponse
1831
+ Successful Response
1832
+
1833
+ Examples
1834
+ --------
1835
+ import asyncio
1836
+
1837
+ from agenta import AsyncAgentaApi, WorkflowRevision
1838
+
1839
+ client = AsyncAgentaApi(
1840
+ api_key="YOUR_API_KEY",
1841
+ )
1842
+
1843
+
1844
+ async def main() -> None:
1845
+ await client.workflows.commit_workflow_revision_by_variant_id(
1846
+ revision=WorkflowRevision(),
1847
+ )
1848
+
1849
+
1850
+ asyncio.run(main())
1851
+ """
1852
+ _response = await self._raw_client.commit_workflow_revision_by_variant_id(
1853
+ variant_id, revision=revision, request_options=request_options
1854
+ )
1855
+ return _response.data
1856
+
1857
+ async def fork_workflow_variant(
1858
+ self,
1859
+ variant_id: typing.Optional[str],
1860
+ *,
1861
+ revision: WorkflowRevision,
1862
+ revision_id: typing.Optional[str] = None,
1863
+ request_options: typing.Optional[RequestOptions] = None,
1864
+ ) -> WorkflowVariantResponse:
1865
+ """
1866
+ Parameters
1867
+ ----------
1868
+ variant_id : typing.Optional[str]
1869
+
1870
+ revision : WorkflowRevision
1871
+
1872
+ revision_id : typing.Optional[str]
1873
+
1874
+ request_options : typing.Optional[RequestOptions]
1875
+ Request-specific configuration.
1876
+
1877
+ Returns
1878
+ -------
1879
+ WorkflowVariantResponse
1880
+ Successful Response
1881
+
1882
+ Examples
1883
+ --------
1884
+ import asyncio
1885
+
1886
+ from agenta import AsyncAgentaApi, WorkflowRevision
1887
+
1888
+ client = AsyncAgentaApi(
1889
+ api_key="YOUR_API_KEY",
1890
+ )
1891
+
1892
+
1893
+ async def main() -> None:
1894
+ await client.workflows.fork_workflow_variant(
1895
+ revision=WorkflowRevision(),
1896
+ )
1897
+
1898
+
1899
+ asyncio.run(main())
1900
+ """
1901
+ _response = await self._raw_client.fork_workflow_variant(
1902
+ variant_id,
1903
+ revision=revision,
1904
+ revision_id=revision_id,
1905
+ request_options=request_options,
1906
+ )
1907
+ return _response.data
1908
+
1909
+ async def list_workflow_revisions(
1910
+ self,
1911
+ *,
1912
+ variant_ref: typing.Optional[str] = None,
1913
+ revision_ref: typing.Optional[str] = None,
1914
+ revision_meta: typing.Optional[str] = None,
1915
+ revision_flags: typing.Optional[str] = None,
1916
+ include_archived: typing.Optional[bool] = None,
1917
+ request_options: typing.Optional[RequestOptions] = None,
1918
+ ) -> WorkflowRevisionsResponse:
1919
+ """
1920
+ Parameters
1921
+ ----------
1922
+ variant_ref : typing.Optional[str]
1923
+ JSON string of ref, e.g. {"key": value}
1924
+
1925
+ revision_ref : typing.Optional[str]
1926
+ JSON string of ref, e.g. {"key": value}
1927
+
1928
+ revision_meta : typing.Optional[str]
1929
+ JSON string of meta, e.g. {"key": value}
1930
+
1931
+ revision_flags : typing.Optional[str]
1932
+ JSON string of flags, e.g. {"key": value}
1933
+
1934
+ include_archived : typing.Optional[bool]
1935
+
1936
+ request_options : typing.Optional[RequestOptions]
1937
+ Request-specific configuration.
1938
+
1939
+ Returns
1940
+ -------
1941
+ WorkflowRevisionsResponse
1942
+ Successful Response
1943
+
1944
+ Examples
1945
+ --------
1946
+ import asyncio
1947
+
1948
+ from agenta import AsyncAgentaApi
1949
+
1950
+ client = AsyncAgentaApi(
1951
+ api_key="YOUR_API_KEY",
1952
+ )
1953
+
1954
+
1955
+ async def main() -> None:
1956
+ await client.workflows.list_workflow_revisions()
1957
+
1958
+
1959
+ asyncio.run(main())
1960
+ """
1961
+ _response = await self._raw_client.list_workflow_revisions(
1962
+ variant_ref=variant_ref,
1963
+ revision_ref=revision_ref,
1964
+ revision_meta=revision_meta,
1965
+ revision_flags=revision_flags,
1966
+ include_archived=include_archived,
1967
+ request_options=request_options,
1968
+ )
1969
+ return _response.data
1970
+
1971
+ async def create_workflow_revision(
1972
+ self,
1973
+ *,
1974
+ revision: WorkflowRevision,
1975
+ request_options: typing.Optional[RequestOptions] = None,
1976
+ ) -> WorkflowRevisionResponse:
1977
+ """
1978
+ Parameters
1979
+ ----------
1980
+ revision : WorkflowRevision
1981
+
1982
+ request_options : typing.Optional[RequestOptions]
1983
+ Request-specific configuration.
1984
+
1985
+ Returns
1986
+ -------
1987
+ WorkflowRevisionResponse
1988
+ Successful Response
1989
+
1990
+ Examples
1991
+ --------
1992
+ import asyncio
1993
+
1994
+ from agenta import AsyncAgentaApi, WorkflowRevision
1995
+
1996
+ client = AsyncAgentaApi(
1997
+ api_key="YOUR_API_KEY",
1998
+ )
1999
+
2000
+
2001
+ async def main() -> None:
2002
+ await client.workflows.create_workflow_revision(
2003
+ revision=WorkflowRevision(),
2004
+ )
2005
+
2006
+
2007
+ asyncio.run(main())
2008
+ """
2009
+ _response = await self._raw_client.create_workflow_revision(
2010
+ revision=revision, request_options=request_options
2011
+ )
2012
+ return _response.data
2013
+
2014
+ async def fetch_workflow_revision(
2015
+ self,
2016
+ revision_id: str,
2017
+ *,
2018
+ request_options: typing.Optional[RequestOptions] = None,
2019
+ ) -> WorkflowRevisionResponse:
2020
+ """
2021
+ Parameters
2022
+ ----------
2023
+ revision_id : str
2024
+
2025
+ request_options : typing.Optional[RequestOptions]
2026
+ Request-specific configuration.
2027
+
2028
+ Returns
2029
+ -------
2030
+ WorkflowRevisionResponse
2031
+ Successful Response
2032
+
2033
+ Examples
2034
+ --------
2035
+ import asyncio
2036
+
2037
+ from agenta import AsyncAgentaApi
2038
+
2039
+ client = AsyncAgentaApi(
2040
+ api_key="YOUR_API_KEY",
2041
+ )
2042
+
2043
+
2044
+ async def main() -> None:
2045
+ await client.workflows.fetch_workflow_revision(
2046
+ revision_id="revision_id",
2047
+ )
2048
+
2049
+
2050
+ asyncio.run(main())
2051
+ """
2052
+ _response = await self._raw_client.fetch_workflow_revision(
2053
+ revision_id, request_options=request_options
2054
+ )
2055
+ return _response.data
2056
+
2057
+ async def edit_workflow_revision(
2058
+ self,
2059
+ revision_id: str,
2060
+ *,
2061
+ revision: WorkflowRevision,
2062
+ request_options: typing.Optional[RequestOptions] = None,
2063
+ ) -> WorkflowRevisionResponse:
2064
+ """
2065
+ Parameters
2066
+ ----------
2067
+ revision_id : str
2068
+
2069
+ revision : WorkflowRevision
2070
+
2071
+ request_options : typing.Optional[RequestOptions]
2072
+ Request-specific configuration.
2073
+
2074
+ Returns
2075
+ -------
2076
+ WorkflowRevisionResponse
2077
+ Successful Response
2078
+
2079
+ Examples
2080
+ --------
2081
+ import asyncio
2082
+
2083
+ from agenta import AsyncAgentaApi, WorkflowRevision
2084
+
2085
+ client = AsyncAgentaApi(
2086
+ api_key="YOUR_API_KEY",
2087
+ )
2088
+
2089
+
2090
+ async def main() -> None:
2091
+ await client.workflows.edit_workflow_revision(
2092
+ revision_id="revision_id",
2093
+ revision=WorkflowRevision(),
2094
+ )
2095
+
2096
+
2097
+ asyncio.run(main())
2098
+ """
2099
+ _response = await self._raw_client.edit_workflow_revision(
2100
+ revision_id, revision=revision, request_options=request_options
2101
+ )
2102
+ return _response.data
2103
+
2104
+ async def archive_workflow_revision_rpc(
2105
+ self,
2106
+ revision_id: str,
2107
+ *,
2108
+ request_options: typing.Optional[RequestOptions] = None,
2109
+ ) -> WorkflowRevisionResponse:
2110
+ """
2111
+ Parameters
2112
+ ----------
2113
+ revision_id : str
2114
+
2115
+ request_options : typing.Optional[RequestOptions]
2116
+ Request-specific configuration.
2117
+
2118
+ Returns
2119
+ -------
2120
+ WorkflowRevisionResponse
2121
+ Successful Response
2122
+
2123
+ Examples
2124
+ --------
2125
+ import asyncio
2126
+
2127
+ from agenta import AsyncAgentaApi
2128
+
2129
+ client = AsyncAgentaApi(
2130
+ api_key="YOUR_API_KEY",
2131
+ )
2132
+
2133
+
2134
+ async def main() -> None:
2135
+ await client.workflows.archive_workflow_revision_rpc(
2136
+ revision_id="revision_id",
2137
+ )
2138
+
2139
+
2140
+ asyncio.run(main())
2141
+ """
2142
+ _response = await self._raw_client.archive_workflow_revision_rpc(
2143
+ revision_id, request_options=request_options
2144
+ )
2145
+ return _response.data
2146
+
2147
+ async def unarchive_workflow_revision_rpc(
2148
+ self,
2149
+ revision_id: str,
2150
+ *,
2151
+ request_options: typing.Optional[RequestOptions] = None,
2152
+ ) -> WorkflowRevisionResponse:
2153
+ """
2154
+ Parameters
2155
+ ----------
2156
+ revision_id : str
2157
+
2158
+ request_options : typing.Optional[RequestOptions]
2159
+ Request-specific configuration.
2160
+
2161
+ Returns
2162
+ -------
2163
+ WorkflowRevisionResponse
2164
+ Successful Response
2165
+
2166
+ Examples
2167
+ --------
2168
+ import asyncio
2169
+
2170
+ from agenta import AsyncAgentaApi
2171
+
2172
+ client = AsyncAgentaApi(
2173
+ api_key="YOUR_API_KEY",
2174
+ )
2175
+
2176
+
2177
+ async def main() -> None:
2178
+ await client.workflows.unarchive_workflow_revision_rpc(
2179
+ revision_id="revision_id",
2180
+ )
2181
+
2182
+
2183
+ asyncio.run(main())
2184
+ """
2185
+ _response = await self._raw_client.unarchive_workflow_revision_rpc(
2186
+ revision_id, request_options=request_options
2187
+ )
2188
+ return _response.data
2189
+
2190
+ async def query_workflow_revisions(
2191
+ self,
2192
+ *,
2193
+ variant_ref: typing.Optional[str] = None,
2194
+ revision_ref: typing.Optional[str] = None,
2195
+ revision_meta: typing.Optional[str] = None,
2196
+ revision_flags: typing.Optional[str] = None,
2197
+ include_archived: typing.Optional[bool] = None,
2198
+ request_options: typing.Optional[RequestOptions] = None,
2199
+ ) -> WorkflowRevisionsResponse:
2200
+ """
2201
+ Parameters
2202
+ ----------
2203
+ variant_ref : typing.Optional[str]
2204
+ JSON string of ref, e.g. {"key": value}
2205
+
2206
+ revision_ref : typing.Optional[str]
2207
+ JSON string of ref, e.g. {"key": value}
2208
+
2209
+ revision_meta : typing.Optional[str]
2210
+ JSON string of meta, e.g. {"key": value}
2211
+
2212
+ revision_flags : typing.Optional[str]
2213
+ JSON string of flags, e.g. {"key": value}
2214
+
2215
+ include_archived : typing.Optional[bool]
2216
+
2217
+ request_options : typing.Optional[RequestOptions]
2218
+ Request-specific configuration.
2219
+
2220
+ Returns
2221
+ -------
2222
+ WorkflowRevisionsResponse
2223
+ Successful Response
2224
+
2225
+ Examples
2226
+ --------
2227
+ import asyncio
2228
+
2229
+ from agenta import AsyncAgentaApi
2230
+
2231
+ client = AsyncAgentaApi(
2232
+ api_key="YOUR_API_KEY",
2233
+ )
2234
+
2235
+
2236
+ async def main() -> None:
2237
+ await client.workflows.query_workflow_revisions()
2238
+
2239
+
2240
+ asyncio.run(main())
2241
+ """
2242
+ _response = await self._raw_client.query_workflow_revisions(
2243
+ variant_ref=variant_ref,
2244
+ revision_ref=revision_ref,
2245
+ revision_meta=revision_meta,
2246
+ revision_flags=revision_flags,
2247
+ include_archived=include_archived,
2248
+ request_options=request_options,
2249
+ )
2250
+ return _response.data
2251
+
2252
+ async def fork_workflow_variant_by_revision_id(
2253
+ self,
2254
+ revision_id: typing.Optional[str],
2255
+ *,
2256
+ revision: WorkflowRevision,
2257
+ variant_id: typing.Optional[str] = None,
2258
+ request_options: typing.Optional[RequestOptions] = None,
2259
+ ) -> WorkflowVariantResponse:
2260
+ """
2261
+ Parameters
2262
+ ----------
2263
+ revision_id : typing.Optional[str]
2264
+
2265
+ revision : WorkflowRevision
2266
+
2267
+ variant_id : typing.Optional[str]
2268
+
2269
+ request_options : typing.Optional[RequestOptions]
2270
+ Request-specific configuration.
2271
+
2272
+ Returns
2273
+ -------
2274
+ WorkflowVariantResponse
2275
+ Successful Response
2276
+
2277
+ Examples
2278
+ --------
2279
+ import asyncio
2280
+
2281
+ from agenta import AsyncAgentaApi, WorkflowRevision
2282
+
2283
+ client = AsyncAgentaApi(
2284
+ api_key="YOUR_API_KEY",
2285
+ )
2286
+
2287
+
2288
+ async def main() -> None:
2289
+ await client.workflows.fork_workflow_variant_by_revision_id(
2290
+ revision=WorkflowRevision(),
2291
+ )
2292
+
2293
+
2294
+ asyncio.run(main())
2295
+ """
2296
+ _response = await self._raw_client.fork_workflow_variant_by_revision_id(
2297
+ revision_id,
2298
+ revision=revision,
2299
+ variant_id=variant_id,
2300
+ request_options=request_options,
2301
+ )
2302
+ return _response.data
2303
+
2304
+ async def commit_workflow_revision(
2305
+ self,
2306
+ *,
2307
+ revision: WorkflowRevision,
2308
+ variant_id: typing.Optional[str] = None,
2309
+ request_options: typing.Optional[RequestOptions] = None,
2310
+ ) -> WorkflowRevisionResponse:
2311
+ """
2312
+ Parameters
2313
+ ----------
2314
+ revision : WorkflowRevision
2315
+
2316
+ variant_id : typing.Optional[str]
2317
+
2318
+ request_options : typing.Optional[RequestOptions]
2319
+ Request-specific configuration.
2320
+
2321
+ Returns
2322
+ -------
2323
+ WorkflowRevisionResponse
2324
+ Successful Response
2325
+
2326
+ Examples
2327
+ --------
2328
+ import asyncio
2329
+
2330
+ from agenta import AsyncAgentaApi, WorkflowRevision
2331
+
2332
+ client = AsyncAgentaApi(
2333
+ api_key="YOUR_API_KEY",
2334
+ )
2335
+
2336
+
2337
+ async def main() -> None:
2338
+ await client.workflows.commit_workflow_revision(
2339
+ revision=WorkflowRevision(),
2340
+ )
2341
+
2342
+
2343
+ asyncio.run(main())
2344
+ """
2345
+ _response = await self._raw_client.commit_workflow_revision(
2346
+ revision=revision, variant_id=variant_id, request_options=request_options
2347
+ )
2348
+ return _response.data
2349
+
2350
+ async def log_workflow_revisions(
2351
+ self,
2352
+ *,
2353
+ depth: typing.Optional[int] = None,
2354
+ variant_ref: typing.Optional[Reference] = OMIT,
2355
+ revision_ref: typing.Optional[Reference] = OMIT,
2356
+ request_options: typing.Optional[RequestOptions] = None,
2357
+ ) -> WorkflowRevisionsResponse:
2358
+ """
2359
+ Parameters
2360
+ ----------
2361
+ depth : typing.Optional[int]
2362
+
2363
+ variant_ref : typing.Optional[Reference]
2364
+
2365
+ revision_ref : typing.Optional[Reference]
2366
+
2367
+ request_options : typing.Optional[RequestOptions]
2368
+ Request-specific configuration.
2369
+
2370
+ Returns
2371
+ -------
2372
+ WorkflowRevisionsResponse
2373
+ Successful Response
2374
+
2375
+ Examples
2376
+ --------
2377
+ import asyncio
2378
+
2379
+ from agenta import AsyncAgentaApi
2380
+
2381
+ client = AsyncAgentaApi(
2382
+ api_key="YOUR_API_KEY",
2383
+ )
2384
+
2385
+
2386
+ async def main() -> None:
2387
+ await client.workflows.log_workflow_revisions()
2388
+
2389
+
2390
+ asyncio.run(main())
2391
+ """
2392
+ _response = await self._raw_client.log_workflow_revisions(
2393
+ depth=depth,
2394
+ variant_ref=variant_ref,
2395
+ revision_ref=revision_ref,
2396
+ request_options=request_options,
2397
+ )
2398
+ return _response.data