Skip to content

feat(agentsysperf): AgentSysPerf Integration - #47

Closed
AhmedSeemalK wants to merge 1 commit into
mainfrom
feature/agentsysperf-integration
Closed

AhmedSeemalK wants to merge 1 commit into
mainfrom
feature/agentsysperf-integration

Conversation

@AhmedSeemalK

Copy link
Copy Markdown
Contributor

Summary

AgentSysPerf benchmarks agents on the toolkit: scored Terminal-Bench runs and concurrency ladders with their system cost, shown on its own dashboard, Grafana and Langfuse. This PR lets the toolkit install and wire it when agentsysperf_enabled: true.

Changes

AgentSysPerf components (new; asp_platform, asp_images, asp_dashboard, plus the shared asp_common):

  • components.yaml: the three components, after kuberay; same-layer depends_on on pgvector and agent_sandbox. Teardown always plans them, so switching off never strands what they made, and teardown works without the checkout.
  • roles/asp_platform: preflight, the results database aspdb on pgvector, a non-admin LiteLLM key, the driver's ServiceAccount, RBAC and router token, Pushgateway and Grafana dashboards, and the cluster contract (ConfigMap asp-cluster-env) that AgentSysPerf runs read.
  • roles/asp_images: builds the driver and dashboard images once with a pinned BuildKit, loads them on every node, labels the nodes.
  • roles/asp_dashboard: the dashboard behind the gateway, with Keycloak sign-in for the platform admin group.
  • config.yaml: the AgentSysPerf section (switch and settings). docs/agentsysperf.md and a README line.

Signed-off-by: Ahmed Seemal <ahmed.seemal@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Copilot review overview

6 open issues
What changed in this PR

Integrates AgentSysPerf into the toolkit so it can be installed/validated/torn down via components when agentsysperf_enabled: true, including image build/distribution and an optional dashboard.

Changes:

  • Adds new Ansible roles/components (asp_platform, asp_images, asp_dashboard, shared asp_common) to provision the result store, credentials/RBAC, observability hooks, images, and dashboard.
  • Updates pgvector and agent-sandbox to support AgentSysPerf’s operational needs (more connections/resources; router HBONE ingress).
  • Adds configuration/docs wiring (config.yaml, components.yaml, docs/agentsysperf.md, README link).
