Skip to content

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.

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"
AspectTask workerDaemon worker
Directivetask (one-shot)instructions (ongoing)
LifecycleCompletes after taskRuns until timeout or stop
EpisodesSingle episodeMultiple episodes
Computebare or sandboxTypically sandbox
TimeoutShort (default 1h)Long (24h+)
Terminal window
arpi spawn task-processor.toml

The worker starts and runs until:

  • The timeout expires (24 hours in this example)
  • You stop it manually with arpi stop
  • It encounters an unrecoverable error

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.

Check status:

Terminal window
arpi status <worker-id>

View the trajectory as it grows:

Terminal window
arpi trajectory <worker-id>

Suspend and resume to pause billing:

Terminal window
arpi suspend <worker-id>
arpi resume <worker-id>