Chat channels
Channels are the front doors users hand tasks to the Manager through. Official channels resolve to their GitHub repos automatically.
# Browser-based chat UI (no bot token — just pick a login) costaff channel add webchat # Telegram bot — prompts for TELEGRAM_BOT_TOKEN costaff channel add telegram
Official channels
These four names auto-resolve to their GitHub repos — no URL needed:
| Name | What you need |
|---|---|
webchat | No third-party service. The CLI prompts for a login email + password (and a JWT secret) at deploy time; then open the channel's port in a browser and chat. |
telegram | A TELEGRAM_BOT_TOKEN from @BotFather. |
discord | A DISCORD_BOT_TOKEN from the Discord developer portal. |
line | A LINE_CHANNEL_ACCESS_TOKEN + LINE_CHANNEL_SECRET. |
Host ports are auto-assigned from 18090–18099 in the order channels are added — costaff channel list shows each channel's port and health. If WebChat is your first channel, it lands on http://localhost:18090.
Step-by-step: setting up each channel
WebChat (easiest — fully local)
costaff channel add webchat- When prompted, choose a login email + password (these are your credentials for the chat page — any values you like) and a JWT secret (any long random string).
- Open the port from
costaff channel listin a browser, log in, chat. No third-party account, works offline from the internet's point of view.
Telegram (≈ 5 min — works on a laptop, no public IP needed)
- In Telegram, open @BotFather and send
/newbot. - Give the bot a display name, then a username ending in
bot(e.g.my_costaff_bot). - BotFather replies with a token like
123456789:AAH…— copy it. costaff channel add telegramand paste the token when prompted.- Open your bot in Telegram, send
/startand then any message. The first message creates a pending identity — see the approval note below.
Telegram uses long polling (your machine calls Telegram, not the other way around), so it works behind home routers and firewalls with zero network setup.
Discord (≈ 10 min)
- Go to the Discord Developer Portal → New Application.
- Under Bot: click Reset Token and copy it.
- Still under Bot, scroll to Privileged Gateway Intents and enable Message Content Intent — without it the bot connects but never sees your messages. This is the #1 Discord gotcha.
- Under OAuth2 → URL Generator: tick the
botscope, give it Send Messages + Read Message History permissions, open the generated URL, and invite the bot to your server. costaff channel add discordand paste the token.
LINE (⚠ requires a public HTTPS URL)
Unlike Telegram, LINE delivers messages by webhook — LINE's servers must be able to reach your machine over public HTTPS at /callback. On a laptop behind a home router that means a tunnel (e.g. Cloudflare Tunnel or ngrok) or a reverse proxy with TLS. If you're just trying CoStaff out locally, use WebChat or Telegram instead and come back to LINE when you have a server.
- In the LINE Developers Console, create a Provider and a Messaging API channel.
- Copy the Channel access token and Channel secret.
costaff channel add lineand paste both.- In the LINE console, set the webhook URL to
https://<your-public-domain>/callback(pointing at this channel's port) and enable webhooks.
By default, the first message from any new chat account creates a pending identity and the assistant replies that the account "has not been approved". Approve yourself: costaff dashboard → Users → approve the new row, then message again. This gate is what stops a stranger who stumbles onto your bot from using your AI — keep it on.
Custom channels
Same flags as agents. Slack, for example, is a first-party repo added by URL:
# Slack bot (Socket Mode — needs SLACK_BOT_TOKEN + SLACK_APP_TOKEN)
costaff channel add slack --github https://github.com/costaff-ai/costaff-channel-slack
costaff channel add my-channel --github https://github.com/you/my-channel
costaff channel add my-channel --local /path/to/my-channel
Manage channels
| Command | What it does |
|---|---|
costaff channel list | Registered channels + port + health. |
costaff channel rebuild <name> | Rebuild image and restart. |
costaff channel remove <name> | Stop, remove, unregister. |
costaff channel tags <name> | List release tags available in the channel's repo (for pinning). |
Pin to a version
Channels accept the same --tag / --no-pull flags as agents. Pin a channel on production and the next rebuild stays on the pinned ref.
costaff channel add telegram --tag v0.1.0 costaff channel rebuild telegram --tag v0.2.0
See CLI → Version pinning for details.
You can run several channels at once. A Telegram message and a WebChat message both go to the same Manager Agent and the same specialist agents — the user identity is normalized across channels.