Skip to content

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Schedule an agent

Page as Markdown

Create a schedule in the kagent UI that runs your agent automatically with a prompt that you choose.

Schedule an agent

Create a schedule in the kagent UI that runs your agent automatically with a prompt that you choose.

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.

Before you begin

  1. Complete Build an Agent, so that the personal-assistant agent exists.
  2. Open the kagent UI with kagent dashboard.

Create the schedule

The kagent UI creating a daily schedule named morning-brief for the personal-assistant agent
Figure: Creating a daily schedule for the agent, sped up
  1. In the sidebar, click Schedules, and then click New Schedule.

  2. From the Agent list, choose kagent/personal-assistant.

  3. In the Name field, enter morning-brief.

  4. Set when the schedule runs.

    FieldValue
    Time zoneUTC, or your own time zone. The schedule follows daylight-saving changes in the time zone that you choose.
    RepeatDaily. The other choices are every few minutes, hourly, weekly, monthly, and a custom schedule.
    At time09:00
  5. In 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.

  6. 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.

ButtonAction
RunStart a run now, without waiting for the next scheduled time.
PauseStop future runs until you resume the schedule.
EditChange the agent, the times, or the prompt.

Each row of the Execution history table links to the conversation of that run.

YAML version

A 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.

Next steps