agenteval-toolkit 0.1.0__tar.gz
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.
- agenteval_toolkit-0.1.0/CHANGELOG.md +22 -0
- agenteval_toolkit-0.1.0/LICENSE +202 -0
- agenteval_toolkit-0.1.0/MANIFEST.in +8 -0
- agenteval_toolkit-0.1.0/NOTICE +19 -0
- agenteval_toolkit-0.1.0/PKG-INFO +307 -0
- agenteval_toolkit-0.1.0/README.md +262 -0
- agenteval_toolkit-0.1.0/README.zh-CN.md +122 -0
- agenteval_toolkit-0.1.0/agenteval/__init__.py +5 -0
- agenteval_toolkit-0.1.0/agenteval/certification/__init__.py +16 -0
- agenteval_toolkit-0.1.0/agenteval/certification/assess.py +137 -0
- agenteval_toolkit-0.1.0/agenteval/certification/issuer.py +165 -0
- agenteval_toolkit-0.1.0/agenteval/certification/models.py +113 -0
- agenteval_toolkit-0.1.0/agenteval/certification/render.py +100 -0
- agenteval_toolkit-0.1.0/agenteval/certification/signing.py +86 -0
- agenteval_toolkit-0.1.0/agenteval/cli.py +533 -0
- agenteval_toolkit-0.1.0/agenteval/collectors/__init__.py +30 -0
- agenteval_toolkit-0.1.0/agenteval/collectors/kubernetes.py +70 -0
- agenteval_toolkit-0.1.0/agenteval/collectors/normalize.py +247 -0
- agenteval_toolkit-0.1.0/agenteval/config.py +49 -0
- agenteval_toolkit-0.1.0/agenteval/engine/__init__.py +12 -0
- agenteval_toolkit-0.1.0/agenteval/engine/conditions.py +109 -0
- agenteval_toolkit-0.1.0/agenteval/engine/evaluator.py +133 -0
- agenteval_toolkit-0.1.0/agenteval/engine/loader.py +131 -0
- agenteval_toolkit-0.1.0/agenteval/evaluation/__init__.py +17 -0
- agenteval_toolkit-0.1.0/agenteval/evaluation/adapters.py +276 -0
- agenteval_toolkit-0.1.0/agenteval/evaluation/assertions.py +73 -0
- agenteval_toolkit-0.1.0/agenteval/evaluation/judges.py +214 -0
- agenteval_toolkit-0.1.0/agenteval/evaluation/messages.py +56 -0
- agenteval_toolkit-0.1.0/agenteval/evaluation/models.py +174 -0
- agenteval_toolkit-0.1.0/agenteval/evaluation/papers.py +103 -0
- agenteval_toolkit-0.1.0/agenteval/evaluation/report.py +80 -0
- agenteval_toolkit-0.1.0/agenteval/evaluation/runner.py +154 -0
- agenteval_toolkit-0.1.0/agenteval/i18n.py +118 -0
- agenteval_toolkit-0.1.0/agenteval/models.py +136 -0
- agenteval_toolkit-0.1.0/agenteval/reports/__init__.py +86 -0
- agenteval_toolkit-0.1.0/agenteval/reports/templates/certificate.html.j2 +178 -0
- agenteval_toolkit-0.1.0/agenteval/reports/templates/eval_report.html.j2 +191 -0
- agenteval_toolkit-0.1.0/agenteval/reports/templates/report.html.j2 +75 -0
- agenteval_toolkit-0.1.0/agenteval/schema.py +66 -0
- agenteval_toolkit-0.1.0/agenteval/schemas/attestations.schema.json +76 -0
- agenteval_toolkit-0.1.0/agenteval/schemas/exam.schema.json +85 -0
- agenteval_toolkit-0.1.0/agenteval/schemas/pack.schema.json +48 -0
- agenteval_toolkit-0.1.0/agenteval/schemas/policy.schema.json +67 -0
- agenteval_toolkit-0.1.0/agenteval/schemas/rule.schema.json +298 -0
- agenteval_toolkit-0.1.0/agenteval/schemas/system.schema.json +76 -0
- agenteval_toolkit-0.1.0/agenteval/schemas/translations.schema.json +32 -0
- agenteval_toolkit-0.1.0/agenteval_toolkit.egg-info/PKG-INFO +307 -0
- agenteval_toolkit-0.1.0/agenteval_toolkit.egg-info/SOURCES.txt +87 -0
- agenteval_toolkit-0.1.0/agenteval_toolkit.egg-info/dependency_links.txt +1 -0
- agenteval_toolkit-0.1.0/agenteval_toolkit.egg-info/entry_points.txt +2 -0
- agenteval_toolkit-0.1.0/agenteval_toolkit.egg-info/requires.txt +18 -0
- agenteval_toolkit-0.1.0/agenteval_toolkit.egg-info/top_level.txt +1 -0
- agenteval_toolkit-0.1.0/certification/policy.yaml +15 -0
- agenteval_toolkit-0.1.0/certification/systems/northwind-cs-staging.yaml +16 -0
- agenteval_toolkit-0.1.0/certification/systems/northwind-cs.yaml +17 -0
- agenteval_toolkit-0.1.0/docs/certification.md +89 -0
- agenteval_toolkit-0.1.0/docs/exams.md +81 -0
- agenteval_toolkit-0.1.0/docs/rule-schema.md +227 -0
- agenteval_toolkit-0.1.0/examples/agents/demo-good.yaml +41 -0
- agenteval_toolkit-0.1.0/examples/agents/demo-weak.yaml +34 -0
- agenteval_toolkit-0.1.0/examples/agents/openai-compatible.example.yaml +15 -0
- agenteval_toolkit-0.1.0/examples/agents/webhook.example.yaml +21 -0
- agenteval_toolkit-0.1.0/examples/attestations-certification.yaml +16 -0
- agenteval_toolkit-0.1.0/examples/attestations.yaml +19 -0
- agenteval_toolkit-0.1.0/examples/snapshots/sample-cluster.json +323 -0
- agenteval_toolkit-0.1.0/exams/customer-service/cs-ecommerce-v1.yaml +222 -0
- agenteval_toolkit-0.1.0/pyproject.toml +65 -0
- agenteval_toolkit-0.1.0/rules/industry-pci-dss/i18n/zh.yaml +27 -0
- agenteval_toolkit-0.1.0/rules/industry-pci-dss/pack.yaml +9 -0
- agenteval_toolkit-0.1.0/rules/industry-pci-dss/rules.yaml +83 -0
- agenteval_toolkit-0.1.0/rules/us-ca/i18n/zh.yaml +21 -0
- agenteval_toolkit-0.1.0/rules/us-ca/pack.yaml +9 -0
- agenteval_toolkit-0.1.0/rules/us-ca/rules.yaml +72 -0
- agenteval_toolkit-0.1.0/rules/us-federal/governance.yaml +216 -0
- agenteval_toolkit-0.1.0/rules/us-federal/i18n/zh.yaml +107 -0
- agenteval_toolkit-0.1.0/rules/us-federal/pack.yaml +8 -0
- agenteval_toolkit-0.1.0/rules/us-federal/security.yaml +164 -0
- agenteval_toolkit-0.1.0/setup.cfg +4 -0
- agenteval_toolkit-0.1.0/setup.py +31 -0
- agenteval_toolkit-0.1.0/tests/conftest.py +28 -0
- agenteval_toolkit-0.1.0/tests/test_cert.py +161 -0
- agenteval_toolkit-0.1.0/tests/test_cli.py +41 -0
- agenteval_toolkit-0.1.0/tests/test_conditions.py +49 -0
- agenteval_toolkit-0.1.0/tests/test_eval.py +285 -0
- agenteval_toolkit-0.1.0/tests/test_i18n.py +61 -0
- agenteval_toolkit-0.1.0/tests/test_init.py +26 -0
- agenteval_toolkit-0.1.0/tests/test_normalize_and_scan.py +99 -0
- agenteval_toolkit-0.1.0/tests/test_rules.py +53 -0
- agenteval_toolkit-0.1.0/tests/test_schemas.py +52 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
|
|
5
|
+
[Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.1.0] - 2026-10-11
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `agenteval scan` / `snapshot`: Kubernetes and offline-snapshot collection; JSON, SARIF and HTML reports in English and Chinese.
|
|
13
|
+
- Policy-as-code rule engine with JSON Schema validation and a fail-closed condition DSL; automated and attestation rules.
|
|
14
|
+
- Starter rule packs: `us-federal` (national), `us-ca` (regional), `pci-dss` (industry) — all mappings `verified: false`.
|
|
15
|
+
- `agenteval eval`: exam papers with multi-turn scripted cases, tool mocks, assertions, critical vetoes and rubric judging;
|
|
16
|
+
OpenAI-compatible, webhook and demo adapters; heuristic, Anthropic and OpenAI-compatible judges.
|
|
17
|
+
- `cs-ecommerce-v1` customer-service exam paper (10 cases).
|
|
18
|
+
- `agenteval cert`: strict certification gates, Ed25519-signed certificates, HTML/PDF rendering,
|
|
19
|
+
optional verification-URL QR code and status-URL revocation check.
|
|
20
|
+
- JSON Schemas for rules, packs, translations, attestations, exams, systems and policy; `agenteval schemas`.
|
|
21
|
+
- `agenteval init`: copy the bundled starter content into a working directory.
|
|
22
|
+
- Published on PyPI as `agenteval-toolkit` (command and import name `agenteval`), released via Trusted Publishing.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
AgentEval
|
|
2
|
+
Copyright 2026 The AgentEval Authors
|
|
3
|
+
|
|
4
|
+
This product includes software developed by The AgentEval Authors and is
|
|
5
|
+
licensed under the Apache License, Version 2.0 (see LICENSE).
|
|
6
|
+
|
|
7
|
+
Rule packs, exam papers and certification policies in this repository are
|
|
8
|
+
technical starter content. Rule-to-regulation mappings are provided for
|
|
9
|
+
convenience, are marked "verified: false" until reviewed, and do not
|
|
10
|
+
constitute legal advice or a determination of regulatory compliance.
|
|
11
|
+
|
|
12
|
+
Names of frameworks, standards and regulations (including NIST publications,
|
|
13
|
+
PCI DSS, and California statutes) are used nominatively to identify source
|
|
14
|
+
material. PCI DSS is a standard of the PCI Security Standards Council, LLC.
|
|
15
|
+
No endorsement by or affiliation with any standards body or regulator is
|
|
16
|
+
implied.
|
|
17
|
+
|
|
18
|
+
"Northwind Outfitters" and all example organizations, hosts and data in the
|
|
19
|
+
examples/ directory are fictional.
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agenteval-toolkit
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Scan AI infrastructure against policy-as-code rule packs, evaluate AI agents with standard exams, and issue signed certificates when both pass.
|
|
5
|
+
Author: The AgentEval Authors
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/pony360/AgentEval
|
|
8
|
+
Project-URL: Documentation, https://github.com/pony360/AgentEval/tree/main/docs
|
|
9
|
+
Project-URL: Source, https://github.com/pony360/AgentEval
|
|
10
|
+
Project-URL: Issues, https://github.com/pony360/AgentEval/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/pony360/AgentEval/blob/main/CHANGELOG.md
|
|
12
|
+
Keywords: ai-governance,compliance,policy-as-code,llm-evaluation,ai-agents,kubernetes,certification
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: System Administrators
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Security
|
|
23
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
25
|
+
Requires-Python: >=3.11
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
License-File: NOTICE
|
|
29
|
+
Requires-Dist: pydantic>=2.6
|
|
30
|
+
Requires-Dist: PyYAML>=6.0
|
|
31
|
+
Requires-Dist: jsonschema>=4.21
|
|
32
|
+
Requires-Dist: typer>=0.12
|
|
33
|
+
Requires-Dist: Jinja2>=3.1
|
|
34
|
+
Requires-Dist: httpx>=0.27
|
|
35
|
+
Requires-Dist: cryptography>=42
|
|
36
|
+
Requires-Dist: qrcode>=7.4
|
|
37
|
+
Provides-Extra: kubernetes
|
|
38
|
+
Requires-Dist: kubernetes>=29.0; extra == "kubernetes"
|
|
39
|
+
Provides-Extra: pdf
|
|
40
|
+
Requires-Dist: playwright>=1.44; extra == "pdf"
|
|
41
|
+
Provides-Extra: dev
|
|
42
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
43
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
44
|
+
Dynamic: license-file
|
|
45
|
+
|
|
46
|
+
# AgentEval
|
|
47
|
+
|
|
48
|
+
**Scan, evaluate, certify.** AgentEval is an Apache-2.0 command-line toolkit with three jobs:
|
|
49
|
+
|
|
50
|
+
- it **scans** self-hosted AI infrastructure against policy-as-code rule packs,
|
|
51
|
+
- it **evaluates** AI agents with standard exam papers, and
|
|
52
|
+
- it **issues signed certificates** when a system passes both.
|
|
53
|
+
|
|
54
|
+
[English](https://github.com/pony360/AgentEval/blob/main/README.md) · [简体中文](https://github.com/pony360/AgentEval/blob/main/README.zh-CN.md)
|
|
55
|
+
|
|
56
|
+
> **Status: alpha (0.1.0).** The rule packs are starter mappings, and every one is marked `verified: false`.
|
|
57
|
+
> They are a starting point for your own legal and compliance review. They are not legal advice.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Contents
|
|
62
|
+
|
|
63
|
+
- [Why](#why)
|
|
64
|
+
- [Features](#features)
|
|
65
|
+
- [Install](#install)
|
|
66
|
+
- [Quickstart](#quickstart)
|
|
67
|
+
- [Commands and exit codes](#commands-and-exit-codes)
|
|
68
|
+
- [Rule packs](#rule-packs)
|
|
69
|
+
- [Writing rules](#writing-rules)
|
|
70
|
+
- [Evaluating agents](#evaluating-agents)
|
|
71
|
+
- [Certification](#certification)
|
|
72
|
+
- [Configuration](#configuration)
|
|
73
|
+
- [Security model](#security-model)
|
|
74
|
+
- [Project layout](#project-layout)
|
|
75
|
+
- [Roadmap](#roadmap)
|
|
76
|
+
- [Contributing](#contributing)
|
|
77
|
+
- [License](#license)
|
|
78
|
+
|
|
79
|
+
## Why
|
|
80
|
+
|
|
81
|
+
Teams that run their own models on Kubernetes have to answer two separate questions:
|
|
82
|
+
|
|
83
|
+
- *Is the deployment configured the way our policies require?* (auth, TLS, provenance, PII handling, …)
|
|
84
|
+
- *Does the agent built on it do its job safely?* (task completion, accuracy, prompt-injection resistance, …)
|
|
85
|
+
|
|
86
|
+
AgentEval answers both with versioned, reviewable files, rules and exams in YAML, and turns the
|
|
87
|
+
combined result into a certificate that anyone can verify offline.
|
|
88
|
+
|
|
89
|
+
## Features
|
|
90
|
+
|
|
91
|
+
| | |
|
|
92
|
+
|---|---|
|
|
93
|
+
| **Compliance scanning** | Live Kubernetes cluster or offline snapshot. Normalizes vLLM, TGI, Triton, Ollama, llama.cpp, SGLang, Ray Serve and KServe workloads into facts |
|
|
94
|
+
| **Policy-as-code** | YAML rules validated by JSON Schema. A safe, fail-closed condition DSL. Automated and attestation rules |
|
|
95
|
+
| **Tiered rule packs** | National (US federal guidance), regional (California) and industry (PCI DSS) starter packs |
|
|
96
|
+
| **Reports** | JSON, SARIF (GitHub code scanning) and HTML, in English or Simplified Chinese |
|
|
97
|
+
| **Agent evaluation** | Scripted multi-turn exams with tool mocks, deterministic assertions plus rubric judging, and critical-failure vetoes |
|
|
98
|
+
| **Pluggable adapters and judges** | OpenAI-compatible endpoints, generic webhooks and demo agents. Heuristic (offline), Anthropic or OpenAI-compatible judges |
|
|
99
|
+
| **Certification** | Strict gates, Ed25519-signed JSON, HTML/PDF certificates, optional QR verification URL and revocation status check |
|
|
100
|
+
| **CI-friendly** | Stable exit codes. No database or server required |
|
|
101
|
+
|
|
102
|
+
## Install
|
|
103
|
+
|
|
104
|
+
Requires Python 3.11+.
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
pip install "agenteval-toolkit[kubernetes]" # drop [kubernetes] if you only scan snapshots
|
|
108
|
+
agenteval version
|
|
109
|
+
|
|
110
|
+
mkdir my-ai-governance && cd my-ai-governance
|
|
111
|
+
agenteval init # copies the starter rules/, exams/, certification/ and examples/ here
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The PyPI package is named `agenteval-toolkit`. The command is `agenteval` and the import name is `agenteval`.
|
|
115
|
+
Optional extras: `pdf` (certificate PDFs through Playwright/Chromium) and `dev` (pytest and build).
|
|
116
|
+
|
|
117
|
+
The CLI looks for `rules/`, `exams/` and `certification/` in the current directory, and falls back to the
|
|
118
|
+
starter copies bundled with the package. Pass `--rules` or `--exams`, or set the
|
|
119
|
+
[environment variables](#configuration), to use other locations.
|
|
120
|
+
|
|
121
|
+
From source:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
git clone https://github.com/pony360/AgentEval.git && cd AgentEval
|
|
125
|
+
pip install -e ".[dev,kubernetes]"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Quickstart
|
|
129
|
+
|
|
130
|
+
All of these commands run offline against the bundled sample cluster and demo agents.
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# 1. Validate the rule packs
|
|
134
|
+
agenteval rules validate
|
|
135
|
+
# ✓ 23 rules validated
|
|
136
|
+
|
|
137
|
+
# 2. Scan a cluster snapshot (exits 1: there are high/critical findings)
|
|
138
|
+
agenteval scan --snapshot examples/snapshots/sample-cluster.json -f html -o scan.html
|
|
139
|
+
|
|
140
|
+
# 3. Evaluate an agent. On a pass, also write pre-deployment-testing evidence for its asset
|
|
141
|
+
agenteval eval run -p cs-ecommerce-v1 -a examples/agents/demo-good.yaml -f json -o eval.json \
|
|
142
|
+
--attest-asset deployment/ml-prod/llama-chat --attest-output att-eval.yaml
|
|
143
|
+
# → 96.7 (grade A) · cases passed 10/10 · critical failures 0
|
|
144
|
+
|
|
145
|
+
# 4. Re-scan with the human attestations and the evaluation evidence
|
|
146
|
+
agenteval scan --snapshot examples/snapshots/sample-cluster.json \
|
|
147
|
+
--attestations examples/attestations.yaml \
|
|
148
|
+
--attestations examples/attestations-certification.yaml \
|
|
149
|
+
--attestations att-eval.yaml -o scan.json --fail-on none
|
|
150
|
+
|
|
151
|
+
# 5. Certify the registered system, then verify the certificate
|
|
152
|
+
agenteval cert keygen --public-out issuer.pem
|
|
153
|
+
agenteval cert issue -s northwind-cs --scan scan.json --eval eval.json -o certificates/
|
|
154
|
+
agenteval cert verify certificates/AEV-*.json --public-key issuer.pem
|
|
155
|
+
# Signature valid · State: active · DEMO certificate (heuristic judge)
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
To scan a live cluster, run `agenteval scan --source kubernetes [--context ctx] [-n namespace]`.
|
|
159
|
+
It needs read-only access to Deployments, StatefulSets, Services, Ingresses and NetworkPolicies.
|
|
160
|
+
For air-gapped clusters, use `agenteval snapshot` to export a snapshot and scan it elsewhere.
|
|
161
|
+
|
|
162
|
+
Every command accepts `--lang zh` for Chinese output.
|
|
163
|
+
|
|
164
|
+
## Commands and exit codes
|
|
165
|
+
|
|
166
|
+
| Command | Purpose |
|
|
167
|
+
|---|---|
|
|
168
|
+
| `agenteval init [DIR]` | Copy the starter rule packs, exams, policy and examples into a directory |
|
|
169
|
+
| `agenteval scan` | Collect assets and evaluate rules. Writes JSON, SARIF or HTML |
|
|
170
|
+
| `agenteval snapshot` | Export a read-only cluster snapshot |
|
|
171
|
+
| `agenteval rules validate \| list` | Validate rule packs and list rules |
|
|
172
|
+
| `agenteval schemas -o DIR` | Export the JSON Schemas for editors |
|
|
173
|
+
| `agenteval eval papers \| validate \| run` | List or validate exam papers. Run an exam against an agent |
|
|
174
|
+
| `agenteval cert check \| issue \| verify \| keygen` | Certification |
|
|
175
|
+
|
|
176
|
+
| Exit code | Meaning |
|
|
177
|
+
|---|---|
|
|
178
|
+
| `0` | Success, or the gate passed |
|
|
179
|
+
| `1` | The gate did not pass: findings at or above `--fail-on`, the exam was not passed, the system is not eligible, or the certificate is invalid |
|
|
180
|
+
| `2` | Usage or input error, such as an invalid rule file or a missing file |
|
|
181
|
+
|
|
182
|
+
## Rule packs
|
|
183
|
+
|
|
184
|
+
| Pack | Tier | Rules | Covers |
|
|
185
|
+
|---|---|---|---|
|
|
186
|
+
| `us-federal` | national | 16 | NIST AI RMF 1.0, AI 600-1, SP 800-53, SP 800-190, SP 800-218A and OMB M-25-21: authentication, TLS, network policy, image pinning, secrets, provenance, governance attestations |
|
|
187
|
+
| `us-ca` | regional | 3 | Bot disclosure (B&P §17940), CCPA data minimization, AB 2013 training-data transparency |
|
|
188
|
+
| `pci-dss` | industry | 4 | PCI DSS v4.0.1 (Req. 3, 4, 8, 10): no full card numbers in logs, strong cryptography in transit, authentication, and audit logging for AI that handles payment conversations |
|
|
189
|
+
|
|
190
|
+
Rule text is in English, and Simplified Chinese translations are in `rules/*/i18n/zh.yaml`.
|
|
191
|
+
|
|
192
|
+
## Writing rules
|
|
193
|
+
|
|
194
|
+
```yaml
|
|
195
|
+
# yaml-language-server: $schema=../../agenteval/schemas/rule.schema.json
|
|
196
|
+
rules:
|
|
197
|
+
- id: FED-SEC-002
|
|
198
|
+
title: Externally exposed inference endpoints must use TLS
|
|
199
|
+
description: Services exposed through LoadBalancer, NodePort or Ingress must encrypt traffic.
|
|
200
|
+
severity: high
|
|
201
|
+
type: automated
|
|
202
|
+
category: data-protection
|
|
203
|
+
applies_to:
|
|
204
|
+
asset_types: [inference_service]
|
|
205
|
+
when: {field: exposure.public, op: eq, value: true}
|
|
206
|
+
check: {field: tls.enabled, op: eq, value: true}
|
|
207
|
+
remediation: Add a tls section to the Ingress with a trusted certificate (e.g. cert-manager).
|
|
208
|
+
sources:
|
|
209
|
+
- framework: NIST SP 800-53 Rev.5
|
|
210
|
+
reference: SC-8 Transmission Confidentiality and Integrity
|
|
211
|
+
verified: false
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
The full reference is in **[docs/rule-schema.md](https://github.com/pony360/AgentEval/blob/main/docs/rule-schema.md)**. It covers every field,
|
|
215
|
+
the condition operators, the fact catalog, attestations and translations. The schemas are in
|
|
216
|
+
[`agenteval/schemas/`](https://github.com/pony360/AgentEval/blob/main/agenteval/schemas/).
|
|
217
|
+
|
|
218
|
+
## Evaluating agents
|
|
219
|
+
|
|
220
|
+
An exam paper defines weighted dimensions, multi-turn cases, assertions (some of them
|
|
221
|
+
**critical**) and rubric items. The bundled `cs-ecommerce-v1` paper tests an e-commerce
|
|
222
|
+
support agent in 10 cases, from order lookup and returns to PII handling and prompt injection.
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
agenteval eval run -p cs-ecommerce-v1 -a my-agent.yaml --judge anthropic --judge-model <model> \
|
|
226
|
+
--judge-key-env ANTHROPIC_API_KEY -o report.html
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
See **[docs/exams.md](https://github.com/pony360/AgentEval/blob/main/docs/exams.md)** for the paper format, scoring, adapters and judges.
|
|
230
|
+
|
|
231
|
+
## Certification
|
|
232
|
+
|
|
233
|
+
`cert issue` signs a certificate only if all of the following hold:
|
|
234
|
+
|
|
235
|
+
- the security score is **> 90** and the quality score is **> 90**,
|
|
236
|
+
- there are no open high or critical findings,
|
|
237
|
+
- no attestations are pending,
|
|
238
|
+
- there are no critical evaluation failures and no session errors, and
|
|
239
|
+
- the evidence is at most 30 days old.
|
|
240
|
+
|
|
241
|
+
Evaluations scored by the offline heuristic judge get **DEMO** certificates only. Certificates are
|
|
242
|
+
valid for 6 months. See **[docs/certification.md](https://github.com/pony360/AgentEval/blob/main/docs/certification.md)** for the gates, keys,
|
|
243
|
+
the verification URL and status hooks, and how to revoke certificates.
|
|
244
|
+
|
|
245
|
+
## Configuration
|
|
246
|
+
|
|
247
|
+
| Variable | Default | Purpose |
|
|
248
|
+
|---|---|---|
|
|
249
|
+
| `AGENTEVAL_LANG` | `en` | Output language (`en`, `zh`) |
|
|
250
|
+
| `AGENTEVAL_RULES_DIR` | `./rules` | Rules directory |
|
|
251
|
+
| `AGENTEVAL_EXAMS_DIR` | `./exams` | Exam library |
|
|
252
|
+
| `AGENTEVAL_CERT_DIR` | `./certification` | Policy and system registry |
|
|
253
|
+
| `AGENTEVAL_SIGNING_KEY` | `./.agenteval/signing-key.pem` | Ed25519 private key |
|
|
254
|
+
| `AGENTEVAL_VERIFY_URL` | — | Verification URL template with `{id}` |
|
|
255
|
+
| `AGENTEVAL_STATUS_URL` | — | Revocation status URL template with `{id}` |
|
|
256
|
+
| `AGENTEVAL_JUDGE_MODEL`, `AGENTEVAL_JUDGE_BASE_URL` | — | LLM judge settings |
|
|
257
|
+
| `AGENTEVAL_ANNOTATION_PREFIX` | `agenteval.io/` | Kubernetes label and annotation prefix for hints |
|
|
258
|
+
|
|
259
|
+
## Security model
|
|
260
|
+
|
|
261
|
+
- **Read-only.** The scanner only lists and reads Kubernetes objects. It never changes them.
|
|
262
|
+
- **No secret values.** Plaintext-secret detection records environment variable *names* only.
|
|
263
|
+
- **No arbitrary code.** Rule conditions are a fixed DSL, and YAML is loaded with `safe_load`.
|
|
264
|
+
- **Fail-closed.** Missing facts never make a check pass.
|
|
265
|
+
- **Secrets come from the environment.** Agent and judge API keys are read from the variables you name.
|
|
266
|
+
- **Private key.** The signing key is created with mode 0600 and is git-ignored.
|
|
267
|
+
|
|
268
|
+
To report a vulnerability, see [SECURITY.md](https://github.com/pony360/AgentEval/blob/main/SECURITY.md).
|
|
269
|
+
|
|
270
|
+
## Project layout
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
agenteval/ Python package (CLI, engine, collectors, evaluation, certification, schemas)
|
|
274
|
+
rules/ Rule packs (national / regional / industry)
|
|
275
|
+
exams/ Exam papers
|
|
276
|
+
certification/ Certification policy and registered systems
|
|
277
|
+
examples/ Sample snapshot, attestations and agent configs
|
|
278
|
+
docs/ Reference documentation
|
|
279
|
+
tests/ Test suite (pytest)
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
## Roadmap
|
|
283
|
+
|
|
284
|
+
- More collectors (cloud-managed endpoints, model registries, API gateways)
|
|
285
|
+
- More rule packs (EU AI Act, ISO/IEC 42001, HIPAA), contributed with reviewer sign-off
|
|
286
|
+
- More exam papers (IT helpdesk, sales assistant, RAG question answering)
|
|
287
|
+
- A hosted verification and status service reference implementation
|
|
288
|
+
|
|
289
|
+
## Contributing
|
|
290
|
+
|
|
291
|
+
Contributions are welcome, especially rules, exam papers and translations. Read
|
|
292
|
+
[CONTRIBUTING.md](https://github.com/pony360/AgentEval/blob/main/CONTRIBUTING.md) first. Commits must be signed off under the
|
|
293
|
+
[DCO](https://developercertificate.org/) (`git commit -s`). This project follows the
|
|
294
|
+
[Code of Conduct](https://github.com/pony360/AgentEval/blob/main/CODE_OF_CONDUCT.md).
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
pip install -e ".[dev]"
|
|
298
|
+
pytest
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
## License
|
|
302
|
+
|
|
303
|
+
Licensed under the [Apache License, Version 2.0](https://github.com/pony360/AgentEval/blob/main/LICENSE). See [NOTICE](https://github.com/pony360/AgentEval/blob/main/NOTICE).
|
|
304
|
+
|
|
305
|
+
Framework and regulation names, including NIST, PCI DSS and California statutes, are used
|
|
306
|
+
only to identify the source material a rule refers to. Their use does not imply endorsement by,
|
|
307
|
+
or affiliation with, their owners.
|