File Description
roles/​pgvector/​defaults/​main.yaml Makes pgvector sizing/params conditional on AgentSysPerf enablement
roles/​asp_platform/​tasks/​validate.yaml Adds read-only validation of AgentSysPerf contract, secrets, and DB
roles/​asp_platform/​tasks/​teardown.yaml Adds teardown flow (revoke LiteLLM key, drop DB optionally, remove resources)
roles/​asp_platform/​tasks/​store.yaml Creates results DB and writes DSN secrets in both namespaces
roles/​asp_platform/​tasks/​runner.yaml Installs driver SA/RBAC and optionally provisions router token secret
roles/​asp_platform/​tasks/​preflight.yaml Adds preflight checks for routing, proxy, pgvector, agent-sandbox, and mesh policies
roles/​asp_platform/​tasks/​observability.yaml Deploys pushgateway/dashboards and propagates Langfuse keys
roles/​asp_platform/​tasks/​main.yaml Adds dispatcher for install/teardown/validate actions
roles/​asp_platform/​tasks/​llm_key.yaml Mints/stores non-admin LiteLLM key for AgentSysPerf
roles/​asp_platform/​tasks/​install.yaml Orchestrates AgentSysPerf platform install steps
roles/​asp_platform/​tasks/​contract.yaml Publishes contract ConfigMap and applies node labeling for driver pinning
roles/​asp_platform/​defaults/​main.yaml Adds role defaults (helm timeout)
roles/​asp_images/​tasks/​validate.yaml Validates images exist on all nodes and node labels are set
roles/​asp_images/​tasks/​tools.yaml Locates nerdctl/runc paths based on containerd service
roles/​asp_images/​tasks/​teardown.yaml Removes images/buildkit artifacts and clears node labels
roles/​asp_images/​tasks/​main.yaml Adds dispatcher for install/teardown/validate actions
roles/​asp_images/​tasks/​install.yaml Builds/distributes images and labels nodes
roles/​asp_images/​tasks/​distribute.yaml Saves/ships a tarball to load images on other nodes (no registry)
roles/​asp_images/​tasks/​build.yaml Installs pinned BuildKit and builds AgentSysPerf images into containerd
roles/​asp_images/​defaults/​main.yaml Defines default AgentSysPerf Dockerfiles to build
roles/​asp_dashboard/​tasks/​validate.yaml Validates dashboard deployment, route acceptance, and SSO policy
roles/​asp_dashboard/​tasks/​teardown.yaml Removes SSO policy, route, published host entry, helm release, and secrets
roles/​asp_dashboard/​tasks/​main.yaml Adds dispatcher for install/teardown/validate actions
roles/​asp_dashboard/​tasks/​install.yaml Installs dashboard chart, publishes host, and configures Keycloak SSO
roles/​asp_dashboard/​defaults/​main.yaml Adds dashboard defaults (port, helm timeout)
roles/​asp_common/​tasks/​facts.yaml Adds shared facts (checkout, tags, nodes, proxies, service discovery)
roles/​asp_common/​defaults/​main.yaml Adds AgentSysPerf configuration defaults/switches
roles/​agent_sandbox/​tasks/​install.yaml Admits Istio ambient HBONE traffic and narrows readiness wait to toolkit pods
docs/​agentsysperf.md Adds AgentSysPerf setup and usage documentation
config.yaml Adds AgentSysPerf configuration section
components.yaml Registers new AgentSysPerf components with enable/teardown behavior
charts/​pgvector/​templates/​statefulset.yaml Adjusts pg_isready probes to use TCP localhost
README.md Adds link/mention to AgentSysPerf docs

Review effort: Lite

Comment thread components.yaml
enabled: >-
{{ ((agentsysperf_enabled | default(false) | bool) and (agentsysperf_dashboard_enabled | default(true) | bool))
or (component_action | default('install')) == 'teardown' }}
depends_on: [asp_platform, asp_images]
Comment on lines +85 to +106
- name: "agent_sandbox | Admit mesh callers to the sandbox-router (HBONE)"
kubernetes.core.k8s:
state: present
definition:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: eat-sandbox-router-mesh
namespace: "{{ agent_sandbox_namespace }}"
labels:
app.kubernetes.io/managed-by: agentic-ai-stack
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: sandbox-router
app.kubernetes.io/component: sandbox-router
policyTypes: [Ingress]
ingress:
- from:
- namespaceSelector: {}
ports:
- {protocol: TCP, port: 15008}
Comment on lines +27 to +28
labels:
agentsysperf.intel.com/driver: "{{ 'true' if item == agentsysperf_driver_node else none }}"
namespace: "{{ _asp_pgvector_ns }}"
pod: "{{ _asp_pgv_pods.resources[0].metadata.name }}"
command: >-
psql -U {{ _asp_pg_su }} -d postgres -tAc "SELECT 1 FROM pg_database WHERE datname='{{ agentsysperf_store_database }}'"
namespace: "{{ _asp_pgvector_ns }}"
pod: "{{ _asp_pgv_pods.resources[0].metadata.name }}"
command: >-
psql -U {{ _asp_pg_su }} -d postgres -c "CREATE DATABASE {{ agentsysperf_store_database }} OWNER {{ _asp_pg_user }}"
Comment thread docs/agentsysperf.md
```bash
cd ext/agentsysperf
helm install smoke deploy/chart -n agent-sandbox-system -f deploy/chart/presets/smoke.yaml
helm install tb1 deploy/chart -n agent-sandbox-system -f deploy/chart/presets/tb2-gateway.yaml
@AhmedSeemalK

Copy link
Copy Markdown
Contributor Author

Moving it to toolkit-manager
intel/toolkit-manager#192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants