Gateway
The gateway is the main runtime process. It starts the agent, connects all enabled chat channels, and runs the cron scheduler and heartbeat service.
Starting the gateway
kyber gatewayConfiguration
{
"gateway": {
"host": "0.0.0.0",
"port": 18790
}
}| Field | Type | Default | Description |
|---|---|---|---|
host | string | 0.0.0.0 | Bind address |
port | number | 18790 | Port |
CLI flags
| Flag | Description |
|---|---|
--port, -p | Override gateway port |
--verbose, -v | Enable debug logging |
What the gateway runs
When you start the gateway, it:
- Loads your config from
~/.kyber/config.json - Creates the LLM provider with your API key and model
- Starts the agent loop
- Connects all enabled chat channels (Discord, Telegram, WhatsApp, Feishu)
- Starts the cron scheduler (if any jobs are configured)
- Starts the heartbeat service
- Listens for incoming messages on all channels
Running as a system service
The install script can set this up for you. If you want to do it manually:
Linux (systemd):
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/kyber-gateway.service << EOF
[Unit]
Description=Kyber Gateway
After=network.target
[Service]
Type=simple
ExecStart=$(which kyber) gateway
Restart=on-failure
RestartSec=5
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable --now kyber-gateway
loginctl enable-linger $(whoami) # survive logout on VPSmacOS (launchd):
The install script creates plist files in ~/Library/LaunchAgents/. See the install script source for the full plist template.