Skip to content
Merged
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
20 changes: 19 additions & 1 deletion Makefile.custom.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,25 @@ helm-template: ## Render the chart with the CI values.
# Prerequisite-only, no recipe: make merges it into the generated helm-test
# rule, which keeps its recipe (the helm-unittest run) and gains the lint.
.PHONY: helm-test
helm-test: helm-lint helm-toolset-schema-test
helm-test: helm-lint helm-toolset-schema-test helm-require-approval-test

# Chart 3.0 refuses muster.requireApproval in its templates, not only in the
# values schema: a HelmRelease with disableSchemaValidation must not render the
# agent with neither kagent's flag nor default: Ask. helm-unittest validates
# the schema first, so this check renders with the schema skipped.
.PHONY: helm-require-approval-test
helm-require-approval-test:
@set -eu; \
for v in true false; do \
for extra in "" "--set muster.enabled=false" "--set toolset[0]=preset:none"; do \
if out=$$(helm template example helm/agent --kubeconfig /dev/null --skip-schema-validation \
--set-string modelConfig.name=schema-test --set muster.requireApproval=$$v $$extra 2>&1); then \
echo "FAIL: muster.requireApproval=$$v $$extra renders with the schema skipped"; exit 1; \
fi; \
echo "$$out" | grep -q 'muster.requireApproval was removed in agent chart 3.0' || { echo "$$out" >&2; exit 1; }; \
done; \
done; \
helm template example helm/agent --kubeconfig /dev/null --skip-schema-validation --set-string modelConfig.name=schema-test --set default=Ask >/dev/null

.PHONY: helm-toolset-schema-test
helm-toolset-schema-test:
Expand Down
56 changes: 55 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ labels:
The technical resource name defaults to the Helm release name. By default the
agent is wired to the platform's muster gateway with **all** of its (dynamic)
tools — implicit full access to everything the gateway exposes to the invoking
human. Declare a **toolset** to compose the agent with a subset:
human. Declare a **toolset** (deprecated, see `tools` below) to compose the agent with a subset:

