Add CP1 Discovery agents in both patterns
All checks were successful
check agents / check (push) Successful in 10s

ALZ-F01 Discovery as a sub-agent orchestrator (sub-agents/) and as eight
individual declarative agents (individual-agents/), with their KAB workflow
exports. Shared check, render and import scripts, the alz-discovery-sample
MCP server, the crucible-kab-dev deploy profile, deployment docs, platform
issue reports and the source material. Agent steps time out at 20 minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 18:25:57 +00:00
commit 416c66ced4
331 changed files with 33561 additions and 0 deletions

View File

@@ -0,0 +1,134 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: <placeholder_for_agent_name>-config # Do not modify, this will be replaced during deployment by the CI/CD pipeline
data:
# This file is the agent's configuration contract. deployment.yaml mounts it
# with `envFrom: configMapRef`, so every key below arrives in the container as
# an environment variable. ./run-local.sh reads the same file, so local runs
# and deployed runs share one source of truth.
#
# Values are read once at process start. Changing a key requires a restart
# (`kubectl rollout restart deploy/<agent>`), not just a ConfigMap apply.
#
# Secrets do NOT belong here — see kubernetes/secretnames.yaml.
# =============================================================================
# Platform Variables (set by Kustomize/Deployment)
# =============================================================================
PORT: "8080"
LOG_LEVEL: "INFO" # DEBUG adds prompts, payloads and replies to the log
# json: one object per line, for a log store. console: aligned columns, for
# reading by eye (set it in .env on your machine).
LOG_FORMAT: "json"
# =============================================================================
# Required Agent Configuration
# =============================================================================
# The agent's name, description, version and framework -- and its tags,
# capabilities and skills -- live in agent.yaml, the source of truth for all
# of them. They are not read from here.
# LLM model (required) - MUST use *LLM_MODEL or *SLM_MODEL pattern for watcher
# Any model the platform's gateway offers, e.g. gpt-5.4, claude-sonnet-4-6.
LITELLM_MODEL: "gpt-5.6-sol"
# Each sub-agent's model: <NAME>_LLM_MODEL for the sub-agent named <name>.
# Unset, a sub-agent uses LITELLM_MODEL. The critic runs on a different model
# from the agents it judges, so it does not share their blind spots. Confirm
# claude-sonnet-5-5 is on the cluster's gateway before the first run.
DSC_08_CRITIC_LLM_MODEL: "claude-sonnet-5-5"
# =============================================================================
# Optional Model Settings
# =============================================================================
# These MUST carry the LITELLM_ prefix. The runtime configures the model via
# build_model(), which reads LITELLM_TEMPERATURE / LITELLM_MAX_TOKENS
# (defaults 0.0 / 16384). The unprefixed LLM_TEMPERATURE / LLM_MAX_TOKENS names
# are read by a different SDK code path that does not configure this agent's
# model, so setting those is silently ignored — the agent keeps running at the
# defaults with no error to chase.
LITELLM_TEMPERATURE: "1"
LITELLM_MAX_TOKENS: "32000"
# =============================================================================
# Agent Loop Guard Rails
# =============================================================================
# An agent with tools makes as many model calls as the model decides it
# needs. These bound that. Any one of them ends the loop, and the caller
# receives an answer explaining why rather than an error.
#
# The defaults sit well above normal work, so they catch runaways — most
# often a tool bug that keeps telling the model to call it again — without
# affecting an agent that is behaving. Measure your agent's typical call
# count in the `agent_loop_completed` log line before tightening them.
#
# An agent with no tools cannot loop: one request is one model call, and
# these settings have nothing to bound.
#
AGENT_GUARDRAILS_ENABLED: "true" # "false" removes the bounds; the run is still counted and logged
# The orchestrator makes one model call per round of MCP calls, so a scan
# batch or the analyse phase needs more than 25. Sub-agents are asked from
# code (delegate), outside the request's model-call budget, and keep their
# own per-run bound. Measure `agent_loop_completed` and set it just above.
AGENT_MAX_ITERATIONS: "60" # model calls per run: the agent's, or one sub-agent's
# Model calls in the whole request, the sub-agents the model calls included
# (runtime 0.28.2 or later). Default 4 x AGENT_MAX_ITERATIONS.
# AGENT_MAX_REQUEST_MODEL_CALLS: "100"
AGENT_MAX_DURATION_SECONDS: "1140" # wall clock per request (19 minutes): inside the workflow step's 20, so the agent replies before the step is cut off
AGENT_MAX_TOKENS: "0" # total tokens per request; 0 = no limit
# =============================================================================
# Connections: set by the platform, not here
# =============================================================================
# The model gateway (LITELLM_PROXY_BASE, GATEWAY_TYPE), the MCP gateway
# (MCP_GATEWAY_URL) and where telemetry goes (OBSERVABILITY_TYPE,
# OTEL_EXPORTER_OTLP_ENDPOINT) are the same for every agent in an environment.
# The platform supplies them in the agents namespace (ConfigMap
# agent-platform-connections), and the Deployment reads them last, so a value
# here would be overridden. Telemetry goes to the platform's OpenTelemetry
# Collector, which holds any keys. Locally, .env holds them (.env.example).
# =============================================================================
# Inbound checks (runtime 0.25.0 or later)
# =============================================================================
# What the agent accepts before any of its work starts.
AGENT_MAX_CONCURRENT_REQUESTS: "100" # one more at once gets HTTP 503, which Temporal retries
# AGENT_MAX_REQUEST_BYTES: "67108864" # 64 MiB; a larger request body gets HTTP 413
# The name of a guardrail configured on the LLM gateway. Each request's text
# is screened by it before the agent runs; a blocked request fails with the
# gateway's reason, with no model call and no cost.
# AGENT_INPUT_GUARDRAIL: ""
# AGENT_INBOUND_TOKEN is a secret, so it is not set here (see
# kubernetes/secretnames.yaml). The platform does not send it yet: leave it unset.
# =============================================================================
# Outbound connections (runtime 0.25.0 or later)
# =============================================================================
# The agent may connect to its own endpoints: the LLM gateway, the MCP
# gateway, its telemetry, localhost, and the hosts in AGENT_EGRESS_ALLOW.
# enforce (default): a connection to any other host is refused and logged
# as egress_blocked, with the file and line that made it.
# log: such a connection goes through and is logged as egress_unlisted.
# off: not watched.
# Reach outside systems through the MCP gateway rather than adding hosts here.
# The cluster's network policy remains the real boundary.
AGENT_EGRESS: "enforce"
# AGENT_EGRESS_ALLOW: "" # comma-separated hosts; *.<domain> for a domain and its subdomains
# =============================================================================
# Run workspace
# =============================================================================
# Where app/workspace.py keeps each run's records: the shared execution-storage-pvc that deployment.yaml mounts
# at /data/executions. The platform does not set this for agents in kab-dev, and without it the workspace falls
# back to /tmp/executions inside the container, which a restart wipes, and which later phases on another pod
# cannot read.
EXECUTION_STORAGE_ROOT: "/data/executions"
# =============================================================================
# Observability content
# =============================================================================
# Discovery handles a client's estate data. "false" keeps prompts, replies and
# tool data out of traces; the run workspace and its manifest remain the record.
OBSERVABILITY_CAPTURE_CONTENT: "false"

