For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
Build an Agent
Create a personal assistant agent in the kagent UI, then make its behavior reusable with a shared template.
Build your first agent in the kagent UI: a personal assistant that you create from one form. Then turn its behavior into a shared template that other agents can reuse.
An agent has two halves. A template describes what the agent does: its model, its system prompt, and its tools. A harness describes where and how the agent runs. kagent install creates a kagent-default harness for you, so the first agent needs only the template half.
To build the same kind of agent from YAML and the CLI instead, see Your first agent.
Before you begin
- Install kagent.
- Open the kagent UI.
kagent dashboard
Create a personal assistant

In the sidebar, click Agents, and then click New Agent.
In the Name field, enter
personal-assistant. Leave the Namespace askagent.In the Harness section, leave Shared harness set to
kagent-default.In the Template section, select Inline. An inline template belongs to this agent only, which is the shortest path to a working agent.
Fill in the template.
Field Value Model configuration kagent/default-model-config, the model that the installation set up from your API key.Description My personal assistantSystem prompt You are my personal assistant. Be friendly and concise. Help me plan my day, draft messages, and answer questions.Leave the other fields as they are. You add tools in Add an MCP server.
Click Create agent. The UI returns to the Agents list, where the agent shows the Preparing status while kagent builds a snapshot of its runtime.
Click Refresh until the status changes to Ready. This step usually takes less than a minute.
Click the agent name,
personal-assistant, to open its chat page. Enter a message, such asWhat can you help me with?, and click Send. Each chat that you start is a Session with the agent.
Make the behavior reusable
The personal assistant keeps its behavior inline, so no other agent can use it. A shared template holds the same settings as an object of its own. Every agent that references the template gets its model, prompt, and tools, and a change to the template reaches all of them.

On the Agents page, click New Template.
Fill in the template, and then click Create template.
Field Value Name assistant-templateModel configuration kagent/default-model-configDescription A friendly, concise assistantSystem prompt You are a personal assistant. Be friendly and concise. Help plan the day, draft messages, and answer questions.The template is listed on the Templates tab of the Agents page.
Click New Agent, and enter
team-assistantin the Name field.In the Template section, leave Reference selected, and choose
assistant-templatefrom the Shared template list.Click Create agent, and then click Refresh until the agent is Ready.
The Agents list now shows both agents. The Template column reads Inline for personal-assistant and assistant-template for team-assistant.
Harnesses
Both agents run on the kagent-default harness. A harness sets the runtime that compiles and runs a template, the image, and the worker pool that the agent’s sessions are scheduled on. kagent install also creates the codex-default and claude-default harnesses, which run a template on those runtimes.
To create a harness of your own, click New Harness on the Agents page. For the options, see Agent harness.
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 personal-assistant agent, with its behavior inline
kubectl apply -f - <<EOF
apiVersion: api.kagent.dev/v1alpha3
kind: Agent
metadata:
name: personal-assistant
namespace: kagent
spec:
harnessRef:
name: kagent-default
template:
inline:
description: My personal assistant
modelConfig:
name: default-model-config
systemPrompt: |-
You are my personal assistant. Be friendly and concise. Help me plan my day, draft messages, and answer questions.
EOFThe shared template, and the team-assistant agent that references it
kubectl apply -f - <<EOF
apiVersion: api.kagent.dev/v1alpha3
kind: AgentTemplate
metadata:
name: assistant-template
namespace: kagent
spec:
description: A friendly, concise assistant
modelConfig:
name: default-model-config
systemPrompt: You are a personal assistant. Be friendly and concise. Help plan the day, draft messages, and answer questions.
---
apiVersion: api.kagent.dev/v1alpha3
kind: Agent
metadata:
name: team-assistant
namespace: kagent
spec:
harnessRef:
name: kagent-default
template:
ref:
name: assistant-template
EOF