```yaml
toolset:
Expand All @@ -99,6 +99,35 @@ preset), and `toolset:<name>` is reserved. Composition, not authorization: the
human's identity and the backends' own authorization remain the boundary. The
agent gets no wider access of its own.

### Tools with approval settings

`tools` replaces the deprecated `toolset`. An item is a selector or a one-key
object giving it a setting (`Allow`, `Ask` or `Block`, case-sensitive);
`default` is the setting of every listed tool without its own.

```yaml
tools: # 1 to 32 items; unlisted tools are invisible
- server:pagerduty # visible; the connector's settings apply
- server:github: Ask # every GitHub tool asks, new ones too
- tool:x_github_merge_pull_request: Allow # holds over the connector's Ask only with a grant
- tool:x_github_delete_repository: Block # hidden from the agent
default: Ask # optional
```

- The selectors alone render as `toolset` does (`X-Muster-Toolset`;
`["preset:none"]` renders no `RemoteMCPServer` and no muster binding).
Settings and `default` render as the header `X-Muster-Tool-Approval`, which
muster applies where no Session binding carries settings (it only tightens).
agent-manager binds them, with grants, to every Session it starts; only
those bindings hold whatever the runtime does.
- The render fails for `tools` with `toolset`, a duplicate selector,
`preset:none` beside other entries or with a setting or `default`, and any
value but `Allow`, `Ask` or `Block`.
- An `Allow` over a connector's `Ask` needs a grant by a connector admin
through agent-manager's `set_agent_approval`; without it the `Ask` stays.
- `muster.requireApproval` is removed in chart 3.0 (the schema refuses it):
use `default: Ask`, see [Migrating from 2.x](#migrating-from-2x).

`muster.tools` narrows the binding to a subset of muster's *meta-tools*
(`list_tools`, `call_tool`, ...), not the tools behind the gateway — a toolset
is the way to narrow those. A Harness enforces a partial selection only when
Expand Down Expand Up @@ -398,6 +427,31 @@ namespace's default model, the ModelConfig annotated
or to any other ModelConfig in the namespace. A release that already sets
`modelConfig.name` upgrades unchanged.

Chart 3.0 also removes `muster.requireApproval`, in the schema and the
templates (also with schema validation skipped): a 2.x release still carrying
it fails its 3.0 render and stays on its 2.x revision until its values change.
Replace `true` with `default: Ask` (muster asks a person before every tool
call, where kagent's flag paused the agent), never just delete it; `false` is
dropped. A release that also sets `tools` settings or `default` never rendered
before: choose its settings by hand.

```diff
muster:
- requireApproval: true
+default: Ask
```

agent-manager's `migrate` (run by the Agent Platform upgrade to the 3.x line)
does both rewrites before it moves a namespace's chart source: `requireApproval:
true` becomes `default: Ask` (only where the muster binding renders), and an
unset `modelConfig.name` is written as `default-model-config`. Releases in
organization namespaces that migrate manages are rewritten the same way. A
GitOps-owned release gets the change as a diff in the report; apply it together
with the move of the source's range to 3.x. A release with `spec.valuesFrom` or
one whose source migrate cannot move is reported, never written. Readiness is
reported through the ready mark the operator waits for (with the release's UID
and generation).

## Migrating from 1.x

Chart 2.0 renders the kagent API that ships the `Agent` kind
Expand Down
7 changes: 4 additions & 3 deletions helm/agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ What an agent can reach and how to add a host (`agent.egress`): [What an agent c
| plugins | list | `[]` | Plugins, each pinned to an immutable source like a skill. An entry is `{git: {url, commit}, path, skills: [...]}` or `{oci: <ref@sha256:...>, path, skills: [...]}`. An Agent Plugins format package (`plugin.json` at its root) enables only the skills `skills` names (optional, unique, never a name `skills[]` or another plugin already uses), and its `mcp.json` servers load either way. A Claude Code format plugin (`.claude-plugin/plugin.json`) loads whole on the `claude` Harness, its hooks, commands and subagents included, and needs no `skills`. Rendered into the Agent's spec.template.plugins[] as `{source: {git | oci, path}, skills}`, `skills` only when set. The pinning rules of `skills[]` apply (a branch, a tag, a short SHA or an OCI tag fails the render), and `skillsGitAuthSecretRef` reaches every git plugin the way it reaches every git skill. |
| skillsGitAuthSecretRef | object | `{"name":""}` | One read credential for every private git skill and git plugin. The chart never creates the Secret; the tenant provisions it in the agent's namespace (on the platform: the namespace the agents are compiled in), or agent-manager mints it. |
| skillsGitAuthSecretRef.name | string | `""` | Name of a Secret in the agent's namespace whose key `token` holds `base64("<username>:<token>")` (on GitHub `x-access-token:<token>`) with read access to the agent's private git skills and plugins; the egress gateway sends it as `Authorization: Basic` to every request to that host, public repositories included. When set, every `skills[]` and `plugins[]` entry with `git` renders `source.git.credentialRef: {name, key: token}`; OCI sources are unchanged. Empty (the default) renders anonymous fetches. Requires an `https://` URL on every git skill and plugin: the CRD refuses a credential on any other source, and the chart fails the render first, naming the entry. Rotate the Secret's contents, never its name. The full contract and its failure modes: the README's "Private skill repositories". |
| muster | object | `{"discovery":{"enabled":false},"enabled":true,"requireApproval":false,"timeout":"60m","tools":[],"url":"http://muster.agent-platform.svc.cluster.local:8090/mcp"}` | The platform's muster MCP gateway. Unless the agent is chat-only (toolset exactly `["preset:none"]`) or `enabled` is false, the chart renders a RemoteMCPServer named after the agent that points at muster and carries the toolset header, and binds it into the Agent's spec.template.tools. |
| muster | object | `{"discovery":{"enabled":false},"enabled":true,"timeout":"60m","tools":[],"url":"http://muster.agent-platform.svc.cluster.local:8090/mcp"}` | The platform's muster MCP gateway. Unless the agent is chat-only (toolset exactly `["preset:none"]`) or `enabled` is false, the chart renders a RemoteMCPServer named after the agent that points at muster and carries the toolset header, and binds it into the Agent's spec.template.tools. |
| muster.enabled | bool | `true` | Wire muster into the agent's tools: render the agent's RemoteMCPServer and bind it in the Agent's template. |
| muster.url | string | `"http://muster.agent-platform.svc.cluster.local:8090/mcp"` | URL of muster's MCP endpoint, rendered into the RemoteMCPServer's spec.url. The default is the platform's in-cluster URL; set it for an installation whose muster is elsewhere. |
| muster.timeout | string | `"60m"` | How long one tool call through muster may run before the agent's runtime cancels it, rendered as given into the RemoteMCPServer's spec.timeout (a duration with a unit: `180s`, `5m`). Without the field kagent applies its own 30 s, which cuts a backend tool that legitimately runs longer — a write that creates a repository and opens a pull request in one call, a watch that blocks for minutes — although muster's own per-server budget for that backend allows more. The default is muster's progress cap (an MCPServer's `progress.maxDuration`, at most an hour): kagent applies the value to the whole request, which no MCP progress notification restarts, so a wait kept alive by progress (devctl's `pr_wait`, `pr_merge`, `release_wait`) returns its verdict in one call; muster still bounds every call by its backend's own `spec.timeout`, restarted by that progress, so a call is bounded by its backend, not by the caller. |
| muster.tools | list | `[]` | Set to narrow the binding to a subset of muster's meta-tools (`list_tools`, `call_tool`, ...); leave empty to bind every tool. Rendered into the binding's `tools`. A toolset is the way to narrow the tools behind the gateway. A Harness enforces a partial selection only when it can discover the server's tools; with discovery off (the default) it may expose the whole server and report a warning in the Agent's status.warnings. |
| muster.requireApproval | bool | `false` | Pause the agent before every tool call through muster until a person approves it. Rendered as `requireApproval: true` on the binding (kagent's human-in-the-loop): the Harness stops the task at `input-required` for each call and continues with the person's decision. It applies to the tools the binding exposes — `tools` when set, otherwise every muster tool. A client that negotiates kagent's HITL A2A extension (`https://kagent.dev/extensions/hitl/v1`) receives the structured `tool_approval_request` and answers it; one that does not sees a plain notice that human input is required. Off by default: the agent calls tools without asking. |
| muster.discovery | object | `{"enabled":false}` | Tool discovery by the kagent controller against muster. |
| muster.discovery.enabled | bool | `false` | Let the kagent controller list muster's tools when it reconciles the RemoteMCPServer. Off by default: muster is an OAuth resource server and the controller holds no user token, so the chart labels the server `kagent.dev/discovery: disabled` and the agent resolves its tools at run time as the signed-in person. Turn on only for a muster without OAuth. |
| toolset | list | unset: implicit full access, renders no header | The tools the agent is composed with: a list of selectors that muster resolves per request. Selectors are `preset:<name>`, `server:<name>`, `workflow:<name>` or `tool:<name>` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for more. `toolset:<name>` is reserved and refused; patterns, excludes, the read-only predicate and `label:` exist only inside presets. Rendered as the static `X-Muster-Toolset` header on the agent's RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly `["preset:none"]` renders NO RemoteMCPServer and no muster binding at all, so a chat-only agent pays no context for meta-tools; an empty list fails the render (say `preset:none` instead). Unset (the default) renders no header and the agent keeps implicit full access to everything the gateway exposes to the invoking human. Built-in presets: `read-only`, `none`, `full`; the platform charts ship `infrastructure` and `agent-platform`. Composition, not authorization: the human's identity and the backends' own authorization stay the boundary. |
| tools | list | unset: implicit full access, renders no header | The tools the agent is composed with, 1 to 32 items; replaces `toolset`. An item is a selector (`preset:`, `server:`, `workflow:` or `tool:<name>`, exact and case-sensitive, each once) or a one-key object giving it `Allow`, `Ask` or `Block`, e.g. `- server:github: Ask`. Unlisted tools are invisible. The selectors render as `toolset` does (exactly `["preset:none"]` renders no RemoteMCPServer and takes no setting or other entry); settings and `default` render as the header `X-Muster-Tool-Approval`, which muster applies where no Session binding carries them, and agent-manager binds them per Session. An `Allow` over a connector's `Ask` needs a grant by a connector admin through agent-manager's `set_agent_approval`. `tools` with `toolset` fails the render. |
| default | string | unset: no default | The setting of every tool in `tools` without its own: `Allow`, `Ask` or `Block` (case-sensitive). `default: Ask` replaces the removed `muster.requireApproval: true`. |
| toolset | list | unset: implicit full access, renders no header | Deprecated, use `tools`. The tools the agent is composed with: a list of selectors that muster resolves per request. Selectors are `preset:<name>`, `server:<name>`, `workflow:<name>` or `tool:<name>` with exact, case-sensitive names (regex `^(preset|server|workflow|tool):[^\s,]+$`); at most 128 inline and 8192 UTF-8 bytes joined by commas, define a preset for more. `toolset:<name>` is reserved and refused; patterns, excludes, the read-only predicate and `label:` exist only inside presets. Rendered as the static `X-Muster-Toolset` header on the agent's RemoteMCPServer (`spec.headersFrom`, the selectors joined by `,`). Exactly `["preset:none"]` renders NO RemoteMCPServer and no muster binding at all, so a chat-only agent pays no context for meta-tools; an empty list fails the render (say `preset:none` instead). Unset (the default) renders no header and the agent keeps implicit full access to everything the gateway exposes to the invoking human. Built-in presets: `read-only`, `none`, `full`; the platform charts ship `infrastructure` and `agent-platform`. Composition, not authorization: the human's identity and the backends' own authorization stay the boundary. |
| extraTools | list | `[]` | Additional raw api.kagent.dev/v1alpha3 tool bindings appended after the muster binding: `{mcp: {server: {kind: RemoteMCPServer, name}, tools, requireApproval}}` or `{subAgent: {name, description, templateRef: {name}}}` (`agentRef` in place of `templateRef` names an Agent; the runtime does not compile it yet). Servers, templates and agents are referenced in the agent's own namespace. |
| labels | object | `{}` | Extra labels merged over the standard set on both objects, e.g. tenant/owner dimensions. They win over the standard set on both objects. |
| annotations | object | `{}` | Extra annotations merged next to the display-name, icon-url and tags annotations on the Agent. ui.giantswarm.io/display-name, icon-url and tags are refused here; set agent.displayName, agent.iconUrl and agent.tags. |
Expand Down
11 changes: 11 additions & 0 deletions helm/agent/ci/tools-settings-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ct lint case: tools with Allow/Ask/Block settings and a default. The
# selectors render as the X-Muster-Toolset header; settings and default render
# nothing.
tools:
- server:pagerduty
- server:github: Ask
- tool:x_github_merge_pull_request: Allow
- tool:x_github_delete_repository: Block
default: Ask
modelConfig:
name: demo-model
Loading
Loading