agenta 0.32.0a2__py3-none-any.whl → 0.33.0a3__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.
- agenta/__init__.py +2 -0
- agenta/client/backend/__init__.py +35 -23
- agenta/client/backend/admin/__init__.py +1 -0
- agenta/client/backend/admin/client.py +576 -0
- agenta/client/backend/apps/client.py +384 -2
- agenta/client/backend/client.py +22 -40
- agenta/client/backend/core/http_client.py +3 -3
- agenta/client/backend/evaluations/client.py +0 -6
- agenta/client/backend/human_evaluations/client.py +2 -6
- agenta/client/backend/observability/__init__.py +4 -0
- agenta/client/backend/observability/client.py +221 -744
- agenta/client/backend/testsets/client.py +16 -180
- agenta/client/backend/types/__init__.py +32 -22
- 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 → legacy_scope_request.py} +3 -4
- agenta/client/backend/types/legacy_scopes_response.py +29 -0
- agenta/client/backend/types/{span_variant.py → legacy_user_request.py} +4 -5
- agenta/client/backend/types/{llm_tokens.py → legacy_user_response.py} +2 -4
- agenta/client/backend/types/{with_pagination.py → organization_membership_request.py} +6 -7
- agenta/client/backend/types/organization_request.py +23 -0
- agenta/client/backend/types/permission.py +4 -0
- agenta/client/backend/types/project_membership_request.py +26 -0
- 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 +166 -12
- agenta/client/backend/vault/client.py +11 -9
- agenta/sdk/__init__.py +3 -0
- agenta/sdk/agenta_init.py +3 -1
- agenta/sdk/decorators/routing.py +97 -13
- agenta/sdk/managers/apps.py +64 -0
- agenta/sdk/managers/shared.py +2 -2
- agenta/sdk/middleware/auth.py +156 -57
- agenta/sdk/middleware/config.py +18 -14
- 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-0.32.0a2.dist-info → agenta-0.33.0a3.dist-info}/METADATA +19 -14
- {agenta-0.32.0a2.dist-info → agenta-0.33.0a3.dist-info}/RECORD +55 -48
- 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/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/{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.0a2.dist-info → agenta-0.33.0a3.dist-info}/WHEEL +0 -0
- {agenta-0.32.0a2.dist-info → agenta-0.33.0a3.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,6 @@ from .types import (
|
|
|
23
24
|
ConfigResponseModel,
|
|
24
25
|
CorrectAnswer,
|
|
25
26
|
CreateAppOutput,
|
|
26
|
-
CreateSpan,
|
|
27
|
-
CreateTraceResponse,
|
|
28
27
|
DeleteEvaluation,
|
|
29
28
|
DockerEnvVars,
|
|
30
29
|
EnvironmentOutput,
|
|
@@ -54,11 +53,14 @@ from .types import (
|
|
|
54
53
|
InviteRequest,
|
|
55
54
|
LegacyAnalyticsResponse,
|
|
56
55
|
LegacyDataPoint,
|
|
56
|
+
LegacyScopeRequest,
|
|
57
|
+
LegacyScopesResponse,
|
|
58
|
+
LegacyUserRequest,
|
|
59
|
+
LegacyUserResponse,
|
|
57
60
|
LifecycleDto,
|
|
58
61
|
LinkDto,
|
|
59
62
|
ListApiKeysResponse,
|
|
60
63
|
LlmRunRateLimit,
|
|
61
|
-
LlmTokens,
|
|
62
64
|
MetricsDto,
|
|
63
65
|
NewTestset,
|
|
64
66
|
NodeDto,
|
|
@@ -72,28 +74,31 @@ from .types import (
|
|
|
72
74
|
OTelSpansResponse,
|
|
73
75
|
OTelStatusCode,
|
|
74
76
|
Organization,
|
|
77
|
+
OrganizationMembershipRequest,
|
|
75
78
|
OrganizationOutput,
|
|
76
|
-
|
|
79
|
+
OrganizationRequest,
|
|
77
80
|
ParentDto,
|
|
78
81
|
Permission,
|
|
82
|
+
ProjectMembershipRequest,
|
|
83
|
+
ProjectRequest,
|
|
84
|
+
ProjectScope,
|
|
79
85
|
ProjectsResponse,
|
|
80
86
|
ProviderKeyDto,
|
|
81
87
|
ProviderKind,
|
|
88
|
+
Reference,
|
|
82
89
|
ReferenceDto,
|
|
83
90
|
ReferenceRequestModel,
|
|
84
91
|
Result,
|
|
92
|
+
Role,
|
|
85
93
|
RootDto,
|
|
94
|
+
ScopesResponseModel,
|
|
86
95
|
Score,
|
|
87
96
|
SecretDto,
|
|
88
97
|
SecretKind,
|
|
89
98
|
SecretResponseDto,
|
|
90
99
|
SimpleEvaluationOutput,
|
|
91
|
-
Span,
|
|
92
|
-
SpanDetail,
|
|
93
100
|
SpanDto,
|
|
94
101
|
SpanDtoNodesValue,
|
|
95
|
-
SpanStatusCode,
|
|
96
|
-
SpanVariant,
|
|
97
102
|
StatusCode,
|
|
98
103
|
StatusDto,
|
|
99
104
|
Template,
|
|
@@ -101,18 +106,19 @@ from .types import (
|
|
|
101
106
|
TestSetOutputResponse,
|
|
102
107
|
TestSetSimpleResponse,
|
|
103
108
|
TimeDto,
|
|
104
|
-
TraceDetail,
|
|
105
109
|
TreeDto,
|
|
106
110
|
TreeType,
|
|
107
111
|
UpdateAppOutput,
|
|
108
112
|
Uri,
|
|
113
|
+
UserRequest,
|
|
109
114
|
ValidationError,
|
|
110
115
|
ValidationErrorLocItem,
|
|
111
116
|
VariantAction,
|
|
112
117
|
VariantActionEnum,
|
|
113
|
-
WithPagination,
|
|
114
118
|
WorkspaceMemberResponse,
|
|
119
|
+
WorkspaceMembershipRequest,
|
|
115
120
|
WorkspacePermission,
|
|
121
|
+
WorkspaceRequest,
|
|
116
122
|
WorkspaceResponse,
|
|
117
123
|
WorkspaceRole,
|
|
118
124
|
WorkspaceRoleResponse,
|
|
@@ -120,6 +126,7 @@ from .types import (
|
|
|
120
126
|
from .errors import UnprocessableEntityError
|
|
121
127
|
from . import (
|
|
122
128
|
access_control,
|
|
129
|
+
admin,
|
|
123
130
|
apps,
|
|
124
131
|
bases,
|
|
125
132
|
configs,
|
|
@@ -129,7 +136,6 @@ from . import (
|
|
|
129
136
|
evaluators,
|
|
130
137
|
human_evaluations,
|
|
131
138
|
observability,
|
|
132
|
-
observability_v_1,
|
|
133
139
|
scopes,
|
|
134
140
|
testsets,
|
|
135
141
|
variants,
|
|
@@ -137,10 +143,11 @@ from . import (
|
|
|
137
143
|
)
|
|
138
144
|
from .client import AgentaApi, AsyncAgentaApi
|
|
139
145
|
from .containers import ContainerTemplatesResponse
|
|
140
|
-
from .
|
|
146
|
+
from .observability import Format, QueryAnalyticsResponse, QueryTracesResponse
|
|
141
147
|
from .variants import AddVariantFromBaseAndConfigResponse
|
|
142
148
|
|
|
143
149
|
__all__ = [
|
|
150
|
+
"AccountResponse",
|
|
144
151
|
"AddVariantFromBaseAndConfigResponse",
|
|
145
152
|
"AgentaApi",
|
|
146
153
|
"AgentaNodeDto",
|
|
@@ -167,8 +174,6 @@ __all__ = [
|
|
|
167
174
|
"ContainerTemplatesResponse",
|
|
168
175
|
"CorrectAnswer",
|
|
169
176
|
"CreateAppOutput",
|
|
170
|
-
"CreateSpan",
|
|
171
|
-
"CreateTraceResponse",
|
|
172
177
|
"DeleteEvaluation",
|
|
173
178
|
"DockerEnvVars",
|
|
174
179
|
"EnvironmentOutput",
|
|
@@ -199,11 +204,14 @@ __all__ = [
|
|
|
199
204
|
"InviteRequest",
|
|
200
205
|
"LegacyAnalyticsResponse",
|
|
201
206
|
"LegacyDataPoint",
|
|
207
|
+
"LegacyScopeRequest",
|
|
208
|
+
"LegacyScopesResponse",
|
|
209
|
+
"LegacyUserRequest",
|
|
210
|
+
"LegacyUserResponse",
|
|
202
211
|
"LifecycleDto",
|
|
203
212
|
"LinkDto",
|
|
204
213
|
"ListApiKeysResponse",
|
|
205
214
|
"LlmRunRateLimit",
|
|
206
|
-
"LlmTokens",
|
|
207
215
|
"MetricsDto",
|
|
208
216
|
"NewTestset",
|
|
209
217
|
"NodeDto",
|
|
@@ -217,30 +225,33 @@ __all__ = [
|
|
|
217
225
|
"OTelSpansResponse",
|
|
218
226
|
"OTelStatusCode",
|
|
219
227
|
"Organization",
|
|
228
|
+
"OrganizationMembershipRequest",
|
|
220
229
|
"OrganizationOutput",
|
|
221
|
-
"
|
|
230
|
+
"OrganizationRequest",
|
|
222
231
|
"ParentDto",
|
|
223
232
|
"Permission",
|
|
233
|
+
"ProjectMembershipRequest",
|
|
234
|
+
"ProjectRequest",
|
|
235
|
+
"ProjectScope",
|
|
224
236
|
"ProjectsResponse",
|
|
225
237
|
"ProviderKeyDto",
|
|
226
238
|
"ProviderKind",
|
|
227
239
|
"QueryAnalyticsResponse",
|
|
228
240
|
"QueryTracesResponse",
|
|
241
|
+
"Reference",
|
|
229
242
|
"ReferenceDto",
|
|
230
243
|
"ReferenceRequestModel",
|
|
231
244
|
"Result",
|
|
245
|
+
"Role",
|
|
232
246
|
"RootDto",
|
|
247
|
+
"ScopesResponseModel",
|
|
233
248
|
"Score",
|
|
234
249
|
"SecretDto",
|
|
235
250
|
"SecretKind",
|
|
236
251
|
"SecretResponseDto",
|
|
237
252
|
"SimpleEvaluationOutput",
|
|
238
|
-
"Span",
|
|
239
|
-
"SpanDetail",
|
|
240
253
|
"SpanDto",
|
|
241
254
|
"SpanDtoNodesValue",
|
|
242
|
-
"SpanStatusCode",
|
|
243
|
-
"SpanVariant",
|
|
244
255
|
"StatusCode",
|
|
245
256
|
"StatusDto",
|
|
246
257
|
"Template",
|
|
@@ -248,23 +259,25 @@ __all__ = [
|
|
|
248
259
|
"TestSetOutputResponse",
|
|
249
260
|
"TestSetSimpleResponse",
|
|
250
261
|
"TimeDto",
|
|
251
|
-
"TraceDetail",
|
|
252
262
|
"TreeDto",
|
|
253
263
|
"TreeType",
|
|
254
264
|
"UnprocessableEntityError",
|
|
255
265
|
"UpdateAppOutput",
|
|
256
266
|
"Uri",
|
|
267
|
+
"UserRequest",
|
|
257
268
|
"ValidationError",
|
|
258
269
|
"ValidationErrorLocItem",
|
|
259
270
|
"VariantAction",
|
|
260
271
|
"VariantActionEnum",
|
|
261
|
-
"WithPagination",
|
|
262
272
|
"WorkspaceMemberResponse",
|
|
273
|
+
"WorkspaceMembershipRequest",
|
|
263
274
|
"WorkspacePermission",
|
|
275
|
+
"WorkspaceRequest",
|
|
264
276
|
"WorkspaceResponse",
|
|
265
277
|
"WorkspaceRole",
|
|
266
278
|
"WorkspaceRoleResponse",
|
|
267
279
|
"access_control",
|
|
280
|
+
"admin",
|
|
268
281
|
"apps",
|
|
269
282
|
"bases",
|
|
270
283
|
"configs",
|
|
@@ -274,7 +287,6 @@ __all__ = [
|
|
|
274
287
|
"evaluators",
|
|
275
288
|
"human_evaluations",
|
|
276
289
|
"observability",
|
|
277
|
-
"observability_v_1",
|
|
278
290
|
"scopes",
|
|
279
291
|
"testsets",
|
|
280
292
|
"variants",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|