Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .circleci/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
# generator gates the release push on, the way image.preBuildJob gates the
# image). A release refused this way is recovered by rerunning the tag's
# workflow from failed once the component chart is out, without a new tag.
# - stamp-release-commit (tags only): hack/stamp-release-commit.sh writes the
# tag's commit into helm/agent-platform/agents/ (default-agent's skill
# pins; the agent chart refuses a tag) and persists it to the workspace,
# which the generated push-chart-release attaches over its checkout before
# packaging: it requires the stamp through verify-release-floors and
# push-connectivity-chart-release. Unstamped (branch builds) default-agent
# renders without skills; make verify-default-agent simulates the step.
#
# The agent-platform-crds chart has been RETIRED — every component now ships
# its own CRDs (app-owned CRDs), so there is no longer a CRD-bundle chart to
Expand Down Expand Up @@ -81,6 +88,24 @@ jobs:
# `helm dependency build`.
command: make verify-all

stamp-release-commit:
docker:
- image: cimg/base:current
resource_class: small
steps:
- checkout
- run:
name: stamp the tag's commit into the chart (hack/stamp-release-commit.sh)
command: |
commit=$(git rev-parse HEAD)
[ "$commit" = "$CIRCLE_SHA1" ] || { echo "checked out $commit, the pipeline's commit is $CIRCLE_SHA1" >&2; exit 1; }
hack/stamp-release-commit.sh "$commit"
grep -cF "commit: \"$commit\"" helm/agent-platform/agents/default-agent/values.yaml
- persist_to_workspace:
root: .
paths:
- helm/agent-platform/agents

verify-release-floors:
# The tag pipeline's gate (giantswarm/agent-platform#624). Same image and the
# same bounded, retried installs as test-ingress-modes, without kyverno: the
Expand Down Expand Up @@ -118,7 +143,19 @@ workflows:
# pushes of the tag wait on it — the connectivity push below by its
# requires, the generated push-chart-release through the generator's
# chart release gate (gen.ci.chartReleaseGateJob).
- stamp-release-commit:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/

- verify-release-floors:
# Carries the stamp to push-chart-release (through
# push-connectivity-chart-release): a chart pushed without it would pin
# no skills.
requires:
- stamp-release-commit
filters:
tags:
only: /^v.*/
Expand Down
5 changes: 5 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ placement* section, kept in its internal plans repository.
golden flags, with a comment saying why, and asserted by a `verify-*` target of its own.
- A change that moves the committed renders under `tests/golden/` on purpose runs
`make golden-update` and commits the diff, which is what a reviewer reads.

## Platform skills

- A change that alters what an agent or a person can do, see or configure on the platform updates
the affected skills in `skills/` in the same pull request; `make verify-skills` checks their layout.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- **The chart ships one agent, the General Purpose Agent** (giantswarm/giantswarm#39057). The new component `default-agent` deploys it as a release of the agent chart into the kagent namespace while kagent and muster are on, with the toolset `preset:full` (every connector the person is signed in to) and the prompt in `agents/default-agent/values.yaml`. `defaultAgent.displayName` (default "General Purpose Agent") and `defaultAgent.modelConfig` configure it; `components.default-agent.enabled: false` leaves it out. While it is on, klaus-gateway's `a2a.defaultAgent` (`<kagent namespace>/default-agent`) and every agent role of the portal (`agentPlatform.metaAgents`) default to it; an own `klausGateway.a2a.defaultAgent` or `backstage.metaAgents.<role>` wins.
- **The platform's skills ship with the chart** (giantswarm/giantswarm#39057). `skills/` carries the five `agent-platform-*` skills, checked by `make verify-skills`. The General Purpose Agent pins them to the release tag's commit, which the tag pipeline stamps into the chart (`hack/stamp-release-commit.sh`); a branch build deploys the agent without skills, and a release packaged without the stamp fails its render.
- **The component loop takes `valuesFile`, `labels`, `inKagentNamespace` and `disableWait`**, and names a release, its HelmRelease and OCIRepository after its `components` key.

### Changed

- **`agentPlatformOrganizations.enabled` turns on agent-manager's organization tools** (giantswarm/giantswarm#38891). With the switch and `components.agent-manager` on, the meta chart sets agent-manager's `tenants.enabled: true`, and with `components.backstage` on its `devPortal.url` to `https://<backstage.hostname>` (else `backstage.<global.domain>`), the portal the tools link a missing credential's form to. With `components.backstage` off, an own `agent-manager.devPortal.url` is forwarded unchanged. `components.agent-manager.versionRange` is `>=2.20.0 <3.0.0` (was `>=2.19.0 <3.0.0`): the switch needs an agent-manager floor of 2.20.0, whose chart leaves the ClusterRole `agent-platform-tenant-flux` to the connectivity chart (giantswarm/agent-manager#305): an earlier chart renders it too, and the two releases' upgrades end without it. The render fails on an earlier floor, on an own `agent-manager.tenants.enabled` that differs from the switch, on any other own `agent-manager.tenants` key (agent-manager 2.19 refuses it), on an own `devPortal.url` other than the installed portal's, and with the switch on while `agent-manager.oauth.downstream.enabled` is off.
Expand Down
12 changes: 11 additions & 1 deletion Makefile.custom.mk
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ verify-meta: ## Assert the app-of-apps meta-package render (pure renderer with t
@grep -qE '^ - name: agentgateway$$' $(VERIFY_TMP)/ap-flux.out || { echo "FAIL: a CR consumer no longer dependsOn its CRD-owning component (agentgateway)"; exit 1; }
@echo "--> kagent's first install does not wait for the controller (it mounts the CNPG Secret connectivity renders, and connectivity dependsOn kagent)"
@$(HELM) template t $(CHART_DIR) -f $(CHART_DIR)/ci/ci-values.yaml $(ENGINE_OFF) --set components.kagent.enabled=true >$(VERIFY_TMP)/ap-kag.out 2>&1 || { cat $(VERIFY_TMP)/ap-kag.out; exit 1; }
@python3 -c 'import re,sys; docs=open("$(VERIFY_TMP)/ap-kag.out").read().split("\n---\n"); hr=[d for d in docs if "kind: HelmRelease" in d and re.search(r"^ name: kagent$$", d, re.M)]; sys.exit("FAIL: kagent HelmRelease not rendered") if not hr else None; waived=[re.search(r"^ name: (.*)$$", d, re.M).group(1) for d in docs if "kind: HelmRelease" in d and "disableWait: true" in d and not (re.search(r"^ name: muster$$", d, re.M) and "gatewayIdentity:" in d)]; sys.exit("FAIL: a component install no longer waits for its workload: "+", ".join(waived)+" (kagent and substrate depend on the connectivity release, whose hooks mint what their pods start against, so every install waits)") if waived else print("ok: every component install waits for its workload (no install.disableWait), but muster while its credential provider mounts the certificates of a substrate release not Ready yet (giantswarm/agent-platform#1107)")'
@python3 -c 'import re,sys; docs=open("$(VERIFY_TMP)/ap-kag.out").read().split("\n---\n"); hr=[d for d in docs if "kind: HelmRelease" in d and re.search(r"^ name: kagent$$", d, re.M)]; sys.exit("FAIL: kagent HelmRelease not rendered") if not hr else None; waived=[re.search(r"^ name: (.*)$$", d, re.M).group(1) for d in docs if "kind: HelmRelease" in d and "disableWait: true" in d and not (re.search(r"^ name: muster$$", d, re.M) and "gatewayIdentity:" in d) and not re.search(r"^ name: default-agent$$", d, re.M)]; sys.exit("FAIL: a component install no longer waits for its workload: "+", ".join(waived)+" (kagent and substrate depend on the connectivity release, whose hooks mint what their pods start against, so every install waits)") if waived else print("ok: every component install waits for its workload (no install.disableWait), but muster while its credential provider mounts the certificates of a substrate release not Ready yet (giantswarm/agent-platform#1107), and default-agent, whose Agent reports its own readiness (components.default-agent.disableWait)")'
@echo "ok: flux render"
@echo "--> agentgateway 2.x wiring: forwarded values are FLAT and carry no umbrella-only key"
@./tests/verify-agentgateway-wiring.py $(VERIFY_TMP)/ap-flux.out
Expand Down Expand Up @@ -1500,6 +1500,16 @@ verify-fast-links: ## Assert the fast-link input of the model serving layer (gia
@echo "====> $@ ($(CHART_DIR), $(CONNECTIVITY_DIR))"
@python3 tests/verify-fast-links.py $(CHART_DIR) $(CONNECTIVITY_DIR)

.PHONY: verify-default-agent
verify-default-agent: ## Assert the General Purpose Agent (components.default-agent, giantswarm/giantswarm#39057): one agent chart release in the kagent namespace while it, kagent and muster are on, with the derived values (preset:full, defaultAgent.displayName, defaultAgent.modelConfig); no skills unstamped, every skill of skills/ pinned to the commit hack/stamp-release-commit.sh stamps into a packaged copy (the tag pipeline's step); klaus-gateway's a2a.defaultAgent and the portal's agent roles default to it. HELM selects the binary.
@echo "====> $@ ($(CHART_DIR), $(CONNECTIVITY_DIR))"
@HELM=$(HELM) python3 tests/verify-default-agent.py $(CHART_DIR) $(CONNECTIVITY_DIR)

.PHONY: verify-skills
verify-skills: ## Check the layout of the skills of skills/ (skills/<name>/SKILL.md, frontmatter name = directory name) and that no SKILL.md lives elsewhere (scripts/validate_skills.py); what the agent runtime accepts beyond that is its own check. Needs PyYAML.
@echo "====> $@"
@python3 scripts/validate_skills.py

.PHONY: verify-gpu-pool
verify-gpu-pool: ## Assert the GPU node pool input of the model serving layer (giantswarm/agent-platform#315): modelServing.gpuPool.taint tolerated by every published preset (the pool's entry first, a preset's equal entry once; Exists without a value, Equal with one), modelServing.gpuPool.nodeSelector merged under the presets' own (their keys win), both published as spec.gpuPool in the discovery ConfigMap model-manager >= 0.23.0 reads; an empty taint key renders no toleration and no taint, and the parsed serving render equals the default render with the pool's toleration taken out, object for object, but for the discovery block (both renders are the head's; a mismatch prints a unified diff); the guards (effect, key, string label values); the meta chart forwards the block. Fixture: ci/test-model-serving-gpu-pool-values.yaml. HELM selects the binary.
@echo "====> $@ ($(CHART_DIR), $(CONNECTIVITY_DIR))"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Each component is developed in its own repository, linked above. This repository

- **[`helm/agent-platform`](helm/agent-platform)** is the chart you install. It holds the component roster with version ranges, the bundled Flux engine, self-management, and the install and upgrade hooks.
- **[`helm/agent-platform-connectivity`](helm/agent-platform-connectivity)** wires the components together: routes and gateways, network policies for Cilium and plain Kubernetes, Kyverno exceptions, the kagent model catalog, [serving presets](docs/serving-presets.md) and Grafana dashboards.
- **[`skills`](skills)** holds the platform's own agent skills, pinned to each release. They follow the platform: a change to it updates them in the same pull request.
- **[`tests`](tests)** holds the render assertions behind `make verify-*` and an end-to-end install on kind ([tests/ats](tests/ats/README.md)).

```bash
Expand Down
10 changes: 10 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ Every component ships its own CRDs and upgrades them with its release; there is

A CRD version change that needs more than an apply (a stored version dropped, as with kagent's `v1alpha2`) has its own entry below, with the hook that does it.

## \<current\> → \<next\> (the General Purpose Agent)

giantswarm/giantswarm#39057: the chart deploys the General Purpose Agent (`default-agent` in the kagent namespace) wherever kagent and muster are on. klaus-gateway's `a2a.defaultAgent` and the portal's agent roles default to it.

### Operator action

- **An installation with an agent named `default-agent` in the kagent namespace** (created through agent-manager, the portal or GitOps): rename or delete it before upgrading, or set `components.default-agent.enabled: false`. The platform's release has the same Helm release name and storage namespace, so the two would take over each other's release instead of failing.
- **An installation whose `default-model-config` does not resolve**: set `defaultAgent.modelConfig`.
- **An installation that sets `klausGateway.a2a.defaultAgent`**: none; the own value stays. Remove it to use the General Purpose Agent.

## \<current\> → \<next\> (the charts declare no model)

giantswarm/giantswarm-platform-manager#789: `kagent.providers`, `kagent.defaultModelConfig` and `kagent.modelConfigs` fail the render. The kagent release always carries `providers: false`, so the upgrade deletes `default-model-config` from the kagent namespace, and the connectivity release deletes every ModelConfig it rendered from `kagent.modelConfigs`.
Expand Down
1 change: 1 addition & 0 deletions agents
13 changes: 13 additions & 0 deletions docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,19 @@ The OAuth issuer, client, secret and base URL come from the block, else from `gl

`make verify-managers` covers the wiring and the guards.

### General Purpose Agent and skills

The General Purpose Agent is the agent the platform ships, `default-agent` in the kagent namespace. A session starts with it unless the person picks another agent. Its prompt is in [`agents/default-agent/values.yaml`](../helm/agent-platform/agents/default-agent/values.yaml) and its skills are in [`skills/`](../skills).

| Value | Default | Effect |
|---|---|---|
| `components.default-agent.enabled` | `true` | Deploys the agent while kagent and muster are on. klaus-gateway's `a2a.defaultAgent` and the portal's agent roles default to it. |
| `defaultAgent.displayName` | `General Purpose Agent` | The name people see. |
| `defaultAgent.modelConfig` | `""` | The `ModelConfig` it runs on. Empty uses `default-model-config`. |
| `backstage.metaAgents.<role>` | `{}` | The agent of one portal role, as `<installation>/<namespace>/<agent>`. A role left out uses `default-agent`. |

Its toolset is `preset:full`: every connector the person is signed in to. A release pins the skills to the tag's commit. A branch build deploys the agent without skills.

### Cluster manager

**[cluster-manager](https://github.com/giantswarm/cluster-manager)** is the cluster write surface. It lists clusters and node pools, creates and deletes GPU node pools, and switches model serving on a cluster.
Expand Down
35 changes: 35 additions & 0 deletions hack/stamp-release-commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# Stamp a release's commit into the chart: every `[[ .SHA ]]` placeholder of the
# agents' values files (helm/agent-platform/agents/) becomes the full commit id
# the agent chart pins the platform's skills to (it refuses a tag). Run by the
# tag pipeline (.circleci/custom.yml, stamp-release-commit) before the chart is
# packaged; make verify-default-agent runs it on a copy.
#
# usage: hack/stamp-release-commit.sh [<commit>] [<chart dir>]
# commit 40-hex commit id; default: git rev-parse HEAD
# chart dir default: helm/agent-platform
set -euo pipefail

commit=${1:-$(git rev-parse HEAD)}
chart=${2:-helm/agent-platform}
placeholder='[[ .SHA ]]'

if ! [[ $commit =~ ^[0-9a-f]{40}$ ]]; then

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Convention: it re-implements the agent chart's pin rule (a 40-hex commit), and that copy is narrower than the chart's own, which accepts 40- or 64-hex.

/Users/marian/tasks/2026-11-default-agent/wt-default-agent/CLAUDE.md: "Do not copy kagent, Substrate or chart rules into this repository." A SHA-256 repository commit would be refused here although the agent chart takes it, and the rule must be kept in sync by hand.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Leaving this as is. The check isn't a copy of the agent chart's rule: it guards the script's own input, a commit from git rev-parse HEAD, which is always 40 hex in this repository. Accepting what the chart accepts wouldn't catch anything more here.

echo "stamp-release-commit: '$commit' is not a full 40-hex commit id" >&2
exit 1
fi

files=$(grep -rlF "$placeholder" "$chart/agents" || true)
if [ -z "$files" ]; then
echo "stamp-release-commit: no '$placeholder' under $chart/agents: nothing to stamp" >&2
exit 1
fi
for f in $files; do
# The placeholder holds no regex metacharacter sed would read once escaped.
sed -i.bak "s/\[\[ \.SHA \]\]/$commit/g" "$f" && rm -f "$f.bak"
echo "stamped $commit into $f"
done
if grep -rqF "$placeholder" "$chart/agents"; then
echo "stamp-release-commit: a placeholder is left under $chart/agents" >&2
exit 1
fi
2 changes: 2 additions & 0 deletions helm/agent-platform-connectivity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,7 @@ The kagent block is open in the schema, so the template refuses a key under `kag
| components.agent-sandbox.enabled | bool | `false` | |
| components.model-manager.enabled | bool | `true` | |
| components.agent-manager.enabled | bool | `false` | |
| components.default-agent.enabled | bool | `false` | |
| components.vm-manager.enabled | bool | `false` | |
| components.cluster-manager.enabled | bool | `false` | |
| components.workspace-manager.enabled | bool | `false` | |
Expand Down Expand Up @@ -1924,6 +1925,7 @@ The kagent block is open in the schema, so the template refuses a key under `kag
| backstage.disabledExtensions[10] | string | `"api:ai-chat/drawer"` | |
| backstage.disabledExtensions[11] | string | `"app-root-element:ai-chat/drawer"` | |
| backstage.skillsRepositories[0] | string | `"https://github.com/giantswarm/agent-skills"` | |
| backstage.metaAgents | object | `{}` | |
| backstage.configReload.enabled | bool | `true` | |
| backstage.configReload.image.registry | string | `"gsoci.azurecr.io"` | |
| backstage.configReload.image.name | string | `"giantswarm/kubectl"` | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,19 @@ data:
signed-in person through muster (the x_model-manager_* tools of the
muster.installations entry above; giantswarm/backstage#2294), and its
backend has no model-manager client to configure. */}}
{{- if or $fluxSa $backstage.skillsRepositories $kagentRoute }}
{{- /* The agent behind each of the portal's agent roles: default-agent
while the meta chart installs it (components.default-agent), in the kagent
namespace; backstage.metaAgents sets a role's agent itself and wins.
backstage >= 3.0.0; an earlier portal ignores the key. */}}
{{- $metaAgents := dict }}
{{- if include "agent-platform.optionalComponentEnabled" (dict "root" . "name" "default-agent") }}
{{- $agent := printf "%s/%s/default-agent" $installation (.Values.kagent.namespaceOverride | default .Release.Namespace) }}
{{- range list "generalInformation" "agentManagement" "workflowManagement" "platformOperations" "skillEvaluation" "skillCreation" }}
{{- $_ := set $metaAgents . $agent }}
{{- end }}
{{- end }}
{{- $metaAgents = mergeOverwrite $metaAgents ($backstage.metaAgents | default dict) }}
{{- if or $fluxSa $backstage.skillsRepositories $kagentRoute $metaAgents }}
agentPlatform:
{{- with $fluxSa }}
{{- /* The tenant identity of the agents' HelmReleases: the ONE value
Expand All @@ -186,6 +198,10 @@ data:
repositories:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- with $metaAgents }}
metaAgents:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if $kagentRoute }}
{{- /* The kagent controller of this installation, as the portal backend
dials it: the gRPC origin of the controller GRPCRoute through agentgateway
Expand Down
9 changes: 9 additions & 0 deletions helm/agent-platform-connectivity/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,15 @@
}
}
},
"default-agent": {
"type": "object",
"additionalProperties": true,
"properties": {
"enabled": {
"type": "boolean"
}
}
},
"dicebear": {
"type": "object",
"additionalProperties": true,
Expand Down
Loading
Loading