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.
Files changed (80) hide show
  1. agenta/__init__.py +2 -0
  2. agenta/client/backend/__init__.py +39 -31
  3. agenta/client/backend/admin/__init__.py +1 -0
  4. agenta/client/backend/admin/client.py +576 -0
  5. agenta/client/backend/apps/client.py +450 -68
  6. agenta/client/backend/bases/client.py +10 -10
  7. agenta/client/backend/client.py +112 -122
  8. agenta/client/backend/containers/client.py +70 -28
  9. agenta/client/backend/core/http_client.py +3 -3
  10. agenta/client/backend/environments/client.py +8 -8
  11. agenta/client/backend/evaluations/client.py +46 -52
  12. agenta/client/backend/evaluators/client.py +32 -32
  13. agenta/client/backend/human_evaluations/__init__.py +1 -0
  14. agenta/client/backend/human_evaluations/client.py +1692 -0
  15. agenta/client/backend/observability/__init__.py +4 -0
  16. agenta/client/backend/observability/client.py +221 -744
  17. agenta/client/backend/testsets/client.py +38 -202
  18. agenta/client/backend/types/__init__.py +34 -28
  19. agenta/client/backend/types/account_response.py +24 -0
  20. agenta/client/backend/types/app_variant_revision.py +2 -1
  21. agenta/client/backend/types/{create_trace_response.py → delete_evaluation.py} +2 -3
  22. agenta/client/backend/types/{evaluation_scenario_score_update.py → legacy_scope_request.py} +2 -2
  23. agenta/client/backend/types/legacy_scopes_response.py +29 -0
  24. agenta/client/backend/types/{human_evaluation_update.py → legacy_user_request.py} +4 -4
  25. agenta/client/backend/types/{span_variant.py → legacy_user_response.py} +2 -4
  26. agenta/client/backend/types/organization_membership_request.py +25 -0
  27. agenta/client/backend/types/organization_request.py +23 -0
  28. agenta/client/backend/types/permission.py +4 -0
  29. agenta/client/backend/types/{llm_tokens.py → project_membership_request.py} +8 -5
  30. agenta/client/backend/types/project_request.py +26 -0
  31. agenta/client/backend/types/project_scope.py +29 -0
  32. agenta/client/backend/types/provider_kind.py +1 -1
  33. agenta/client/backend/types/reference.py +22 -0
  34. agenta/client/backend/types/role.py +15 -0
  35. agenta/client/backend/types/scopes_response_model.py +22 -0
  36. agenta/client/backend/types/score.py +1 -1
  37. agenta/client/backend/types/secret_response_dto.py +2 -2
  38. agenta/client/backend/types/user_request.py +22 -0
  39. agenta/client/backend/types/workspace_membership_request.py +26 -0
  40. agenta/client/backend/types/workspace_request.py +25 -0
  41. agenta/client/backend/variants/client.py +208 -42
  42. agenta/client/backend/vault/client.py +11 -9
  43. agenta/sdk/__init__.py +3 -0
  44. agenta/sdk/agenta_init.py +3 -1
  45. agenta/sdk/assets.py +4 -4
  46. agenta/sdk/decorators/routing.py +129 -23
  47. agenta/sdk/decorators/tracing.py +16 -4
  48. agenta/sdk/litellm/litellm.py +44 -8
  49. agenta/sdk/litellm/mockllm.py +2 -2
  50. agenta/sdk/litellm/mocks/__init__.py +9 -3
  51. agenta/sdk/managers/apps.py +64 -0
  52. agenta/sdk/managers/shared.py +2 -2
  53. agenta/sdk/middleware/auth.py +156 -53
  54. agenta/sdk/middleware/config.py +28 -16
  55. agenta/sdk/middleware/inline.py +1 -1
  56. agenta/sdk/middleware/mock.py +1 -1
  57. agenta/sdk/middleware/otel.py +1 -1
  58. agenta/sdk/middleware/vault.py +1 -1
  59. agenta/sdk/tracing/exporters.py +0 -1
  60. agenta/sdk/tracing/inline.py +26 -30
  61. agenta/sdk/types.py +12 -9
  62. {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/METADATA +23 -20
  63. {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/RECORD +69 -63
  64. agenta/client/backend/observability_v_1/__init__.py +0 -5
  65. agenta/client/backend/observability_v_1/client.py +0 -763
  66. agenta/client/backend/types/create_span.py +0 -45
  67. agenta/client/backend/types/human_evaluation_scenario_update.py +0 -30
  68. agenta/client/backend/types/new_human_evaluation.py +0 -27
  69. agenta/client/backend/types/outputs.py +0 -5
  70. agenta/client/backend/types/span.py +0 -42
  71. agenta/client/backend/types/span_detail.py +0 -44
  72. agenta/client/backend/types/span_status_code.py +0 -5
  73. agenta/client/backend/types/trace_detail.py +0 -44
  74. agenta/client/backend/types/with_pagination.py +0 -26
  75. /agenta/client/backend/{observability_v_1 → observability}/types/__init__.py +0 -0
  76. /agenta/client/backend/{observability_v_1 → observability}/types/format.py +0 -0
  77. /agenta/client/backend/{observability_v_1 → observability}/types/query_analytics_response.py +0 -0
  78. /agenta/client/backend/{observability_v_1 → observability}/types/query_traces_response.py +0 -0
  79. {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/WHEEL +0 -0
  80. {agenta-0.32.0a1.dist-info → agenta-0.33.0.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,29 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import pydantic
7
+
8
+
9
+ class LegacyScopesResponse(UniversalBaseModel):
10
+ organization_id: typing.Optional[str] = None
11
+ organization_name: typing.Optional[str] = None
12
+ workspace_id: typing.Optional[str] = None
13
+ workspace_name: typing.Optional[str] = None
14
+ project_id: typing.Optional[str] = None
15
+ project_name: typing.Optional[str] = None
16
+ is_demo: typing.Optional[bool] = None
17
+ user_role: typing.Optional[str] = None
18
+ credentials: typing.Optional[str] = None
19
+
20
+ if IS_PYDANTIC_V2:
21
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
22
+ extra="allow", frozen=True
23
+ ) # type: ignore # Pydantic v2
24
+ else:
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ extra = pydantic.Extra.allow
@@ -1,14 +1,14 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
- from .evaluation_status_enum import EvaluationStatusEnum
6
4
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
5
+ import typing
7
6
  import pydantic
8
7
 
9
8
 
10
- class HumanEvaluationUpdate(UniversalBaseModel):
11
- status: typing.Optional[EvaluationStatusEnum] = None
9
+ class LegacyUserRequest(UniversalBaseModel):
10
+ name: str
11
+ email: str
12
12
 
13
13
  if IS_PYDANTIC_V2:
14
14
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
@@ -6,10 +6,8 @@ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
6
  import pydantic
7
7
 
8
8
 
9
- class SpanVariant(UniversalBaseModel):
10
- variant_id: typing.Optional[str] = None
11
- variant_name: typing.Optional[str] = None
12
- revision: typing.Optional[int] = None
9
+ class LegacyUserResponse(UniversalBaseModel):
10
+ id: typing.Optional[str] = None
13
11
 
14
12
  if IS_PYDANTIC_V2:
15
13
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
@@ -0,0 +1,25 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .reference import Reference
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import pydantic
8
+
9
+
10
+ class OrganizationMembershipRequest(UniversalBaseModel):
11
+ role: typing.Literal["owner"] = "owner"
12
+ is_demo: bool
13
+ user_ref: Reference
14
+ organization_ref: Reference
15
+
16
+ if IS_PYDANTIC_V2:
17
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
18
+ extra="allow", frozen=True
19
+ ) # type: ignore # Pydantic v2
20
+ else:
21
+
22
+ class Config:
23
+ frozen = True
24
+ smart_union = True
25
+ extra = pydantic.Extra.allow
@@ -0,0 +1,23 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
5
+ import typing
6
+ import pydantic
7
+
8
+
9
+ class OrganizationRequest(UniversalBaseModel):
10
+ name: str
11
+ description: str
12
+ is_paying: bool
13
+
14
+ if IS_PYDANTIC_V2:
15
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
16
+ extra="allow", frozen=True
17
+ ) # type: ignore # Pydantic v2
18
+ else:
19
+
20
+ class Config:
21
+ frozen = True
22
+ smart_union = True
23
+ extra = pydantic.Extra.allow
@@ -14,6 +14,10 @@ Permission = typing.Union[
14
14
  "modify_variant_configurations",
15
15
  "delete_application_variant",
16
16
  "run_service",
17
+ "create_secret",
18
+ "view_secret",
19
+ "update_secret",
20
+ "delete_secret",
17
21
  "view_app_environment_deployment",
18
22
  "edit_app_environment_deployment",
19
23
  "create_app_environment_deployment",
@@ -1,15 +1,18 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
4
+ from .role import Role
5
+ from .reference import Reference
5
6
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import typing
6
8
  import pydantic
7
9
 
8
10
 
9
- class LlmTokens(UniversalBaseModel):
10
- prompt_tokens: typing.Optional[int] = None
11
- completion_tokens: typing.Optional[int] = None
12
- total_tokens: typing.Optional[int] = None
11
+ class ProjectMembershipRequest(UniversalBaseModel):
12
+ role: Role
13
+ is_demo: bool
14
+ user_ref: Reference
15
+ project_ref: Reference
13
16
 
14
17
  if IS_PYDANTIC_V2:
15
18
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ from .reference import Reference
5
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import typing
7
+ import pydantic
8
+
9
+
10
+ class ProjectRequest(UniversalBaseModel):
11
+ name: str
12
+ description: str
13
+ is_default: bool
14
+ workspace_ref: Reference
15
+ organization_ref: Reference
16
+
17
+ if IS_PYDANTIC_V2:
18
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
19
+ extra="allow", frozen=True
20
+ ) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow
@@ -0,0 +1,29 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ from .role import Role
5
+ from .reference import Reference
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import typing
8
+ import pydantic
9
+
10
+
11
+ class ProjectScope(UniversalBaseModel):
12
+ credentials: str
13
+ role: Role
14
+ tier: str
15
+ user: Reference
16
+ project: Reference
17
+ workspace: Reference
18
+ organization: Reference
19
+
20
+ if IS_PYDANTIC_V2:
21
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
22
+ extra="allow", frozen=True
23
+ ) # type: ignore # Pydantic v2
24
+ else:
25
+
26
+ class Config:
27
+ frozen = True
28
+ smart_union = True
29
+ extra = pydantic.Extra.allow
@@ -10,7 +10,7 @@ ProviderKind = typing.Union[
10
10
  "deepinfra",
11
11
  "alephalpha",
12
12
  "groq",
13
- "mistral",
13
+ "mistralai",
14
14
  "anthropic",
15
15
  "perplexityai",
16
16
  "togetherai",
@@ -0,0 +1,22 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import pydantic
7
+
8
+
9
+ class Reference(UniversalBaseModel):
10
+ id: typing.Optional[str] = None
11
+ slug: typing.Optional[str] = None
12
+
13
+ if IS_PYDANTIC_V2:
14
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
15
+ extra="allow", frozen=True
16
+ ) # type: ignore # Pydantic v2
17
+ else:
18
+
19
+ class Config:
20
+ frozen = True
21
+ smart_union = True
22
+ extra = pydantic.Extra.allow
@@ -0,0 +1,15 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ Role = typing.Union[
6
+ typing.Literal[
7
+ "owner",
8
+ "viewer",
9
+ "editor",
10
+ "evaluator",
11
+ "workspace_admin",
12
+ "deployment_manager",
13
+ ],
14
+ typing.Any,
15
+ ]
@@ -0,0 +1,22 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ import typing
5
+ from .project_scope import ProjectScope
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import pydantic
8
+
9
+
10
+ class ScopesResponseModel(UniversalBaseModel):
11
+ projects: typing.Optional[typing.Dict[str, typing.Dict[str, ProjectScope]]] = None
12
+
13
+ if IS_PYDANTIC_V2:
14
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
15
+ extra="allow", frozen=True
16
+ ) # type: ignore # Pydantic v2
17
+ else:
18
+
19
+ class Config:
20
+ frozen = True
21
+ smart_union = True
22
+ extra = pydantic.Extra.allow
@@ -2,4 +2,4 @@
2
2
 
