agenta 0.32.0a1__py3-none-any.whl → 0.33.0__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.
- agenta/__init__.py +2 -0
- agenta/client/backend/__init__.py +39 -31
- agenta/client/backend/admin/__init__.py +1 -0
- agenta/client/backend/admin/client.py +576 -0
- agenta/client/backend/apps/client.py +450 -68
- agenta/client/backend/bases/client.py +10 -10
- agenta/client/backend/client.py +112 -122
- agenta/client/backend/containers/client.py +70 -28
- agenta/client/backend/core/http_client.py +3 -3
- agenta/client/backend/environments/client.py +8 -8
- agenta/client/backend/evaluations/client.py +46 -52
- agenta/client/backend/evaluators/client.py +32 -32
- agenta/client/backend/human_evaluations/__init__.py +1 -0
- agenta/client/backend/human_evaluations/client.py +1692 -0
- agenta/client/backend/observability/__init__.py +4 -0
- agenta/client/backend/observability/client.py +221 -744
- agenta/client/backend/testsets/client.py +38 -202
- agenta/client/backend/types/__init__.py +34 -28
- agenta/client/backend/types/account_response.py +24 -0
- agenta/client/backend/types/app_variant_revision.py +2 -1
- agenta/client/backend/types/{create_trace_response.py → delete_evaluation.py} +2 -3
- agenta/client/backend/types/{evaluation_scenario_score_update.py → legacy_scope_request.py} +2 -2
- agenta/client/backend/types/legacy_scopes_response.py +29 -0
- agenta/client/backend/types/{human_evaluation_update.py → legacy_user_request.py} +4 -4
- agenta/client/backend/types/{span_variant.py → legacy_user_response.py} +2 -4
- agenta/client/backend/types/organization_membership_request.py +25 -0
- agenta/client/backend/types/organization_request.py +23 -0
- agenta/client/backend/types/permission.py +4 -0
- agenta/client/backend/types/{llm_tokens.py → project_membership_request.py} +8 -5
- agenta/client/backend/types/project_request.py +26 -0
- agenta/client/backend/types/project_scope.py +29 -0
- agenta/client/backend/types/provider_kind.py +1 -1
- agenta/client/backend/types/reference.py +22 -0
- agenta/client/backend/types/role.py +15 -0
- agenta/client/backend/types/scopes_response_model.py +22 -0
- agenta/client/backend/types/score.py +1 -1
- agenta/client/backend/types/secret_response_dto.py +2 -2
- agenta/client/backend/types/user_request.py +22 -0
- agenta/client/backend/types/workspace_membership_request.py +26 -0
- agenta/client/backend/types/workspace_request.py +25 -0
- agenta/client/backend/variants/client.py +208 -42
- agenta/client/backend/vault/client.py +11 -9
- agenta/sdk/__init__.py +3 -0
- agenta/sdk/agenta_init.py +3 -1
- agenta/sdk/assets.py +4 -4
- agenta/sdk/decorators/routing.py +129 -23
- agenta/sdk/decorators/tracing.py +16 -4
- agenta/sdk/litellm/litellm.py +44 -8
- agenta/sdk/litellm/mockllm.py +2 -2
- agenta/sdk/litellm/mocks/__init__.py +9 -3
- agenta/sdk/managers/apps.py +64 -0
- agenta/sdk/managers/shared.py +2 -2
- agenta/sdk/middleware/auth.py +156 -53
- agenta/sdk/middleware/config.py +28 -16
- agenta/sdk/middleware/inline.py +1 -1
- agenta/sdk/middleware/mock.py +1 -1
- agenta/sdk/middleware/otel.py +1 -1
- agenta/sdk/middleware/vault.py +1 -1
- agenta/sdk/tracing/exporters.py +0 -1
- agenta/sdk/tracing/inline.py +26 -30
- agenta/sdk/types.py +12 -9
- {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/METADATA +23 -20
- {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/RECORD +69 -63
- agenta/client/backend/observability_v_1/__init__.py +0 -5
- agenta/client/backend/observability_v_1/client.py +0 -763
- agenta/client/backend/types/create_span.py +0 -45
- agenta/client/backend/types/human_evaluation_scenario_update.py +0 -30
- agenta/client/backend/types/new_human_evaluation.py +0 -27
- agenta/client/backend/types/outputs.py +0 -5
- agenta/client/backend/types/span.py +0 -42
- agenta/client/backend/types/span_detail.py +0 -44
- agenta/client/backend/types/span_status_code.py +0 -5
- agenta/client/backend/types/trace_detail.py +0 -44
- agenta/client/backend/types/with_pagination.py +0 -26
- /agenta/client/backend/{observability_v_1 → observability}/types/__init__.py +0 -0
- /agenta/client/backend/{observability_v_1 → observability}/types/format.py +0 -0
- /agenta/client/backend/{observability_v_1 → observability}/types/query_analytics_response.py +0 -0
- /agenta/client/backend/{observability_v_1 → observability}/types/query_traces_response.py +0 -0
- {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/WHEEL +0 -0
- {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/entry_points.txt +0 -0
agenta/__init__.py
CHANGED
|
@@ -29,6 +29,7 @@ from .sdk.agenta_init import Config, AgentaSingleton, init as _init
|
|
|
29
29
|
from .sdk.utils.costs import calculate_token_usage
|
|
30
30
|
from .sdk.client import Agenta
|
|
31
31
|
from .sdk.litellm import litellm as callbacks
|
|
32
|
+
from .sdk.managers.apps import AppManager
|
|
32
33
|
from .sdk.managers.vault import VaultManager
|
|
33
34
|
from .sdk.managers.secrets import SecretsManager
|
|
34
35
|
from .sdk.managers.config import ConfigManager
|
|
@@ -36,6 +37,7 @@ from .sdk.managers.variant import VariantManager
|
|
|
36
37
|
from .sdk.managers.deployment import DeploymentManager
|
|
37
38
|
from .sdk import assets as assets
|
|
38
39
|
from .sdk import tracer
|
|
40
|
+
from .client.exceptions import APIRequestError
|
|
39
41
|
|
|
40
42
|
config = PreInitObject("agenta.config", Config)
|
|
41
43
|
DEFAULT_AGENTA_SINGLETON_INSTANCE = AgentaSingleton()
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from .types import (
|
|
4
|
+
AccountResponse,
|
|
4
5
|
AgentaNodeDto,
|
|
5
6
|
AgentaNodeDtoNodesValue,
|
|
6
7
|
AgentaNodesResponse,
|
|
@@ -23,8 +24,7 @@ from .types import (
|
|
|
23
24
|
ConfigResponseModel,
|
|
24
25
|
CorrectAnswer,
|
|
25
26
|
CreateAppOutput,
|
|
26
|
-
|
|
27
|
-
CreateTraceResponse,
|
|
27
|
+
DeleteEvaluation,
|
|
28
28
|
DockerEnvVars,
|
|
29
29
|
EnvironmentOutput,
|
|
30
30
|
EnvironmentOutputExtended,
|
|
@@ -35,7 +35,6 @@ from .types import (
|
|
|
35
35
|
EvaluationScenarioInput,
|
|
36
36
|
EvaluationScenarioOutput,
|
|
37
37
|
EvaluationScenarioResult,
|
|
38
|
-
EvaluationScenarioScoreUpdate,
|
|
39
38
|
EvaluationStatusEnum,
|
|
40
39
|
EvaluationType,
|
|
41
40
|
Evaluator,
|
|
@@ -50,19 +49,19 @@ from .types import (
|
|
|
50
49
|
HumanEvaluationScenario,
|
|
51
50
|
HumanEvaluationScenarioInput,
|
|
52
51
|
HumanEvaluationScenarioOutput,
|
|
53
|
-
HumanEvaluationScenarioUpdate,
|
|
54
|
-
HumanEvaluationUpdate,
|
|
55
52
|
Image,
|
|
56
53
|
InviteRequest,
|
|
57
54
|
LegacyAnalyticsResponse,
|
|
58
55
|
LegacyDataPoint,
|
|
56
|
+
LegacyScopeRequest,
|
|
57
|
+
LegacyScopesResponse,
|
|
58
|
+
LegacyUserRequest,
|
|
59
|
+
LegacyUserResponse,
|
|
59
60
|
LifecycleDto,
|
|
60
61
|
LinkDto,
|
|
61
62
|
ListApiKeysResponse,
|
|
62
63
|
LlmRunRateLimit,
|
|
63
|
-
LlmTokens,
|
|
64
64
|
MetricsDto,
|
|
65
|
-
NewHumanEvaluation,
|
|
66
65
|
NewTestset,
|
|
67
66
|
NodeDto,
|
|
68
67
|
NodeType,
|
|
@@ -75,28 +74,31 @@ from .types import (
|
|
|
75
74
|
OTelSpansResponse,
|
|
76
75
|
OTelStatusCode,
|
|
77
76
|
Organization,
|
|
77
|
+
OrganizationMembershipRequest,
|
|
78
78
|
OrganizationOutput,
|
|
79
|
-
|
|
79
|
+
OrganizationRequest,
|
|
80
80
|
ParentDto,
|
|
81
81
|
Permission,
|
|
82
|
+
ProjectMembershipRequest,
|
|
83
|
+
ProjectRequest,
|
|
84
|
+
ProjectScope,
|
|
82
85
|
ProjectsResponse,
|
|
83
86
|
ProviderKeyDto,
|
|
84
87
|
ProviderKind,
|
|
88
|
+
Reference,
|
|
85
89
|
ReferenceDto,
|
|
86
90
|
ReferenceRequestModel,
|
|
87
91
|
Result,
|
|
92
|
+
Role,
|
|
88
93
|
RootDto,
|
|
94
|
+
ScopesResponseModel,
|
|
89
95
|
Score,
|
|
90
96
|
SecretDto,
|
|
91
97
|
SecretKind,
|
|
92
98
|
SecretResponseDto,
|
|
93
99
|
SimpleEvaluationOutput,
|
|
94
|
-
Span,
|
|
95
|
-
SpanDetail,
|
|
96
100
|
SpanDto,
|
|
97
101
|
SpanDtoNodesValue,
|
|
98
|
-
SpanStatusCode,
|
|
99
|
-
SpanVariant,
|
|
100
102
|
StatusCode,
|
|
101
103
|
StatusDto,
|
|
102
104
|
Template,
|
|
@@ -104,18 +106,19 @@ from .types import (
|
|
|
104
106
|
TestSetOutputResponse,
|
|
105
107
|
TestSetSimpleResponse,
|
|
106
108
|
TimeDto,
|
|
107
|
-
TraceDetail,
|
|
108
109
|
TreeDto,
|
|
109
110
|
TreeType,
|
|
110
111
|
UpdateAppOutput,
|
|
111
112
|
Uri,
|
|
113
|
+
UserRequest,
|
|
112
114
|
ValidationError,
|
|
113
115
|
ValidationErrorLocItem,
|
|
114
116
|
VariantAction,
|
|
115
117
|
VariantActionEnum,
|
|
116
|
-
WithPagination,
|
|
117
118
|
WorkspaceMemberResponse,
|
|
119
|
+
WorkspaceMembershipRequest,
|
|
118
120
|
WorkspacePermission,
|
|
121
|
+
WorkspaceRequest,
|
|
119
122
|
WorkspaceResponse,
|
|
120
123
|
WorkspaceRole,
|
|
121
124
|
WorkspaceRoleResponse,
|
|
@@ -123,6 +126,7 @@ from .types import (
|
|
|
123
126
|
from .errors import UnprocessableEntityError
|
|
124
127
|
from . import (
|
|
125
128
|
access_control,
|
|
129
|
+
admin,
|
|
126
130
|
apps,
|
|
127
131
|
bases,
|
|
128
132
|
configs,
|
|
@@ -130,8 +134,8 @@ from . import (
|
|
|
130
134
|
environments,
|
|
131
135
|
evaluations,
|
|
132
136
|
evaluators,
|
|
137
|
+
human_evaluations,
|
|
133
138
|
observability,
|
|
134
|
-
observability_v_1,
|
|
135
139
|
scopes,
|
|
136
140
|
testsets,
|
|
137
141
|
variants,
|
|
@@ -139,10 +143,11 @@ from . import (
|
|
|
139
143
|
)
|
|
140
144
|
from .client import AgentaApi, AsyncAgentaApi
|
|
141
145
|
from .containers import ContainerTemplatesResponse
|
|
142
|
-
from .
|
|
146
|
+
from .observability import Format, QueryAnalyticsResponse, QueryTracesResponse
|
|
143
147
|
from .variants import AddVariantFromBaseAndConfigResponse
|
|
144
148
|
|
|
145
149
|
__all__ = [
|
|
150
|
+
"AccountResponse",
|
|
146
151
|
"AddVariantFromBaseAndConfigResponse",
|
|
147
152
|
"AgentaApi",
|
|
148
153
|
"AgentaNodeDto",
|
|
@@ -169,8 +174,7 @@ __all__ = [
|
|
|
169
174
|
"ContainerTemplatesResponse",
|
|
170
175
|
"CorrectAnswer",
|
|
171
176
|
"CreateAppOutput",
|
|
172
|
-
"
|
|
173
|
-
"CreateTraceResponse",
|
|
177
|
+
"DeleteEvaluation",
|
|
174
178
|
"DockerEnvVars",
|
|
175
179
|
"EnvironmentOutput",
|
|
176
180
|
"EnvironmentOutputExtended",
|
|
@@ -181,7 +185,6 @@ __all__ = [
|
|
|
181
185
|
"EvaluationScenarioInput",
|
|
182
186
|
"EvaluationScenarioOutput",
|
|
183
187
|
"EvaluationScenarioResult",
|
|
184
|
-
"EvaluationScenarioScoreUpdate",
|
|
185
188
|
"EvaluationStatusEnum",
|
|
186
189
|
"EvaluationType",
|
|
187
190
|
"Evaluator",
|
|
@@ -197,19 +200,19 @@ __all__ = [
|
|
|
197
200
|
"HumanEvaluationScenario",
|
|
198
201
|
"HumanEvaluationScenarioInput",
|
|
199
202
|
"HumanEvaluationScenarioOutput",
|
|
200
|
-
"HumanEvaluationScenarioUpdate",
|
|
201
|
-
"HumanEvaluationUpdate",
|
|
202
203
|
"Image",
|
|
203
204
|
"InviteRequest",
|
|
204
205
|
"LegacyAnalyticsResponse",
|
|
205
206
|
"LegacyDataPoint",
|
|
207
|
+
"LegacyScopeRequest",
|
|
208
|
+
"LegacyScopesResponse",
|
|
209
|
+
"LegacyUserRequest",
|
|
210
|
+
"LegacyUserResponse",
|
|
206
211
|
"LifecycleDto",
|
|
207
212
|
"LinkDto",
|
|
208
213
|
"ListApiKeysResponse",
|
|
209
214
|
"LlmRunRateLimit",
|
|
210
|
-
"LlmTokens",
|
|
211
215
|
"MetricsDto",
|
|
212
|
-
"NewHumanEvaluation",
|
|
213
216
|
"NewTestset",
|
|
214
217
|
"NodeDto",
|
|
215
218
|
"NodeType",
|
|
@@ -222,30 +225,33 @@ __all__ = [
|
|
|
222
225
|
"OTelSpansResponse",
|
|
223
226
|
"OTelStatusCode",
|
|
224
227
|
"Organization",
|
|
228
|
+
"OrganizationMembershipRequest",
|
|
225
229
|
"OrganizationOutput",
|
|
226
|
-
"
|
|
230
|
+
"OrganizationRequest",
|
|
227
231
|
"ParentDto",
|
|
228
232
|
"Permission",
|
|
233
|
+
"ProjectMembershipRequest",
|
|
234
|
+
"ProjectRequest",
|
|
235
|
+
"ProjectScope",
|
|
229
236
|
"ProjectsResponse",
|
|
230
237
|
"ProviderKeyDto",
|
|
231
238
|
"ProviderKind",
|
|
232
239
|
"QueryAnalyticsResponse",
|
|
233
240
|
"QueryTracesResponse",
|
|
241
|
+
"Reference",
|
|
234
242
|
"ReferenceDto",
|
|
235
243
|
"ReferenceRequestModel",
|
|
236
244
|
"Result",
|
|
245
|
+
"Role",
|
|
237
246
|
"RootDto",
|
|
247
|
+
"ScopesResponseModel",
|
|
238
248
|
"Score",
|
|
239
249
|
"SecretDto",
|
|
240
250
|
"SecretKind",
|
|
241
251
|
"SecretResponseDto",
|
|
242
252
|
"SimpleEvaluationOutput",
|
|
243
|
-
"Span",
|
|
244
|
-
"SpanDetail",
|
|
245
253
|
"SpanDto",
|
|
246
254
|
"SpanDtoNodesValue",
|
|
247
|
-
"SpanStatusCode",
|
|
248
|
-
"SpanVariant",
|
|
249
255
|
"StatusCode",
|
|
250
256
|
"StatusDto",
|
|
251
257
|
"Template",
|
|
@@ -253,23 +259,25 @@ __all__ = [
|
|
|
253
259
|
"TestSetOutputResponse",
|
|
254
260
|
"TestSetSimpleResponse",
|
|
255
261
|
"TimeDto",
|
|
256
|
-
"TraceDetail",
|
|
257
262
|
"TreeDto",
|
|
258
263
|
"TreeType",
|
|
259
264
|
"UnprocessableEntityError",
|
|
260
265
|
"UpdateAppOutput",
|
|
261
266
|
"Uri",
|
|
267
|
+
"UserRequest",
|
|
262
268
|
"ValidationError",
|
|
263
269
|
"ValidationErrorLocItem",
|
|
264
270
|
"VariantAction",
|
|
265
271
|
"VariantActionEnum",
|
|
266
|
-
"WithPagination",
|
|
267
272
|
"WorkspaceMemberResponse",
|
|
273
|
+
"WorkspaceMembershipRequest",
|
|
268
274
|
"WorkspacePermission",
|
|
275
|
+
"WorkspaceRequest",
|
|
269
276
|
"WorkspaceResponse",
|
|
270
277
|
"WorkspaceRole",
|
|
271
278
|
"WorkspaceRoleResponse",
|
|
272
279
|
"access_control",
|
|
280
|
+
"admin",
|
|
273
281
|
"apps",
|
|
274
282
|
"bases",
|
|
275
283
|
"configs",
|
|
@@ -277,8 +285,8 @@ __all__ = [
|
|
|
277
285
|
"environments",
|
|
278
286
|
"evaluations",
|
|
279
287
|
"evaluators",
|
|
288
|
+
"human_evaluations",
|
|
280
289
|
"observability",
|
|
281
|
-
"observability_v_1",
|
|
282
290
|
"scopes",
|
|
283
291
|
"testsets",
|
|
284
292
|
"variants",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|