@aws/agentcore 0.5.0 → 0.6.0
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.
- package/dist/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +3 -0
- package/dist/assets/evaluators/python-lambda/execution-role-policy.json +10 -0
- package/dist/assets/evaluators/python-lambda/lambda_function.py +19 -0
- package/dist/assets/evaluators/python-lambda/pyproject.toml +15 -0
- package/dist/cli/index.mjs +350 -332
- package/dist/lib/packaging/index.js.map +1 -1
- package/dist/lib/packaging/node.js.map +1 -1
- package/dist/lib/packaging/python.js.map +1 -1
- package/dist/schema/schemas/agent-env.d.ts +3 -2
- package/dist/schema/schemas/agent-env.d.ts.map +1 -1
- package/dist/schema/schemas/agent-env.js +3 -1
- package/dist/schema/schemas/agent-env.js.map +1 -1
- package/dist/schema/schemas/agentcore-project.d.ts +34 -7
- package/dist/schema/schemas/agentcore-project.d.ts.map +1 -1
- package/dist/schema/schemas/agentcore-project.js +10 -0
- package/dist/schema/schemas/agentcore-project.js.map +1 -1
- package/dist/schema/schemas/primitives/evaluator.d.ts +36 -2
- package/dist/schema/schemas/primitives/evaluator.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/evaluator.js +30 -3
- package/dist/schema/schemas/primitives/evaluator.js.map +1 -1
- package/dist/schema/schemas/primitives/index.d.ts +2 -2
- package/dist/schema/schemas/primitives/index.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/index.js +7 -4
- package/dist/schema/schemas/primitives/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -446,6 +446,9 @@ exports[`Assets Directory Snapshots > File listing > should match the expected f
|
|
|
446
446
|
"cdk/tsconfig.json",
|
|
447
447
|
"container/python/Dockerfile",
|
|
448
448
|
"container/python/dockerignore.template",
|
|
449
|
+
"evaluators/python-lambda/execution-role-policy.json",
|
|
450
|
+
"evaluators/python-lambda/lambda_function.py",
|
|
451
|
+
"evaluators/python-lambda/pyproject.toml",
|
|
449
452
|
"mcp/python-lambda/README.md",
|
|
450
453
|
"mcp/python-lambda/handler.py",
|
|
451
454
|
"mcp/python-lambda/pyproject.toml",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from bedrock_agentcore.evaluation.custom_code_based_evaluators import (
|
|
2
|
+
custom_code_based_evaluator,
|
|
3
|
+
EvaluatorInput,
|
|
4
|
+
EvaluatorOutput,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@custom_code_based_evaluator()
|
|
9
|
+
def handler(input: EvaluatorInput, context) -> EvaluatorOutput:
|
|
10
|
+
"""Evaluate agent behavior with custom logic.
|
|
11
|
+
|
|
12
|
+
Args:
|
|
13
|
+
input: Contains evaluation_level, session_spans, target_trace_id, target_span_id
|
|
14
|
+
|
|
15
|
+
Returns:
|
|
16
|
+
EvaluatorOutput with value/label for success, or errorCode/errorMessage for failure.
|
|
17
|
+
"""
|
|
18
|
+
# TODO: Replace with your evaluation logic
|
|
19
|
+
return EvaluatorOutput(value=1.0, label="Pass", explanation="Evaluation passed")
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "{{ Name }}"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "AgentCore Code-Based Evaluator"
|
|
9
|
+
requires-python = ">=3.10"
|
|
10
|
+
dependencies = [
|
|
11
|
+
"bedrock-agentcore>=1.6.0",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
[tool.hatch.build.targets.wheel]
|
|
15
|
+
packages = ["."]
|