Agent startup services: systemd units for autonomous operation
Summary
Add systemd service units so agents can run autonomously on boot, each executing Claude with their PROMPT.md.
Requirements
-
Per-agent systemd service — e.g.
agent-roster-bossypants.servicethat starts a Claude session with the agent's PROMPT.md -
Environment setup — each service should have:
-
ANTHROPIC_API_KEYfrom secrets (depends on #7) -
GITLAB_HOSTand auth tokens - Correct
HOMEandUSER
-
-
Lifecycle management — services should:
- Start on boot (or be timer-activated)
- Restart on failure with backoff
- Be individually controllable (
systemctl start/stop agent-roster-bossypants)
Design Considerations
-
claude --headlessor equivalent CLI mode for non-interactive operation - Consider whether all agents run continuously or some are on-demand (timer-activated)
- Resource limits per agent (memory, CPU) to prevent runaway usage
- Logging per agent to separate journal units
Dependencies
Acceptance Criteria
-
Systemd service template for agents -
Per-agent service instantiation from roster config -
Environment variables injected from secrets -
Restart policy with backoff -
Tested on earthrealm