agenta 0.57.0__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.
- agenta/__init__.py +12 -3
- agenta/client/__init__.py +4 -4
- agenta/client/backend/__init__.py +4 -4
- agenta/client/backend/api_keys/client.py +2 -2
- agenta/client/backend/billing/client.py +2 -2
- agenta/client/backend/billing/raw_client.py +2 -2
- agenta/client/backend/client.py +56 -48
- agenta/client/backend/core/client_wrapper.py +2 -2
- agenta/client/backend/core/file.py +3 -1
- agenta/client/backend/core/http_client.py +3 -3
- agenta/client/backend/core/pydantic_utilities.py +13 -3
- agenta/client/backend/human_evaluations/client.py +2 -2
- agenta/client/backend/human_evaluations/raw_client.py +2 -2
- agenta/client/backend/organization/client.py +46 -34
- agenta/client/backend/organization/raw_client.py +32 -26
- agenta/client/backend/raw_client.py +26 -26
- agenta/client/backend/testsets/client.py +18 -18
- agenta/client/backend/testsets/raw_client.py +30 -30
- agenta/client/backend/types/__init__.py +4 -4
- agenta/client/backend/types/account_request.py +3 -1
- agenta/client/backend/types/account_response.py +3 -1
- agenta/client/backend/types/agenta_node_dto.py +3 -1
- agenta/client/backend/types/agenta_nodes_response.py +3 -1
- agenta/client/backend/types/agenta_root_dto.py +3 -1
- agenta/client/backend/types/agenta_roots_response.py +3 -1
- agenta/client/backend/types/agenta_tree_dto.py +3 -1
- agenta/client/backend/types/agenta_trees_response.py +3 -1
- agenta/client/backend/types/aggregated_result.py +3 -1
- agenta/client/backend/types/analytics_response.py +3 -1
- agenta/client/backend/types/annotation.py +6 -4
- agenta/client/backend/types/annotation_create.py +3 -1
- agenta/client/backend/types/annotation_edit.py +3 -1
- agenta/client/backend/types/annotation_link.py +3 -1
- agenta/client/backend/types/annotation_link_response.py +3 -1
- agenta/client/backend/types/annotation_query.py +3 -1
- agenta/client/backend/types/annotation_query_request.py +3 -1
- agenta/client/backend/types/annotation_reference.py +3 -1
- agenta/client/backend/types/annotation_references.py +3 -1
- agenta/client/backend/types/annotation_response.py +3 -1
- agenta/client/backend/types/annotations_response.py +3 -1
- agenta/client/backend/types/app.py +3 -1
- agenta/client/backend/types/app_variant_response.py +3 -1
- agenta/client/backend/types/app_variant_revision.py +3 -1
- agenta/client/backend/types/artifact.py +6 -4
- agenta/client/backend/types/base_output.py +3 -1
- agenta/client/backend/types/body_fetch_workflow_revision.py +3 -1
- agenta/client/backend/types/body_import_testset.py +3 -1
- agenta/client/backend/types/bucket_dto.py +3 -1
- agenta/client/backend/types/collect_status_response.py +3 -1
- agenta/client/backend/types/config_db.py +3 -1
- agenta/client/backend/types/config_dto.py +3 -1
- agenta/client/backend/types/config_response_model.py +3 -1
- agenta/client/backend/types/correct_answer.py +3 -1
- agenta/client/backend/types/create_app_output.py +3 -1
- agenta/client/backend/types/custom_model_settings_dto.py +3 -1
- agenta/client/backend/types/custom_provider_dto.py +3 -1
- agenta/client/backend/types/custom_provider_kind.py +1 -1
- agenta/client/backend/types/custom_provider_settings_dto.py +3 -1
- agenta/client/backend/types/delete_evaluation.py +3 -1
- agenta/client/backend/types/environment_output.py +3 -1
- agenta/client/backend/types/environment_output_extended.py +3 -1
- agenta/client/backend/types/environment_revision.py +3 -1
- agenta/client/backend/types/error.py +3 -1
- agenta/client/backend/types/evaluation.py +3 -1
- agenta/client/backend/types/evaluation_scenario.py +3 -1
- agenta/client/backend/types/evaluation_scenario_input.py +3 -1
- agenta/client/backend/types/evaluation_scenario_output.py +3 -1
- agenta/client/backend/types/evaluation_scenario_result.py +3 -1
- agenta/client/backend/types/evaluator.py +6 -4
- agenta/client/backend/types/evaluator_config.py +6 -4
- agenta/client/backend/types/evaluator_flags.py +3 -1
- agenta/client/backend/types/evaluator_mapping_output_interface.py +3 -1
- agenta/client/backend/types/evaluator_output_interface.py +3 -1
- agenta/client/backend/types/evaluator_query.py +3 -1
- agenta/client/backend/types/evaluator_query_request.py +3 -1
- agenta/client/backend/types/evaluator_request.py +3 -1
- agenta/client/backend/types/evaluator_response.py +3 -1
- agenta/client/backend/types/evaluators_response.py +3 -1
- agenta/client/backend/types/exception_dto.py +3 -1
- agenta/client/backend/types/extended_o_tel_tracing_response.py +3 -1
- agenta/client/backend/types/get_config_response.py +3 -1
- agenta/client/backend/types/header.py +3 -1
- agenta/client/backend/types/http_validation_error.py +3 -1
- agenta/client/backend/types/human_evaluation.py +3 -1
- agenta/client/backend/types/human_evaluation_scenario.py +3 -1
- agenta/client/backend/types/human_evaluation_scenario_input.py +3 -1
- agenta/client/backend/types/human_evaluation_scenario_output.py +3 -1
- agenta/client/backend/types/invite_request.py +3 -1
- agenta/client/backend/types/legacy_analytics_response.py +3 -1
- agenta/client/backend/types/legacy_data_point.py +3 -1
- agenta/client/backend/types/legacy_evaluator.py +3 -1
- agenta/client/backend/types/legacy_scope_request.py +3 -1
- agenta/client/backend/types/legacy_scopes_response.py +3 -1
- agenta/client/backend/types/legacy_subscription_request.py +3 -1
- agenta/client/backend/types/legacy_user_request.py +3 -1
- agenta/client/backend/types/legacy_user_response.py +3 -1
- agenta/client/backend/types/lifecycle_dto.py +3 -1
- agenta/client/backend/types/link_dto.py +3 -1
- agenta/client/backend/types/list_api_keys_response.py +3 -1
- agenta/client/backend/types/llm_run_rate_limit.py +3 -1
- agenta/client/backend/types/meta_request.py +3 -1
- agenta/client/backend/types/metrics_dto.py +3 -1
- agenta/client/backend/types/new_testset.py +3 -1
- agenta/client/backend/types/node_dto.py +3 -1
- agenta/client/backend/types/o_tel_context_dto.py +3 -1
- agenta/client/backend/types/o_tel_event.py +6 -4
- agenta/client/backend/types/o_tel_event_dto.py +3 -1
- agenta/client/backend/types/o_tel_extra_dto.py +3 -1
- agenta/client/backend/types/o_tel_flat_span.py +6 -4
- agenta/client/backend/types/o_tel_link.py +6 -4
- agenta/client/backend/types/o_tel_link_dto.py +3 -1
- agenta/client/backend/types/o_tel_links_response.py +3 -1
- agenta/client/backend/types/o_tel_span.py +1 -1
- agenta/client/backend/types/o_tel_span_dto.py +3 -1
- agenta/client/backend/types/o_tel_spans_tree.py +3 -1
- agenta/client/backend/types/o_tel_tracing_data_response.py +3 -1
- agenta/client/backend/types/o_tel_tracing_request.py +3 -1
- agenta/client/backend/types/o_tel_tracing_response.py +3 -1
- agenta/client/backend/types/organization.py +3 -1
- agenta/client/backend/types/organization_details.py +3 -1
- agenta/client/backend/types/organization_membership_request.py +3 -1
- agenta/client/backend/types/organization_output.py +3 -1
- agenta/client/backend/types/organization_request.py +3 -1
- agenta/client/backend/types/parent_dto.py +3 -1
- agenta/client/backend/types/project_membership_request.py +3 -1
- agenta/client/backend/types/project_request.py +3 -1
- agenta/client/backend/types/project_scope.py +3 -1
- agenta/client/backend/types/projects_response.py +3 -1
- agenta/client/backend/types/reference.py +6 -4
- agenta/client/backend/types/reference_dto.py +3 -1
- agenta/client/backend/types/reference_request_model.py +3 -1
- agenta/client/backend/types/result.py +3 -1
- agenta/client/backend/types/root_dto.py +3 -1
- agenta/client/backend/types/scopes_response_model.py +3 -1
- agenta/client/backend/types/secret_dto.py +3 -1
- agenta/client/backend/types/secret_response_dto.py +3 -1
- agenta/client/backend/types/simple_evaluation_output.py +3 -1
- agenta/client/backend/types/span_dto.py +6 -4
- agenta/client/backend/types/standard_provider_dto.py +3 -1
- agenta/client/backend/types/standard_provider_settings_dto.py +3 -1
- agenta/client/backend/types/status_dto.py +3 -1
- agenta/client/backend/types/tags_request.py +3 -1
- agenta/client/backend/types/testcase_response.py +6 -4
- agenta/client/backend/types/testset.py +6 -4
- agenta/client/backend/types/{test_set_output_response.py → testset_output_response.py} +4 -2
- agenta/client/backend/types/testset_request.py +3 -1
- agenta/client/backend/types/testset_response.py +3 -1
- agenta/client/backend/types/{test_set_simple_response.py → testset_simple_response.py} +4 -2
- agenta/client/backend/types/testsets_response.py +3 -1
- agenta/client/backend/types/time_dto.py +3 -1
- agenta/client/backend/types/tree_dto.py +3 -1
- agenta/client/backend/types/update_app_output.py +3 -1
- agenta/client/backend/types/user_request.py +3 -1
- agenta/client/backend/types/validation_error.py +3 -1
- agenta/client/backend/types/workflow_artifact.py +6 -4
- agenta/client/backend/types/workflow_data.py +3 -1
- agenta/client/backend/types/workflow_flags.py +3 -1
- agenta/client/backend/types/workflow_request.py +3 -1
- agenta/client/backend/types/workflow_response.py +3 -1
- agenta/client/backend/types/workflow_revision.py +6 -4
- agenta/client/backend/types/workflow_revision_request.py +3 -1
- agenta/client/backend/types/workflow_revision_response.py +3 -1
- agenta/client/backend/types/workflow_revisions_response.py +3 -1
- agenta/client/backend/types/workflow_variant.py +6 -4
- agenta/client/backend/types/workflow_variant_request.py +3 -1
- agenta/client/backend/types/workflow_variant_response.py +3 -1
- agenta/client/backend/types/workflow_variants_response.py +3 -1
- agenta/client/backend/types/workflows_response.py +3 -1
- agenta/client/backend/types/workspace.py +3 -1
- agenta/client/backend/types/workspace_member_response.py +3 -1
- agenta/client/backend/types/workspace_membership_request.py +3 -1
- agenta/client/backend/types/workspace_permission.py +3 -1
- agenta/client/backend/types/workspace_request.py +3 -1
- agenta/client/backend/types/workspace_response.py +3 -1
- agenta/client/backend/workspace/client.py +2 -2
- agenta/client/client.py +102 -88
- agenta/sdk/__init__.py +52 -3
- agenta/sdk/agenta_init.py +43 -16
- agenta/sdk/assets.py +22 -15
- agenta/sdk/context/serving.py +20 -8
- agenta/sdk/context/tracing.py +40 -22
- agenta/sdk/contexts/__init__.py +0 -0
- agenta/sdk/contexts/routing.py +38 -0
- agenta/sdk/contexts/running.py +57 -0
- agenta/sdk/contexts/tracing.py +86 -0
- agenta/sdk/decorators/__init__.py +1 -0
- agenta/sdk/decorators/routing.py +284 -0
- agenta/sdk/decorators/running.py +692 -98
- agenta/sdk/decorators/serving.py +20 -21
- agenta/sdk/decorators/tracing.py +176 -131
- agenta/sdk/engines/__init__.py +0 -0
- agenta/sdk/engines/running/__init__.py +0 -0
- agenta/sdk/engines/running/utils.py +17 -0
- agenta/sdk/engines/tracing/__init__.py +1 -0
- agenta/sdk/engines/tracing/attributes.py +185 -0
- agenta/sdk/engines/tracing/conventions.py +49 -0
- agenta/sdk/engines/tracing/exporters.py +130 -0
- agenta/sdk/engines/tracing/inline.py +1154 -0
- agenta/sdk/engines/tracing/processors.py +190 -0
- agenta/sdk/engines/tracing/propagation.py +102 -0
- agenta/sdk/engines/tracing/spans.py +136 -0
- agenta/sdk/engines/tracing/tracing.py +324 -0
- agenta/sdk/evaluations/__init__.py +2 -0
- agenta/sdk/evaluations/metrics.py +37 -0
- agenta/sdk/evaluations/preview/__init__.py +0 -0
- agenta/sdk/evaluations/preview/evaluate.py +765 -0
- agenta/sdk/evaluations/preview/utils.py +861 -0
- agenta/sdk/evaluations/results.py +66 -0
- agenta/sdk/evaluations/runs.py +153 -0
- agenta/sdk/evaluations/scenarios.py +48 -0
- agenta/sdk/litellm/litellm.py +12 -0
- agenta/sdk/litellm/mockllm.py +6 -8
- agenta/sdk/litellm/mocks/__init__.py +5 -5
- agenta/sdk/managers/applications.py +304 -0
- agenta/sdk/managers/config.py +2 -2
- agenta/sdk/managers/evaluations.py +0 -0
- agenta/sdk/managers/evaluators.py +303 -0
- agenta/sdk/managers/secrets.py +161 -24
- agenta/sdk/managers/shared.py +3 -1
- agenta/sdk/managers/testsets.py +441 -0
- agenta/sdk/managers/vault.py +3 -3
- agenta/sdk/middleware/auth.py +0 -176
- agenta/sdk/middleware/vault.py +203 -8
- agenta/sdk/middlewares/__init__.py +0 -0
- agenta/sdk/middlewares/routing/__init__.py +0 -0
- agenta/sdk/middlewares/routing/auth.py +263 -0
- agenta/sdk/middlewares/routing/cors.py +30 -0
- agenta/sdk/middlewares/routing/otel.py +29 -0
- agenta/sdk/middlewares/running/__init__.py +0 -0
- agenta/sdk/middlewares/running/normalizer.py +321 -0
- agenta/sdk/middlewares/running/resolver.py +161 -0
- agenta/sdk/middlewares/running/vault.py +140 -0
- agenta/sdk/models/__init__.py +0 -0
- agenta/sdk/models/blobs.py +33 -0
- agenta/sdk/models/evaluations.py +119 -0
- agenta/sdk/models/git.py +126 -0
- agenta/sdk/models/shared.py +167 -0
- agenta/sdk/models/testsets.py +163 -0
- agenta/sdk/models/tracing.py +202 -0
- agenta/sdk/models/workflows.py +753 -0
- agenta/sdk/tracing/exporters.py +67 -17
- agenta/sdk/tracing/processors.py +97 -0
- agenta/sdk/tracing/propagation.py +3 -1
- agenta/sdk/tracing/spans.py +4 -0
- agenta/sdk/tracing/tracing.py +13 -13
- agenta/sdk/types.py +211 -17
- agenta/sdk/utils/cache.py +1 -1
- agenta/sdk/utils/client.py +38 -0
- agenta/sdk/utils/helpers.py +13 -12
- agenta/sdk/utils/logging.py +18 -78
- agenta/sdk/utils/references.py +23 -0
- agenta/sdk/workflows/builtin.py +600 -0
- agenta/sdk/workflows/configurations.py +22 -0
- agenta/sdk/workflows/errors.py +292 -0
- agenta/sdk/workflows/handlers.py +1791 -0
- agenta/sdk/workflows/interfaces.py +948 -0
- agenta/sdk/workflows/sandbox.py +118 -0
- agenta/sdk/workflows/utils.py +303 -6
- {agenta-0.57.0.dist-info → agenta-0.63.2.dist-info}/METADATA +33 -30
- agenta-0.63.2.dist-info/RECORD +421 -0
- agenta/sdk/middleware/adapt.py +0 -253
- agenta/sdk/middleware/base.py +0 -40
- agenta/sdk/middleware/flags.py +0 -40
- agenta/sdk/workflows/types.py +0 -472
- agenta-0.57.0.dist-info/RECORD +0 -371
- /agenta/sdk/{workflows → engines/running}/registry.py +0 -0
- {agenta-0.57.0.dist-info → agenta-0.63.2.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
from typing import Union, Text, Dict, Any
|
|
2
|
+
|
|
3
|
+
from RestrictedPython import safe_builtins, compile_restricted, utility_builtins
|
|
4
|
+
from RestrictedPython.Eval import (
|
|
5
|
+
default_guarded_getiter,
|
|
6
|
+
default_guarded_getitem,
|
|
7
|
+
)
|
|
8
|
+
from RestrictedPython.Guards import (
|
|
9
|
+
guarded_iter_unpack_sequence,
|
|
10
|
+
full_write_guard,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def is_import_safe(python_code: Text) -> bool:
|
|
15
|
+
"""Checks if the imports in the python code contains a system-level import.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
python_code (str): The Python code to be executed
|
|
19
|
+
|
|
20
|
+
Returns:
|
|
21
|
+
bool - module is secured or not
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
disallowed_imports = ["os", "subprocess", "threading", "multiprocessing"]
|
|
25
|
+
for import_ in disallowed_imports:
|
|
26
|
+
if import_ in python_code:
|
|
27
|
+
return False
|
|
28
|
+
return True
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def execute_code_safely(
|
|
32
|
+
app_params: Dict[str, Any],
|
|
33
|
+
inputs: Dict[str, Any],
|
|
34
|
+
output: Union[dict, str],
|
|
35
|
+
correct_answer: Any, # for backward compatibility reasons
|
|
36
|
+
code: Text,
|
|
37
|
+
) -> Union[float, None]:
|
|
38
|
+
"""
|
|
39
|
+
Execute the provided Python code safely using RestrictedPython.
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
- app_params (Dict[str, str]): The parameters of the app variant.
|
|
43
|
+
- inputs (dict): Inputs to be used during code execution.
|
|
44
|
+
- output (str): The output of the app variant after being called.
|
|
45
|
+
- correct_answer (str): The correct answer (or target) of the app variant.
|
|
46
|
+
- code (Text): The Python code to be executed.
|
|
47
|
+
- datapoint (Dict[str, str]): The test datapoint.
|
|
48
|
+
|
|
49
|
+
Returns:
|
|
50
|
+
- (float): Result of the execution if successful. Should be between 0 and 1.
|
|
51
|
+
- None if execution fails or result is not a float between 0 and 1.
|
|
52
|
+
"""
|
|
53
|
+
# Define the available built-ins
|
|
54
|
+
local_builtins = safe_builtins.copy()
|
|
55
|
+
|
|
56
|
+
# Add the __import__ built-in function to the local builtins
|
|
57
|
+
local_builtins["__import__"] = __import__
|
|
58
|
+
|
|
59
|
+
# Define supported packages
|
|
60
|
+
allowed_imports = [
|
|
61
|
+
"math",
|
|
62
|
+
"random",
|
|
63
|
+
"datetime",
|
|
64
|
+
"json",
|
|
65
|
+
"requests",
|
|
66
|
+
"typing",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
# Create a dictionary to simulate allowed imports
|
|
70
|
+
allowed_modules = {}
|
|
71
|
+
for package_name in allowed_imports:
|
|
72
|
+
allowed_modules[package_name] = __import__(package_name)
|
|
73
|
+
|
|
74
|
+
# Add the allowed modules to the local built-ins
|
|
75
|
+
local_builtins.update(allowed_modules)
|
|
76
|
+
local_builtins.update(utility_builtins)
|
|
77
|
+
|
|
78
|
+
# Define the environment for the code execution
|
|
79
|
+
environment = {
|
|
80
|
+
"_getiter_": default_guarded_getiter,
|
|
81
|
+
"_getitem_": default_guarded_getitem,
|
|
82
|
+
"_iter_unpack_sequence_": guarded_iter_unpack_sequence,
|
|
83
|
+
"_write_": full_write_guard,
|
|
84
|
+
"__builtins__": local_builtins,
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
# Compile the code in a restricted environment
|
|
88
|
+
byte_code = compile_restricted(code, filename="<inline>", mode="exec")
|
|
89
|
+
|
|
90
|
+
# Call the evaluation function, extract the result if it exists
|
|
91
|
+
# and is a float between 0 and 1
|
|
92
|
+
try:
|
|
93
|
+
# Execute the code
|
|
94
|
+
exec(byte_code, environment)
|
|
95
|
+
|
|
96
|
+
# Call the evaluation function, extract the result
|
|
97
|
+
result = environment["evaluate"](app_params, inputs, output, correct_answer)
|
|
98
|
+
|
|
99
|
+
# Attempt to convert result to float
|
|
100
|
+
if isinstance(result, (float, int, str)):
|
|
101
|
+
try:
|
|
102
|
+
result = float(result)
|
|
103
|
+
except ValueError as e:
|
|
104
|
+
raise ValueError(f"Result cannot be converted to float: {e}")
|
|
105
|
+
|
|
106
|
+
if not isinstance(result, float):
|
|
107
|
+
raise TypeError(f"Result is not a float after conversion: {type(result)}")
|
|
108
|
+
|
|
109
|
+
return result
|
|
110
|
+
|
|
111
|
+
except KeyError as e:
|
|
112
|
+
raise KeyError(f"Missing expected key in environment: {e}")
|
|
113
|
+
|
|
114
|
+
except SyntaxError as e:
|
|
115
|
+
raise SyntaxError(f"Syntax error in provided code: {e}")
|
|
116
|
+
|
|
117
|
+
except Exception as e:
|
|
118
|
+
raise RuntimeError(f"Error during code execution: {e}")
|
agenta/sdk/workflows/utils.py
CHANGED
|
@@ -1,17 +1,314 @@
|
|
|
1
|
-
|
|
1
|
+
# /agenta/sdk/workflows/utils.py
|
|
2
2
|
|
|
3
|
+
from typing import Optional, Tuple, Callable
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
from agenta.sdk.models.workflows import WorkflowServiceInterface
|
|
6
|
+
|
|
7
|
+
from agenta.sdk.workflows.handlers import (
|
|
8
|
+
echo_v0,
|
|
9
|
+
auto_exact_match_v0,
|
|
10
|
+
auto_regex_test_v0,
|
|
11
|
+
field_match_test_v0,
|
|
12
|
+
auto_webhook_test_v0,
|
|
13
|
+
auto_custom_code_run_v0,
|
|
14
|
+
auto_ai_critique_v0,
|
|
15
|
+
auto_starts_with_v0,
|
|
16
|
+
auto_ends_with_v0,
|
|
17
|
+
auto_contains_v0,
|
|
18
|
+
auto_contains_any_v0,
|
|
19
|
+
auto_contains_all_v0,
|
|
20
|
+
auto_contains_json_v0,
|
|
21
|
+
auto_json_diff_v0,
|
|
22
|
+
auto_levenshtein_distance_v0,
|
|
23
|
+
auto_similarity_match_v0,
|
|
24
|
+
auto_semantic_similarity_v0,
|
|
25
|
+
completion_v0,
|
|
26
|
+
chat_v0,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
from agenta.sdk.workflows.interfaces import (
|
|
30
|
+
echo_v0_interface,
|
|
31
|
+
auto_exact_match_v0_interface,
|
|
32
|
+
auto_regex_test_v0_interface,
|
|
33
|
+
field_match_test_v0_interface,
|
|
34
|
+
auto_webhook_test_v0_interface,
|
|
35
|
+
auto_custom_code_run_v0_interface,
|
|
36
|
+
auto_ai_critique_v0_interface,
|
|
37
|
+
auto_starts_with_v0_interface,
|
|
38
|
+
auto_ends_with_v0_interface,
|
|
39
|
+
auto_contains_v0_interface,
|
|
40
|
+
auto_contains_any_v0_interface,
|
|
41
|
+
auto_contains_all_v0_interface,
|
|
42
|
+
auto_contains_json_v0_interface,
|
|
43
|
+
auto_json_diff_v0_interface,
|
|
44
|
+
auto_levenshtein_distance_v0_interface,
|
|
45
|
+
auto_similarity_match_v0_interface,
|
|
46
|
+
auto_semantic_similarity_v0_interface,
|
|
47
|
+
completion_v0_interface,
|
|
48
|
+
chat_v0_interface,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
from agenta.sdk.workflows.configurations import (
|
|
53
|
+
echo_v0_configuration,
|
|
54
|
+
auto_exact_match_v0_configuration,
|
|
55
|
+
auto_regex_test_v0_configuration,
|
|
56
|
+
field_match_test_v0_configuration,
|
|
57
|
+
auto_webhook_test_v0_configuration,
|
|
58
|
+
auto_custom_code_run_v0_configuration,
|
|
59
|
+
auto_ai_critique_v0_configuration,
|
|
60
|
+
auto_starts_with_v0_configuration,
|
|
61
|
+
auto_ends_with_v0_configuration,
|
|
62
|
+
auto_contains_v0_configuration,
|
|
63
|
+
auto_contains_any_v0_configuration,
|
|
64
|
+
auto_contains_all_v0_configuration,
|
|
65
|
+
auto_contains_json_v0_configuration,
|
|
66
|
+
auto_json_diff_v0_configuration,
|
|
67
|
+
auto_levenshtein_distance_v0_configuration,
|
|
68
|
+
auto_similarity_match_v0_configuration,
|
|
69
|
+
auto_semantic_similarity_v0_configuration,
|
|
70
|
+
completion_v0_configuration,
|
|
71
|
+
chat_v0_configuration,
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
INTERFACE_REGISTRY: dict = dict(
|
|
75
|
+
agenta={
|
|
76
|
+
"built-in": dict(
|
|
77
|
+
echo=dict(v0=echo_v0_interface),
|
|
78
|
+
auto_exact_match=dict(v0=auto_exact_match_v0_interface),
|
|
79
|
+
auto_regex_test=dict(v0=auto_regex_test_v0_interface),
|
|
80
|
+
field_match_test=dict(v0=field_match_test_v0_interface),
|
|
81
|
+
auto_webhook_test=dict(v0=auto_webhook_test_v0_interface),
|
|
82
|
+
auto_custom_code_run=dict(v0=auto_custom_code_run_v0_interface),
|
|
83
|
+
auto_ai_critique=dict(v0=auto_ai_critique_v0_interface),
|
|
84
|
+
auto_starts_with=dict(v0=auto_starts_with_v0_interface),
|
|
85
|
+
auto_ends_with=dict(v0=auto_ends_with_v0_interface),
|
|
86
|
+
auto_contains=dict(v0=auto_contains_v0_interface),
|
|
87
|
+
auto_contains_any=dict(v0=auto_contains_any_v0_interface),
|
|
88
|
+
auto_contains_all=dict(v0=auto_contains_all_v0_interface),
|
|
89
|
+
auto_contains_json=dict(v0=auto_contains_json_v0_interface),
|
|
90
|
+
auto_json_diff=dict(v0=auto_json_diff_v0_interface),
|
|
91
|
+
auto_levenshtein_distance=dict(v0=auto_levenshtein_distance_v0_interface),
|
|
92
|
+
auto_similarity_match=dict(v0=auto_similarity_match_v0_interface),
|
|
93
|
+
auto_semantic_similarity=dict(v0=auto_semantic_similarity_v0_interface),
|
|
94
|
+
completion=dict(v0=completion_v0_interface),
|
|
95
|
+
chat=dict(v0=chat_v0_interface),
|
|
96
|
+
),
|
|
97
|
+
},
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
CONFIGURATION_REGISTRY: dict = dict(
|
|
101
|
+
agenta={
|
|
102
|
+
"built-in": dict(
|
|
103
|
+
echo=dict(v0=echo_v0_configuration),
|
|
104
|
+
auto_exact_match=dict(v0=auto_exact_match_v0_configuration),
|
|
105
|
+
auto_regex_test=dict(v0=auto_regex_test_v0_configuration),
|
|
106
|
+
field_match_test=dict(v0=field_match_test_v0_configuration),
|
|
107
|
+
auto_webhook_test=dict(v0=auto_webhook_test_v0_configuration),
|
|
108
|
+
auto_custom_code_run=dict(v0=auto_custom_code_run_v0_configuration),
|
|
109
|
+
auto_ai_critique=dict(v0=auto_ai_critique_v0_configuration),
|
|
110
|
+
auto_starts_with=dict(v0=auto_starts_with_v0_configuration),
|
|
111
|
+
auto_ends_with=dict(v0=auto_ends_with_v0_configuration),
|
|
112
|
+
auto_contains=dict(v0=auto_contains_v0_configuration),
|
|
113
|
+
auto_contains_any=dict(v0=auto_contains_any_v0_configuration),
|
|
114
|
+
auto_contains_all=dict(v0=auto_contains_all_v0_configuration),
|
|
115
|
+
auto_contains_json=dict(v0=auto_contains_json_v0_configuration),
|
|
116
|
+
auto_json_diff=dict(v0=auto_json_diff_v0_configuration),
|
|
117
|
+
auto_levenshtein_distance=dict(
|
|
118
|
+
v0=auto_levenshtein_distance_v0_configuration
|
|
119
|
+
),
|
|
120
|
+
auto_similarity_match=dict(v0=auto_similarity_match_v0_configuration),
|
|
121
|
+
auto_semantic_similarity=dict(v0=auto_semantic_similarity_v0_configuration),
|
|
122
|
+
completion=dict(v0=completion_v0_configuration),
|
|
123
|
+
chat=dict(v0=chat_v0_configuration),
|
|
124
|
+
),
|
|
125
|
+
},
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
# Global registry for workflow handlers organized by URI structure.
|
|
129
|
+
#
|
|
130
|
+
# URI Format: provider:kind:key:version
|
|
131
|
+
#
|
|
132
|
+
# Structure:
|
|
133
|
+
# HANDLER_REGISTRY[provider][kind][key][version] = handler_callable
|
|
134
|
+
#
|
|
135
|
+
# Components:
|
|
136
|
+
# - provider: The source/namespace of the handler (e.g., "agenta", "user")
|
|
137
|
+
# - kind: The category/type of handler (e.g., "built-in", "custom")
|
|
138
|
+
# - key: The unique identifier for the handler (e.g., "echo", "auto_exact_match", "module.function_name")
|
|
139
|
+
# - version: The version identifier (e.g., "v0", "v1", "latest")
|
|
140
|
+
#
|
|
141
|
+
# Examples:
|
|
142
|
+
# - URI: "agenta:built-in:echo:v0"
|
|
143
|
+
# Access: HANDLER_REGISTRY["agenta"]["built-in"]["echo"]["v0"]
|
|
144
|
+
#
|
|
145
|
+
# - URI: "user:custom:mymodule.my_workflow:latest"
|
|
146
|
+
# Access: HANDLER_REGISTRY["user"]["custom"]["mymodule.my_workflow"]["latest"]
|
|
147
|
+
#
|
|
148
|
+
# Usage:
|
|
149
|
+
# - register_handler(fn, uri) - Registers a new handler with the given URI
|
|
150
|
+
# - retrieve_handler(uri) - Retrieves a handler by its URI
|
|
151
|
+
# - retrieve_interface(uri) - Retrieves the interface configuration for a handler
|
|
152
|
+
# - retrieve_configuration(uri) - Retrieves default parameters for a handler
|
|
153
|
+
#
|
|
154
|
+
# The registry supports automatic URI generation for user-defined workflows:
|
|
155
|
+
# If no URI is provided, register_handler() generates: "user:custom:{module}.{name}:latest"
|
|
156
|
+
HANDLER_REGISTRY: dict = dict(
|
|
157
|
+
agenta={
|
|
158
|
+
"built-in": dict(
|
|
159
|
+
echo=dict(v0=echo_v0),
|
|
160
|
+
auto_exact_match=dict(v0=auto_exact_match_v0),
|
|
161
|
+
auto_regex_test=dict(v0=auto_regex_test_v0),
|
|
162
|
+
field_match_test=dict(v0=field_match_test_v0),
|
|
163
|
+
auto_webhook_test=dict(v0=auto_webhook_test_v0),
|
|
164
|
+
auto_custom_code_run=dict(v0=auto_custom_code_run_v0),
|
|
165
|
+
auto_ai_critique=dict(v0=auto_ai_critique_v0),
|
|
166
|
+
auto_starts_with=dict(v0=auto_starts_with_v0),
|
|
167
|
+
auto_ends_with=dict(v0=auto_ends_with_v0),
|
|
168
|
+
auto_contains=dict(v0=auto_contains_v0),
|
|
169
|
+
auto_contains_any=dict(v0=auto_contains_any_v0),
|
|
170
|
+
auto_contains_all=dict(v0=auto_contains_all_v0),
|
|
171
|
+
auto_contains_json=dict(v0=auto_contains_json_v0),
|
|
172
|
+
auto_json_diff=dict(v0=auto_json_diff_v0),
|
|
173
|
+
auto_levenshtein_distance=dict(v0=auto_levenshtein_distance_v0),
|
|
174
|
+
auto_similarity_match=dict(v0=auto_similarity_match_v0),
|
|
175
|
+
auto_semantic_similarity=dict(v0=auto_semantic_similarity_v0),
|
|
176
|
+
completion=dict(v0=completion_v0),
|
|
177
|
+
chat=dict(v0=chat_v0),
|
|
178
|
+
),
|
|
179
|
+
},
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
def parse_uri(
|
|
5
184
|
uri: str,
|
|
6
185
|
) -> Tuple[Optional[str], Optional[str], Optional[str], Optional[str]]:
|
|
7
186
|
if not uri or not uri.strip():
|
|
8
187
|
return None, None, None, None
|
|
9
188
|
|
|
10
|
-
# uri ~ [<provider>|empty]:<kind>:<key>:[<version>|'latest'|empty]
|
|
11
|
-
|
|
12
189
|
parts = uri.split(":")
|
|
13
190
|
|
|
14
|
-
|
|
191
|
+
# 1 → key
|
|
192
|
+
# 2 → kind:key
|
|
193
|
+
# 3 → provider:kind:key
|
|
194
|
+
# 4 → provider:kind:key:version
|
|
195
|
+
if len(parts) == 1:
|
|
196
|
+
provider, kind, key, version = "agenta", "built-in", parts[0], "latest"
|
|
197
|
+
elif len(parts) == 2:
|
|
198
|
+
provider, kind, key, version = "agenta", parts[0], parts[1], "latest"
|
|
199
|
+
elif len(parts) == 3:
|
|
200
|
+
provider, kind, key, version = parts[0], parts[1], parts[2], "latest"
|
|
201
|
+
elif len(parts) == 4:
|
|
202
|
+
provider, kind, key, version = parts[0], parts[1], parts[2], parts[3]
|
|
203
|
+
else:
|
|
15
204
|
return None, None, None, None
|
|
16
205
|
|
|
17
|
-
return
|
|
206
|
+
return provider, kind, key, version
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def register_handler(fn: Callable, uri: Optional[str] = None) -> str:
|
|
210
|
+
"""Register a handler function in the global handler registry.
|
|
211
|
+
|
|
212
|
+
Stores a callable in the HANDLER_REGISTRY with a hierarchical URI structure
|
|
213
|
+
of provider:kind:key:version. If no URI is provided, generates one automatically
|
|
214
|
+
using the function's module and name (user:custom:module.name:latest).
|
|
215
|
+
|
|
216
|
+
The URI is parsed into components and used to create nested dictionary entries
|
|
217
|
+
in the registry for later retrieval by retrieve_handler().
|
|
218
|
+
|
|
219
|
+
Args:
|
|
220
|
+
fn: The callable function to register
|
|
221
|
+
uri: Optional URI string in format "provider:kind:key:version".
|
|
222
|
+
If None, auto-generates "user:custom:{module}.{name}:latest"
|
|
223
|
+
|
|
224
|
+
Returns:
|
|
225
|
+
The URI string used for registration
|
|
226
|
+
|
|
227
|
+
Raises:
|
|
228
|
+
ValueError: If the URI is invalid or missing required components
|
|
229
|
+
|
|
230
|
+
Example:
|
|
231
|
+
>>> def my_workflow(): pass
|
|
232
|
+
>>> uri = register_handler(my_workflow, "user:custom:my_workflow:v1")
|
|
233
|
+
>>> uri
|
|
234
|
+
'user:custom:my_workflow:v1'
|
|
235
|
+
"""
|
|
236
|
+
if not uri:
|
|
237
|
+
key = f"{fn.__module__}.{fn.__name__}"
|
|
238
|
+
uri = f"user:custom:{key}:latest"
|
|
239
|
+
|
|
240
|
+
provider, kind, key, version = parse_uri(uri) # type: ignore
|
|
241
|
+
|
|
242
|
+
if not provider or not kind or not key or not version:
|
|
243
|
+
raise ValueError(f"Invalid URI: {uri}")
|
|
244
|
+
|
|
245
|
+
HANDLER_REGISTRY.setdefault(provider, {}).setdefault(kind, {}).setdefault(
|
|
246
|
+
key, {}
|
|
247
|
+
).setdefault(version, fn)
|
|
248
|
+
|
|
249
|
+
return uri
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def _get_with_latest(
|
|
253
|
+
registry: dict,
|
|
254
|
+
provider: Optional[str] = None,
|
|
255
|
+
kind: Optional[str] = None,
|
|
256
|
+
key: Optional[str] = None,
|
|
257
|
+
version: Optional[str] = None,
|
|
258
|
+
):
|
|
259
|
+
kind_dict = registry.get(provider, {}).get(kind, {}).get(key, {})
|
|
260
|
+
|
|
261
|
+
if not isinstance(kind_dict, dict) or not kind_dict:
|
|
262
|
+
return None
|
|
263
|
+
|
|
264
|
+
if version == "latest":
|
|
265
|
+
# if "latest" explicitly exists, prefer it
|
|
266
|
+
if "latest" in kind_dict:
|
|
267
|
+
return kind_dict.get("latest")
|
|
268
|
+
|
|
269
|
+
# collect keys of the form vN
|
|
270
|
+
candidates = [
|
|
271
|
+
(int(v[1:]), v)
|
|
272
|
+
for v in kind_dict.keys()
|
|
273
|
+
if isinstance(v, str) and v.startswith("v") and v[1:].isdigit()
|
|
274
|
+
]
|
|
275
|
+
if not candidates:
|
|
276
|
+
return None
|
|
277
|
+
# get the highest int N
|
|
278
|
+
_, best_key = max(candidates, key=lambda x: x[0])
|
|
279
|
+
return kind_dict.get(best_key)
|
|
280
|
+
|
|
281
|
+
return kind_dict.get(version)
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
def retrieve_handler(uri: Optional[str] = None) -> Optional[Callable]:
|
|
285
|
+
if not uri:
|
|
286
|
+
return None
|
|
287
|
+
provider, kind, key, version = parse_uri(uri)
|
|
288
|
+
|
|
289
|
+
return _get_with_latest(HANDLER_REGISTRY, provider, kind, key, version)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
def retrieve_interface(uri: Optional[str] = None) -> Optional[WorkflowServiceInterface]:
|
|
293
|
+
if not uri:
|
|
294
|
+
return None
|
|
295
|
+
provider, kind, key, version = parse_uri(uri)
|
|
296
|
+
|
|
297
|
+
return _get_with_latest(INTERFACE_REGISTRY, provider, kind, key, version)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
def retrieve_configuration(uri: Optional[str] = None) -> Optional[dict]:
|
|
301
|
+
if not uri:
|
|
302
|
+
return None
|
|
303
|
+
provider, kind, key, version = parse_uri(uri)
|
|
304
|
+
|
|
305
|
+
return _get_with_latest(CONFIGURATION_REGISTRY, provider, kind, key, version)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
def is_custom_uri(uri: Optional[str] = None) -> bool:
|
|
309
|
+
if not uri:
|
|
310
|
+
return True
|
|
311
|
+
|
|
312
|
+
provider, kind, key, version = parse_uri(uri)
|
|
313
|
+
|
|
314
|
+
return provider == "user" and kind == "custom"
|
|
@@ -1,42 +1,44 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agenta
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.63.2
|
|
4
4
|
Summary: The SDK for agenta is an open-source LLMOps platform.
|
|
5
5
|
Keywords: LLMOps,LLM,evaluation,prompt engineering
|
|
6
6
|
Author: Mahmoud Mabrouk
|
|
7
7
|
Author-email: mahmoud@agenta.ai
|
|
8
|
-
Requires-Python: >=3.
|
|
8
|
+
Requires-Python: >=3.11,<4.0
|
|
9
9
|
Classifier: Intended Audience :: Developers
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
14
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
17
|
Classifier: Topic :: Software Development :: Libraries
|
|
19
18
|
Requires-Dist: decorator (>=5.2.1,<6.0.0)
|
|
20
19
|
Requires-Dist: fastapi (>=0.116.0,<0.117.0)
|
|
20
|
+
Requires-Dist: google-auth (>=2.23,<3)
|
|
21
21
|
Requires-Dist: h11 (>=0.16.0,<0.17.0)
|
|
22
22
|
Requires-Dist: httpx (>=0.28.0,<0.29.0)
|
|
23
23
|
Requires-Dist: huggingface-hub (<0.31.0)
|
|
24
24
|
Requires-Dist: importlib-metadata (>=8.0.0,<9.0)
|
|
25
25
|
Requires-Dist: jinja2 (>=3.1.6,<4.0.0)
|
|
26
|
-
Requires-Dist: litellm (==1.
|
|
27
|
-
Requires-Dist: openai (>=1.106.0
|
|
26
|
+
Requires-Dist: litellm (==1.78.7)
|
|
27
|
+
Requires-Dist: openai (>=1.106.0)
|
|
28
28
|
Requires-Dist: opentelemetry-api (>=1.27.0,<2.0.0)
|
|
29
29
|
Requires-Dist: opentelemetry-exporter-otlp-proto-http (>=1.27.0,<2.0.0)
|
|
30
30
|
Requires-Dist: opentelemetry-instrumentation (>=0.56b0)
|
|
31
31
|
Requires-Dist: opentelemetry-sdk (>=1.27.0,<2.0.0)
|
|
32
32
|
Requires-Dist: pydantic (>=2,<3)
|
|
33
33
|
Requires-Dist: python-dotenv (>=1.0.0,<2.0.0)
|
|
34
|
+
Requires-Dist: python-jsonpath (>=2.0.0,<3.0.0)
|
|
34
35
|
Requires-Dist: pyyaml (>=6.0.2,<7.0.0)
|
|
36
|
+
Requires-Dist: restrictedpython (>=8.0,<9.0) ; python_version >= "3.11" and python_version < "3.14"
|
|
35
37
|
Requires-Dist: starlette (>=0.47.0,<0.48.0)
|
|
36
38
|
Requires-Dist: structlog (>=25.2.0,<26.0.0)
|
|
37
39
|
Requires-Dist: tiktoken (==0.11.0)
|
|
38
40
|
Requires-Dist: toml (>=0.10.2,<0.11.0)
|
|
39
|
-
Project-URL: Documentation, https://
|
|
41
|
+
Project-URL: Documentation, https://agenta.ai/docs/
|
|
40
42
|
Project-URL: Homepage, https://agenta.ai
|
|
41
43
|
Project-URL: Repository, https://github.com/agenta-ai/agenta
|
|
42
44
|
Description-Content-Type: text/markdown
|
|
@@ -45,11 +47,12 @@ Description-Content-Type: text/markdown
|
|
|
45
47
|
<p align="center">
|
|
46
48
|
<a href="https://agenta.ai?utm_source=github&utm_medium=referral&utm_campaign=readme">
|
|
47
49
|
<picture >
|
|
48
|
-
<source width="275" media="(prefers-color-scheme: dark)" srcset="https://github.com/
|
|
49
|
-
<source width="275" media="(prefers-color-scheme: light)" srcset="https://github.com/
|
|
50
|
-
<img alt="Shows the logo of agenta" src="https://github.com/
|
|
50
|
+
<source width="275" media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/97e31bfc-b1fc-4d19-b443-5aedf6029017" >
|
|
51
|
+
<source width="275" media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/fdc5f23f-2095-4cfc-9511-14c6851c1262" >
|
|
52
|
+
<img alt="Shows the logo of agenta" src="https://github.com/user-attachments/assets/fdc5f23f-2095-4cfc-9511-14c6851c1262" >
|
|
51
53
|
</picture>
|
|
52
54
|
</a>
|
|
55
|
+
|
|
53
56
|
<div align="center">
|
|
54
57
|
<strong> <h1> The Open-source LLMOps Platform </h1></strong>
|
|
55
58
|
Build reliable LLM applications faster with integrated prompt management, evaluation, and observability.
|
|
@@ -58,9 +61,9 @@ Description-Content-Type: text/markdown
|
|
|
58
61
|
<div align="center" >
|
|
59
62
|
<a href="https://cloud.agenta.ai?utm_source=github&utm_medium=referral&utm_campaign=readme">
|
|
60
63
|
<picture >
|
|
61
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/
|
|
62
|
-
<source media="(prefers-color-scheme: light)" srcset="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/
|
|
63
|
-
<img alt="Shows the logo of agenta" src="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/
|
|
64
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/6fa19a9d-9785-4acf-5d08-e81b1e38b100/large" >
|
|
65
|
+
<source media="(prefers-color-scheme: light)" srcset="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/6fa19a9d-9785-4acf-5d08-e81b1e38b100/large" >
|
|
66
|
+
<img alt="Shows the logo of agenta" src="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/6fa19a9d-9785-4acf-5d08-e81b1e38b100/large" >
|
|
64
67
|
</picture>
|
|
65
68
|
</a>
|
|
66
69
|
</div>
|
|
@@ -69,7 +72,7 @@ Description-Content-Type: text/markdown
|
|
|
69
72
|
---
|
|
70
73
|
|
|
71
74
|
<h3 align="center">
|
|
72
|
-
<a href="https://
|
|
75
|
+
<a href="https://agenta.ai/docs/?utm_source=github&utm_medium=referral&utm_campaign=readme"><b>Documentation</b></a> •
|
|
73
76
|
<a href="https://agenta.ai?utm_source=github&utm_medium=referral&utm_campaign=readme"><b>Website</b></a> •
|
|
74
77
|
<a href="https://cloud.agenta.ai?utm_source=github&utm_medium=referral&utm_campaign=readme"><b>Agenta Cloud</b></a>
|
|
75
78
|
</h3>
|
|
@@ -78,7 +81,7 @@ Description-Content-Type: text/markdown
|
|
|
78
81
|
|
|
79
82
|
<p align="center">
|
|
80
83
|
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT license." />
|
|
81
|
-
<a href="https://
|
|
84
|
+
<a href="https://agenta.ai/docs/?utm_source=github&utm_medium=referral&utm_campaign=readme">
|
|
82
85
|
<img src="https://img.shields.io/badge/Doc-online-green" alt="Doc">
|
|
83
86
|
</a>
|
|
84
87
|
<a href="https://github.com/Agenta-AI/agenta/blob/main/CONTRIBUTING.md">
|
|
@@ -126,20 +129,20 @@ Agenta is a platform for building production-grade LLM applications. It helps **
|
|
|
126
129
|
Collaborate with Subject Matter Experts (SMEs) on prompt engineering and make sure nothing breaks in production.
|
|
127
130
|
|
|
128
131
|
- **Interactive Playground**: Compare prompts side by side against your test cases
|
|
129
|
-
- **Multi-Model Support**: Experiment with 50+ LLM models or [bring-your-own models](https://
|
|
132
|
+
- **Multi-Model Support**: Experiment with 50+ LLM models or [bring-your-own models](https://agenta.ai/docs/prompt-engineering/playground/custom-providers?utm_source=github&utm_medium=referral&utm_campaign=readme)
|
|
130
133
|
- **Version Control**: Version prompts and configurations with branching and environments
|
|
131
|
-
- **Complex Configurations**: Enable SMEs to collaborate on [complex configuration schemas](https://
|
|
134
|
+
- **Complex Configurations**: Enable SMEs to collaborate on [complex configuration schemas](https://agenta.ai/docs/custom-workflows/overview?utm_source=github&utm_medium=referral&utm_campaign=readme) beyond simple prompts
|
|
132
135
|
|
|
133
|
-
[Explore prompt management →](https://
|
|
136
|
+
[Explore prompt management →](https://agenta.ai/docs/prompt-engineering/concepts?utm_source=github&utm_medium=referral&utm_campaign=readme)
|
|
134
137
|
|
|
135
138
|
### 📊 Evaluation & Testing
|
|
136
139
|
Evaluate your LLM applications systematically with both human and automated feedback.
|
|
137
|
-
- **Flexible
|
|
140
|
+
- **Flexible Testsets**: Create testcases from production data, playground experiments, or upload CSVs
|
|
138
141
|
- **Pre-built and Custom Evaluators**: Use LLM-as-judge, one of our 20+ pre-built evaluators, or you custom evaluators
|
|
139
142
|
- **UI and API Access**: Run evaluations via UI (for SMEs) or programmatically (for engineers)
|
|
140
143
|
- **Human Feedback Integration**: Collect and incorporate expert annotations
|
|
141
144
|
|
|
142
|
-
[Explore evaluation frameworks →](https://
|
|
145
|
+
[Explore evaluation frameworks →](https://agenta.ai/docs/evaluation/overview?utm_source=github&utm_medium=referral&utm_campaign=readme)
|
|
143
146
|
|
|
144
147
|
### 📡 Observability & Monitoring
|
|
145
148
|
Get visibility into your LLM applications in production.
|
|
@@ -148,14 +151,14 @@ Get visibility into your LLM applications in production.
|
|
|
148
151
|
- **Open Standards**: OpenTelemetry native tracing compatible with OpenLLMetry, and OpenInference
|
|
149
152
|
- **Integrations**: Comes with pre-built integrations for most models and frameworks
|
|
150
153
|
|
|
151
|
-
[Learn about observability →](https://
|
|
154
|
+
[Learn about observability →](https://agenta.ai/docs/observability/overview?utm_source=github&utm_medium=referral&utm_campaign=readme)
|
|
152
155
|
|
|
153
156
|
## 📸 Screenshots
|
|
154
157
|
|
|
155
|
-
<img alt="Playground" src="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/
|
|
156
|
-
<img alt="Prompt Management" src="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/
|
|
157
|
-
<img alt="Evaluation" src="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/
|
|
158
|
-
<img alt="Observability" src="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/
|
|
158
|
+
<img alt="Playground" src="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/a4f67ac4-1acc-40c6-7a1a-5616eee7bb00/large" />
|
|
159
|
+
<img alt="Prompt Management" src="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/65f697d0-3221-4e3c-7232-f350b1976a00/large" />
|
|
160
|
+
<img alt="Evaluation" src="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/19b5b77e-6945-4419-15b9-cfea197e1300/large" />
|
|
161
|
+
<img alt="Observability" src="https://imagedelivery.net/UNvjPBCIZFONpkVPQTxVuA/efc8a24c-2a2a-427c-f285-7d8b41200700/large" />
|
|
159
162
|
|
|
160
163
|
## 🚀 Getting Started
|
|
161
164
|
|
|
@@ -188,7 +191,7 @@ docker compose -f hosting/docker-compose/oss/docker-compose.gh.yml --env-file ho
|
|
|
188
191
|
|
|
189
192
|
3. Access Agenta at `http://localhost`.
|
|
190
193
|
|
|
191
|
-
For deploying on a remote host, or using different ports refers to our [self-hosting](https://
|
|
194
|
+
For deploying on a remote host, or using different ports refers to our [self-hosting](https://agenta.ai/docs/self-host/quick-start?utm_source=github&utm_medium=referral&utm_campaign=readme) and [remote deployment documentation](https://agenta.ai/docs/self-host/guides/deploy-remotely?utm_source=github&utm_medium=referral&utm_campaign=readme).
|
|
192
195
|
|
|
193
196
|
## 💬 Community
|
|
194
197
|
|
|
@@ -196,8 +199,8 @@ Find help, explore resources, or get involved:
|
|
|
196
199
|
|
|
197
200
|
### 🧰 Support
|
|
198
201
|
|
|
199
|
-
- **📚 [Documentation](https://
|
|
200
|
-
- **📋 [Changelog](https://
|
|
202
|
+
- **📚 [Documentation](https://agenta.ai/docs/?utm_source=github&utm_medium=referral&utm_campaign=readme)** – Full guides and API reference
|
|
203
|
+
- **📋 [Changelog](https://agenta.ai/docs/changelog/main?utm_source=github&utm_medium=referral&utm_campaign=readme)** – Track recent updates
|
|
201
204
|
- **💬 [Slack Community](https://join.slack.com/t/agenta-hq/shared_invite/zt-37pnbp5s6-mbBrPL863d_oLB61GSNFjw)** – Ask questions and get support
|
|
202
205
|
|
|
203
206
|
### 🤝 Contribute
|
|
@@ -206,7 +209,7 @@ We welcome contributions of all kinds — from filing issues and sharing ideas t
|
|
|
206
209
|
|
|
207
210
|
- **🐛 [Report bugs](https://github.com/Agenta-AI/agenta/issues)** – Help us by reporting problems you encounter
|
|
208
211
|
- **💡 [Share ideas and feedback](https://github.com/Agenta-AI/agenta/discussions)** – Suggest features or vote on ideas
|
|
209
|
-
- **🔧 [Contribute to the codebase](https://
|
|
212
|
+
- **🔧 [Contribute to the codebase](https://agenta.ai/docs/misc/contributing/getting-started?utm_source=github&utm_medium=referral&utm_campaign=readme)** – Read the guide and open a pull request
|
|
210
213
|
|
|
211
214
|
## ⭐ Star Agenta
|
|
212
215
|
|
|
@@ -224,7 +227,7 @@ We welcome contributions of all kinds — from filing issues and sharing ideas t
|
|
|
224
227
|
## Contributors ✨
|
|
225
228
|
|
|
226
229
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
227
|
-
[](#contributors-)
|
|
228
231
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
229
232
|
|
|
230
233
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|