Skip to content

[FEATURE] meta agent that creates other kagent declarative agents #2211

Description

@the-mentor

📋 Prerequisites

📝 Feature Summary

A self-hosted meta-agent that guides users through building and deploying new Declarative kagent agents — interview, discovery, YAML draft, and one-click apply with mandatory human approval.

❓ Problem Statement / Motivation

Creating a new kagent agent today requires knowing the CRD schema, discovering which ModelConfigs and RemoteMCPServers exist in the cluster, picking valid tool names, writing a system prompt, and applying the manifest. The agent-builder automates all of that through a guided interview, grounded in what actually exists in the cluster.

💡 Proposed Solution

Behavior

  1. Interview — asks the user what the agent should do, what tools it needs, and what namespace to deploy into
  2. Discover — lists live ModelConfigs, RemoteMCPServers (and their tool names), and existing Agents to avoid name collisions and mirror house conventions
  3. Name — proposes 3 DNS-1123-compliant candidate names and waits for the user to pick one
  4. Draft — composes a complete Agent YAML scoped to the minimum tools the job needs; mutating tools are placed in requireApproval on the child agent by default
  5. Present & apply — shows the full manifest in the chat, then calls k8s_apply_manifest which pauses for explicit human approval before writing anything
  6. Verify — reads back status.conditions after apply and diagnoses failures using k8s_describe_resource, k8s_get_events, and k8s_get_pod_logs

Safety

  • k8s_apply_manifest is the only write tool and is declared under requireApproval — nothing reaches the cluster without the user explicitly approving the tool call
  • No delete, patch, or exec tools
  • The agent is explicitly forbidden from modifying or replacing itself

Implementation

  • New Helm chart at helm/agents/agent-builder/
  • Wired into the main helm/kagent chart as an optional dependency (agent-builder.enabled, default true)
  • Added to make helm-agents for version stamping and packaging at release time
  • Two new helm-unittest cases in tests/agent-nodeselector_test.yaml

🔄 Alternatives Considered

Considered a CLI wizard or a kagent scaffold command, but a conversational agent can ground itself in live cluster state (real ModelConfigs, real tool names) in a way a static CLI cannot. It also keeps the workflow inside the kagent UI rather than requiring terminal access.

🎯 Affected Service(s)

helm/kagent (new subchart dependency), helm/agents/agent-builder (new chart), Makefile (build target)

📚 Additional Context

Draft implementation: #2210

🙋 Are you willing to contribute?

  • I am willing to submit a PR for this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for Feature.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions