agenta 0.52.6__py3-none-any.whl → 0.63.2__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.
Files changed (271) hide show
  1. agenta/__init__.py +12 -3
  2. agenta/client/__init__.py +4 -4
  3. agenta/client/backend/__init__.py +4 -4
  4. agenta/client/backend/api_keys/client.py +2 -2
  5. agenta/client/backend/billing/client.py +2 -2
  6. agenta/client/backend/billing/raw_client.py +2 -2
  7. agenta/client/backend/client.py +56 -48
  8. agenta/client/backend/core/client_wrapper.py +2 -2
  9. agenta/client/backend/core/file.py +3 -1
  10. agenta/client/backend/core/http_client.py +3 -3
  11. agenta/client/backend/core/pydantic_utilities.py +13 -3
  12. agenta/client/backend/human_evaluations/client.py +2 -2
  13. agenta/client/backend/human_evaluations/raw_client.py +2 -2
  14. agenta/client/backend/organization/client.py +46 -34
  15. agenta/client/backend/organization/raw_client.py +32 -26
  16. agenta/client/backend/raw_client.py +26 -26
  17. agenta/client/backend/testsets/client.py +18 -18
  18. agenta/client/backend/testsets/raw_client.py +30 -30
  19. agenta/client/backend/types/__init__.py +4 -4
  20. agenta/client/backend/types/account_request.py +3 -1
  21. agenta/client/backend/types/account_response.py +3 -1
  22. agenta/client/backend/types/agenta_node_dto.py +3 -1
  23. agenta/client/backend/types/agenta_nodes_response.py +3 -1
  24. agenta/client/backend/types/agenta_root_dto.py +3 -1
  25. agenta/client/backend/types/agenta_roots_response.py +3 -1
  26. agenta/client/backend/types/agenta_tree_dto.py +3 -1
  27. agenta/client/backend/types/agenta_trees_response.py +3 -1
  28. agenta/client/backend/types/aggregated_result.py +3 -1
  29. agenta/client/backend/types/analytics_response.py +3 -1
  30. agenta/client/backend/types/annotation.py +6 -4
  31. agenta/client/backend/types/annotation_create.py +3 -1
  32. agenta/client/backend/types/annotation_edit.py +3 -1
  33. agenta/client/backend/types/annotation_link.py +3 -1
  34. agenta/client/backend/types/annotation_link_response.py +3 -1
  35. agenta/client/backend/types/annotation_query.py +3 -1
  36. agenta/client/backend/types/annotation_query_request.py +3 -1
  37. agenta/client/backend/types/annotation_reference.py +3 -1
  38. agenta/client/backend/types/annotation_references.py +3 -1
  39. agenta/client/backend/types/annotation_response.py +3 -1
  40. agenta/client/backend/types/annotations_response.py +3 -1
  41. agenta/client/backend/types/app.py +3 -1
  42. agenta/client/backend/types/app_variant_response.py +3 -1
  43. agenta/client/backend/types/app_variant_revision.py +3 -1
  44. agenta/client/backend/types/artifact.py +6 -4
  45. agenta/client/backend/types/base_output.py +3 -1
  46. agenta/client/backend/types/body_fetch_workflow_revision.py +3 -1
  47. agenta/client/backend/types/body_import_testset.py +3 -1
  48. agenta/client/backend/types/bucket_dto.py +3 -1
  49. agenta/client/backend/types/collect_status_response.py +3 -1
  50. agenta/client/backend/types/config_db.py +3 -1
  51. agenta/client/backend/types/config_dto.py +3 -1
  52. agenta/client/backend/types/config_response_model.py +3 -1
  53. agenta/client/backend/types/correct_answer.py +3 -1
  54. agenta/client/backend/types/create_app_output.py +3 -1
  55. agenta/client/backend/types/custom_model_settings_dto.py +3 -1
  56. agenta/client/backend/types/custom_provider_dto.py +3 -1
  57. agenta/client/backend/types/custom_provider_kind.py +1 -1
  58. agenta/client/backend/types/custom_provider_settings_dto.py +3 -1
  59. agenta/client/backend/types/delete_evaluation.py +3 -1
  60. agenta/client/backend/types/environment_output.py +3 -1
  61. agenta/client/backend/types/environment_output_extended.py +3 -1
  62. agenta/client/backend/types/environment_revision.py +3 -1
  63. agenta/client/backend/types/error.py +3 -1
  64. agenta/client/backend/types/evaluation.py +3 -1
  65. agenta/client/backend/types/evaluation_scenario.py +3 -1
  66. agenta/client/backend/types/evaluation_scenario_input.py +3 -1
  67. agenta/client/backend/types/evaluation_scenario_output.py +3 -1
  68. agenta/client/backend/types/evaluation_scenario_result.py +3 -1
  69. agenta/client/backend/types/evaluator.py +6 -4
  70. agenta/client/backend/types/evaluator_config.py +6 -4
  71. agenta/client/backend/types/evaluator_flags.py +3 -1
  72. agenta/client/backend/types/evaluator_mapping_output_interface.py +3 -1
  73. agenta/client/backend/types/evaluator_output_interface.py +3 -1
  74. agenta/client/backend/types/evaluator_query.py +3 -1
  75. agenta/client/backend/types/evaluator_query_request.py +3 -1
  76. agenta/client/backend/types/evaluator_request.py +3 -1
  77. agenta/client/backend/types/evaluator_response.py +3 -1
  78. agenta/client/backend/types/evaluators_response.py +3 -1
  79. agenta/client/backend/types/exception_dto.py +3 -1
  80. agenta/client/backend/types/extended_o_tel_tracing_response.py +3 -1
  81. agenta/client/backend/types/get_config_response.py +3 -1
  82. agenta/client/backend/types/header.py +3 -1
  83. agenta/client/backend/types/http_validation_error.py +3 -1
  84. agenta/client/backend/types/human_evaluation.py +3 -1
  85. agenta/client/backend/types/human_evaluation_scenario.py +3 -1
  86. agenta/client/backend/types/human_evaluation_scenario_input.py +3 -1
  87. agenta/client/backend/types/human_evaluation_scenario_output.py +3 -1
  88. agenta/client/backend/types/invite_request.py +3 -1
  89. agenta/client/backend/types/legacy_analytics_response.py +3 -1
  90. agenta/client/backend/types/legacy_data_point.py +3 -1
  91. agenta/client/backend/types/legacy_evaluator.py +3 -1
  92. agenta/client/backend/types/legacy_scope_request.py +3 -1
  93. agenta/client/backend/types/legacy_scopes_response.py +3 -1
  94. agenta/client/backend/types/legacy_subscription_request.py +3 -1
  95. agenta/client/backend/types/legacy_user_request.py +3 -1
  96. agenta/client/backend/types/legacy_user_response.py +3 -1
  97. agenta/client/backend/types/lifecycle_dto.py +3 -1
  98. agenta/client/backend/types/link_dto.py +3 -1
  99. agenta/client/backend/types/list_api_keys_response.py +3 -1
  100. agenta/client/backend/types/llm_run_rate_limit.py +3 -1
  101. agenta/client/backend/types/meta_request.py +3 -1
  102. agenta/client/backend/types/metrics_dto.py +3 -1
  103. agenta/client/backend/types/new_testset.py +3 -1
  104. agenta/client/backend/types/node_dto.py +3 -1
  105. agenta/client/backend/types/o_tel_context_dto.py +3 -1
  106. agenta/client/backend/types/o_tel_event.py +6 -4
  107. agenta/client/backend/types/o_tel_event_dto.py +3 -1
  108. agenta/client/backend/types/o_tel_extra_dto.py +3 -1
  109. agenta/client/backend/types/o_tel_flat_span.py +6 -4
  110. agenta/client/backend/types/o_tel_link.py +6 -4
  111. agenta/client/backend/types/o_tel_link_dto.py +3 -1
  112. agenta/client/backend/types/o_tel_links_response.py +3 -1
  113. agenta/client/backend/types/o_tel_span.py +1 -1
  114. agenta/client/backend/types/o_tel_span_dto.py +3 -1
  115. agenta/client/backend/types/o_tel_spans_tree.py +3 -1
  116. agenta/client/backend/types/o_tel_tracing_data_response.py +3 -1
  117. agenta/client/backend/types/o_tel_tracing_request.py +3 -1
  118. agenta/client/backend/types/o_tel_tracing_response.py +3 -1
  119. agenta/client/backend/types/organization.py +3 -1
  120. agenta/client/backend/types/organization_details.py +3 -1
  121. agenta/client/backend/types/organization_membership_request.py +3 -1
  122. agenta/client/backend/types/organization_output.py +3 -1
  123. agenta/client/backend/types/organization_request.py +3 -1
  124. agenta/client/backend/types/parent_dto.py +3 -1
  125. agenta/client/backend/types/project_membership_request.py +3 -1
  126. agenta/client/backend/types/project_request.py +3 -1
  127. agenta/client/backend/types/project_scope.py +3 -1
  128. agenta/client/backend/types/projects_response.py +3 -1
  129. agenta/client/backend/types/reference.py +6 -4
  130. agenta/client/backend/types/reference_dto.py +3 -1
  131. agenta/client/backend/types/reference_request_model.py +3 -1
  132. agenta/client/backend/types/result.py +3 -1
  133. agenta/client/backend/types/root_dto.py +3 -1
  134. agenta/client/backend/types/scopes_response_model.py +3 -1
  135. agenta/client/backend/types/secret_dto.py +3 -1
  136. agenta/client/backend/types/secret_response_dto.py +3 -1
  137. agenta/client/backend/types/simple_evaluation_output.py +3 -1
  138. agenta/client/backend/types/span_dto.py +6 -4
  139. agenta/client/backend/types/standard_provider_dto.py +3 -1
  140. agenta/client/backend/types/standard_provider_settings_dto.py +3 -1
  141. agenta/client/backend/types/status_dto.py +3 -1
  142. agenta/client/backend/types/tags_request.py +3 -1
  143. agenta/client/backend/types/testcase_response.py +6 -4
  144. agenta/client/backend/types/testset.py +6 -4
  145. agenta/client/backend/types/{test_set_output_response.py → testset_output_response.py} +4 -2
  146. agenta/client/backend/types/testset_request.py +3 -1
  147. agenta/client/backend/types/testset_response.py +3 -1
  148. agenta/client/backend/types/{test_set_simple_response.py → testset_simple_response.py} +4 -2
  149. agenta/client/backend/types/testsets_response.py +3 -1
  150. agenta/client/backend/types/time_dto.py +3 -1
  151. agenta/client/backend/types/tree_dto.py +3 -1
  152. agenta/client/backend/types/update_app_output.py +3 -1
  153. agenta/client/backend/types/user_request.py +3 -1
  154. agenta/client/backend/types/validation_error.py +3 -1
  155. agenta/client/backend/types/workflow_artifact.py +6 -4
  156. agenta/client/backend/types/workflow_data.py +3 -1
  157. agenta/client/backend/types/workflow_flags.py +3 -1
  158. agenta/client/backend/types/workflow_request.py +3 -1
  159. agenta/client/backend/types/workflow_response.py +3 -1
  160. agenta/client/backend/types/workflow_revision.py +6 -4
  161. agenta/client/backend/types/workflow_revision_request.py +3 -1
  162. agenta/client/backend/types/workflow_revision_response.py +3 -1
  163. agenta/client/backend/types/workflow_revisions_response.py +3 -1
  164. agenta/client/backend/types/workflow_variant.py +6 -4
  165. agenta/client/backend/types/workflow_variant_request.py +3 -1
  166. agenta/client/backend/types/workflow_variant_response.py +3 -1
  167. agenta/client/backend/types/workflow_variants_response.py +3 -1
  168. agenta/client/backend/types/workflows_response.py +3 -1
  169. agenta/client/backend/types/workspace.py +3 -1
  170. agenta/client/backend/types/workspace_member_response.py +3 -1
  171. agenta/client/backend/types/workspace_membership_request.py +3 -1
  172. agenta/client/backend/types/workspace_permission.py +3 -1
  173. agenta/client/backend/types/workspace_request.py +3 -1
  174. agenta/client/backend/types/workspace_response.py +3 -1
  175. agenta/client/backend/vault/raw_client.py +4 -4
  176. agenta/client/backend/workspace/client.py +2 -2
  177. agenta/client/client.py +102 -88
  178. agenta/sdk/__init__.py +52 -3
  179. agenta/sdk/agenta_init.py +43 -16
  180. agenta/sdk/assets.py +23 -15
  181. agenta/sdk/context/serving.py +20 -8
  182. agenta/sdk/context/tracing.py +40 -22
  183. agenta/sdk/contexts/__init__.py +0 -0
  184. agenta/sdk/contexts/routing.py +38 -0
  185. agenta/sdk/contexts/running.py +57 -0
  186. agenta/sdk/contexts/tracing.py +86 -0
  187. agenta/sdk/decorators/__init__.py +1 -0
  188. agenta/sdk/decorators/routing.py +284 -0
  189. agenta/sdk/decorators/running.py +692 -98
  190. agenta/sdk/decorators/serving.py +20 -21
  191. agenta/sdk/decorators/tracing.py +176 -131
  192. agenta/sdk/engines/__init__.py +0 -0
  193. agenta/sdk/engines/running/__init__.py +0 -0
  194. agenta/sdk/engines/running/utils.py +17 -0
  195. agenta/sdk/engines/tracing/__init__.py +1 -0
  196. agenta/sdk/engines/tracing/attributes.py +185 -0
  197. agenta/sdk/engines/tracing/conventions.py +49 -0
  198. agenta/sdk/engines/tracing/exporters.py +130 -0
  199. agenta/sdk/engines/tracing/inline.py +1154 -0
  200. agenta/sdk/engines/tracing/processors.py +190 -0
  201. agenta/sdk/engines/tracing/propagation.py +102 -0
  202. agenta/sdk/engines/tracing/spans.py +136 -0
  203. agenta/sdk/engines/tracing/tracing.py +324 -0
  204. agenta/sdk/evaluations/__init__.py +2 -0
  205. agenta/sdk/evaluations/metrics.py +37 -0
  206. agenta/sdk/evaluations/preview/__init__.py +0 -0
  207. agenta/sdk/evaluations/preview/evaluate.py +765 -0
  208. agenta/sdk/evaluations/preview/utils.py +861 -0
  209. agenta/sdk/evaluations/results.py +66 -0
  210. agenta/sdk/evaluations/runs.py +153 -0
  211. agenta/sdk/evaluations/scenarios.py +48 -0
  212. agenta/sdk/litellm/litellm.py +12 -0
  213. agenta/sdk/litellm/mockllm.py +6 -8
  214. agenta/sdk/litellm/mocks/__init__.py +5 -5
  215. agenta/sdk/managers/applications.py +304 -0
  216. agenta/sdk/managers/config.py +2 -2
  217. agenta/sdk/managers/evaluations.py +0 -0
  218. agenta/sdk/managers/evaluators.py +303 -0
  219. agenta/sdk/managers/secrets.py +161 -24
  220. agenta/sdk/managers/shared.py +3 -1
  221. agenta/sdk/managers/testsets.py +441 -0
  222. agenta/sdk/managers/vault.py +3 -3
  223. agenta/sdk/middleware/auth.py +0 -176
  224. agenta/sdk/middleware/config.py +27 -9
  225. agenta/sdk/middleware/vault.py +204 -9
  226. agenta/sdk/middlewares/__init__.py +0 -0
  227. agenta/sdk/middlewares/routing/__init__.py +0 -0
  228. agenta/sdk/middlewares/routing/auth.py +263 -0
  229. agenta/sdk/middlewares/routing/cors.py +30 -0
  230. agenta/sdk/middlewares/routing/otel.py +29 -0
  231. agenta/sdk/middlewares/running/__init__.py +0 -0
  232. agenta/sdk/middlewares/running/normalizer.py +321 -0
  233. agenta/sdk/middlewares/running/resolver.py +161 -0
  234. agenta/sdk/middlewares/running/vault.py +140 -0
  235. agenta/sdk/models/__init__.py +0 -0
  236. agenta/sdk/models/blobs.py +33 -0
  237. agenta/sdk/models/evaluations.py +119 -0
  238. agenta/sdk/models/git.py +126 -0
  239. agenta/sdk/models/shared.py +167 -0
  240. agenta/sdk/models/testsets.py +163 -0
  241. agenta/sdk/models/tracing.py +202 -0
  242. agenta/sdk/models/workflows.py +753 -0
  243. agenta/sdk/tracing/attributes.py +4 -4
  244. agenta/sdk/tracing/exporters.py +67 -17
  245. agenta/sdk/tracing/inline.py +37 -45
  246. agenta/sdk/tracing/processors.py +97 -0
  247. agenta/sdk/tracing/propagation.py +3 -1
  248. agenta/sdk/tracing/spans.py +4 -0
  249. agenta/sdk/tracing/tracing.py +13 -15
  250. agenta/sdk/types.py +222 -22
  251. agenta/sdk/utils/cache.py +1 -1
  252. agenta/sdk/utils/client.py +38 -0
  253. agenta/sdk/utils/helpers.py +13 -12
  254. agenta/sdk/utils/logging.py +18 -78
  255. agenta/sdk/utils/references.py +23 -0
  256. agenta/sdk/workflows/builtin.py +600 -0
  257. agenta/sdk/workflows/configurations.py +22 -0
  258. agenta/sdk/workflows/errors.py +292 -0
  259. agenta/sdk/workflows/handlers.py +1791 -0
  260. agenta/sdk/workflows/interfaces.py +948 -0
  261. agenta/sdk/workflows/sandbox.py +118 -0
  262. agenta/sdk/workflows/utils.py +303 -6
  263. {agenta-0.52.6.dist-info → agenta-0.63.2.dist-info}/METADATA +37 -33
  264. agenta-0.63.2.dist-info/RECORD +421 -0
  265. {agenta-0.52.6.dist-info → agenta-0.63.2.dist-info}/WHEEL +1 -1
  266. agenta/sdk/middleware/adapt.py +0 -253
  267. agenta/sdk/middleware/base.py +0 -40
  268. agenta/sdk/middleware/flags.py +0 -40
  269. agenta/sdk/workflows/types.py +0 -472
  270. agenta-0.52.6.dist-info/RECORD +0 -371
  271. /agenta/sdk/{workflows → engines/running}/registry.py +0 -0
agenta/client/client.py CHANGED
@@ -99,13 +99,17 @@ class AgentaApi:
99
99
  self._client_wrapper = SyncClientWrapper(
100
100
  base_url=base_url,
101
101
  api_key=api_key,
102
- httpx_client=httpx_client
103
- if httpx_client is not None
104
- else httpx.Client(
105
- timeout=_defaulted_timeout, follow_redirects=follow_redirects
106
- )
107
- if follow_redirects is not None
108
- else httpx.Client(timeout=_defaulted_timeout),
102
+ httpx_client=(
103
+ httpx_client
104
+ if httpx_client is not None
105
+ else (
106
+ httpx.Client(
107
+ timeout=_defaulted_timeout, follow_redirects=follow_redirects
108
+ )
109
+ if follow_redirects is not None
110
+ else httpx.Client(timeout=_defaulted_timeout)
111
+ )
112
+ ),
109
113
  timeout=_defaulted_timeout,
110
114
  )
111
115
  self.admin = AdminClient(client_wrapper=self._client_wrapper)
@@ -542,7 +546,10 @@ class AgentaApi:
542
546
  raise ApiError(status_code=_response.status_code, body=_response_json)
543
547
 
544
548
  def fetch_organization_details(
545
- self, org_id: str, *, request_options: typing.Optional[RequestOptions] = None
549
+ self,
550
+ organization_id: str,
551
+ *,
552
+ request_options: typing.Optional[RequestOptions] = None,
546
553
  ) -> typing.Optional[typing.Any]:
