Files
opencode/scripts/systemd/agent-core.service
T
Artur Do Lago 74820949d1 feat(daemon): integrate zee gateway with auto-supervision
- Remove built-in WhatsApp/Telegram gateways from agent-core
- Add GatewaySupervisor to spawn zee gateway as child process
- Auto-restart gateway on crash (up to 5 times per minute)
- Add --gateway flag to daemon command (default: true)
- Update systemd service for headless operation
- Gateway logs forwarded to agent-core journal

Messaging is now handled exclusively by external zee gateway,
keeping agent-core clean for upstream compatibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 12:51:55 +01:00

50 lines
1.6 KiB
Desktop File

[Unit]
Description=Agent Core - Always-On Personas Daemon
Documentation=https://github.com/anthropics/agent-core
After=network.target
[Service]
Type=simple
User=artur
Group=artur
# Environment setup
Environment=HOME=/home/artur
Environment=AGENT_CORE_HEADLESS=1
Environment=NODE_ENV=production
Environment=PATH=/home/artur/bin:/home/artur/.local/bin:/home/artur/.bun/bin:/usr/local/bin:/usr/bin:/bin
# API keys can be loaded from environment file (create ~/.config/agent-core/daemon.env)
EnvironmentFile=-/home/artur/.config/agent-core/daemon.env
# Working directory - use home for general access
WorkingDirectory=/home/artur
# Use installed binary - starts both agent-core daemon AND zee gateway
# Gateway auto-starts with supervision and auto-restart on crash
ExecStart=/home/artur/bin/agent-core daemon --hostname 127.0.0.1 --port 3210 --gateway
# Restart policy
Restart=always
RestartSec=10
TimeoutStopSec=30
# Security hardening
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=read-only
# Use private /tmp for security while allowing tsx to create pipes
PrivateTmp=true
# Agent-core needs write access to config, state, logs, and session data
# Gateway needs access to zee directory for cache and session data
# Signal needs access to its data directory
ReadWritePaths=/home/artur/.config/agent-core /home/artur/.local/state/agent-core /home/artur/.local/share/agent-core /home/artur/.local/share/signal-cli /home/artur/.zee /home/artur/Repositories/personas/zee
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=agent-core
[Install]
WantedBy=multi-user.target