agent-release-gates 0.1.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.
- agent_release_gates-0.1.0.dist-info/METADATA +201 -0
- agent_release_gates-0.1.0.dist-info/RECORD +74 -0
- agent_release_gates-0.1.0.dist-info/WHEEL +4 -0
- agent_release_gates-0.1.0.dist-info/entry_points.txt +5 -0
- agent_release_gates-0.1.0.dist-info/licenses/LICENSE +21 -0
- internal_ai_agent/__init__.py +5 -0
- internal_ai_agent/agent/__init__.py +1 -0
- internal_ai_agent/agent/schemas.py +47 -0
- internal_ai_agent/agent/tools.py +86 -0
- internal_ai_agent/agent/workflow.py +254 -0
- internal_ai_agent/api/__init__.py +1 -0
- internal_ai_agent/api/main.py +206 -0
- internal_ai_agent/api/schemas.py +50 -0
- internal_ai_agent/cli.py +111 -0
- internal_ai_agent/dashboard/__init__.py +1 -0
- internal_ai_agent/dashboard/data.py +1763 -0
- internal_ai_agent/data/__init__.py +1 -0
- internal_ai_agent/data/synthetic.py +2526 -0
- internal_ai_agent/evals/__init__.py +1 -0
- internal_ai_agent/evals/agent.py +185 -0
- internal_ai_agent/evals/candidate_results_export.py +724 -0
- internal_ai_agent/evals/dataset_profile.py +148 -0
- internal_ai_agent/evals/external_review.py +535 -0
- internal_ai_agent/evals/extraction.py +71 -0
- internal_ai_agent/evals/failure_taxonomy.py +218 -0
- internal_ai_agent/evals/gates.py +264 -0
- internal_ai_agent/evals/goal_conflict_intervention.py +363 -0
- internal_ai_agent/evals/human_calibration.py +617 -0
- internal_ai_agent/evals/incident_replay.py +2288 -0
- internal_ai_agent/evals/intervention_study.py +1175 -0
- internal_ai_agent/evals/memory_context_intervention.py +368 -0
- internal_ai_agent/evals/model_judge.py +319 -0
- internal_ai_agent/evals/model_judge_promotion.py +105 -0
- internal_ai_agent/evals/multi_model_comparison.py +355 -0
- internal_ai_agent/evals/multilingual_safety.py +117 -0
- internal_ai_agent/evals/nist_rmf_mapping.py +160 -0
- internal_ai_agent/evals/public_rag_findings.py +229 -0
- internal_ai_agent/evals/public_rag_model_reranker.py +283 -0
- internal_ai_agent/evals/public_rag_reranker.py +390 -0
- internal_ai_agent/evals/public_rag_reranking.py +214 -0
- internal_ai_agent/evals/rag_grounding_intervention.py +449 -0
- internal_ai_agent/evals/runner.py +767 -0
- internal_ai_agent/evals/safety_classifier.py +1890 -0
- internal_ai_agent/evals/security.py +221 -0
- internal_ai_agent/evals/techqa_public.py +693 -0
- internal_ai_agent/evals/wixqa_public.py +616 -0
- internal_ai_agent/extraction/__init__.py +1 -0
- internal_ai_agent/extraction/schemas.py +28 -0
- internal_ai_agent/extraction/service.py +99 -0
- internal_ai_agent/inspect_suite/__init__.py +8 -0
- internal_ai_agent/inspect_suite/_registry.py +9 -0
- internal_ai_agent/inspect_suite/scorers.py +33 -0
- internal_ai_agent/inspect_suite/scoring.py +40 -0
- internal_ai_agent/inspect_suite/tasks.py +34 -0
- internal_ai_agent/io.py +23 -0
- internal_ai_agent/observability/__init__.py +1 -0
- internal_ai_agent/observability/audit.py +59 -0
- internal_ai_agent/observability/collector.py +246 -0
- internal_ai_agent/observability/collector_deployment.py +70 -0
- internal_ai_agent/observability/collector_smoke.py +143 -0
- internal_ai_agent/observability/otel.py +763 -0
- internal_ai_agent/observability/trace_index.py +192 -0
- internal_ai_agent/providers/__init__.py +1 -0
- internal_ai_agent/providers/agent_runner.py +258 -0
- internal_ai_agent/providers/anthropic_judge.py +223 -0
- internal_ai_agent/providers/openai_embeddings.py +113 -0
- internal_ai_agent/providers/openai_judge.py +214 -0
- internal_ai_agent/rag/__init__.py +1 -0
- internal_ai_agent/rag/baseline.py +1168 -0
- internal_ai_agent/reporting/__init__.py +1 -0
- internal_ai_agent/reporting/public_report.py +2327 -0
- internal_ai_agent/security/__init__.py +1 -0
- internal_ai_agent/security/action_safety.py +89 -0
- internal_ai_agent/security/policy.py +178 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agent-release-gates
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Release-readiness gates for AI agents: replay known incidents, apply policy-as-code gates, and produce ship/warn/block evidence before an agent, prompt, model, or tool-policy change ships.
|
|
5
|
+
Project-URL: Homepage, https://github.com/rosscyking1115/agent-release-gates
|
|
6
|
+
Project-URL: Repository, https://github.com/rosscyking1115/agent-release-gates
|
|
7
|
+
Project-URL: Documentation, https://rosscyking1115.github.io/agent-release-gates/
|
|
8
|
+
Project-URL: Issues, https://github.com/rosscyking1115/agent-release-gates/issues
|
|
9
|
+
Author: rosscyking1115
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agent,ai-safety,evaluation,inspect-ai,llm,red-team,release-gate
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
18
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
19
|
+
Requires-Python: >=3.12
|
|
20
|
+
Requires-Dist: pydantic>=2.8.0
|
|
21
|
+
Provides-Extra: api
|
|
22
|
+
Requires-Dist: fastapi>=0.115.0; extra == 'api'
|
|
23
|
+
Requires-Dist: uvicorn[standard]>=0.30.0; extra == 'api'
|
|
24
|
+
Provides-Extra: dashboard
|
|
25
|
+
Requires-Dist: altair>=6.0.0; extra == 'dashboard'
|
|
26
|
+
Requires-Dist: pandas>=2.2.0; extra == 'dashboard'
|
|
27
|
+
Requires-Dist: streamlit>=1.38.0; extra == 'dashboard'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# Agent Release Safety Gates
|
|
31
|
+
|
|
32
|
+
A public release-readiness system for testing whether AI-agent workflow changes remain grounded, safe, auditable, and useful under retrieval, refusal, prompt-injection, incident replay, and approval-gated tool-use conditions.
|
|
33
|
+
|
|
34
|
+
This project is not a clone, assessment, or reverse-engineering attempt of any company's internal AI system. The controlled operations benchmark is synthetic by design; TechQA and WixQA are used separately as public retrieval-validation datasets.
|
|
35
|
+
|
|
36
|
+
## Live Project
|
|
37
|
+
|
|
38
|
+
- Public project page: https://rosscyking1115.github.io/agent-release-gates/
|
|
39
|
+
- Full evaluation report (HTML): https://rosscyking1115.github.io/agent-release-gates/evaluation_report.html
|
|
40
|
+
- PDF report: https://rosscyking1115.github.io/agent-release-gates/evaluation_report.pdf
|
|
41
|
+
- Interactive dashboard: run locally (see [Run Locally](#run-locally)) or deploy on
|
|
42
|
+
Streamlit Cloud — see the [dashboard deployment guide](docs/dashboard.md). A hosted
|
|
43
|
+
instance must be set to public visibility to be shareable.
|
|
44
|
+
|
|
45
|
+
## What This Project Does
|
|
46
|
+
|
|
47
|
+
The project evaluates an AI-agent workflow across five release questions:
|
|
48
|
+
|
|
49
|
+
- Does the agent retrieve the right evidence and cite it?
|
|
50
|
+
- Does it abstain or refuse when evidence is weak, unsafe, or prompt-injected?
|
|
51
|
+
- Does it require approval before mock side-effecting tool calls?
|
|
52
|
+
- Does it leave enough trace, audit, and monitoring evidence for review?
|
|
53
|
+
- Does it pass incident replay and policy-as-code release gates?
|
|
54
|
+
|
|
55
|
+
The result is a reproducible evaluation artifact rather than a one-off dashboard: deterministic eval runners, generated reports, CI checks, Dockerized local execution, a Streamlit dashboard, and a GitHub Pages report site.
|
|
56
|
+
|
|
57
|
+
## Product Direction
|
|
58
|
+
|
|
59
|
+
**Agent Release Safety Gates** is a release-readiness workflow for replaying known agent incidents, applying policy gates, and producing evidence before a changed agent, prompt, model, or tool policy ships. Its deterministic evaluation benchmark and runners are the evidence layer behind that workflow.
|
|
60
|
+
|
|
61
|
+
The first module is an Incident Replay Suite that turns redacted synthetic incidents into regression fixtures, replay results, release gates, and incident memos.
|
|
62
|
+
|
|
63
|
+
To evaluate an external agent, use the public quickstart:
|
|
64
|
+
|
|
65
|
+
- [Evaluate your agent quickstart](docs/evaluate_your_agent_quickstart.md)
|
|
66
|
+
- [Incident pack schema](docs/incident_pack_schema.md)
|
|
67
|
+
- [Candidate results schema](docs/candidate_results_schema.md)
|
|
68
|
+
|
|
69
|
+
## Current Evidence Snapshot
|
|
70
|
+
|
|
71
|
+
| Area | Current result |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| Controlled benchmark | 358 synthetic golden cases, 60 red-team cases, 180 synthetic operations tickets |
|
|
74
|
+
| Retrieval | 100.00% synthetic retrieval hit rate@3 with local TF-IDF/vector-style retrievers |
|
|
75
|
+
| Public RAG validation | 160 TechQA cases and 80 WixQA cases evaluated separately from the synthetic benchmark |
|
|
76
|
+
| Safety | 90.91% classifier recall, 0 high-severity false negatives in the current challenge set |
|
|
77
|
+
| Agent governance | 100.00% mock side-effect block rate and approval audit rate |
|
|
78
|
+
| Incident replay | 8 seeded synthetic incidents replayed, 100.00% closure rate, 0 replay must-not violations |
|
|
79
|
+
| Intervention study | 3 deterministic safety studies plus public RAG grounding and memory/context studies |
|
|
80
|
+
| Hosted judge calibration | Reviewed OpenAI and Anthropic judge runs with public-safe provider comparison |
|
|
81
|
+
|
|
82
|
+
These results are engineering evidence over controlled benchmarks. They are not claims of real-world production performance.
|
|
83
|
+
|
|
84
|
+
## Key Findings
|
|
85
|
+
|
|
86
|
+
- Safety metrics are not meaningful alone; the lab reports over-review cost, benign auto-blocks, weak-evidence handling, and unsafe misses beside the headline scores.
|
|
87
|
+
- Layered safeguards reduce selected prompt-injection, unsafe-action, and unsafe-request failures in controlled studies while making review burden visible.
|
|
88
|
+
- Public TechQA and WixQA retrieval tracks help test whether the RAG harness works beyond self-contained synthetic data.
|
|
89
|
+
- Public RAG grounding thresholds reduce unsupported answer attempts while making abstention and review cost visible.
|
|
90
|
+
- Memory/context controls reduce polluted-memory following while preserving benign memory usefulness.
|
|
91
|
+
- Goal-conflict arbitration reduces unsafe goal-following while preserving benign task completion.
|
|
92
|
+
- Synthetic operations data remains useful for controlled tests that would be unsafe or impractical to run on confidential real workflows.
|
|
93
|
+
- The next strongest validation step is independent human labelling, followed by broader multi-model comparison.
|
|
94
|
+
|
|
95
|
+
## What Is Included
|
|
96
|
+
|
|
97
|
+
- Evaluation runners for retrieval, extraction, safety classification, controlled-agent behavior, and observability.
|
|
98
|
+
- Baseline-vs-intervention studies for instruction hierarchy, action-risk gates, and safety classifier review policy.
|
|
99
|
+
- Public RAG grounding and abstention intervention study over TechQA and WixQA.
|
|
100
|
+
- Memory/context pollution intervention study covering stale, injected, and cross-user memory.
|
|
101
|
+
- Goal-conflict intervention study covering safety, evidence, privacy, and tool-risk arbitration.
|
|
102
|
+
- Incident replay suite with seeded incidents, replay matrix, release gates, regression fixtures, and generated memos.
|
|
103
|
+
- Public benchmark documentation, dataset boundaries, failure taxonomy, and external-review packet.
|
|
104
|
+
- Candidate-results exporters for generic agent logs and LangChain/LangSmith-style traces.
|
|
105
|
+
- Streamlit dashboard for interactive inspection.
|
|
106
|
+
- GitHub Pages report and PDF for public review.
|
|
107
|
+
- CI, Docker, Docker Compose, linting, tests, and deterministic report regeneration.
|
|
108
|
+
|
|
109
|
+
## Install
|
|
110
|
+
|
|
111
|
+
Once published to PyPI (see [publishing guide](docs/publishing.md)), the core install
|
|
112
|
+
is lean — `pydantic` only — and gives you the CLI, the Inspect suite, the real-agent
|
|
113
|
+
runner, and the scoring logic. The API and dashboard are opt-in extras:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
pip install agent-release-gates # CLI + Inspect suite + scoring
|
|
117
|
+
pip install "agent-release-gates[api]" # + FastAPI evidence service
|
|
118
|
+
pip install "agent-release-gates[dashboard]" # + Streamlit dashboard deps
|
|
119
|
+
pip install agent-release-gates inspect_ai # to run under Inspect
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
agent-safety release-gate # ship / warn / block
|
|
124
|
+
inspect eval agent-release-gates/incident_replay --model openai/gpt-4.1-mini
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
> Not yet on PyPI — build it yourself with `uv build`, or run from source below.
|
|
128
|
+
|
|
129
|
+
## Run Locally
|
|
130
|
+
|
|
131
|
+
```powershell
|
|
132
|
+
uv sync
|
|
133
|
+
uv run python scripts/run_all_evals.py
|
|
134
|
+
# Release gate (installed console command); exits non-zero on a blocking failure.
|
|
135
|
+
uv run agent-safety release-gate --policy config/incident_release_policy.json
|
|
136
|
+
# Interactive dashboard.
|
|
137
|
+
uv run streamlit run streamlit_app.py --server.port 8510
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Open `http://localhost:8510`. Run the API and dashboard together with
|
|
141
|
+
`docker compose up --build`, then open `http://localhost:8510` and
|
|
142
|
+
`http://localhost:8000/health`.
|
|
143
|
+
|
|
144
|
+
Drive a real LLM through the release gate, or run the suite under Inspect:
|
|
145
|
+
|
|
146
|
+
```powershell
|
|
147
|
+
# Any OpenAI-compatible / self-hosted open model endpoint.
|
|
148
|
+
$env:AGENT_RUNNER_API_KEY = "..."
|
|
149
|
+
uv run python scripts/run_real_agent_replay.py
|
|
150
|
+
|
|
151
|
+
# Inspect (UK AISI) -- optional peer dependency.
|
|
152
|
+
uv pip install inspect_ai
|
|
153
|
+
inspect eval agent-release-gates/incident_replay --model openai/gpt-4.1-mini
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Verification
|
|
157
|
+
|
|
158
|
+
```powershell
|
|
159
|
+
uv run ruff check .
|
|
160
|
+
uv run pytest
|
|
161
|
+
uv run python scripts/run_all_evals.py
|
|
162
|
+
uv run agent-safety release-gate --policy config/incident_release_policy.json
|
|
163
|
+
uv run python scripts/build_public_site.py
|
|
164
|
+
docker build -t agent-release-safety-gates:local .
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
CI runs linting, tests, deterministic report checks, local OpenTelemetry smoke testing, Dockerized collector verification, and Docker build verification.
|
|
168
|
+
|
|
169
|
+
## Review Materials
|
|
170
|
+
|
|
171
|
+
- Evaluate your agent quickstart: [docs/evaluate_your_agent_quickstart.md](docs/evaluate_your_agent_quickstart.md)
|
|
172
|
+
- Benchmark card: [docs/benchmark_card.md](docs/benchmark_card.md)
|
|
173
|
+
- Agent safety intervention study: [docs/agent_safety_intervention_study.md](docs/agent_safety_intervention_study.md)
|
|
174
|
+
- RAG grounding intervention report: [reports/rag_grounding_intervention.md](reports/rag_grounding_intervention.md)
|
|
175
|
+
- Memory context intervention report: [reports/memory_context_intervention.md](reports/memory_context_intervention.md)
|
|
176
|
+
- Goal conflict intervention report: [reports/goal_conflict_intervention.md](reports/goal_conflict_intervention.md)
|
|
177
|
+
- Incident pack schema: [docs/incident_pack_schema.md](docs/incident_pack_schema.md)
|
|
178
|
+
- Candidate results schema: [docs/candidate_results_schema.md](docs/candidate_results_schema.md)
|
|
179
|
+
- Incident replay summary: [reports/incident_replay_summary.json](reports/incident_replay_summary.json)
|
|
180
|
+
- Dataset card: [docs/dataset_card.md](docs/dataset_card.md)
|
|
181
|
+
- Failure taxonomy: [docs/failure_taxonomy.md](docs/failure_taxonomy.md)
|
|
182
|
+
- External reviewer handoff pack: [docs/reviewer_handoff_pack.md](docs/reviewer_handoff_pack.md)
|
|
183
|
+
- Technical artifact index: [docs/technical_artifacts.md](docs/technical_artifacts.md)
|
|
184
|
+
- Contribution guide: [CONTRIBUTING.md](CONTRIBUTING.md)
|
|
185
|
+
|
|
186
|
+
## Current Limitations
|
|
187
|
+
|
|
188
|
+
- The controlled benchmark is synthetic and still partly templated.
|
|
189
|
+
- Public TechQA and WixQA tracks use compact samples, not the full upstream datasets.
|
|
190
|
+
- Human-review labels are currently simulated workflow labels; independent reviewer labels are prepared but not yet published.
|
|
191
|
+
- Hosted model evidence includes reviewed judge-calibration runs, not a broad multi-model agent comparison.
|
|
192
|
+
- Provider-backed embedding and reranker adapters are prepared, but credentialed hosted results are not claimed until reviewed.
|
|
193
|
+
|
|
194
|
+
## Roadmap
|
|
195
|
+
|
|
196
|
+
- Collect independent human labels using the prepared review packet.
|
|
197
|
+
- Add reproducible multi-model comparison across hosted and open-source models.
|
|
198
|
+
- Expand public RAG validation beyond the current compact TechQA and WixQA samples.
|
|
199
|
+
- Add more framework-specific candidate-results exporters for common agent runners.
|
|
200
|
+
- Expand the paper-style intervention report with external reviewer disagreement analysis.
|
|
201
|
+
- Invite external review through issues and contribution guidelines.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
internal_ai_agent/__init__.py,sha256=5pj6HrvaI6zBb8hDTL-EAC_pcIfa4oInCmxdEdOQ5UY,84
|
|
2
|
+
internal_ai_agent/cli.py,sha256=62KofB0d7ZWpgfmab-zgOAWk1AEPIAURXe80AP45NDo,3983
|
|
3
|
+
internal_ai_agent/io.py,sha256=ubw1DH5DjpEAmgtNPDAN9f6dD1vDJW-D_Rf2g-Tp1Po,772
|
|
4
|
+
internal_ai_agent/agent/__init__.py,sha256=EuPVNLnCG9S5VY8ET2pheIkrlSzWZDwR0P7Y4gVXSUI,43
|
|
5
|
+
internal_ai_agent/agent/schemas.py,sha256=FAVr7YY9_kPddEwBjacwaje8SONDx4yOU_4gkRK5m6E,1174
|
|
6
|
+
internal_ai_agent/agent/tools.py,sha256=wo8ASgW5BtOyUc2V7Jn37n6OgasaQwOtCZATqn7rtPA,2746
|
|
7
|
+
internal_ai_agent/agent/workflow.py,sha256=fx4dDB-sDdfw945h6dm1u9Lr8G8LpWC2nhw5tFm5Sno,8251
|
|
8
|
+
internal_ai_agent/api/__init__.py,sha256=E9WAQukVOuCYKUPDJuT5hOqXc5Gl-uSNuR1eTDUn7Ps,50
|
|
9
|
+
internal_ai_agent/api/main.py,sha256=7XilqOh8Nlghm7mgfssnJbXZTTnnCb4rRrkKkvd48nY,7851
|
|
10
|
+
internal_ai_agent/api/schemas.py,sha256=k-5Cgp77VL3k3MV49KUVZ8lZC8RtBkdAR_AXobBCPgg,1088
|
|
11
|
+
internal_ai_agent/dashboard/__init__.py,sha256=LBhz-cOpyTnJ7Hsjbcp5s2S4tuejkpr2K-Y0hyjs8ck,30
|
|
12
|
+
internal_ai_agent/dashboard/data.py,sha256=NiM2XDfTscRq0rYFdnUGNvgfE27MVA-AS5oRqv-1gLs,65713
|
|
13
|
+
internal_ai_agent/data/__init__.py,sha256=ioR4A1CmQFOKF4Eaur195zQWzMOfYyL-O8PjWKZsE0U,43
|
|
14
|
+
internal_ai_agent/data/synthetic.py,sha256=TgHAQT0LHnplMELYw1mKhPlHc5MtFpwGLQBgcj_dQto,107205
|
|
15
|
+
internal_ai_agent/evals/__init__.py,sha256=9u6VFTKmYlae_jneJrRA-m_Zzc7uT8A5Fse6qPufaYs,62
|
|
16
|
+
internal_ai_agent/evals/agent.py,sha256=qo0g7uSzpXjOvKB6a3Akttq31U4kxjf11on3BdtIh6Q,7721
|
|
17
|
+
internal_ai_agent/evals/candidate_results_export.py,sha256=o_lF5RAhIN3UfzrgRqe2XIW_yXcQlxcrYv4qI-2JeP0,25814
|
|
18
|
+
internal_ai_agent/evals/dataset_profile.py,sha256=KXeJo6bclSwBFCaQeQdPon1Ldh7ppyDp947GuU9n0wY,5598
|
|
19
|
+
internal_ai_agent/evals/external_review.py,sha256=7j76KhQbRG9UUtfseX_KGGbXGFdP74JE2ZWGs3b788A,19390
|
|
20
|
+
internal_ai_agent/evals/extraction.py,sha256=JDeyg0adi63whPPBt0_m7_H4QGB9fHrwnRUYoqEUuhg,2804
|
|
21
|
+
internal_ai_agent/evals/failure_taxonomy.py,sha256=EQAzetI7fyY_qUfFhI3HSunUq0xwgV2yuWrjZabgQwE,8221
|
|
22
|
+
internal_ai_agent/evals/gates.py,sha256=yZEbmpcZ2siuzELue4U0P7n18QD-EHajoMJB3D4HI7U,9203
|
|
23
|
+
internal_ai_agent/evals/goal_conflict_intervention.py,sha256=8fcvUWN-Ii3u_5TMrgrhSa2Wygt94cCitYGEg2xtxvw,14149
|
|
24
|
+
internal_ai_agent/evals/human_calibration.py,sha256=geuaUVjeaqpTmiDAE15nclW5wB3HH7VcsbTmYi00LRk,22506
|
|
25
|
+
internal_ai_agent/evals/incident_replay.py,sha256=AdYTj5qOarYsHINSuhoVVFCTMONcyhppfUsNWg40d1k,83012
|
|
26
|
+
internal_ai_agent/evals/intervention_study.py,sha256=4IrXigSaDr5WHG_4SXPJM5yeB1xuD0lk5IpQdQc8euo,42509
|
|
27
|
+
internal_ai_agent/evals/memory_context_intervention.py,sha256=048raPTWmGuwAlO6ZvES8bSqnN5hTuGSbzYTm8mrLFc,14290
|
|
28
|
+
internal_ai_agent/evals/model_judge.py,sha256=A_8k7u2s2mktAXk-bpS5QeL9ri6Q35h0VKXcLf0K3Xs,11049
|
|
29
|
+
internal_ai_agent/evals/model_judge_promotion.py,sha256=Diy7kXnnzP86iTVnHw_Xh-pcG2ATCZ3pry63fJbr-Bw,3371
|
|
30
|
+
internal_ai_agent/evals/multi_model_comparison.py,sha256=DK6iVbObLjgTkIAGvgYWKFD9mMISQI9Wsx56G0JuK54,14282
|
|
31
|
+
internal_ai_agent/evals/multilingual_safety.py,sha256=0J_1czHj8SBgxXLJ2_ruQvxF42Ec3INg9nr9H5A_MMg,4989
|
|
32
|
+
internal_ai_agent/evals/nist_rmf_mapping.py,sha256=fcTJkLXxp6lD2i2mETyt0CYNpm1ANGo_npSLDj4yF_0,7142
|
|
33
|
+
internal_ai_agent/evals/public_rag_findings.py,sha256=saP0Xx7ul8emsF1IjvRXQK6BjVRvSfaxmFi1fFi1ZPA,9000
|
|
34
|
+
internal_ai_agent/evals/public_rag_model_reranker.py,sha256=EU9I9vpdkFHmLQ5MbxcEoY8nBkGyvCzGm544eMMuOro,10872
|
|
35
|
+
internal_ai_agent/evals/public_rag_reranker.py,sha256=rjF0K-ozj9Ji_3X5zvSQBWDqP6BmvNSfIxuy1mgrXSk,14466
|
|
36
|
+
internal_ai_agent/evals/public_rag_reranking.py,sha256=_cqoNLtcq1NORnoq3Verqgla9ByYsXWunbpEm2m3go0,8269
|
|
37
|
+
internal_ai_agent/evals/rag_grounding_intervention.py,sha256=BIgNza4lhVfBMDM21XzHDGFbB5Q_lSjLinU1CpFa5-w,16593
|
|
38
|
+
internal_ai_agent/evals/runner.py,sha256=2yu__30vplVrsm6S5kVaQAdcMVGfLMAZ0f5RFQ728ik,29377
|
|
39
|
+
internal_ai_agent/evals/safety_classifier.py,sha256=_GZjRQgVavbHCjuy7oKTxRBX4wkMHpnPWu7XXgruhYw,75474
|
|
40
|
+
internal_ai_agent/evals/security.py,sha256=ix9HWX58Nzni7-tAfigN-MbrXoR4-aHJ-mOlEA11Aro,7899
|
|
41
|
+
internal_ai_agent/evals/techqa_public.py,sha256=TWcZDiIQG6BnQFO3JW-Dap7TsS2UMTGRuLl_wo7W_CE,24819
|
|
42
|
+
internal_ai_agent/evals/wixqa_public.py,sha256=a75Y7f21OuBxKsp-VHOi64_A67HgRo0vW7N-sIV10WE,22028
|
|
43
|
+
internal_ai_agent/extraction/__init__.py,sha256=GUXBdvm3lihERH3ShgYWtxFnOy1SGwiqvavygyZbeEc,51
|
|
44
|
+
internal_ai_agent/extraction/schemas.py,sha256=6DXI1dGeHKRZwaeJf6HA8BvIQtdr9kPFNmSXyA_gXuE,732
|
|
45
|
+
internal_ai_agent/extraction/service.py,sha256=ewpJ56CSt3XZTxMsGYgyLdJO-5ftJMYrE6oxhCfe0nc,3155
|
|
46
|
+
internal_ai_agent/inspect_suite/__init__.py,sha256=hVdp13T3YhhJsMZMj1PaYIGPF7slwwNKUcqM8HMzP8M,480
|
|
47
|
+
internal_ai_agent/inspect_suite/_registry.py,sha256=z989a8ETDPafY5Hnyamy-_Y5m-hlOoWXYajpAv1NHWQ,273
|
|
48
|
+
internal_ai_agent/inspect_suite/scorers.py,sha256=Zz4jWjmD84Hi0cZgsuRTmQ6NV_-I11Ebe9X0YZ_Zoz4,1107
|
|
49
|
+
internal_ai_agent/inspect_suite/scoring.py,sha256=qCPai5orU6lNpOdOmlzS2megfsmyUmCTA-GIL4lt-0o,1679
|
|
50
|
+
internal_ai_agent/inspect_suite/tasks.py,sha256=1xQka3YTWhlC6tVRDPrUVUCVkAJ8XE9CCqf23cEYTGA,1148
|
|
51
|
+
internal_ai_agent/observability/__init__.py,sha256=gse8gRKGAmGpXa4UbMI1A0XlSx1jSdmmhGj9Oneqckc,47
|
|
52
|
+
internal_ai_agent/observability/audit.py,sha256=Ecyjsm4AzNIt1wkB_reIbS9ihXvS35tbib_LZODWDjo,1317
|
|
53
|
+
internal_ai_agent/observability/collector.py,sha256=O97N6_XFTWeNXlMFSpYCE3ejwEztEsqQTpAOHwz4zMQ,7789
|
|
54
|
+
internal_ai_agent/observability/collector_deployment.py,sha256=5uaeSVZQTq6UFFGtnx55UCTwyyMeU3-fpIlgOOy96pc,2592
|
|
55
|
+
internal_ai_agent/observability/collector_smoke.py,sha256=3rHaEQAXR3UnHDnyQWLqlv8kHBQM4dEepBiDqVG5vBg,4774
|
|
56
|
+
internal_ai_agent/observability/otel.py,sha256=ylShLmB-NsVYyGhIQsvTe-C6f1DuoHCXQTW07IUdcgk,31422
|
|
57
|
+
internal_ai_agent/observability/trace_index.py,sha256=iBji1AWEE-digjcTXDhXZuUspzCGUyp8guMmhz45SWw,6756
|
|
58
|
+
internal_ai_agent/providers/__init__.py,sha256=5USfd_M83RcGTejgqa7CgKcouNd44pWXn1rcnwGTw5M,78
|
|
59
|
+
internal_ai_agent/providers/agent_runner.py,sha256=m_kbR9Pm65-EYPJE9PNCx9u1a89w0AXSco_HLwAOvVg,9535
|
|
60
|
+
internal_ai_agent/providers/anthropic_judge.py,sha256=Y53oav2M2Vq4LDvNj2kJLBoMke0mrpnvTE6aK4BZQQ4,7812
|
|
61
|
+
internal_ai_agent/providers/openai_embeddings.py,sha256=L968xMSMsAEHOfWGgZgQzF7_rewQ-c0afT6qdgJwcJk,3890
|
|
62
|
+
internal_ai_agent/providers/openai_judge.py,sha256=dAEqWUzkINHb6z8fVvRJpPXGAqpYeQzLsJV4FWL7zdA,7644
|
|
63
|
+
internal_ai_agent/rag/__init__.py,sha256=B82YHSJsXep2C8pLO0F_rPz4yFY4JBxwTtHz-Fvx2yw,50
|
|
64
|
+
internal_ai_agent/rag/baseline.py,sha256=95rJv7SeONuLdqcfYEDHHdRX_OuOAujryzDZ3vP0hWY,38861
|
|
65
|
+
internal_ai_agent/reporting/__init__.py,sha256=H42MMB875Pdhfr56chw7Ewok_lPPoL69Cz6aXekT5f8,60
|
|
66
|
+
internal_ai_agent/reporting/public_report.py,sha256=BTx3jFlBUXaZAyNs2MW6_aeR4LlFqY9I210zSpmAAsU,95585
|
|
67
|
+
internal_ai_agent/security/__init__.py,sha256=XzzoG0N-BvTbuhRu8505p8aM-mwGaqvwyO9m26DzfF0,31
|
|
68
|
+
internal_ai_agent/security/action_safety.py,sha256=uAEwpxgKM5_zV_mIjAm5NZn_1yDL_XcU11v3DkpRLtQ,2938
|
|
69
|
+
internal_ai_agent/security/policy.py,sha256=_l7VCOfH7BxMWrRWtALTxVMBt2UbTmO1vyFyFjgXCzM,6538
|
|
70
|
+
agent_release_gates-0.1.0.dist-info/METADATA,sha256=_IhhkbZAUJ-F4i-SVTV_v5ACEIlgDIVbgF_bODrF9Yc,11494
|
|
71
|
+
agent_release_gates-0.1.0.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
72
|
+
agent_release_gates-0.1.0.dist-info/entry_points.txt,sha256=_T_Q2olwdu4cp5tWeNzGuuL01r4IqMAhO-YxYqe6Mmc,138
|
|
73
|
+
agent_release_gates-0.1.0.dist-info/licenses/LICENSE,sha256=AJUwcM_Bzqa4voXHS2MHwr0RZT9U8bxDEOAkKukH6K4,1071
|
|
74
|
+
agent_release_gates-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rosscyking1115
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Controlled synthetic agent workflow."""
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any, Literal
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel
|
|
6
|
+
|
|
7
|
+
from internal_ai_agent.extraction.schemas import RoutingDecision, TicketExtraction
|
|
8
|
+
from internal_ai_agent.observability.audit import AuditEvent
|
|
9
|
+
from internal_ai_agent.security.policy import PolicyDecision
|
|
10
|
+
|
|
11
|
+
ToolName = Literal[
|
|
12
|
+
"search_runbook",
|
|
13
|
+
"extract_ticket",
|
|
14
|
+
"draft_escalation_note",
|
|
15
|
+
"route_ticket_mock",
|
|
16
|
+
"create_followup_task_mock",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
ToolType = Literal["read_only", "side_effect"]
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class ToolDecision(BaseModel):
|
|
23
|
+
tool_name: ToolName
|
|
24
|
+
tool_type: ToolType
|
|
25
|
+
requested: bool
|
|
26
|
+
requires_approval: bool
|
|
27
|
+
approval_granted: bool
|
|
28
|
+
executed: bool
|
|
29
|
+
valid_schema: bool
|
|
30
|
+
rationale: str
|
|
31
|
+
blocked_reason: str | None = None
|
|
32
|
+
output: dict[str, Any] = {}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class AgentRunResult(BaseModel):
|
|
36
|
+
trace_id: str
|
|
37
|
+
question: str
|
|
38
|
+
answer: str
|
|
39
|
+
citations: list[str]
|
|
40
|
+
abstained: bool
|
|
41
|
+
extraction: TicketExtraction | None = None
|
|
42
|
+
routing: RoutingDecision | None = None
|
|
43
|
+
tool_decisions: list[ToolDecision]
|
|
44
|
+
audit_log: list[str]
|
|
45
|
+
audit_events: list[AuditEvent]
|
|
46
|
+
monitoring: dict[str, Any]
|
|
47
|
+
policy: PolicyDecision
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from internal_ai_agent.agent.schemas import ToolDecision, ToolName, ToolType
|
|
6
|
+
|
|
7
|
+
TOOL_TYPES: dict[ToolName, ToolType] = {
|
|
8
|
+
"search_runbook": "read_only",
|
|
9
|
+
"extract_ticket": "read_only",
|
|
10
|
+
"draft_escalation_note": "read_only",
|
|
11
|
+
"route_ticket_mock": "side_effect",
|
|
12
|
+
"create_followup_task_mock": "side_effect",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
REQUIRED_FIELDS: dict[ToolName, set[str]] = {
|
|
16
|
+
"search_runbook": {"query"},
|
|
17
|
+
"extract_ticket": {"text"},
|
|
18
|
+
"draft_escalation_note": {"ticket_id", "team", "issue_category"},
|
|
19
|
+
"route_ticket_mock": {"ticket_id", "team"},
|
|
20
|
+
"create_followup_task_mock": {"ticket_id", "owner", "reason"},
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def make_tool_decision(
|
|
25
|
+
tool_name: ToolName,
|
|
26
|
+
payload: dict[str, Any],
|
|
27
|
+
*,
|
|
28
|
+
approval_granted: bool = False,
|
|
29
|
+
rationale: str,
|
|
30
|
+
) -> ToolDecision:
|
|
31
|
+
tool_type = TOOL_TYPES[tool_name]
|
|
32
|
+
valid_schema = _valid_payload(tool_name, payload)
|
|
33
|
+
requires_approval = tool_type == "side_effect"
|
|
34
|
+
blocked_reason: str | None = None
|
|
35
|
+
executed = valid_schema
|
|
36
|
+
|
|
37
|
+
if requires_approval and not approval_granted:
|
|
38
|
+
executed = False
|
|
39
|
+
blocked_reason = "approval_required"
|
|
40
|
+
elif not valid_schema:
|
|
41
|
+
executed = False
|
|
42
|
+
blocked_reason = "invalid_tool_payload"
|
|
43
|
+
|
|
44
|
+
return ToolDecision(
|
|
45
|
+
tool_name=tool_name,
|
|
46
|
+
tool_type=tool_type,
|
|
47
|
+
requested=True,
|
|
48
|
+
requires_approval=requires_approval,
|
|
49
|
+
approval_granted=approval_granted,
|
|
50
|
+
executed=executed,
|
|
51
|
+
valid_schema=valid_schema,
|
|
52
|
+
rationale=rationale,
|
|
53
|
+
blocked_reason=blocked_reason,
|
|
54
|
+
output=_tool_output(tool_name, payload) if executed else {},
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def _valid_payload(tool_name: ToolName, payload: dict[str, Any]) -> bool:
|
|
59
|
+
required = REQUIRED_FIELDS[tool_name]
|
|
60
|
+
return all(str(payload.get(field, "")).strip() for field in required)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def _tool_output(tool_name: ToolName, payload: dict[str, Any]) -> dict[str, Any]:
|
|
64
|
+
if tool_name == "route_ticket_mock":
|
|
65
|
+
return {
|
|
66
|
+
"status": "mock_routed",
|
|
67
|
+
"ticket_id": payload["ticket_id"],
|
|
68
|
+
"team": payload["team"],
|
|
69
|
+
}
|
|
70
|
+
if tool_name == "create_followup_task_mock":
|
|
71
|
+
return {
|
|
72
|
+
"status": "mock_followup_created",
|
|
73
|
+
"ticket_id": payload["ticket_id"],
|
|
74
|
+
"owner": payload["owner"],
|
|
75
|
+
}
|
|
76
|
+
if tool_name == "draft_escalation_note":
|
|
77
|
+
return {
|
|
78
|
+
"status": "drafted",
|
|
79
|
+
"note": (
|
|
80
|
+
f"Draft note for {payload['ticket_id']}: route to {payload['team']} "
|
|
81
|
+
f"for {payload['issue_category']} review."
|
|
82
|
+
),
|
|
83
|
+
}
|
|
84
|
+
if tool_name == "extract_ticket":
|
|
85
|
+
return {"status": "extracted"}
|
|
86
|
+
return {"status": "searched"}
|