Xibe Daemon (24/7)
Xibe Daemon — long-lived coding agent for Telegram, Discord, Slack, cron, and systemd start/stop.
Xibe Daemon (24/7)
Xibe Daemon is the always-on coding agent: Telegram / Discord / Slack, cron, pairing, and delivery ledger.
CLI primary: xibecode daemon
Alias: xibecode gateway (same process)
This is separate from the E2B cloud gateway (sandbox HTTP proxy). See Cloud / E2B.
Home layout (~/.xibecode or $XIBECODE_HOME)
| Path | Purpose |
|---|---|
profile-*.json | Interactive CLI profiles |
.env / daemon.env / gateway.env | Secrets (API keys, bot tokens) |
daemon/ | Daemon runtime (migrates from legacy gateway/) |
daemon/sessions/ | Messaging chat sessions |
daemon/logs/daemon.log | Daemon log |
daemon/pairing.json | DM pairing state |
daemon/delivery-ledger.json | At-least-once outbound delivery |
cron/ | Scheduled jobs |
memories/ | Curated MEMORY.md / USER.md |
skills/ | Learned / user skills |
projects/ | JSONL transcripts per project cwd |
logs/ | Shared logs |
Override root with XIBECODE_HOME.
Quick start
# Configure tokens (wizard)
xibecode setup gateway
# Or edit secrets manually:
# ~/.xibecode/daemon.env (or gateway.env / .env)
# TELEGRAM_BOT_TOKEN=...
# TELEGRAM_ALLOWED_USERS=123456789
# ANTHROPIC_API_KEY=...
# Foreground
xibecode daemon --workdir /path/to/repo
# Always-on (systemd user service)
xibecode daemon --install --workdir /path/to/repo
xibecode daemon --start
xibecode daemon --statusStart / stop / status
| Command | Effect |
|---|---|
xibecode daemon | Run in foreground (Ctrl+C stops) |
xibecode daemon --install | Install systemd unit xibecode-daemon.service |
xibecode daemon --start | Start the service |
xibecode daemon --stop | Stop the service |
xibecode daemon --status | Service status |
xibecode daemon --cron-only | Cron only (no messaging) |
xibecode daemon --workdir <path> | Default project directory |
xibecode gateway … is a full alias for the same flags.
Systemd helpers after install:
systemctl --user daemon-reload
systemctl --user enable --now xibecode-gateway
# Optional: keep running after logout
sudo loginctl enable-linger $USEREnvironment (~/.xibecode/gateway.env)
| Variable | Purpose |
|---|---|
TELEGRAM_BOT_TOKEN | BotFather token |
TELEGRAM_ALLOWED_USERS | Comma-separated Telegram user ids |
TELEGRAM_HOME_CHANNEL | Default channel for cron delivery |
DISCORD_* / SLACK_* | Optional adapters |
| Provider API keys | ANTHROPIC_API_KEY, OPENAI_API_KEY, OPENROUTER_API_KEY, … |
XIBECODE_FALLBACK_PROVIDERS | Failover pool string |
XIBECODE_GATEWAY_WORKDIR | Default workdir |
GATEWAY_ALLOW_ALL_USERS | Dev-only; do not enable on public bots |
In-chat commands
| Slash | Meaning |
|---|---|
/stop | Abort the current agent run (not the gateway process) |
/new / /reset | Clear conversation history |
/status | Busy state, workdir, adapters |
/workdir [path] | Set project directory for this chat |
/progress on|off | Tool progress edits |
/sethome | Cron delivery home |
/help | Help |
Process lifecycle = gateway --start / --stop.
Run lifecycle = /stop or natural completion.
Security
- Prefer allowlists (
TELEGRAM_ALLOWED_USERS) or pairing (xibecode pair). - Never commit
gateway.env. - Treat bot tokens like production secrets.
Pairing
xibecode pair list
xibecode pair approve telegram <code>
xibecode pair revoke telegram <userId>Logs & sessions
- Logs:
~/.xibecode/gateway/logs/gateway.log - Sessions:
~/.xibecode/gateway/sessions/
Iterations
Gateway agent runs default to unlimited iterations (0). Abort with /stop if needed. See Agent engine.