For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
Build a scheduled agent
Build an agent in the kagent UI that writes a cluster health report every day, without being asked.
Build an agent that works on a timer. Every day, it reads the cluster, writes a short health report, and leaves the report in a conversation for you to read. Nobody has to ask.
Before you begin
- Install kagent.
- Open the kagent UI with
kagent dashboard.
Create the agent

In the sidebar, click Agents, and then click New Agent.
In the Name field, enter
cluster-reporter. Leave the Namespace askagent, and leave Shared harness set tokagent-default.In the Template section, select Inline, and fill in the template.
Field Value Model configuration kagent/default-model-configDescription Writes a short cluster health reportIn the System prompt field, enter the following prompt.
You write a short health report for a Kubernetes cluster. List pods that are not Running or Ready, and recent Warning events. Keep the report under ten lines. If everything is healthy, say so in one line.Under Tools from MCP servers, click Add an MCP server, and choose
kagent/kagent-tool-server. From the tool list beside it, choosek8s_get_resourcesandk8s_get_events. An agent that runs unattended gets only tools that read.Click Create agent, and then click Refresh until the agent is Ready.
Schedule it
In the sidebar, click Schedules, and then click New Schedule.
From the Agent list, choose
kagent/cluster-reporter.In the Name field, enter
nightly-health-report.Leave Repeat set to Daily, and set At time and Time zone to when you want the report.
In the Prompt field, enter
Write the health report for all namespaces.Leave Enable Schedule on, and click Create schedule.
Read the reports
The page of the schedule shows the next execution and an Execution history table. To get the first report without waiting, click Run. Each row of the table links to the conversation of that run, which holds the report.
YAML version
Everything that you did in the UI is stored as Kubernetes resources. To create the same resources from the command line, or to keep them in a Git repository, apply this YAML.
The cluster-reporter agent
kubectl apply -f - <<EOF
apiVersion: api.kagent.dev/v1alpha3
kind: Agent
metadata:
name: cluster-reporter
namespace: kagent
spec:
harnessRef:
name: kagent-default
template:
inline:
description: Writes a short cluster health report
modelConfig:
name: default-model-config
systemPrompt: |-
You write a short health report for a Kubernetes cluster.
List pods that are not Running or Ready, and recent Warning events.
Keep the report under ten lines. If everything is healthy, say so in one line.
tools:
- mcp:
server:
kind: RemoteMCPServer
name: kagent-tool-server
tools:
- k8s_get_resources
- k8s_get_events
EOFA schedule is not a Kubernetes resource, so it has no YAML. To create one without the UI, use the API, as described in Scheduled runs.