Schedule an agent
Create a schedule in the kagent UI that runs your agent automatically with a prompt that you choose.
About this tutorial
A schedule runs an agent automatically, at times that you choose, with a prompt that you write. Each run starts a new conversation with the agent. In this tutorial, you schedule the personal assistant to write a plan for your day every morning. A schedule is not a Kubernetes resource. kagent keeps it in its database. For how schedules work, see Scheduled runs.
Time: about 5 minutes.
Before you begin
- Complete Build an agent, so that the
personal-assistantagent exists.
Schedule the agent
Create and manage the schedule in the kagent UI, or with the kagent API.
Open the kagent UI
kagent dashboardThe command forwards the UI to http://localhost:8082 and opens it in your browser. Leave it running while you work.
Create the schedule

In the sidebar, click Schedules, and then click New Schedule.
From the Agent list, choose
kagent/personal-assistant.In the Name field, enter
morning-brief.Set when the schedule runs.
Field Value Time zone UTC, or your own time zone. The schedule follows daylight-saving changes in the time zone that you choose.Repeat Daily. The other choices are every few minutes, hourly, weekly, monthly, and a custom schedule. At time 09:00In the Prompt field, enter the message that each run sends to the agent, such as
Give me a short plan for today: three priorities and one reminder to take a break.Leave Enable Schedule on, and click Create schedule.
The page of the schedule shows its status, the next execution in your local time, and an Execution history table that fills in as the schedule runs.
Run, pause, or change the schedule
Use the buttons at the top of the page of the schedule.
| Button | Action |
|---|---|
| Run | Start a run now, without waiting for the next scheduled time. |
| Pause | Stop future runs until you resume the schedule. |
| Edit | Change the agent, the times, or the prompt. |
Each row of the Execution history table links to the conversation of that run.
Verify the schedule
In the kagent UI, click Schedules, and open
morning-brief. The page shows the schedule as enabled, with its next execution in your local time.Click Run to start a run now.
Check that the Execution history table lists the run, and click its link to read the plan that the agent wrote.
What you built
A schedule that starts a conversation with the personal assistant every morning. Along the way, you used these features:
| Feature | What you did | Read more |
|---|---|---|
| Scheduled runs | Created a daily schedule with a time zone and a prompt, and ran it on demand | Scheduled runs |
Clean up
Delete the schedule. In the kagent UI, click Schedules, and delete
morning-brief. With the API, callDeleteScheduledRun, as described in Scheduled runs.To keep the schedule but stop its runs, click Pause on its page instead.