Daemon Worker
A daemon worker runs continuously, processing multiple tasks over its lifetime. Unlike one-shot task workers, daemon workers use instructions instead of task and run in sandbox mode for isolation.
Template
Section titled “Template”Save as task-processor.toml:
template_version = "1.0"
[worker]name = "task-processor"
[workstation]model = "claude-sonnet-4-20250514"instructions = "You are a background task processor. Monitor the incoming task queue and process each task as it arrives. For each task, read the specification, execute the required actions, and report the result."
[workstation.capabilities]mcps = ["filesystem"]
[compute]mode = "sandbox"timeout = "24h"Key differences from task workers
Section titled “Key differences from task workers”| Aspect | Task worker | Daemon worker |
|---|---|---|
| Directive | task (one-shot) | instructions (ongoing) |
| Lifecycle | Completes after task | Runs until timeout or stop |
| Episodes | Single episode | Multiple episodes |
| Compute | bare or sandbox | Typically sandbox |
| Timeout | Short (default 1h) | Long (24h+) |
arpi spawn task-processor.tomlThe worker starts and runs until:
- The
timeoutexpires (24 hours in this example) - You stop it manually with
arpi stop - It encounters an unrecoverable error
Sandbox mode
Section titled “Sandbox mode”Setting mode = "sandbox" provides:
- Kernel-level isolation — The worker runs in its own container with restricted syscalls
- Credential injection — Secrets from Infisical are injected into the sandbox environment
- Filesystem isolation — The worker cannot access the host filesystem
- Egress filtering — Network access is restricted to approved endpoints
Sandbox mode is required when the worker needs credentials or handles untrusted input.
Monitoring
Section titled “Monitoring”Check status:
arpi status <worker-id>View the trajectory as it grows:
arpi trajectory <worker-id>Suspend and resume to pause billing:
arpi suspend <worker-id>arpi resume <worker-id>