[Unit]
Description=Uma Hermes Gateway - Telegram Integration
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
WorkingDirectory=/usr/local/lib/hermes-agent
Environment="HOME=/home/uma"
Environment="USER=uma"
Environment="LOGNAME=uma"
Environment="HERMES_HOME=/home/uma/.hermes"
Environment="HERMES_MODEL=gpt-5.5"
Environment="HERMES_INFERENCE_MODEL=gpt-5.5"
Environment="PATH=/usr/local/lib/hermes-agent/venv/bin:/usr/local/lib/hermes-agent/node_modules/.bin:/home/uma/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Environment="VIRTUAL_ENV=/usr/local/lib/hermes-agent/venv"
ExecStart=/usr/local/lib/hermes-agent/venv/bin/python -m hermes_cli.main gateway run --replace
Restart=always
RestartSec=5
RestartMaxDelaySec=300
RestartSteps=5
RestartForceExitStatus=75
KillMode=mixed
KillSignal=SIGTERM
ExecReload=/bin/kill -USR1 $MAINPID
TimeoutStopSec=210

[Install]
WantedBy=default.target
