Agent API
Create a namespaced Agent resource with a system prompt and optional model and tool policy.
Kubernetes resource
Agent is a core.kaigents.io/v1alpha1 CRD. Supported spec fields include systemPrompt, runtime, modelEndpointRef, modelName, tools (objects with name), allowedTools (string allowlist), and routing. Avoid using a model or skills field in the spec: they are not in the chart schema.
apiVersion: core.kaigents.io/v1alpha1
kind: Agent
metadata:
name: example-agent
spec:
systemPrompt: "Summarize the supplied request accurately."
allowedTools: []Model and tool selection
Set modelEndpointRef to a ModelEndpoint in the same namespace, and set modelName to the serving backend’s actual model ID if required. Run-level modelEndpointRef and modelName may override defaults for that execution. tools refers to Tool.metadata.name, while allowedTools contains the MCP-advertised Tool.spec.toolName when non-empty. The chart describes enforcement when allowedTools is non-empty; an empty array is not a deny-all policy. Do not attach Tools to a no-tool Agent, and enforce server-side authentication and tenant access for every callable tool.
spec:
modelEndpointRef: local-model
modelName: example-model
tools:
- name: search-docs
allowedTools:
- search_docsRouting and status
The chart allows routing.computeResource, routing.nodeSelector, routing.preferredContextWindow, and routing.contextBudgetStrategy (Summarize, Truncate, or Error). The Agent status can contain observedGeneration, phase, and conditions. Check the resource actually reconciles before submitting a Run.
kubectl get agents -n kaigents
kubectl describe agent example-agent -n kaigents
kubectl explain agent.spec --api-version=core.kaigents.io/v1alpha1When it does not run
Agent creation only establishes a definition; create a Run to request work. If execution fails, inspect the Run, verify the ModelEndpoint and actual backend are reachable, and compare every Tool reference against an installed Tool resource.