View File

@@ -0,0 +1,81 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: <placeholder_for_agent_name> # Do not modify, this will be replaced during deployment by the CI/CD pipeline
labels:
app: <placeholder_for_agent_name> # Do not modify, this will be replaced during deployment by the CI/CD pipeline
repo: <placeholder_for_repo_name> # Do not modify, this will be replaced during deployment by the CI/CD pipeline
spec:
replicas: 1
selector:
matchLabels:
app: <placeholder_for_agent_name> # Do not modify, this will be replaced during deployment by the CI/CD pipeline
template:
metadata:
labels:
app: <placeholder_for_agent_name> # Do not modify, this will be replaced during deployment by the CI/CD pipeline
spec:
imagePullSecrets:
- name: jfrog-secret
containers:
- name: <placeholder_for_agent_name> # Do not modify, this will be replaced during deployment by the CI/CD pipeline
image: <placeholder_for_image> # Do not modify, this will be replaced during deployment by the CI/CD pipeline
imagePullPolicy: Always
ports:
- containerPort: <placeholder_for_port> # Do not modify, this will be replaced during deployment by the CI/CD pipeline
name: http
# Load all environment variables from ConfigMap and Secrets
envFrom:
- secretRef:
name: <placeholder_for_agent_name>-secrets # Do not modify, this will be replaced during deployment by the CI/CD pipeline
optional: true
- secretRef:
name: <placeholder_for_agent_name>-dotenv-secrets # Do not modify, this will be replaced during deployment by the CI/CD pipeline
optional: true
- configMapRef:
name: <placeholder_for_agent_name>-config # Do not modify, this will be replaced during deployment by the CI/CD pipeline
# The platform's connections, the same for every agent: the model
# gateway, the MCP gateway and where telemetry goes. Last, so they win
# over anything above; an agent does not choose them. Created by the
# platform's Helm chart in this namespace.
- configMapRef:
name: agent-platform-connections
optional: true
# Platform-provided credentials
env:
- name: LITELLM_MASTER_KEY
valueFrom:
secretKeyRef:
name: agent-builder-secrets
key: litellm-master-key
volumeMounts:
- name: execution-storage
mountPath: /data/executions
resources:
requests:
memory: "128Mi"
cpu: "10m"
limits:
memory: "1024Mi"
cpu: "1000m"
# Health checks use A2A agent card endpoint
livenessProbe:
httpGet:
path: /.well-known/agent-card.json
port: <placeholder_for_port>
initialDelaySeconds: 30
periodSeconds: 60
timeoutSeconds: 10
failureThreshold: 5
readinessProbe:
httpGet:
path: /.well-known/agent-card.json
port: <placeholder_for_port>
initialDelaySeconds: 30
periodSeconds: 60
timeoutSeconds: 10
failureThreshold: 5
volumes:
- name: execution-storage
persistentVolumeClaim:
claimName: execution-storage-pvc # Same PVC name as core-components

View File

@@ -0,0 +1,20 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- namespace.yaml
- deployment.yaml
- service.yaml
- configmap.yaml
- secretnames.yaml
# Optionally add common labels
# Namespace for all resources
namespace: agents
labels:
- includeSelectors: true
pairs:
app: <placeholder_for_agent_name> # Do not modify, this will be replaced during deployment by the CI/CD pipeline
environment: production
repo: <placeholder_for_repo_name> # Do not modify, this will be replaced during deployment by the CI/CD pipeline

View File

@@ -0,0 +1,7 @@
# Do not modify this file, otherwise CI/CD pipeline will fail
apiVersion: v1
kind: Namespace
metadata:
name: agents
labels:
name: agents

View File

@@ -0,0 +1,34 @@
apiVersion: v1
kind: Secret
metadata:
name: <placeholder_for_agent_name>-secrets
type: Opaque
data:
# Base64 encoded values (NOT RECOMMENDED for sensitive data)
# To encode: echo -n 'your-secret-value' | base64
# Example: api-key: eW91ci1hcGkta2V5LXZhbHVl
stringData:
# Plain text values saved on GitHub Secrets (RECOMMENDED)
# Example:
#
# DB_PASSWORD: ${DB_PASSWORD_GITHUB_SECRET}
# ANOTHER_SECRET: ${ANOTHER_GITHUB_SECRET}
#
# ${DB_PASSWORD_GITHUB_SECRET} and ${ANOTHER_GITHUB_SECRET} must exist as GitHub Secrets
#
# AGENT_INBOUND_TOKEN (runtime 0.25.0 or later): when set, every call to the
# agent must carry it as a bearer token, and other calls get HTTP 401. It is
# a secret, so it goes here, never in the ConfigMap. The platform does not
# send this token to agents yet, so leave it unset for now.
# AGENT_INBOUND_TOKEN: ${AGENT_INBOUND_TOKEN_GITHUB_SECRET}
#
# Telemetry keys are not here: agents send to the platform's OpenTelemetry
# Collector, which holds them.
#
# AGENT_CONTINUATION_KEY (runtime 0.28.0 or later): signs the conversation the
# agent hands the platform when it pauses for a person's approval, so it can
# carry on from there. A long random string, different for each agent. Unset,
# each process makes its own at start-up: an answer that reaches another
# replica, or comes after a restart, runs the step again from the start.
# AGENT_CONTINUATION_KEY: ${AGENT_CONTINUATION_KEY_GITHUB_SECRET}

View File

@@ -0,0 +1,33 @@
apiVersion: v1
kind: Service
metadata:
name: <placeholder_for_agent_name>
labels:
app: <placeholder_for_agent_name>
repo: <placeholder_for_repo_name> # Do not modify, this will be replaced during deployment by the CI/CD pipeline
spec:
type: ClusterIP
ports:
- port: <placeholder_for_port> # Do not modify, this will be replaced during deployment by the CI/CD pipeline
targetPort: <placeholder_for_port> # Do not modify, this will be replaced during deployment by the CI/CD pipeline
protocol: TCP
name: http
selector:
app: <placeholder_for_agent_name>
---
# Optional: LoadBalancer service for external access
# apiVersion: v1
# kind: Service
# metadata:
# name: <placeholder_for_agent_name>-external
# labels:
# app: <placeholder_for_agent_name>
# spec:
# type: LoadBalancer
# ports:
# - port: 80
# targetPort: 8080
# protocol: TCP
# name: http
# selector:
# app: <placeholder_for_agent_name>