agentops-accelerator 0.3.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.
- agentops/__init__.py +10 -0
- agentops/__main__.py +6 -0
- agentops/agent/__init__.py +12 -0
- agentops/agent/_legacy_ids.py +92 -0
- agentops/agent/analyzer.py +207 -0
- agentops/agent/checks/__init__.py +1 -0
- agentops/agent/checks/catalog.py +880 -0
- agentops/agent/checks/errors.py +279 -0
- agentops/agent/checks/foundry_config.py +75 -0
- agentops/agent/checks/latency.py +84 -0
- agentops/agent/checks/opex.py +157 -0
- agentops/agent/checks/opex_workspace.py +874 -0
- agentops/agent/checks/posture.py +36 -0
- agentops/agent/checks/posture_rules/__init__.py +53 -0
- agentops/agent/checks/posture_rules/content_filter.py +59 -0
- agentops/agent/checks/posture_rules/diagnostics.py +74 -0
- agentops/agent/checks/posture_rules/local_auth.py +55 -0
- agentops/agent/checks/posture_rules/managed_identity.py +59 -0
- agentops/agent/checks/posture_rules/network.py +68 -0
- agentops/agent/checks/regression.py +78 -0
- agentops/agent/checks/release_readiness.py +182 -0
- agentops/agent/checks/safety.py +247 -0
- agentops/agent/checks/spec_conformance.py +375 -0
- agentops/agent/cockpit.py +5159 -0
- agentops/agent/config.py +240 -0
- agentops/agent/findings.py +113 -0
- agentops/agent/history.py +142 -0
- agentops/agent/knowledge/__init__.py +182 -0
- agentops/agent/knowledge/waf-checklist.csv +39 -0
- agentops/agent/llm_assist/__init__.py +16 -0
- agentops/agent/llm_assist/_base.py +124 -0
- agentops/agent/llm_assist/_bundle_rule.py +154 -0
- agentops/agent/llm_assist/_client.py +347 -0
- agentops/agent/llm_assist/_dataset_rules.py +191 -0
- agentops/agent/llm_assist/_engine.py +106 -0
- agentops/agent/llm_assist/_prompt_rules.py +291 -0
- agentops/agent/llm_assist/_spec_rules.py +235 -0
- agentops/agent/production_telemetry.py +430 -0
- agentops/agent/report.py +207 -0
- agentops/agent/server/__init__.py +1 -0
- agentops/agent/server/app.py +84 -0
- agentops/agent/server/auth.py +94 -0
- agentops/agent/server/chat.py +44 -0
- agentops/agent/server/protocol.py +72 -0
- agentops/agent/sources/__init__.py +1 -0
- agentops/agent/sources/azure_monitor.py +523 -0
- agentops/agent/sources/azure_resources.py +602 -0
- agentops/agent/sources/foundry_control.py +174 -0
- agentops/agent/sources/results_history.py +494 -0
- agentops/agent/sources/spec_detectors/__init__.py +42 -0
- agentops/agent/sources/spec_detectors/_base.py +58 -0
- agentops/agent/sources/spec_detectors/agents_md.py +75 -0
- agentops/agent/sources/spec_detectors/spec_kit.py +172 -0
- agentops/agent/time_range.py +117 -0
- agentops/cli/__init__.py +1 -0
- agentops/cli/app.py +4823 -0
- agentops/core/__init__.py +1 -0
- agentops/core/agentops_config.py +592 -0
- agentops/core/config_loader.py +22 -0
- agentops/core/evaluators.py +480 -0
- agentops/core/release_evidence.py +56 -0
- agentops/core/results.py +117 -0
- agentops/mcp/__init__.py +10 -0
- agentops/mcp/server.py +232 -0
- agentops/pipeline/__init__.py +8 -0
- agentops/pipeline/cloud_results.py +189 -0
- agentops/pipeline/cloud_runner.py +901 -0
- agentops/pipeline/comparison.py +108 -0
- agentops/pipeline/diagnostics.py +51 -0
- agentops/pipeline/invocations.py +535 -0
- agentops/pipeline/official_eval.py +414 -0
- agentops/pipeline/orchestrator.py +775 -0
- agentops/pipeline/prompt_deploy.py +377 -0
- agentops/pipeline/publisher.py +121 -0
- agentops/pipeline/reporter.py +202 -0
- agentops/pipeline/runtime.py +409 -0
- agentops/pipeline/thresholds.py +84 -0
- agentops/services/__init__.py +1 -0
- agentops/services/cicd.py +720 -0
- agentops/services/eval_analysis.py +848 -0
- agentops/services/evidence_pack.py +757 -0
- agentops/services/initializer.py +86 -0
- agentops/services/preflight.py +470 -0
- agentops/services/setup_wizard.py +709 -0
- agentops/services/skills.py +643 -0
- agentops/services/trace_promotion.py +300 -0
- agentops/services/workflow_analysis.py +1129 -0
- agentops/templates/.gitignore +15 -0
- agentops/templates/__init__.py +1 -0
- agentops/templates/agent-server/Dockerfile +23 -0
- agentops/templates/agent-server/README.md +61 -0
- agentops/templates/agent-server/main.bicep +94 -0
- agentops/templates/agent.yaml +87 -0
- agentops/templates/agentops.yaml +58 -0
- agentops/templates/foundry.svg +71 -0
- agentops/templates/icon.png +0 -0
- agentops/templates/pipelines/azuredevops/agentops-deploy-dev-azd.yml +118 -0
- agentops/templates/pipelines/azuredevops/agentops-deploy-dev.yml +73 -0
- agentops/templates/pipelines/azuredevops/agentops-deploy-prod-azd.yml +141 -0
- agentops/templates/pipelines/azuredevops/agentops-deploy-prod.yml +94 -0
- agentops/templates/pipelines/azuredevops/agentops-deploy-prompt-agent.yml +167 -0
- agentops/templates/pipelines/azuredevops/agentops-deploy-qa-azd.yml +118 -0
- agentops/templates/pipelines/azuredevops/agentops-deploy-qa.yml +68 -0
- agentops/templates/pipelines/azuredevops/agentops-pr-prompt-agent.yml +210 -0
- agentops/templates/pipelines/azuredevops/agentops-pr.yml +155 -0
- agentops/templates/pipelines/azuredevops/agentops-watchdog.yml +106 -0
- agentops/templates/project.gitignore +36 -0
- agentops/templates/sample-traces.jsonl +3 -0
- agentops/templates/skills/agentops-agent/SKILL.md +137 -0
- agentops/templates/skills/agentops-config/SKILL.md +113 -0
- agentops/templates/skills/agentops-dataset/SKILL.md +84 -0
- agentops/templates/skills/agentops-eval/SKILL.md +189 -0
- agentops/templates/skills/agentops-report/SKILL.md +71 -0
- agentops/templates/skills/agentops-workflow/SKILL.md +471 -0
- agentops/templates/smoke.jsonl +3 -0
- agentops/templates/waf-checklist.README.md +84 -0
- agentops/templates/waf-checklist.csv +22 -0
- agentops/templates/workflows/agentops-deploy-dev-azd.yml +166 -0
- agentops/templates/workflows/agentops-deploy-dev.yml +187 -0
- agentops/templates/workflows/agentops-deploy-prod-azd.yml +183 -0
- agentops/templates/workflows/agentops-deploy-prod.yml +171 -0
- agentops/templates/workflows/agentops-deploy-prompt-agent.yml +197 -0
- agentops/templates/workflows/agentops-deploy-qa-azd.yml +156 -0
- agentops/templates/workflows/agentops-deploy-qa.yml +145 -0
- agentops/templates/workflows/agentops-pr-prompt-agent.yml +210 -0
- agentops/templates/workflows/agentops-pr.yml +148 -0
- agentops/templates/workflows/agentops-watchdog.yml +122 -0
- agentops/utils/__init__.py +1 -0
- agentops/utils/azd_env.py +435 -0
- agentops/utils/azure_endpoints.py +62 -0
- agentops/utils/colors.py +47 -0
- agentops/utils/dotenv_loader.py +105 -0
- agentops/utils/foundry_discovery.py +229 -0
- agentops/utils/logging.py +59 -0
- agentops/utils/telemetry.py +554 -0
- agentops/utils/yaml.py +36 -0
- agentops_accelerator-0.3.0.dist-info/METADATA +278 -0
- agentops_accelerator-0.3.0.dist-info/RECORD +142 -0
- agentops_accelerator-0.3.0.dist-info/WHEEL +5 -0
- agentops_accelerator-0.3.0.dist-info/entry_points.txt +2 -0
- agentops_accelerator-0.3.0.dist-info/licenses/LICENSE +21 -0
- agentops_accelerator-0.3.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Generated by agentops init
|
|
2
|
+
# Keep generated runtime artifacts out of source control
|
|
3
|
+
.env
|
|
4
|
+
.env.*
|
|
5
|
+
!.env.example
|
|
6
|
+
results/**
|
|
7
|
+
official-eval/**
|
|
8
|
+
.resolved/**
|
|
9
|
+
|
|
10
|
+
# Keep source-of-truth AgentOps configuration under version control
|
|
11
|
+
!config.yaml
|
|
12
|
+
!run.yaml
|
|
13
|
+
!bundles/**
|
|
14
|
+
!datasets/**
|
|
15
|
+
!data/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Template assets used by AgentOps services."""
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
FROM python:3.11-slim
|
|
2
|
+
|
|
3
|
+
ENV PYTHONUNBUFFERED=1 \
|
|
4
|
+
PIP_NO_CACHE_DIR=1 \
|
|
5
|
+
PIP_DISABLE_PIP_VERSION_CHECK=1
|
|
6
|
+
|
|
7
|
+
WORKDIR /app
|
|
8
|
+
|
|
9
|
+
# Install AgentOps with the agent extras (FastAPI + Azure Monitor + crypto).
|
|
10
|
+
ARG AGENTOPS_VERSION=
|
|
11
|
+
RUN if [ -n "$AGENTOPS_VERSION" ]; then \
|
|
12
|
+
pip install "agentops-accelerator[agent]==${AGENTOPS_VERSION}"; \
|
|
13
|
+
else \
|
|
14
|
+
pip install "agentops-accelerator[agent] @ git+https://github.com/Azure/agentops.git@main"; \
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# Optional: copy a workspace into the image so analyze can find historic
|
|
18
|
+
# runs. In production you would mount this as a volume instead.
|
|
19
|
+
COPY .agentops /app/.agentops
|
|
20
|
+
|
|
21
|
+
EXPOSE 8080
|
|
22
|
+
|
|
23
|
+
CMD ["agentops", "agent", "serve", "--host", "0.0.0.0", "--port", "8080"]
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# AgentOps Watchdog - deploy scaffold
|
|
2
|
+
|
|
3
|
+
This folder contains the minimum bits to host `agentops agent serve`
|
|
4
|
+
on **Azure Container Apps** as a GitHub Copilot Extension.
|
|
5
|
+
|
|
6
|
+
## Files
|
|
7
|
+
|
|
8
|
+
- `Dockerfile` - installs `agentops-accelerator[agent]` and runs
|
|
9
|
+
`agentops agent serve --host 0.0.0.0 --port 8080`.
|
|
10
|
+
- `main.bicep` - single-resource ACA app with HTTPS ingress, a
|
|
11
|
+
user-assigned managed identity, and a `/healthz` liveness probe.
|
|
12
|
+
|
|
13
|
+
## Quickstart
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# 1. Build & push the image (server-side build avoids local Docker).
|
|
17
|
+
az acr build \
|
|
18
|
+
--registry <your-acr> \
|
|
19
|
+
--image agentops-doctor:1.0.0 \
|
|
20
|
+
--file Dockerfile .
|
|
21
|
+
|
|
22
|
+
# 2. Provision the Container App.
|
|
23
|
+
az deployment group create \
|
|
24
|
+
--resource-group <rg> \
|
|
25
|
+
--template-file main.bicep \
|
|
26
|
+
--parameters \
|
|
27
|
+
environmentName=<aca-environment> \
|
|
28
|
+
image=<your-acr>.azurecr.io/agentops-doctor:1.0.0 \
|
|
29
|
+
userAssignedIdentityId=<umi-resource-id> \
|
|
30
|
+
appInsightsResourceId=<app-insights-resource-id> \
|
|
31
|
+
foundryProjectEndpoint=<https://...>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The user-assigned identity needs read access on the Application
|
|
35
|
+
Insights resource (`Monitoring Reader`) and on the Foundry project
|
|
36
|
+
(`Azure AI Developer`).
|
|
37
|
+
|
|
38
|
+
## Wire to Copilot Chat
|
|
39
|
+
|
|
40
|
+
Once the app is running, register a GitHub App that points its Copilot
|
|
41
|
+
Extension webhook at:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
https://<app-fqdn>/agents/messages
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Local development bypasses the GitHub signature check via
|
|
48
|
+
`agentops agent serve --no-verify`. **Never** deploy with
|
|
49
|
+
`--no-verify` to a public endpoint.
|
|
50
|
+
|
|
51
|
+
## What the agent does
|
|
52
|
+
|
|
53
|
+
The container runs the Doctor analyzer on every chat turn,
|
|
54
|
+
combining:
|
|
55
|
+
|
|
56
|
+
1. AgentOps eval history (mounted at `/app/.agentops` or pulled at
|
|
57
|
+
runtime).
|
|
58
|
+
2. Application Insights traces (Foundry telemetry).
|
|
59
|
+
3. Foundry control plane (`azure-ai-projects`).
|
|
60
|
+
|
|
61
|
+
It returns a Markdown reply with severity-ranked findings.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// Minimal Bicep to deploy the AgentOps Watchdog as a Copilot Extension
|
|
2
|
+
// hosted on Azure Container Apps. Pair with a pre-built image (e.g. from
|
|
3
|
+
// `az acr build`).
|
|
4
|
+
|
|
5
|
+
@description('Resource location.')
|
|
6
|
+
param location string = resourceGroup().location
|
|
7
|
+
|
|
8
|
+
@description('Container Apps environment name.')
|
|
9
|
+
param environmentName string
|
|
10
|
+
|
|
11
|
+
@description('Container app name.')
|
|
12
|
+
param appName string = 'agentops-doctor'
|
|
13
|
+
|
|
14
|
+
@description('Fully qualified image reference, e.g. myacr.azurecr.io/agentops-doctor:1.0.0.')
|
|
15
|
+
param image string
|
|
16
|
+
|
|
17
|
+
@description('Application Insights resource id consumed by the Doctor.')
|
|
18
|
+
param appInsightsResourceId string = ''
|
|
19
|
+
|
|
20
|
+
@description('Foundry project endpoint.')
|
|
21
|
+
param foundryProjectEndpoint string = ''
|
|
22
|
+
|
|
23
|
+
@description('User-assigned managed identity resource id with reader access on App Insights and Foundry.')
|
|
24
|
+
param userAssignedIdentityId string
|
|
25
|
+
|
|
26
|
+
resource env 'Microsoft.App/managedEnvironments@2024-03-01' existing = {
|
|
27
|
+
name: environmentName
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
resource app 'Microsoft.App/containerApps@2024-03-01' = {
|
|
31
|
+
name: appName
|
|
32
|
+
location: location
|
|
33
|
+
identity: {
|
|
34
|
+
type: 'UserAssigned'
|
|
35
|
+
userAssignedIdentities: {
|
|
36
|
+
'${userAssignedIdentityId}': {}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
properties: {
|
|
40
|
+
managedEnvironmentId: env.id
|
|
41
|
+
configuration: {
|
|
42
|
+
activeRevisionsMode: 'Single'
|
|
43
|
+
ingress: {
|
|
44
|
+
external: true
|
|
45
|
+
targetPort: 8080
|
|
46
|
+
transport: 'auto'
|
|
47
|
+
allowInsecure: false
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
template: {
|
|
51
|
+
containers: [
|
|
52
|
+
{
|
|
53
|
+
name: 'doctor'
|
|
54
|
+
image: image
|
|
55
|
+
resources: {
|
|
56
|
+
cpu: json('0.5')
|
|
57
|
+
memory: '1.0Gi'
|
|
58
|
+
}
|
|
59
|
+
env: [
|
|
60
|
+
{
|
|
61
|
+
name: 'AZURE_CLIENT_ID'
|
|
62
|
+
value: userAssignedIdentityId
|
|
63
|
+
}
|
|
64
|
+
{
|
|
65
|
+
name: 'AGENTOPS_APP_INSIGHTS_RESOURCE_ID'
|
|
66
|
+
value: appInsightsResourceId
|
|
67
|
+
}
|
|
68
|
+
{
|
|
69
|
+
name: 'AZURE_AI_FOUNDRY_PROJECT_ENDPOINT'
|
|
70
|
+
value: foundryProjectEndpoint
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
probes: [
|
|
74
|
+
{
|
|
75
|
+
type: 'Liveness'
|
|
76
|
+
httpGet: {
|
|
77
|
+
path: '/healthz'
|
|
78
|
+
port: 8080
|
|
79
|
+
}
|
|
80
|
+
initialDelaySeconds: 10
|
|
81
|
+
periodSeconds: 30
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
scale: {
|
|
87
|
+
minReplicas: 1
|
|
88
|
+
maxReplicas: 3
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
output appFqdn string = app.properties.configuration.ingress.fqdn
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# AgentOps Watchdog Agent configuration.
|
|
2
|
+
#
|
|
3
|
+
# Every section is optional — sources auto-skip with a diagnostic note when
|
|
4
|
+
# they are disabled, missing required config, or missing the optional Azure
|
|
5
|
+
# extras (`pip install "agentops-accelerator[agent] @ git+https://github.com/Azure/agentops.git@main"`).
|
|
6
|
+
#
|
|
7
|
+
# Run:
|
|
8
|
+
#
|
|
9
|
+
# agentops doctor
|
|
10
|
+
# agentops agent serve --no-verify # local dev
|
|
11
|
+
#
|
|
12
|
+
version: 1
|
|
13
|
+
|
|
14
|
+
# Lookback window applied to production telemetry queries.
|
|
15
|
+
lookback_days: 7
|
|
16
|
+
|
|
17
|
+
sources:
|
|
18
|
+
# Reads local `.agentops/results/*/results.json` first. If local history
|
|
19
|
+
# is missing or too short, Doctor falls back to Foundry cloud evaluations
|
|
20
|
+
# when `foundry_control` has a reachable project endpoint.
|
|
21
|
+
results_history:
|
|
22
|
+
enabled: true
|
|
23
|
+
path: .agentops/results
|
|
24
|
+
lookback_runs: 10
|
|
25
|
+
|
|
26
|
+
# Azure Monitor / Application Insights for the deployed agent.
|
|
27
|
+
azure_monitor:
|
|
28
|
+
enabled: true
|
|
29
|
+
# Use either app_insights_resource_id (preferred) OR
|
|
30
|
+
# log_analytics_workspace_id, depending on how telemetry is wired.
|
|
31
|
+
app_insights_resource_id: ""
|
|
32
|
+
log_analytics_workspace_id: ""
|
|
33
|
+
|
|
34
|
+
# Foundry control plane (agent metadata / recent runs).
|
|
35
|
+
foundry_control:
|
|
36
|
+
enabled: true
|
|
37
|
+
# Inline value, or read from this env var.
|
|
38
|
+
project_endpoint: ""
|
|
39
|
+
project_endpoint_env: AZURE_AI_FOUNDRY_PROJECT_ENDPOINT
|
|
40
|
+
# Empty list = consider all agents in the project.
|
|
41
|
+
agent_ids: []
|
|
42
|
+
|
|
43
|
+
# Azure management plane — read-only resource posture audits.
|
|
44
|
+
# Enabled by default and fail-open: Doctor reads `.azure/<env>/.env` when
|
|
45
|
+
# AZD metadata exists, then falls back to the Foundry project endpoint /
|
|
46
|
+
# Azure resource scan, then to the fields below. If discovery is not possible,
|
|
47
|
+
# the source is marked skipped with guidance in the report.
|
|
48
|
+
# Required RBAC when used: `Reader` on the resource group.
|
|
49
|
+
azure_resources:
|
|
50
|
+
enabled: true
|
|
51
|
+
# subscription_id: "00000000-0000-0000-0000-000000000000"
|
|
52
|
+
subscription_id_env: AZURE_SUBSCRIPTION_ID
|
|
53
|
+
# resource_group: "rg-myproject"
|
|
54
|
+
# cognitive_services_account: "ai-services-myproject"
|
|
55
|
+
|
|
56
|
+
checks:
|
|
57
|
+
regression:
|
|
58
|
+
metrics: [coherence, fluency, similarity, f1_score, groundedness, tool_call_accuracy]
|
|
59
|
+
threshold_drop: 0.10
|
|
60
|
+
min_runs: 3
|
|
61
|
+
|
|
62
|
+
latency:
|
|
63
|
+
p95_threshold_seconds: 5.0
|
|
64
|
+
|
|
65
|
+
errors:
|
|
66
|
+
rate_threshold: 0.05
|
|
67
|
+
|
|
68
|
+
safety:
|
|
69
|
+
severity_floor: Medium # Low | Medium | High
|
|
70
|
+
|
|
71
|
+
# WAF-AI posture audit. Enabled by default; it emits findings only when
|
|
72
|
+
# the `azure_resources` source is successfully discovered/read. When the
|
|
73
|
+
# source cannot be used, the reason appears in the report's Sources table.
|
|
74
|
+
# Findings are produced under the `security` category, filterable with
|
|
75
|
+
# `agentops doctor --categories security`.
|
|
76
|
+
posture:
|
|
77
|
+
enabled: true
|
|
78
|
+
pillar: security
|
|
79
|
+
# Skip individual rules without disabling the whole check, e.g.
|
|
80
|
+
# exclude_rules:
|
|
81
|
+
# - waf.security.diagnostic_settings
|
|
82
|
+
exclude_rules: []
|
|
83
|
+
|
|
84
|
+
server:
|
|
85
|
+
# GitHub App client id, used to distinguish the Copilot Extension that
|
|
86
|
+
# is allowed to call this server. Optional for v1.
|
|
87
|
+
github_app_client_id: ""
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# AgentOps configuration — 1.0 flat schema.
|
|
2
|
+
#
|
|
3
|
+
# The four required fields are 'version', 'agent', 'dataset', and (optionally)
|
|
4
|
+
# 'thresholds'. AgentOps infers evaluators from the agent type and dataset
|
|
5
|
+
# columns, so most users only need this much.
|
|
6
|
+
#
|
|
7
|
+
# Examples:
|
|
8
|
+
#
|
|
9
|
+
# agent: "my-rag:3" # Foundry prompt agent (name:version)
|
|
10
|
+
# agent: "https://...foundry.../agents/" # Foundry hosted endpoint
|
|
11
|
+
# agent: "https://api.example.com/chat" # any HTTP/JSON agent (ACA, AKS, custom)
|
|
12
|
+
# agent: "model:gpt-4o" # raw Foundry model deployment
|
|
13
|
+
|
|
14
|
+
# Schema version of this agentops.yaml file (not the agent version).
|
|
15
|
+
version: 1
|
|
16
|
+
|
|
17
|
+
# Foundry agent identifier as name:version, where the trailing number is
|
|
18
|
+
# the *agent* version published in Foundry (not the schema version above).
|
|
19
|
+
agent: "my-agent:1"
|
|
20
|
+
|
|
21
|
+
dataset: .agentops/data/smoke.jsonl
|
|
22
|
+
|
|
23
|
+
# Optional. Source-controlled instructions file used by prompt-agent CI/CD.
|
|
24
|
+
# Generated prompt-agent deploy workflows create a candidate Foundry version
|
|
25
|
+
# from this file, evaluate that exact version, then record it as deployed only
|
|
26
|
+
# after the gate passes.
|
|
27
|
+
#
|
|
28
|
+
# prompt_file: .agentops/prompts/agent-instructions.md
|
|
29
|
+
|
|
30
|
+
# Optional. Override the auto-selected pass/fail thresholds. AgentOps fills in
|
|
31
|
+
# sensible defaults for the metrics that are auto-selected.
|
|
32
|
+
#
|
|
33
|
+
# thresholds:
|
|
34
|
+
# coherence: ">=3"
|
|
35
|
+
# groundedness: ">=3"
|
|
36
|
+
# avg_latency_seconds: "<=30"
|
|
37
|
+
|
|
38
|
+
# Optional. Foundry prompt agents and Foundry publishing need a project
|
|
39
|
+
# endpoint. If both this value and AZURE_AI_FOUNDRY_PROJECT_ENDPOINT are set,
|
|
40
|
+
# this file wins for target invocation and publishing.
|
|
41
|
+
#
|
|
42
|
+
# project_endpoint: "https://<resource>.services.ai.azure.com/api/projects/<project>"
|
|
43
|
+
#
|
|
44
|
+
# Optional. Where the agent and evaluators execute.
|
|
45
|
+
# local (default) — AgentOps runs the agent row-by-row locally.
|
|
46
|
+
# cloud — Foundry runs the agent and evaluators server-side
|
|
47
|
+
# (only valid for 'name:version' Foundry prompt agents;
|
|
48
|
+
# implicitly publishes to the New Foundry panel).
|
|
49
|
+
#
|
|
50
|
+
# execution: local
|
|
51
|
+
#
|
|
52
|
+
# Optional. Publish local results to the Classic Foundry Evaluations panel.
|
|
53
|
+
# Only meaningful when execution: local. With execution: cloud the run is
|
|
54
|
+
# always published (Foundry hosts the run by definition).
|
|
55
|
+
# false (default) — only local results.json / report.md are written.
|
|
56
|
+
# true — execution: local + publish: true → upload to Classic Foundry.
|
|
57
|
+
#
|
|
58
|
+
# publish: false
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 18 18">
|
|
3
|
+
<defs>
|
|
4
|
+
<style>
|
|
5
|
+
.cls-1 {
|
|
6
|
+
fill: none;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.cls-1, .cls-2, .cls-3, .cls-4 {
|
|
10
|
+
stroke-width: 0px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.cls-2 {
|
|
14
|
+
fill: url(#linear-gradient);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.cls-2, .cls-3 {
|
|
18
|
+
fill-rule: evenodd;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.cls-3 {
|
|
22
|
+
fill: url(#linear-gradient-3);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.cls-4 {
|
|
26
|
+
fill: url(#linear-gradient-2);
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
29
|
+
<linearGradient id="linear-gradient" x1="12.76" y1="11.97" x2="10.26" y2="1.96" gradientUnits="userSpaceOnUse">
|
|
30
|
+
<stop offset="0" stop-color="#712575"/>
|
|
31
|
+
<stop offset=".09" stop-color="#9a2884"/>
|
|
32
|
+
<stop offset=".18" stop-color="#bf2c92"/>
|
|
33
|
+
<stop offset=".27" stop-color="#da2e9c"/>
|
|
34
|
+
<stop offset=".34" stop-color="#eb30a2"/>
|
|
35
|
+
<stop offset=".4" stop-color="#f131a5"/>
|
|
36
|
+
<stop offset=".5" stop-color="#ec30a3"/>
|
|
37
|
+
<stop offset=".61" stop-color="#df2f9e"/>
|
|
38
|
+
<stop offset=".72" stop-color="#c92d96"/>
|
|
39
|
+
<stop offset=".83" stop-color="#aa2a8a"/>
|
|
40
|
+
<stop offset=".95" stop-color="#83267c"/>
|
|
41
|
+
<stop offset="1" stop-color="#712575"/>
|
|
42
|
+
</linearGradient>
|
|
43
|
+
<linearGradient id="linear-gradient-2" x1="13.71" y1="1.8" x2="13.71" y2="15.92" gradientUnits="userSpaceOnUse">
|
|
44
|
+
<stop offset="0" stop-color="#da7ed0"/>
|
|
45
|
+
<stop offset=".08" stop-color="#b17bd5"/>
|
|
46
|
+
<stop offset=".19" stop-color="#8778db"/>
|
|
47
|
+
<stop offset=".3" stop-color="#6276e1"/>
|
|
48
|
+
<stop offset=".41" stop-color="#4574e5"/>
|
|
49
|
+
<stop offset=".54" stop-color="#2e72e8"/>
|
|
50
|
+
<stop offset=".67" stop-color="#1d71eb"/>
|
|
51
|
+
<stop offset=".81" stop-color="#1471ec"/>
|
|
52
|
+
<stop offset="1" stop-color="#1171ed"/>
|
|
53
|
+
</linearGradient>
|
|
54
|
+
<linearGradient id="linear-gradient-3" x1="12.86" y1="2.12" x2="3.5" y2="17.13" gradientUnits="userSpaceOnUse">
|
|
55
|
+
<stop offset="0" stop-color="#da7ed0"/>
|
|
56
|
+
<stop offset=".05" stop-color="#b77bd4"/>
|
|
57
|
+
<stop offset=".11" stop-color="#9079da"/>
|
|
58
|
+
<stop offset=".18" stop-color="#6e77df"/>
|
|
59
|
+
<stop offset=".25" stop-color="#5175e3"/>
|
|
60
|
+
<stop offset=".33" stop-color="#3973e7"/>
|
|
61
|
+
<stop offset=".42" stop-color="#2772e9"/>
|
|
62
|
+
<stop offset=".54" stop-color="#1a71eb"/>
|
|
63
|
+
<stop offset=".68" stop-color="#1371ec"/>
|
|
64
|
+
<stop offset="1" stop-color="#1171ed"/>
|
|
65
|
+
</linearGradient>
|
|
66
|
+
</defs>
|
|
67
|
+
<path class="cls-2" d="m11.52,1.59c.44,0,.83.33.97.81s.96,3.45.96,3.45v5.9h-2.97l.06-10.17h.98Z"/>
|
|
68
|
+
<path class="cls-4" d="m15.88,6.2c0-.21-.17-.37-.37-.37h-1.75c-1.23,0-2.23,1-2.23,2.23v3.7h2.12c1.23,0,2.23-1,2.23-2.23v-3.33Z"/>
|
|
69
|
+
<path class="cls-3" d="m11.52,1.59c-.34,0-.61.27-.61.61l-.06,11.23c0,1.64-1.33,2.97-2.97,2.97H2.49c-.26,0-.43-.25-.35-.49L6.46,3.58c.42-1.19,1.54-1.99,2.8-1.99h2.27Z"/>
|
|
70
|
+
<rect class="cls-1" width="18" height="18"/>
|
|
71
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# AgentOps - Deploy to dev with azd (Azure DevOps Pipelines)
|
|
2
|
+
#
|
|
3
|
+
# agentops:deploy-mode=azd
|
|
4
|
+
#
|
|
5
|
+
# Delegates provision/deploy to Azure Developer CLI. AgentOps only runs
|
|
6
|
+
# the eval gate; azd owns infra, packaging, deploy, and azure.yaml hooks.
|
|
7
|
+
#
|
|
8
|
+
# Generated by `agentops workflow generate --platform azure-devops --deploy-mode azd`.
|
|
9
|
+
|
|
10
|
+
trigger:
|
|
11
|
+
branches:
|
|
12
|
+
include:
|
|
13
|
+
- develop
|
|
14
|
+
|
|
15
|
+
pr: none
|
|
16
|
+
|
|
17
|
+
pool:
|
|
18
|
+
vmImage: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
variables:
|
|
21
|
+
- group: agentops
|
|
22
|
+
- name: AZURE_SERVICE_CONNECTION
|
|
23
|
+
value: agentops-azure
|
|
24
|
+
- name: AGENTOPS_CONFIG
|
|
25
|
+
value: agentops.yaml
|
|
26
|
+
- name: AZURE_ENV_NAME
|
|
27
|
+
value: dev
|
|
28
|
+
- name: RUN_AZD_PROVISION
|
|
29
|
+
value: "true"
|
|
30
|
+
|
|
31
|
+
stages:
|
|
32
|
+
- stage: provision
|
|
33
|
+
displayName: azd provision (dev)
|
|
34
|
+
jobs:
|
|
35
|
+
- deployment: azd_provision
|
|
36
|
+
environment: dev
|
|
37
|
+
strategy:
|
|
38
|
+
runOnce:
|
|
39
|
+
deploy:
|
|
40
|
+
steps:
|
|
41
|
+
- checkout: self
|
|
42
|
+
- task: AzureCLI@2
|
|
43
|
+
displayName: Prepare azd env and provision
|
|
44
|
+
inputs:
|
|
45
|
+
azureSubscription: $(AZURE_SERVICE_CONNECTION)
|
|
46
|
+
scriptType: bash
|
|
47
|
+
scriptLocation: inlineScript
|
|
48
|
+
inlineScript: |
|
|
49
|
+
test -f azure.yaml || {
|
|
50
|
+
echo "##vso[task.logissue type=error;sourcepath=azure.yaml]No azure.yaml found. Ask your coding agent to generate a zero-trust azd deployment, then re-run this pipeline."
|
|
51
|
+
exit 1
|
|
52
|
+
}
|
|
53
|
+
curl -fsSL https://aka.ms/install-azd.sh | bash
|
|
54
|
+
azd env new "$(AZURE_ENV_NAME)" --no-prompt --subscription "$(AZURE_SUBSCRIPTION_ID)" ${AZURE_LOCATION:+--location "$AZURE_LOCATION"} \
|
|
55
|
+
|| azd env select "$(AZURE_ENV_NAME)"
|
|
56
|
+
azd env set AZURE_SUBSCRIPTION_ID "$(AZURE_SUBSCRIPTION_ID)"
|
|
57
|
+
if [ -n "$AZURE_LOCATION" ]; then
|
|
58
|
+
azd env set AZURE_LOCATION "$AZURE_LOCATION"
|
|
59
|
+
fi
|
|
60
|
+
if [ "$(RUN_AZD_PROVISION)" = "true" ]; then
|
|
61
|
+
__AILZ_PREFLIGHT_COMMAND__
|
|
62
|
+
azd provision --no-prompt
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
- stage: eval
|
|
66
|
+
displayName: AgentOps eval (pre-deploy)
|
|
67
|
+
dependsOn: provision
|
|
68
|
+
jobs:
|
|
69
|
+
- job: eval_gate
|
|
70
|
+
steps:
|
|
71
|
+
- checkout: self
|
|
72
|
+
- task: UsePythonVersion@0
|
|
73
|
+
inputs:
|
|
74
|
+
versionSpec: "3.11"
|
|
75
|
+
- bash: |
|
|
76
|
+
python -m pip install --upgrade pip
|
|
77
|
+
python -m pip install "agentops-accelerator[foundry] @ git+https://github.com/Azure/agentops.git@main"
|
|
78
|
+
displayName: Install AgentOps Toolkit
|
|
79
|
+
|
|
80
|
+
__EVAL_TASKS__
|
|
81
|
+
- task: PublishPipelineArtifact@1
|
|
82
|
+
condition: always()
|
|
83
|
+
inputs:
|
|
84
|
+
targetPath: __EVAL_ARTIFACT_TARGET__
|
|
85
|
+
artifact: agentops-deploy-dev-results
|
|
86
|
+
publishLocation: pipeline
|
|
87
|
+
|
|
88
|
+
- stage: deploy
|
|
89
|
+
displayName: azd deploy (dev)
|
|
90
|
+
dependsOn: eval
|
|
91
|
+
jobs:
|
|
92
|
+
- deployment: azd_deploy
|
|
93
|
+
environment: dev
|
|
94
|
+
strategy:
|
|
95
|
+
runOnce:
|
|
96
|
+
deploy:
|
|
97
|
+
steps:
|
|
98
|
+
- checkout: self
|
|
99
|
+
- task: AzureCLI@2
|
|
100
|
+
displayName: Run azd deploy
|
|
101
|
+
inputs:
|
|
102
|
+
azureSubscription: $(AZURE_SERVICE_CONNECTION)
|
|
103
|
+
scriptType: bash
|
|
104
|
+
scriptLocation: inlineScript
|
|
105
|
+
inlineScript: |
|
|
106
|
+
curl -fsSL https://aka.ms/install-azd.sh | bash
|
|
107
|
+
test -f azure.yaml || {
|
|
108
|
+
echo "##vso[task.logissue type=error;sourcepath=azure.yaml]No azure.yaml found. Ask your coding agent to generate a zero-trust azd deployment, then re-run this pipeline."
|
|
109
|
+
exit 1
|
|
110
|
+
}
|
|
111
|
+
azd env new "$(AZURE_ENV_NAME)" --no-prompt --subscription "$(AZURE_SUBSCRIPTION_ID)" ${AZURE_LOCATION:+--location "$AZURE_LOCATION"} \
|
|
112
|
+
|| azd env select "$(AZURE_ENV_NAME)"
|
|
113
|
+
azd env set AZURE_SUBSCRIPTION_ID "$(AZURE_SUBSCRIPTION_ID)"
|
|
114
|
+
if [ -n "$AZURE_LOCATION" ]; then
|
|
115
|
+
azd env set AZURE_LOCATION "$AZURE_LOCATION"
|
|
116
|
+
fi
|
|
117
|
+
azd env refresh "$(AZURE_ENV_NAME)" --no-prompt
|
|
118
|
+
azd deploy --no-prompt
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# AgentOps — Deploy to dev (Azure DevOps Pipelines)
|
|
2
|
+
#
|
|
3
|
+
# Runs on push to `develop`. Executes the AgentOps eval against the dev
|
|
4
|
+
# environment; on PASS, calls `agentops/deploy.sh` (your project hook)
|
|
5
|
+
# to promote the agent. Adjust the deploy step to match your tooling.
|
|
6
|
+
#
|
|
7
|
+
# Setup mirrors agentops-pr.yml (variable group `agentops`, service
|
|
8
|
+
# connection `agentops-azure`).
|
|
9
|
+
#
|
|
10
|
+
# Generated by `agentops workflow generate --platform azure-devops`.
|
|
11
|
+
|
|
12
|
+
trigger:
|
|
13
|
+
branches:
|
|
14
|
+
include:
|
|
15
|
+
- develop
|
|
16
|
+
|
|
17
|
+
pr: none
|
|
18
|
+
|
|
19
|
+
pool:
|
|
20
|
+
vmImage: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
variables:
|
|
23
|
+
- group: agentops
|
|
24
|
+
- name: AZURE_SERVICE_CONNECTION
|
|
25
|
+
value: agentops-azure
|
|
26
|
+
- name: AGENTOPS_CONFIG
|
|
27
|
+
value: agentops.yaml
|
|
28
|
+
- name: TARGET_ENVIRONMENT
|
|
29
|
+
value: dev
|
|
30
|
+
|
|
31
|
+
stages:
|
|
32
|
+
- stage: eval
|
|
33
|
+
displayName: AgentOps eval (pre-deploy)
|
|
34
|
+
jobs:
|
|
35
|
+
- deployment: agentops_eval_and_deploy
|
|
36
|
+
displayName: Eval + deploy to $(TARGET_ENVIRONMENT)
|
|
37
|
+
environment: $(TARGET_ENVIRONMENT)
|
|
38
|
+
timeoutInMinutes: 45
|
|
39
|
+
strategy:
|
|
40
|
+
runOnce:
|
|
41
|
+
deploy:
|
|
42
|
+
steps:
|
|
43
|
+
- checkout: self
|
|
44
|
+
fetchDepth: 1
|
|
45
|
+
|
|
46
|
+
- task: UsePythonVersion@0
|
|
47
|
+
displayName: Set up Python 3.11
|
|
48
|
+
inputs:
|
|
49
|
+
versionSpec: "3.11"
|
|
50
|
+
|
|
51
|
+
- bash: |
|
|
52
|
+
python -m pip install --upgrade pip
|
|
53
|
+
python -m pip install "agentops-accelerator[foundry] @ git+https://github.com/Azure/agentops.git@main"
|
|
54
|
+
displayName: Install AgentOps Toolkit
|
|
55
|
+
|
|
56
|
+
__EVAL_TASKS__
|
|
57
|
+
|
|
58
|
+
- task: PublishPipelineArtifact@1
|
|
59
|
+
displayName: Upload AgentOps results
|
|
60
|
+
condition: always()
|
|
61
|
+
inputs:
|
|
62
|
+
targetPath: __EVAL_ARTIFACT_TARGET__
|
|
63
|
+
artifact: agentops-deploy-$(TARGET_ENVIRONMENT)-results
|
|
64
|
+
publishLocation: pipeline
|
|
65
|
+
|
|
66
|
+
- bash: |
|
|
67
|
+
if [ -x ./agentops/deploy.sh ]; then
|
|
68
|
+
./agentops/deploy.sh "$(TARGET_ENVIRONMENT)"
|
|
69
|
+
else
|
|
70
|
+
echo "##[warning]No ./agentops/deploy.sh hook found; skipping deploy step."
|
|
71
|
+
echo "Drop a script there to publish your agent/prompt/model to $(TARGET_ENVIRONMENT)."
|
|
72
|
+
fi
|
|
73
|
+
displayName: Deploy to $(TARGET_ENVIRONMENT)
|