Background Daemon
The daemon runs agents as persistent background processes, automatically executing queued tasks and scheduled jobs.
How It Works
The daemon combines two systems:
- Scheduler — Checks cron-based schedules every 60 seconds and enqueues tasks when due
- Queue Processor — Polls the task queue every 30 seconds and executes pending tasks via the orchestrator
When a scheduled task fires, it creates a task entry in the queue. The queue processor picks it up, spins up the assigned agent, and runs it to completion.
API
Get Status
GET /api/daemon
Returns:
{
"running": true,
"schedulerActive": true,
"queueLength": 2,
"lastProcessed": "2026-02-19T10:30:00Z",
"nextScheduled": "2026-02-19T11:00:00Z"
}
Start / Stop
POST /api/daemon
Content-Type: application/json
{ "action": "start" }
Actions: start, stop
Sidebar Indicator
The daemon status is shown in the sidebar as a small indicator. Click it to toggle the daemon on or off.
- Green pulse — daemon is running
- Gray — daemon is stopped
Auto-Start
On first load, if there are queued tasks waiting, the daemon starts automatically. You can disable this in Settings.
Task Lifecycle
- Scheduled — Cron expression matches, task is created with status
queued - Queued — Daemon picks up the task, sets status to
running - Running — Agent processes the task, using its configured tools
- Completed — Agent finishes, result is saved, status set to
completed - Failed — If the agent errors out, status is set to
failedwith the error message