547
554
  """
548
555
  Get an organization's details.
@@ -556,7 +563,7 @@ class AgentaApi:
556
563
 
557
564
  Parameters
558
565
  ----------
559
- org_id : str
566
+ organization_id : str
560
567
 
561
568
  request_options : typing.Optional[RequestOptions]
562
569
  Request-specific configuration.
@@ -575,11 +582,11 @@ class AgentaApi:
575
582
  base_url="https://yourhost.com/path/to/api",
576
583
  )
577
584
  client.fetch_organization_details(
578
- org_id="org_id",
585
+ organization_id="organization_id",
579
586
  )
580
587
  """
581
588
  _response = self._client_wrapper.httpx_client.request(
582
- f"organizations/{jsonable_encoder(org_id)}",
589
+ f"organizations/{jsonable_encoder(organization_id)}",
583
590
  method="GET",
584
591
  request_options=request_options,
585
592
  )
@@ -609,7 +616,7 @@ class AgentaApi:
609
616
 
610
617
  def update_organization(
611
618
  self,
612
- org_id: str,
619
+ organization_id: str,
613
620
  *,
614
621
  name: typing.Optional[str] = OMIT,
615
622
  description: typing.Optional[str] = OMIT,
@@ -619,7 +626,7 @@ class AgentaApi:
619
626
  """
620
627
  Parameters
621
628
  ----------
622
- org_id : str
629
+ organization_id : str
623
630
 
624
631
  name : typing.Optional[str]
625
632
 
@@ -644,11 +651,11 @@ class AgentaApi:
644
651
  base_url="https://yourhost.com/path/to/api",
645
652
  )
646
653
  client.update_organization(
647
- org_id="org_id",
654
+ organization_id="organization_id",
648
655
  )
649
656
  """
650
657
  _response = self._client_wrapper.httpx_client.request(
651
- f"organizations/{jsonable_encoder(org_id)}",
658
+ f"organizations/{jsonable_encoder(organization_id)}",
652
659
  method="PUT",
653
660
  json={
654
661
  "name": name,
@@ -687,7 +694,7 @@ class AgentaApi:
687
694
 
688
695
  def invite_user_to_workspace(
689
696
  self,
690
- org_id: str,
697
+ organization_id: str,
691
698
  workspace_id: str,
692
699
  *,
693
700
  request: typing.Sequence[InviteRequest],
@@ -696,7 +703,7 @@ class AgentaApi:
696
703
  """
697
704
  Parameters
698
705
  ----------
699
- org_id : str
706
+ organization_id : str
700
707
 
701
708
  workspace_id : str
702
709
 
@@ -719,7 +726,7 @@ class AgentaApi:
719
726
  base_url="https://yourhost.com/path/to/api",
720
727
  )
721
728
  client.invite_user_to_workspace(
722
- org_id="org_id",
729
+ organization_id="organization_id",
723
730
  workspace_id="workspace_id",
724
731
  request=[
725
732
  InviteRequest(
@@ -730,7 +737,7 @@ class AgentaApi:
730
737
  )
731
738
  """
732
739
  _response = self._client_wrapper.httpx_client.request(
733
- f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite",
740
+ f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite",
734
741
  method="POST",
735
742
  json=convert_and_respect_annotation_metadata(
736
743
  object_=request,
@@ -766,7 +773,7 @@ class AgentaApi:
766
773
 
767
774
  def resend_invitation(
768
775
  self,
769
- org_id: str,
776
+ organization_id: str,
770
777
  workspace_id: str,
771
778
  *,
772
779
  email: str,
@@ -785,7 +792,7 @@ class AgentaApi:
785
792
 
786
793
  Parameters
787
794
  ----------
788
- org_id : str
795
+ organization_id : str
789
796
 
790
797
  workspace_id : str
791
798
 
@@ -808,13 +815,13 @@ class AgentaApi:
808
815
  base_url="https://yourhost.com/path/to/api",
809
816
  )
810
817
  client.resend_invitation(
811
- org_id="org_id",
818
+ organization_id="organization_id",
812
819
  workspace_id="workspace_id",
813
820
  email="email",
814
821
  )
815
822
  """
816
823
  _response = self._client_wrapper.httpx_client.request(
817
- f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/resend",
824
+ f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/resend",
818
825
  method="POST",
819
826
  json={
820
827
  "email": email,
@@ -851,7 +858,7 @@ class AgentaApi:
851
858
 
852
859
  def accept_invitation(
853
860
  self,
854
- org_id: str,
861
+ organization_id: str,
855
862
  workspace_id: str,
856
863
  *,
857
864
  project_id: str,
@@ -871,7 +878,7 @@ class AgentaApi:
871
878
 
872
879
  Parameters
873
880
  ----------
874
- org_id : str
881
+ organization_id : str
875
882
 
876
883
  workspace_id : str
877
884
 
@@ -896,14 +903,14 @@ class AgentaApi:
896
903
  base_url="https://yourhost.com/path/to/api",
897
904
  )
898
905
  client.accept_invitation(
899
- org_id="org_id",
906
+ organization_id="organization_id",
900
907
  workspace_id="workspace_id",
901
908
  project_id="project_id",
902
909
  token="token",
903
910
  )
904
911
  """
905
912
  _response = self._client_wrapper.httpx_client.request(
906
- f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept",
913
+ f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept",
907
914
  method="POST",
908
915
  params={
909
916
  "project_id": project_id,
@@ -943,7 +950,7 @@ class AgentaApi:
943
950
 
944
951
  def create_workspace(
945
952
  self,
946
- org_id: str,
953
+ organization_id: str,
947
954
  *,
948
955
  name: str,
949
956
  description: typing.Optional[str] = OMIT,
@@ -953,7 +960,7 @@ class AgentaApi:
953
960
  """
954
961
  Parameters
955
962
  ----------
956
- org_id : str
963
+ organization_id : str
957
964
 
958
965
  name : str
959
966
 
@@ -978,12 +985,12 @@ class AgentaApi:
978
985
  base_url="https://yourhost.com/path/to/api",
979
986
  )
980
987
  client.create_workspace(
981
- org_id="org_id",
988
+ organization_id="organization_id",
982
989
  name="name",
983
990
  )
984
991
  """
985
992
  _response = self._client_wrapper.httpx_client.request(
986
- f"organizations/{jsonable_encoder(org_id)}/workspaces",
993
+ f"organizations/{jsonable_encoder(organization_id)}/workspaces",
987
994
  method="POST",
988
995
  json={
989
996
  "name": name,
@@ -1022,7 +1029,7 @@ class AgentaApi:
1022
1029
 
1023
1030
  def update_workspace(
1024
1031
  self,
1025
- org_id: str,
1032
+ organization_id: str,
1026
1033
  workspace_id: str,
1027
1034
  *,
1028
1035
  name: typing.Optional[str] = OMIT,
@@ -1033,7 +1040,7 @@ class AgentaApi:
1033
1040
  """
1034
1041
  Parameters
1035
1042
  ----------
1036
- org_id : str
1043
+ organization_id : str
1037
1044
 
1038
1045
  workspace_id : str
1039
1046
 
@@ -1060,12 +1067,12 @@ class AgentaApi:
1060
1067
  base_url="https://yourhost.com/path/to/api",
1061
1068
  )
1062
1069
  client.update_workspace(
1063
- org_id="org_id",
1070
+ organization_id="organization_id",
1064
1071
  workspace_id="workspace_id",
1065
1072
  )
1066
1073
  """
1067
1074
  _response = self._client_wrapper.httpx_client.request(
1068
- f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}",
1075
+ f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}",
1069
1076
  method="PUT",
1070
1077
  json={
1071
1078
  "name": name,
@@ -1307,7 +1314,7 @@ class AgentaApi:
1307
1314
  workspace_id: str,
1308
1315
  *,
1309
1316
  email: str,
1310
- org_id: str,
1317
+ organization_id: str,
1311
1318
  role: str,
1312
1319
  request_options: typing.Optional[RequestOptions] = None,
1313
1320
  ) -> typing.Optional[typing.Any]:
@@ -1317,7 +1324,7 @@ class AgentaApi:
1317
1324
  Args:
1318
1325
  workspace_id (str): The ID of the workspace.
1319
1326
  email (str): The email of the user to remove the role from.
1320
- org_id (str): The ID of the organization.
1327
+ organization_id (str): The ID of the organization.
1321
1328
  role (str): The role to remove from the user.
1322
1329
  request (Request): The FastAPI request object.
1323
1330
 
@@ -1334,7 +1341,7 @@ class AgentaApi:
1334
1341
 
1335
1342
  email : str
1336
1343
 
1337
- org_id : str
1344
+ organization_id : str
1338
1345
 
1339
1346
  role : str
1340
1347
 
@@ -1357,7 +1364,7 @@ class AgentaApi:
1357
1364
  client.unassign_role_from_user(
1358
1365
  workspace_id="workspace_id",
1359
1366
  email="email",
1360
- org_id="org_id",
1367
+ organization_id="organization_id",
1361
1368
  role="role",
1362
1369
  )
1363
1370
  """
@@ -1366,7 +1373,7 @@ class AgentaApi:
1366
1373
  method="DELETE",
1367
1374
  params={
1368
1375
  "email": email,
1369
- "org_id": org_id,
1376
+ "organization_id": organization_id,
1370
1377
  "role": role,
1371
1378
  },
1372
1379
  request_options=request_options,
@@ -1399,7 +1406,7 @@ class AgentaApi:
1399
1406
  self,
1400
1407
  workspace_id: str,
1401
1408
  *,
1402
- org_id: str,
1409
+ organization_id: str,
1403
1410
  email: str,
1404
1411
  request_options: typing.Optional[RequestOptions] = None,
1405
1412
  ) -> WorkspaceResponse:
@@ -1422,7 +1429,7 @@ class AgentaApi:
1422
1429
  ----------
1423
1430
  workspace_id : str
1424
1431
 
1425
- org_id : str
1432
+ organization_id : str
1426
1433
 
1427
1434
  email : str
1428
1435
 
@@ -1444,7 +1451,7 @@ class AgentaApi:
1444
1451
  )
1445
1452
  client.remove_user_from_workspace(
1446
1453
  workspace_id="workspace_id",
1447
- org_id="org_id",
1454
+ organization_id="organization_id",
1448
1455
  email="email",
1449
1456
  )
1450
1457
  """
@@ -1452,7 +1459,7 @@ class AgentaApi:
1452
1459
  f"workspaces/{jsonable_encoder(workspace_id)}/users",
1453
1460
  method="DELETE",
1454
1461
  params={
1455
- "org_id": org_id,
1462
+ "organization_id": organization_id,
1456
1463
  "email": email,
1457
1464
  },
1458
1465
  request_options=request_options,
@@ -1630,13 +1637,17 @@ class AsyncAgentaApi:
1630
1637
  self._client_wrapper = AsyncClientWrapper(
1631
1638
  base_url=base_url,
1632
1639
  api_key=api_key,
1633
- httpx_client=httpx_client
1634
- if httpx_client is not None
1635
- else httpx.AsyncClient(
1636
- timeout=_defaulted_timeout, follow_redirects=follow_redirects
1637
- )
1638
- if follow_redirects is not None
1639
- else httpx.AsyncClient(timeout=_defaulted_timeout),
1640
+ httpx_client=(
1641
+ httpx_client
1642
+ if httpx_client is not None
1643
+ else (
1644
+ httpx.AsyncClient(
1645
+ timeout=_defaulted_timeout, follow_redirects=follow_redirects
1646
+ )
1647
+ if follow_redirects is not None
1648
+ else httpx.AsyncClient(timeout=_defaulted_timeout)
1649
+ )
1650
+ ),
1640
1651
  timeout=_defaulted_timeout,
1641
1652
  )
1642
1653
  self.admin = AsyncAdminClient(client_wrapper=self._client_wrapper)
@@ -2133,7 +2144,10 @@ class AsyncAgentaApi:
2133
2144
  raise ApiError(status_code=_response.status_code, body=_response_json)
2134
2145
 
2135
2146
  async def fetch_organization_details(
2136
- self, org_id: str, *, request_options: typing.Optional[RequestOptions] = None
2147
+ self,
2148
+ organization_id: str,
2149
+ *,
2150
+ request_options: typing.Optional[RequestOptions] = None,
2137
2151
  ) -> typing.Optional[typing.Any]:
2138
2152
  """
2139
2153
  Get an organization's details.
@@ -2147,7 +2161,7 @@ class AsyncAgentaApi:
2147
2161
 
2148
2162
  Parameters
2149
2163
  ----------
2150
- org_id : str
2164
+ organization_id : str
2151
2165
 
2152
2166
  request_options : typing.Optional[RequestOptions]
2153
2167
  Request-specific configuration.
@@ -2171,14 +2185,14 @@ class AsyncAgentaApi:
2171
2185
 
2172
2186
  async def main() -> None:
2173
2187
  await client.fetch_organization_details(
2174
- org_id="org_id",
2188
+ organization_id="organization_id",
2175
2189
  )
2176
2190
 
2177
2191
 
2178
2192
  asyncio.run(main())
2179
2193
  """
2180
2194
  _response = await self._client_wrapper.httpx_client.request(
2181
- f"organizations/{jsonable_encoder(org_id)}",
2195
+ f"organizations/{jsonable_encoder(organization_id)}",
2182
2196
  method="GET",
2183
2197
  request_options=request_options,
2184
2198
  )
@@ -2208,7 +2222,7 @@ class AsyncAgentaApi:
2208
2222
 
2209
2223
  async def update_organization(
2210
2224
  self,
2211
- org_id: str,
2225
+ organization_id: str,
2212
2226
  *,
2213
2227
  name: typing.Optional[str] = OMIT,
2214
2228
  description: typing.Optional[str] = OMIT,
@@ -2218,7 +2232,7 @@ class AsyncAgentaApi:
2218
2232
  """
2219
2233
  Parameters
2220
2234
  ----------
2221
- org_id : str
2235
+ organization_id : str
2222
2236
 
2223
2237
  name : typing.Optional[str]
2224
2238
 
@@ -2248,14 +2262,14 @@ class AsyncAgentaApi:
2248
2262
 
2249
2263
  async def main() -> None:
2250
2264
  await client.update_organization(
2251
- org_id="org_id",
2265
+ organization_id="organization_id",
2252
2266
  )
2253
2267
 
2254
2268
 
2255
2269
  asyncio.run(main())
2256
2270
  """
2257
2271
  _response = await self._client_wrapper.httpx_client.request(
2258
- f"organizations/{jsonable_encoder(org_id)}",
2272
+ f"organizations/{jsonable_encoder(organization_id)}",
2259
2273
  method="PUT",
2260
2274
  json={
2261
2275
  "name": name,
@@ -2294,7 +2308,7 @@ class AsyncAgentaApi:
2294
2308
 
2295
2309
  async def invite_user_to_workspace(
2296
2310
  self,
2297
- org_id: str,
2311
+ organization_id: str,
2298
2312
  workspace_id: str,
2299
2313
  *,
2300
2314
  request: typing.Sequence[InviteRequest],
@@ -2303,7 +2317,7 @@ class AsyncAgentaApi:
2303
2317
  """
2304
2318
  Parameters
2305
2319
  ----------
2306
- org_id : str
2320
+ organization_id : str
2307
2321
 
2308
2322
  workspace_id : str
2309
2323
 
@@ -2331,7 +2345,7 @@ class AsyncAgentaApi:
2331
2345
 
2332
2346
  async def main() -> None:
2333
2347
  await client.invite_user_to_workspace(
2334
- org_id="org_id",
2348
+ organization_id="organization_id",
2335
2349
  workspace_id="workspace_id",
2336
2350
  request=[
2337
2351
  InviteRequest(
@@ -2345,7 +2359,7 @@ class AsyncAgentaApi:
2345
2359
  asyncio.run(main())
2346
2360
  """
2347
2361
  _response = await self._client_wrapper.httpx_client.request(
2348
- f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite",
2362
+ f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite",
2349
2363
  method="POST",
2350
2364
  json=convert_and_respect_annotation_metadata(
2351
2365
  object_=request,
@@ -2381,7 +2395,7 @@ class AsyncAgentaApi:
2381
2395
 
2382
2396
  async def resend_invitation(
2383
2397
  self,
2384
- org_id: str,
2398
+ organization_id: str,
2385
2399
  workspace_id: str,
2386
2400
  *,
2387
2401
  email: str,
@@ -2400,7 +2414,7 @@ class AsyncAgentaApi:
2400
2414
 
2401
2415
  Parameters
2402
2416
  ----------
2403
- org_id : str
2417
+ organization_id : str
2404
2418
 
2405
2419
  workspace_id : str
2406
2420
 
@@ -2428,7 +2442,7 @@ class AsyncAgentaApi:
2428
2442
 
2429
2443
  async def main() -> None:
2430
2444
  await client.resend_invitation(
2431
- org_id="org_id",
2445
+ organization_id="organization_id",
2432
2446
  workspace_id="workspace_id",
2433
2447
  email="email",
2434
2448
  )
@@ -2437,7 +2451,7 @@ class AsyncAgentaApi:
2437
2451
  asyncio.run(main())
2438
2452
  """
2439
2453
  _response = await self._client_wrapper.httpx_client.request(
2440
- f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/resend",
2454
+ f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/resend",
2441
2455
  method="POST",
2442
2456
  json={
2443
2457
  "email": email,
@@ -2474,7 +2488,7 @@ class AsyncAgentaApi:
2474
2488
 
2475
2489
  async def accept_invitation(
2476
2490
  self,
2477
- org_id: str,
2491
+ organization_id: str,
2478
2492
  workspace_id: str,
2479
2493
  *,
2480
2494
  project_id: str,
@@ -2494,7 +2508,7 @@ class AsyncAgentaApi:
2494
2508
 
2495
2509
  Parameters
2496
2510
  ----------
2497
- org_id : str
2511
+ organization_id : str
2498
2512
 
2499
2513
  workspace_id : str
2500
2514
 
@@ -2524,7 +2538,7 @@ class AsyncAgentaApi:
2524
2538
 
2525
2539
  async def main() -> None:
2526
2540
  await client.accept_invitation(
2527
- org_id="org_id",
2541
+ organization_id="organization_id",
2528
2542
  workspace_id="workspace_id",
2529
2543
  project_id="project_id",
2530
2544
  token="token",
@@ -2534,7 +2548,7 @@ class AsyncAgentaApi:
2534
2548
  asyncio.run(main())
2535
2549
  """
2536
2550
  _response = await self._client_wrapper.httpx_client.request(
2537
- f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept",
2551
+ f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}/invite/accept",
2538
2552
  method="POST",
2539
2553
  params={
2540
2554
  "project_id": project_id,
@@ -2574,7 +2588,7 @@ class AsyncAgentaApi:
2574
2588
 
2575
2589
  async def create_workspace(
2576
2590
  self,
2577
- org_id: str,
2591
+ organization_id: str,
2578
2592
  *,
2579
2593
  name: str,
2580
2594
  description: typing.Optional[str] = OMIT,
@@ -2584,7 +2598,7 @@ class AsyncAgentaApi:
2584
2598
  """
2585
2599
  Parameters
2586
2600
  ----------
2587
- org_id : str
2601
+ organization_id : str
2588
2602
 
2589
2603
  name : str
2590
2604
 
@@ -2614,7 +2628,7 @@ class AsyncAgentaApi:
2614
2628
 
2615
2629
  async def main() -> None:
2616
2630
  await client.create_workspace(
2617
- org_id="org_id",
2631
+ organization_id="organization_id",
2618
2632
  name="name",
2619
2633
  )
2620
2634
 
@@ -2622,7 +2636,7 @@ class AsyncAgentaApi:
2622
2636
  asyncio.run(main())
2623
2637
  """
2624
2638
  _response = await self._client_wrapper.httpx_client.request(
2625
- f"organizations/{jsonable_encoder(org_id)}/workspaces",
2639
+ f"organizations/{jsonable_encoder(organization_id)}/workspaces",
2626
2640
  method="POST",
2627
2641
  json={
2628
2642
  "name": name,
@@ -2661,7 +2675,7 @@ class AsyncAgentaApi:
2661
2675
 
2662
2676
  async def update_workspace(
2663
2677
  self,
2664
- org_id: str,
2678
+ organization_id: str,
2665
2679
  workspace_id: str,
2666
2680
  *,
2667
2681
  name: typing.Optional[str] = OMIT,
@@ -2672,7 +2686,7 @@ class AsyncAgentaApi:
2672
2686
  """
2673
2687
  Parameters
2674
2688
  ----------
2675
- org_id : str
2689
+ organization_id : str
2676
2690
 
2677
2691
  workspace_id : str
2678
2692
 
@@ -2704,7 +2718,7 @@ class AsyncAgentaApi:
2704
2718
 
2705
2719
  async def main() -> None:
2706
2720
  await client.update_workspace(
2707
- org_id="org_id",
2721
+ organization_id="organization_id",
2708
2722
  workspace_id="workspace_id",
2709
2723
  )
2710
2724
 
@@ -2712,7 +2726,7 @@ class AsyncAgentaApi:
2712
2726
  asyncio.run(main())
2713
2727
  """
2714
2728
  _response = await self._client_wrapper.httpx_client.request(
2715
- f"organizations/{jsonable_encoder(org_id)}/workspaces/{jsonable_encoder(workspace_id)}",
2729
+ f"organizations/{jsonable_encoder(organization_id)}/workspaces/{jsonable_encoder(workspace_id)}",
2716
2730
  method="PUT",
2717
2731
  json={
2718
2732
  "name": name,
@@ -2978,7 +2992,7 @@ class AsyncAgentaApi:
2978
2992
  workspace_id: str,
2979
2993
  *,
2980
2994
  email: str,
2981
- org_id: str,
2995
+ organization_id: str,
2982
2996
  role: str,
2983
2997
  request_options: typing.Optional[RequestOptions] = None,
2984
2998
  ) -> typing.Optional[typing.Any]:
@@ -2988,7 +3002,7 @@ class AsyncAgentaApi:
2988
3002
  Args:
2989
3003
  workspace_id (str): The ID of the workspace.
2990
3004
  email (str): The email of the user to remove the role from.
2991
- org_id (str): The ID of the organization.
3005
+ organization_id (str): The ID of the organization.
2992
3006
  role (str): The role to remove from the user.
2993
3007
  request (Request): The FastAPI request object.
2994
3008
 
@@ -3005,7 +3019,7 @@ class AsyncAgentaApi:
3005
3019
 
3006
3020
  email : str
3007
3021
 
3008
- org_id : str
3022
+ organization_id : str
3009
3023
 
3010
3024
  role : str
3011
3025
 
@@ -3033,7 +3047,7 @@ class AsyncAgentaApi:
3033
3047
  await client.unassign_role_from_user(
3034
3048
  workspace_id="workspace_id",
3035
3049
  email="email",
3036
- org_id="org_id",
3050
+ organization_id="organization_id",
3037
3051
  role="role",
3038
3052
  )
3039
3053
 
@@ -3045,7 +3059,7 @@ class AsyncAgentaApi:
3045
3059
  method="DELETE",
3046
3060
  params={
3047
3061
  "email": email,
3048
- "org_id": org_id,
3062
+ "organization_id": organization_id,
3049
3063
  "role": role,
3050
3064
  },
3051
3065
  request_options=request_options,
@@ -3078,7 +3092,7 @@ class AsyncAgentaApi:
3078
3092
  self,
3079
3093
  workspace_id: str,
3080
3094
  *,
3081
- org_id: str,
3095
+ organization_id: str,
3082
3096
  email: str,
3083
3097
  request_options: typing.Optional[RequestOptions] = None,
3084
3098
  ) -> WorkspaceResponse:
@@ -3101,7 +3115,7 @@ class AsyncAgentaApi:
3101
3115
  ----------
3102
3116
  workspace_id : str
3103
3117
 
3104
- org_id : str
3118
+ organization_id : str
3105
3119
 
3106
3120
  email : str
3107
3121
 
@@ -3128,7 +3142,7 @@ class AsyncAgentaApi:
3128
3142
  async def main() -> None:
3129
3143
  await client.remove_user_from_workspace(
3130
3144
  workspace_id="workspace_id",
3131
- org_id="org_id",
3145
+ organization_id="organization_id",
3132
3146
  email="email",
3133
3147
  )
3134
3148
 
@@ -3139,7 +3153,7 @@ class AsyncAgentaApi:
3139
3153
  f"workspaces/{jsonable_encoder(workspace_id)}/users",
3140
3154
  method="DELETE",
3141
3155
  params={
3142
- "org_id": org_id,
3156
+ "organization_id": organization_id,
3143
3157
  "email": email,
3144
3158
  },
3145
3159
  request_options=request_options,