agenta 0.48.9__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 (295) 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/types.py +28 -1
  285. {agenta-0.48.9.dist-info → agenta-0.48.10.dist-info}/METADATA +1 -1
  286. agenta-0.48.10.dist-info/RECORD +362 -0
  287. agenta/client/backend/containers/types/__init__.py +0 -5
  288. agenta/client/backend/containers/types/container_templates_response.py +0 -6
  289. agenta/client/backend/types/image.py +0 -25
  290. agenta/client/backend/types/provider_kind.py +0 -21
  291. agenta/client/backend/types/template.py +0 -23
  292. agenta/client/backend/types/template_image_info.py +0 -29
  293. agenta/client/backend/types/variant_action.py +0 -22
  294. agenta-0.48.9.dist-info/RECORD +0 -255
  295. {agenta-0.48.9.dist-info → agenta-0.48.10.dist-info}/WHEEL +0 -0
@@ -0,0 +1,782 @@
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.focus import Focus
8
+ from ..types.format import Format
9
+ from ..types.o_tel_flat_span import OTelFlatSpan
10
+ from ..types.o_tel_links_response import OTelLinksResponse
11
+ from ..types.o_tel_spans_tree import OTelSpansTree
12
+ from ..types.o_tel_tracing_response import OTelTracingResponse
13
+ from .raw_client import AsyncRawTracingClient, RawTracingClient
14
+ from .types.fetch_trace_request_trace_id import FetchTraceRequestTraceId
15
+ from .types.remove_trace_request_trace_id import RemoveTraceRequestTraceId
16
+
17
+ # this is used as the default value for optional parameters
18
+ OMIT = typing.cast(typing.Any, ...)
19
+
20
+
21
+ class TracingClient:
22
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
23
+ self._raw_client = RawTracingClient(client_wrapper=client_wrapper)
24
+
25
+ @property
26
+ def with_raw_response(self) -> RawTracingClient:
27
+ """
28
+ Retrieves a raw implementation of this client that returns raw responses.
29
+
30
+ Returns
31
+ -------
32
+ RawTracingClient
33
+ """
34
+ return self._raw_client
35
+
36
+ def add_trace(
37
+ self,
38
+ *,
39
+ spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT,
40
+ traces: typing.Optional[
41
+ typing.Dict[str, typing.Optional[OTelSpansTree]]
42
+ ] = OMIT,
43
+ request_options: typing.Optional[RequestOptions] = None,
44
+ ) -> OTelLinksResponse:
45
+ """
46
+ Parameters
47
+ ----------
48
+ spans : typing.Optional[typing.Sequence[OTelFlatSpan]]
49
+
50
+ traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]]
51
+
52
+ request_options : typing.Optional[RequestOptions]
53
+ Request-specific configuration.
54
+
55
+ Returns
56
+ -------
57
+ OTelLinksResponse
58
+ Successful Response
59
+
60
+ Examples
61
+ --------
62
+ from agenta import AgentaApi
63
+
64
+ client = AgentaApi(
65
+ api_key="YOUR_API_KEY",
66
+ )
67
+ client.tracing.add_trace()
68
+ """
69
+ _response = self._raw_client.add_trace(
70
+ spans=spans, traces=traces, request_options=request_options
71
+ )
72
+ return _response.data
73
+
74
+ def edit_trace(
75
+ self,
76
+ *,
77
+ spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT,
78
+ traces: typing.Optional[
79
+ typing.Dict[str, typing.Optional[OTelSpansTree]]
80
+ ] = OMIT,
81
+ request_options: typing.Optional[RequestOptions] = None,
82
+ ) -> OTelLinksResponse:
83
+ """
84
+ Parameters
85
+ ----------
86
+ spans : typing.Optional[typing.Sequence[OTelFlatSpan]]
87
+
88
+ traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]]
89
+
90
+ request_options : typing.Optional[RequestOptions]
91
+ Request-specific configuration.
92
+
93
+ Returns
94
+ -------
95
+ OTelLinksResponse
96
+ Successful Response
97
+
98
+ Examples
99
+ --------
100
+ from agenta import AgentaApi
101
+
102
+ client = AgentaApi(
103
+ api_key="YOUR_API_KEY",
104
+ )
105
+ client.tracing.edit_trace()
106
+ """
107
+ _response = self._raw_client.edit_trace(
108
+ spans=spans, traces=traces, request_options=request_options
109
+ )
110
+ return _response.data
111
+
112
+ def fetch_trace(
113
+ self,
114
+ trace_id: FetchTraceRequestTraceId,
115
+ *,
116
+ request_options: typing.Optional[RequestOptions] = None,
117
+ ) -> OTelTracingResponse:
118
+ """
119
+ Parameters
120
+ ----------
121
+ trace_id : FetchTraceRequestTraceId
122
+
123
+ request_options : typing.Optional[RequestOptions]
124
+ Request-specific configuration.
125
+
126
+ Returns
127
+ -------
128
+ OTelTracingResponse
129
+ Successful Response
130
+
131
+ Examples
132
+ --------
133
+ from agenta import AgentaApi
134
+
135
+ client = AgentaApi(
136
+ api_key="YOUR_API_KEY",
137
+ )
138
+ client.tracing.fetch_trace(
139
+ trace_id="trace_id",
140
+ )
141
+ """
142
+ _response = self._raw_client.fetch_trace(
143
+ trace_id, request_options=request_options
144
+ )
145
+ return _response.data
146
+
147
+ def remove_trace(
148
+ self,
149
+ trace_id: RemoveTraceRequestTraceId,
150
+ *,
151
+ request_options: typing.Optional[RequestOptions] = None,
152
+ ) -> OTelLinksResponse:
153
+ """
154
+ Parameters
155
+ ----------
156
+ trace_id : RemoveTraceRequestTraceId
157
+
158
+ request_options : typing.Optional[RequestOptions]
159
+ Request-specific configuration.
160
+
161
+ Returns
162
+ -------
163
+ OTelLinksResponse
164
+ Successful Response
165
+
166
+ Examples
167
+ --------
168
+ from agenta import AgentaApi
169
+
170
+ client = AgentaApi(
171
+ api_key="YOUR_API_KEY",
172
+ )
173
+ client.tracing.remove_trace(
174
+ trace_id="trace_id",
175
+ )
176
+ """
177
+ _response = self._raw_client.remove_trace(
178
+ trace_id, request_options=request_options
179
+ )
180
+ return _response.data
181
+
182
+ def query_spans(
183
+ self,
184
+ *,
185
+ filter: str,
186
+ focus: typing.Optional[Focus] = None,
187
+ format: typing.Optional[Format] = None,
188
+ oldest: typing.Optional[str] = None,
189
+ newest: typing.Optional[str] = None,
190
+ limit: typing.Optional[int] = None,
191
+ request_options: typing.Optional[RequestOptions] = None,
192
+ ) -> OTelTracingResponse:
193
+ """
194
+ Parameters
195
+ ----------
196
+ filter : str
197
+
198
+ focus : typing.Optional[Focus]
199
+
200
+ format : typing.Optional[Format]
201
+
202
+ oldest : typing.Optional[str]
203
+
204
+ newest : typing.Optional[str]
205
+
206
+ limit : typing.Optional[int]
207
+
208
+ request_options : typing.Optional[RequestOptions]
209
+ Request-specific configuration.
210
+
211
+ Returns
212
+ -------
213
+ OTelTracingResponse
214
+ Successful Response
215
+
216
+ Examples
217
+ --------
218
+ from agenta import AgentaApi
219
+
220
+ client = AgentaApi(
221
+ api_key="YOUR_API_KEY",
222
+ )
223
+ client.tracing.query_spans(
224
+ filter="filter",
225
+ )
226
+ """
227
+ _response = self._raw_client.query_spans(
228
+ filter=filter,
229
+ focus=focus,
230
+ format=format,
231
+ oldest=oldest,
232
+ newest=newest,
233
+ limit=limit,
234
+ request_options=request_options,
235
+ )
236
+ return _response.data
237
+
238
+ def ingest_spans(
239
+ self,
240
+ *,
241
+ spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT,
242
+ traces: typing.Optional[
243
+ typing.Dict[str, typing.Optional[OTelSpansTree]]
244
+ ] = OMIT,
245
+ request_options: typing.Optional[RequestOptions] = None,
246
+ ) -> OTelLinksResponse:
247
+ """
248
+ Parameters
249
+ ----------
250
+ spans : typing.Optional[typing.Sequence[OTelFlatSpan]]
251
+
252
+ traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]]
253
+
254
+ request_options : typing.Optional[RequestOptions]
255
+ Request-specific configuration.
256
+
257
+ Returns
258
+ -------
259
+ OTelLinksResponse
260
+ Successful Response
261
+
262
+ Examples
263
+ --------
264
+ from agenta import AgentaApi
265
+
266
+ client = AgentaApi(
267
+ api_key="YOUR_API_KEY",
268
+ )
269
+ client.tracing.ingest_spans()
270
+ """
271
+ _response = self._raw_client.ingest_spans(
272
+ spans=spans, traces=traces, request_options=request_options
273
+ )
274
+ return _response.data
275
+
276
+ def ingest_spans_rpc(
277
+ self,
278
+ *,
279
+ spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT,
280
+ traces: typing.Optional[
281
+ typing.Dict[str, typing.Optional[OTelSpansTree]]
282
+ ] = OMIT,
283
+ request_options: typing.Optional[RequestOptions] = None,
284
+ ) -> OTelLinksResponse:
285
+ """
286
+ Parameters
287
+ ----------
288
+ spans : typing.Optional[typing.Sequence[OTelFlatSpan]]
289
+
290
+ traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]]
291
+
292
+ request_options : typing.Optional[RequestOptions]
293
+ Request-specific configuration.
294
+
295
+ Returns
296
+ -------
297
+ OTelLinksResponse
298
+ Successful Response
299
+
300
+ Examples
301
+ --------
302
+ from agenta import AgentaApi
303
+
304
+ client = AgentaApi(
305
+ api_key="YOUR_API_KEY",
306
+ )
307
+ client.tracing.ingest_spans_rpc()
308
+ """
309
+ _response = self._raw_client.ingest_spans_rpc(
310
+ spans=spans, traces=traces, request_options=request_options
311
+ )
312
+ return _response.data
313
+
314
+ def query_spans_rpc(
315
+ self,
316
+ *,
317
+ filter: str,
318
+ focus: typing.Optional[Focus] = None,
319
+ format: typing.Optional[Format] = None,
320
+ oldest: typing.Optional[str] = None,
321
+ newest: typing.Optional[str] = None,
322
+ limit: typing.Optional[int] = None,
323
+ request_options: typing.Optional[RequestOptions] = None,
324
+ ) -> OTelTracingResponse:
325
+ """
326
+ Parameters
327
+ ----------
328
+ filter : str
329
+
330
+ focus : typing.Optional[Focus]
331
+
332
+ format : typing.Optional[Format]
333
+
334
+ oldest : typing.Optional[str]
335
+
336
+ newest : typing.Optional[str]
337
+
338
+ limit : typing.Optional[int]
339
+
340
+ request_options : typing.Optional[RequestOptions]
341
+ Request-specific configuration.
342
+
343
+ Returns
344
+ -------
345
+ OTelTracingResponse
346
+ Successful Response
347
+
348
+ Examples
349
+ --------
350
+ from agenta import AgentaApi
351
+
352
+ client = AgentaApi(
353
+ api_key="YOUR_API_KEY",
354
+ )
355
+ client.tracing.query_spans_rpc(
356
+ filter="filter",
357
+ )
358
+ """
359
+ _response = self._raw_client.query_spans_rpc(
360
+ filter=filter,
361
+ focus=focus,
362
+ format=format,
363
+ oldest=oldest,
364
+ newest=newest,
365
+ limit=limit,
366
+ request_options=request_options,
367
+ )
368
+ return _response.data
369
+
370
+
371
+ class AsyncTracingClient:
372
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
373
+ self._raw_client = AsyncRawTracingClient(client_wrapper=client_wrapper)
374
+
375
+ @property
376
+ def with_raw_response(self) -> AsyncRawTracingClient:
377
+ """
378
+ Retrieves a raw implementation of this client that returns raw responses.
379
+
380
+ Returns
381
+ -------
382
+ AsyncRawTracingClient
383
+ """
384
+ return self._raw_client
385
+
386
+ async def add_trace(
387
+ self,
388
+ *,
389
+ spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT,
390
+ traces: typing.Optional[
391
+ typing.Dict[str, typing.Optional[OTelSpansTree]]
392
+ ] = OMIT,
393
+ request_options: typing.Optional[RequestOptions] = None,
394
+ ) -> OTelLinksResponse:
395
+ """
396
+ Parameters
397
+ ----------
398
+ spans : typing.Optional[typing.Sequence[OTelFlatSpan]]
399
+
400
+ traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]]
401
+
402
+ request_options : typing.Optional[RequestOptions]
403
+ Request-specific configuration.
404
+
405
+ Returns
406
+ -------
407
+ OTelLinksResponse
408
+ Successful Response
409
+
410
+ Examples
411
+ --------
412
+ import asyncio
413
+
414
+ from agenta import AsyncAgentaApi
415
+
416
+ client = AsyncAgentaApi(
417
+ api_key="YOUR_API_KEY",
418
+ )
419
+
420
+
421
+ async def main() -> None:
422
+ await client.tracing.add_trace()
423
+
424
+
425
+ asyncio.run(main())
426
+ """
427
+ _response = await self._raw_client.add_trace(
428
+ spans=spans, traces=traces, request_options=request_options
429
+ )
430
+ return _response.data
431
+
432
+ async def edit_trace(
433
+ self,
434
+ *,
435
+ spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT,
436
+ traces: typing.Optional[
437
+ typing.Dict[str, typing.Optional[OTelSpansTree]]
438
+ ] = OMIT,
439
+ request_options: typing.Optional[RequestOptions] = None,
440
+ ) -> OTelLinksResponse:
441
+ """
442
+ Parameters
443
+ ----------
444
+ spans : typing.Optional[typing.Sequence[OTelFlatSpan]]
445
+
446
+ traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]]
447
+
448
+ request_options : typing.Optional[RequestOptions]
449
+ Request-specific configuration.
450
+
451
+ Returns
452
+ -------
453
+ OTelLinksResponse
454
+ Successful Response
455
+
456
+ Examples
457
+ --------
458
+ import asyncio
459
+
460
+ from agenta import AsyncAgentaApi
461
+
462
+ client = AsyncAgentaApi(
463
+ api_key="YOUR_API_KEY",
464
+ )
465
+
466
+
467
+ async def main() -> None:
468
+ await client.tracing.edit_trace()
469
+
470
+
471
+ asyncio.run(main())
472
+ """
473
+ _response = await self._raw_client.edit_trace(
474
+ spans=spans, traces=traces, request_options=request_options
475
+ )
476
+ return _response.data
477
+
478
+ async def fetch_trace(
479
+ self,
480
+ trace_id: FetchTraceRequestTraceId,
481
+ *,
482
+ request_options: typing.Optional[RequestOptions] = None,
483
+ ) -> OTelTracingResponse:
484
+ """
485
+ Parameters
486
+ ----------
487
+ trace_id : FetchTraceRequestTraceId
488
+
489
+ request_options : typing.Optional[RequestOptions]
490
+ Request-specific configuration.
491
+
492
+ Returns
493
+ -------
494
+ OTelTracingResponse
495
+ Successful Response
496
+
497
+ Examples
498
+ --------
499
+ import asyncio
500
+
501
+ from agenta import AsyncAgentaApi
502
+
503
+ client = AsyncAgentaApi(
504
+ api_key="YOUR_API_KEY",
505
+ )
506
+
507
+
508
+ async def main() -> None:
509
+ await client.tracing.fetch_trace(
510
+ trace_id="trace_id",
511
+ )
512
+
513
+
514
+ asyncio.run(main())
515
+ """
516
+ _response = await self._raw_client.fetch_trace(
517
+ trace_id, request_options=request_options
518
+ )
519
+ return _response.data
520
+
521
+ async def remove_trace(
522
+ self,
523
+ trace_id: RemoveTraceRequestTraceId,
524
+ *,
525
+ request_options: typing.Optional[RequestOptions] = None,
526
+ ) -> OTelLinksResponse:
527
+ """
528
+ Parameters
529
+ ----------
530
+ trace_id : RemoveTraceRequestTraceId
531
+
532
+ request_options : typing.Optional[RequestOptions]
533
+ Request-specific configuration.
534
+
535
+ Returns
536
+ -------
537
+ OTelLinksResponse
538
+ Successful Response
539
+
540
+ Examples
541
+ --------
542
+ import asyncio
543
+
544
+ from agenta import AsyncAgentaApi
545
+
546
+ client = AsyncAgentaApi(
547
+ api_key="YOUR_API_KEY",
548
+ )
549
+
550
+
551
+ async def main() -> None:
552
+ await client.tracing.remove_trace(
553
+ trace_id="trace_id",
554
+ )
555
+
556
+
557
+ asyncio.run(main())
558
+ """
559
+ _response = await self._raw_client.remove_trace(
560
+ trace_id, request_options=request_options
561
+ )
562
+ return _response.data
563
+
564
+ async def query_spans(
565
+ self,
566
+ *,
567
+ filter: str,
568
+ focus: typing.Optional[Focus] = None,
569
+ format: typing.Optional[Format] = None,
570
+ oldest: typing.Optional[str] = None,
571
+ newest: typing.Optional[str] = None,
572
+ limit: typing.Optional[int] = None,
573
+ request_options: typing.Optional[RequestOptions] = None,
574
+ ) -> OTelTracingResponse:
575
+ """
576
+ Parameters
577
+ ----------
578
+ filter : str
579
+
580
+ focus : typing.Optional[Focus]
581
+
582
+ format : typing.Optional[Format]
583
+
584
+ oldest : typing.Optional[str]
585
+
586
+ newest : typing.Optional[str]
587
+
588
+ limit : typing.Optional[int]
589
+
590
+ request_options : typing.Optional[RequestOptions]
591
+ Request-specific configuration.
592
+
593
+ Returns
594
+ -------
595
+ OTelTracingResponse
596
+ Successful Response
597
+
598
+ Examples
599
+ --------
600
+ import asyncio
601
+
602
+ from agenta import AsyncAgentaApi
603
+
604
+ client = AsyncAgentaApi(
605
+ api_key="YOUR_API_KEY",
606
+ )
607
+
608
+
609
+ async def main() -> None:
610
+ await client.tracing.query_spans(
611
+ filter="filter",
612
+ )
613
+
614
+
615
+ asyncio.run(main())
616
+ """
617
+ _response = await self._raw_client.query_spans(
618
+ filter=filter,
619
+ focus=focus,
620
+ format=format,
621
+ oldest=oldest,
622
+ newest=newest,
623
+ limit=limit,
624
+ request_options=request_options,
625
+ )
626
+ return _response.data
627
+
628
+ async def ingest_spans(
629
+ self,
630
+ *,
631
+ spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT,
632
+ traces: typing.Optional[
633
+ typing.Dict[str, typing.Optional[OTelSpansTree]]
634
+ ] = OMIT,
635
+ request_options: typing.Optional[RequestOptions] = None,
636
+ ) -> OTelLinksResponse:
637
+ """
638
+ Parameters
639
+ ----------
640
+ spans : typing.Optional[typing.Sequence[OTelFlatSpan]]
641
+
642
+ traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]]
643
+
644
+ request_options : typing.Optional[RequestOptions]
645
+ Request-specific configuration.
646
+
647
+ Returns
648
+ -------
649
+ OTelLinksResponse
650
+ Successful Response
651
+
652
+ Examples
653
+ --------
654
+ import asyncio
655
+
656
+ from agenta import AsyncAgentaApi
657
+
658
+ client = AsyncAgentaApi(
659
+ api_key="YOUR_API_KEY",
660
+ )
661
+
662
+
663
+ async def main() -> None:
664
+ await client.tracing.ingest_spans()
665
+
666
+
667
+ asyncio.run(main())
668
+ """
669
+ _response = await self._raw_client.ingest_spans(
670
+ spans=spans, traces=traces, request_options=request_options
671
+ )
672
+ return _response.data
673
+
674
+ async def ingest_spans_rpc(
675
+ self,
676
+ *,
677
+ spans: typing.Optional[typing.Sequence[OTelFlatSpan]] = OMIT,
678
+ traces: typing.Optional[
679
+ typing.Dict[str, typing.Optional[OTelSpansTree]]
680
+ ] = OMIT,
681
+ request_options: typing.Optional[RequestOptions] = None,
682
+ ) -> OTelLinksResponse:
683
+ """
684
+ Parameters
685
+ ----------
686
+ spans : typing.Optional[typing.Sequence[OTelFlatSpan]]
687
+
688
+ traces : typing.Optional[typing.Dict[str, typing.Optional[OTelSpansTree]]]
689
+
690
+ request_options : typing.Optional[RequestOptions]
691
+ Request-specific configuration.
692
+
693
+ Returns
694
+ -------
695
+ OTelLinksResponse
696
+ Successful Response
697
+
698
+ Examples
699
+ --------
700
+ import asyncio
701
+
702
+ from agenta import AsyncAgentaApi
703
+
704
+ client = AsyncAgentaApi(
705
+ api_key="YOUR_API_KEY",
706
+ )
707
+
708
+
709
+ async def main() -> None:
710
+ await client.tracing.ingest_spans_rpc()
711
+
712
+
713
+ asyncio.run(main())
714
+ """
715
+ _response = await self._raw_client.ingest_spans_rpc(
716
+ spans=spans, traces=traces, request_options=request_options
717
+ )
718
+ return _response.data
719
+
720
+ async def query_spans_rpc(
721
+ self,
722
+ *,
723
+ filter: str,
724
+ focus: typing.Optional[Focus] = None,
725
+ format: typing.Optional[Format] = None,
726
+ oldest: typing.Optional[str] = None,
727
+ newest: typing.Optional[str] = None,
728
+ limit: typing.Optional[int] = None,
729
+ request_options: typing.Optional[RequestOptions] = None,
730
+ ) -> OTelTracingResponse:
731
+ """
732
+ Parameters
733
+ ----------
734
+ filter : str
735
+
736
+ focus : typing.Optional[Focus]
737
+
738
+ format : typing.Optional[Format]
739
+
740
+ oldest : typing.Optional[str]
741
+
742
+ newest : typing.Optional[str]
743
+
744
+ limit : typing.Optional[int]
745
+
746
+ request_options : typing.Optional[RequestOptions]
747
+ Request-specific configuration.
748
+
749
+ Returns
750
+ -------
751
+ OTelTracingResponse
752
+ Successful Response
753
+
754
+ Examples
755
+ --------
756
+ import asyncio
757
+
758
+ from agenta import AsyncAgentaApi
759
+
760
+ client = AsyncAgentaApi(
761
+ api_key="YOUR_API_KEY",
762
+ )
763
+
764
+
765
+ async def main() -> None:
766
+ await client.tracing.query_spans_rpc(
767
+ filter="filter",
768
+ )
769
+
770
+
771
+ asyncio.run(main())
772
+ """
773
+ _response = await self._raw_client.query_spans_rpc(
774
+ filter=filter,
775
+ focus=focus,
776
+ format=format,
777
+ oldest=oldest,
778
+ newest=newest,
779
+ limit=limit,
780
+ request_options=request_options,
781
+ )
782
+ return _response.data