Scheduled Agents

Scheduled agents let you run recurring tasks automatically. Define a cron schedule, an agent type, and a prompt — the system handles the rest using Google Cloud Scheduler to trigger agent runs on time.

This is useful for daily reports, weekly code reviews, periodic data analysis, knowledge graph health checks, and any other repeating task you want to automate.

Creating a Schedule

Use the CLI to create a schedule interactively or with flags:

Interactive
ai agent schedule create
With flags
ai agent schedule create \
  --name "Daily health check" \
  --cron "0 8 * * MON-FRI" \
  --prompt "Run a health check on the knowledge graph and summarize any issues" \
  --type researcher \
  --timezone "Europe/Oslo"

Options

FlagDescription
-n, --nameSchedule name (required)
-c, --cronCron expression (required)
-p, --promptTask prompt (required)
-t, --typeAgent type (researcher, brainstormer, planner, developer, reviewer, data)
-m, --modelModel override (sonnet, opus, haiku)
-w, --workspaceScope to a workspace
--timezoneTimezone for the schedule (default: UTC)
-d, --descriptionOptional description

Cron Expression Examples

ExpressionMeaning
0 8 * * MON-FRIWeekdays at 08:00
0 9 * * MONEvery Monday at 09:00
0 */6 * * *Every 6 hours
0 0 1 * *First day of each month at midnight
30 17 * * FRIEvery Friday at 17:30

Note

Cron expressions use 5 fields: minute, hour, day-of-month, month, day-of-week. All times are interpreted in the timezone you specify (defaults to UTC).

Managing Schedules

List all schedules

ai agent schedule list
ai agent schedule list --enabled
ai agent schedule list --disabled

View schedule details

ai agent schedule get <schedule-id>

Update a schedule

# Change the cron expression
ai agent schedule update <id> --cron "0 9 * * MON"

# Change the prompt
ai agent schedule update <id> --prompt "New task description"

# Change multiple fields
ai agent schedule update <id> --name "Weekly review" --model opus

Pause and resume

# Pause a schedule (stops future runs)
ai agent schedule pause <id>

# Resume a paused schedule
ai agent schedule resume <id>

Delete a schedule

ai agent schedule delete <id>

Deleting a schedule also removes the corresponding Cloud Scheduler job.

Authentication

Schedules work with both authentication modes:

  • SSO/OAuth users: A dedicated API key is automatically generated when you create a schedule. This key is used by Cloud Scheduler to trigger runs on your behalf.
  • API key users: The API key you authenticate with is stored (encrypted) and used by Cloud Scheduler.

In both cases, agent runs triggered by a schedule use the organization's agent configuration (Claude API key, E2B key, model, timeout, prompt template).

API Reference

All schedule endpoints are available via the REST API. Authenticate with either an API key or an OAuth token.

MethodEndpointDescription
POST/api/agent/schedulesCreate a schedule
GET/api/agent/schedulesList schedules
GET/api/agent/schedules/:idGet schedule details
PATCH/api/agent/schedules/:idUpdate a schedule
DELETE/api/agent/schedules/:idDelete a schedule
POST/api/agent/schedules/:id/pausePause a schedule
POST/api/agent/schedules/:id/resumeResume a schedule

Create schedule (API example)

curl -X POST https://api.intelligence.apart.tech/api/agent/schedules \
  -H "Authorization: Bearer apart_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Daily health check",
    "cronExpression": "0 8 * * MON-FRI",
    "prompt": "Run a health check and summarize issues",
    "agentType": "researcher",
    "timezone": "Europe/Oslo"
  }'

How It Works

  1. You create a schedule with a cron expression and agent configuration.
  2. A Google Cloud Scheduler job is created that fires at the specified times.
  3. When the scheduler fires, it calls the Apart Intelligence trigger endpoint.
  4. The trigger endpoint creates a standard agent run using the schedule's configuration.
  5. The agent runs in an isolated sandbox, same as a manually triggered run.

Each scheduled run is linked back to its schedule via scheduleId, so you can track which runs were triggered by which schedule.

Tip

Scheduled agents use the same infrastructure as on-demand agents. The schedule's prompt, model, agent type, and workspace settings are passed through to the agent run unchanged.

CLI Reference

CommandDescription
ai agent schedule listList all schedules
ai agent schedule createCreate a new schedule (interactive or with flags)
ai agent schedule get <id>View schedule details
ai agent schedule update <id>Update schedule fields
ai agent schedule delete <id>Delete a schedule and its Cloud Scheduler job
ai agent schedule pause <id>Pause a schedule
ai agent schedule resume <id>Resume a paused schedule