3
3
  import typing
4
4
 
5
- Score = typing.Union[str, int]
5
+ Score = typing.Optional[typing.Any]
@@ -1,16 +1,16 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
3
  from ..core.pydantic_utilities import UniversalBaseModel
4
- import typing
5
4
  from .header_dto import HeaderDto
6
5
  from .secret_dto import SecretDto
6
+ import typing
7
7
  from .lifecycle_dto import LifecycleDto
8
8
  from ..core.pydantic_utilities import IS_PYDANTIC_V2
9
9
  import pydantic
10
10
 
11
11
 
12
12
  class SecretResponseDto(UniversalBaseModel):
13
- header: typing.Optional[HeaderDto] = None
13
+ header: HeaderDto
14
14
  secret: SecretDto
15
15
  id: str
16
16
  lifecycle: typing.Optional[LifecycleDto] = None
@@ -0,0 +1,22 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
5
+ import typing
6
+ import pydantic
7
+
8
+
9
+ class UserRequest(UniversalBaseModel):
10
+ name: str
11
+ email: str
12
+
13
+ if IS_PYDANTIC_V2:
14
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
15
+ extra="allow", frozen=True
16
+ ) # type: ignore # Pydantic v2
17
+ else:
18
+
19
+ class Config:
20
+ frozen = True
21
+ smart_union = True
22
+ extra = pydantic.Extra.allow
@@ -0,0 +1,26 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ from .role import Role
5
+ from .reference import Reference
6
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
7
+ import typing
8
+ import pydantic
9
+
10
+
11
+ class WorkspaceMembershipRequest(UniversalBaseModel):
12
+ role: Role
13
+ is_demo: bool
14
+ user_ref: Reference
15
+ workspace_ref: Reference
16
+
17
+ if IS_PYDANTIC_V2:
18
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
19
+ extra="allow", frozen=True
20
+ ) # type: ignore # Pydantic v2
21
+ else:
22
+
23
+ class Config:
24
+ frozen = True
25
+ smart_union = True
26
+ extra = pydantic.Extra.allow
@@ -0,0 +1,25 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ..core.pydantic_utilities import UniversalBaseModel
4
+ from .reference import Reference
5
+ from ..core.pydantic_utilities import IS_PYDANTIC_V2
6
+ import typing
7
+ import pydantic
8
+
9
+
10
+ class WorkspaceRequest(UniversalBaseModel):
11
+ name: str
12
+ description: str
13
+ is_default: bool
14
+ organization_ref: Reference
15
+
16
+ if IS_PYDANTIC_V2:
17
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(
18
+ extra="allow", frozen=True
19
+ ) # type: ignore # Pydantic v2
20
+ else:
21
+
22
+ class Config:
23
+ frozen = True
24
+ smart_union = True
25
+ extra = pydantic.Extra.allow