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:
ai agent schedule createai 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
| Flag | Description |
|---|---|
-n, --name | Schedule name (required) |
-c, --cron | Cron expression (required) |
-p, --prompt | Task prompt (required) |
-t, --type | Agent type (researcher, brainstormer, planner, developer, reviewer, data) |
-m, --model | Model override (sonnet, opus, haiku) |
-w, --workspace | Scope to a workspace |
--timezone | Timezone for the schedule (default: UTC) |
-d, --description | Optional description |
Cron Expression Examples
| Expression | Meaning |
|---|---|
0 8 * * MON-FRI | Weekdays at 08:00 |
0 9 * * MON | Every Monday at 09:00 |
0 */6 * * * | Every 6 hours |
0 0 1 * * | First day of each month at midnight |
30 17 * * FRI | Every Friday at 17:30 |
Note
Managing Schedules
List all schedules
ai agent schedule list
ai agent schedule list --enabled
ai agent schedule list --disabledView 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 opusPause 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.
| Method | Endpoint | Description |
|---|---|---|
POST | /api/agent/schedules | Create a schedule |
GET | /api/agent/schedules | List schedules |
GET | /api/agent/schedules/:id | Get schedule details |
PATCH | /api/agent/schedules/:id | Update a schedule |
DELETE | /api/agent/schedules/:id | Delete a schedule |
POST | /api/agent/schedules/:id/pause | Pause a schedule |
POST | /api/agent/schedules/:id/resume | Resume 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
- You create a schedule with a cron expression and agent configuration.
- A Google Cloud Scheduler job is created that fires at the specified times.
- When the scheduler fires, it calls the Apart Intelligence trigger endpoint.
- The trigger endpoint creates a standard agent run using the schedule's configuration.
- 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
CLI Reference
| Command | Description |
|---|---|
ai agent schedule list | List all schedules |
ai agent schedule create | Create 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 |