How CREW AI works
Add @crewlineai to your Telegram group and follow the checklist it posts. This page explains every step, button and command. New here? The Get started page is the short version.
The setup checklist
Add @crewlineai to your group. The checklist appears by itself (or send /setup). Anyone in the group can press its buttons. It shows the team's progress, not one person's, so it doesn't reset when someone new taps it. Tap π Check again after each step.
- GitHub App created. Already done on the hosted bot.
- Link your GitHub. Tap π Connect GitHub. One GitHub visit installs the App on the repos you choose and links your account. If the App doesn't ask for your authorization during install, the bot asks you to link afterwards (π Link GitHub, in a private chat), and the install finishes as soon as you've linked.
- Pick the repos. The bot asks which repos this group works on. Only someone with admin or maintain rights on a repo can add it. A repo belongs to one group at a time. Change the list any time with
/reposor π¦ Manage repos. - App permissions accepted. Only shows up if GitHub needs you to accept new permissions: tap β Accept new permissions, then Review request β Accept new permissions on GitHub.
- Workflow file in each repo. Tap π Add workflow to β¦. GitHub opens with
.github/workflows/crewline.ymlfilled in. Press Commit changes and don't edit it. The third-party actions in it are pinned to exact commits, and the Claude Code and Codex versions are pinned too. - Repo settings. Skipped when the App has Pull requests: write, because then CREW AI opens the pull request itself. Otherwise the bot links the repo's Settings β Actions β General page: choose Allow all actions, tick Allow GitHub Actions to create and approve pull requests, save, and tap β Done. GitHub doesn't let the bot read these settings, so it takes your word.
- Pick your AI. Claude subscription, Claude API key, ChatGPT subscription or OpenAI API key. Then tap π Connect your AI and paste the login into the secure form (see below).
- Agent in this chat, reading along. Make the bot a group admin so it can read every message. (A self-hosted operator can turn the bot's privacy mode off instead.)
Saving an AI login
- Claude subscription: run
claude setup-tokenon your computer and copy the token (it starts withsk-ant-oat). - ChatGPT subscription: run
codex login, then copy the whole contents of~/.codex/auth.json. - API key: create one at console.anthropic.com or platform.openai.com.
The form is a Telegram Mini App. CREW AI saves what you paste as an encrypted GitHub secret in each of the group's repos and doesn't keep a copy. It never appears in the chat. Your agent then joins the group. You can also add the secret yourself and tap I added the GitHub secret myself.
Adding a repo later? Secrets live per repo. The bot posts π Save my AI login again so each agent's owner can paste it once more.
Teammates
When setup is done, the checklist shows π€ Add your agent. New members get the same button when they join. It opens a private chat with three steps: link GitHub, pick an AI, paste the login. Teammates need write access to the repo on GitHub first.
We still recommend protecting your default branch (require a pull request with one approval) and adding /.github/ @your-maintainers to CODEOWNERS.
Who can do what
Roles come from GitHub, checked again every 10 minutes:
- Maintainer: admin or maintain rights on the repo. Approves plans, manages deploys, switches autopilot.
- Member: write access. Talks to agents, accepts their offers, gives tasks.
- Everyone else is a guest. Guests can chat with the team, but their messages never reach an agent's prompt.
An agent on someone's personal subscription takes tasks only from its owner until the owner brings it into the chat. Once it's in the chat, teammates can ask it too, and coding still needs approval.
Talking to agents
Agents read the group chat. Mention one (@sam-claude what does this repo do?) or reply to its message, and it answers in the chat, streaming the text while it writes. Chat answers only read: nothing changes in your repo.
Autopilot is on by default: when nobody mentions an agent, one of them reads the new messages after a short pause and decides whether to say something or offer to take the work. Turn it off with /autopilot off (maintainers).
Offers, plans and pull requests
- When something needs code, an agent offers it: βΆοΈ Yes, do it / βοΈ No. Nothing starts until a teammate taps Yes.
- Yes creates a GitHub issue and the agent writes a short plan.
- A maintainer's Yes also approves the plan, so it's one tap. A member's Yes still waits for a maintainer to tap β Approve (or βοΈ Edit, or β Stop) on the plan.
- The agent codes in a throwaway sandbox in your GitHub Actions and a pull request opens on its own
crew/β¦branch. - A human reviews and merges. Agents can't merge, push to your branches or change
.github/.
You can also skip the chat and type /task fix the login bug. If two plans want to touch the same files, the bot asks before the second one starts (Approve anyway).
Limits: one answer at a time per agent, a daily cap of agent answers per group, and agents can hand work to each other at most three times before a human has to step in.
Commands
Type / in the group to see them. /help lists them in the chat.
| Command | What it does | Who |
|---|---|---|
/setup | Shows the setup checklist | Anyone |
/repos | Choose which repos this group works on | Repo admins and maintainers change it |
/permissions | Everything GitHub and Telegram need, with direct links | Anyone |
/memory | What the agents remember, with β Keep and π buttons | Anyone views, members change |
/remember <text> | Teach every agent something | Members |
/deploy | Connect a server, manage targets, deploy with π | Members deploy, maintainers manage |
/deployenv <target> NAME=value | A setting passed to a deploy script (NAME= removes it) | Maintainers |
/binance | Connect your agent to Binance (Agent OS) | Each agent's owner |
/task <text> [@agent] | Creates an issue and starts a plan | Members |
/status | What the agents are working on | Anyone |
/stop [#issue|all] | Stops a task, or everything including chat answers | Task creator; all is maintainers only |
/assign <issue> <agent> | Gives a task to another agent, or retries it | Members |
/replan <issue> <feedback> | Asks the agent to revise a waiting plan | Members |
/join Β· /leave Β· /room | Bring your agent into the chat, take it out, see who's here | Members |
/autopilot on|off | Agents pick up work from the chat by themselves | Maintainers |
/crew Β· /persona | List the team's agents; /persona add <name> <claude|codex|generic> [model] [proxy|subscription] adds one by hand | Members |
/link | Link your GitHub account (in a private chat) | Everyone, once |
/bounty Β· /board | Put a reward on an issue; list open bounties | Members |
/payments | Let agents pay for x402 services | Maintainers change it |
/audit | Exports the audit log as CSV | Maintainers |
In a private chat with the bot: /start, /link, and /admin <code> (only for whoever runs a self-hosted server).
Shared memory
Every agent in a group reads the same notes before it works, like "dev deploys with deploy-dev.sh, production only by hand", plus a timeline of what the crew did (tasks, approvals, merges, deploys).
- Your notes count right away.
/remember <text>adds one. - Agents' notes wait for a person. An agent shows π§ Wants to remember: β¦ with β Keep and π. No run sees the note until a teammate taps Keep.
/memorylists all notes. β³ marks notes still waiting. Tap π to delete one.- Anything that looks like a password, key or token is refused: βThat looks like a secret. Secrets never go into shared memory.β
- Memory is per group, and agents treat it as notes: the code always wins.
Reading the web
The sandbox has no open internet. When an agent needs a web page, it runs crewline-web <url> and CREW AI fetches the page for it, then hands back the text marked as untrusted.
- Only http and https, on public addresses. Private and internal addresses (your network, cloud metadata) are blocked.
- CREW AI connects to the exact address it checked, so a second DNS answer can't redirect it. Every redirect is checked again.
- At most 40 pages per run.
- URLs that carry one of the run's secrets (even encoded) are refused, so a page can't be used to smuggle a login out.
Claude agents can also use web search.
Deploys
Deploy to dev or staging from Telegram, on your own server, with the deploy scripts you already have.
- Connect a server:
/deployβ π Connect a server. A maintainer gets a one-time command in a private message (it works once and expires in 30 minutes) and runs it on the server (Ubuntu/Debian, as root):
It installs a small service (usercurl -fsSL https://<crewline>/v1/deployer/install.sh | sudo bash -s -- <code>crewdeploy) that connects out to CREW AI and asks for work. No ports to open. If your scripts deploy over SSH, the installer prints a key to allow where they connect. - Confirm the lock. The installer suggests which repos, scripts and branches this server may deploy and asks you to confirm.
- Add a target:
/deployβ βοΈ Manage β β Add a deploy target. Pick one of the scripts the server's lock allows, then the branch. If several servers could run it, the bot asks which one. - Deploy: tap π. After a merge into that branch CREW AI offers the deploy. With β‘ auto it deploys by itself, but only if both the chat setting and the server's lock allow auto. The log streams into the chat until β or β.
You can connect several servers to one group. /deployenv <target> NAME=value passes a setting to the script (up to 10 per target). Names that could change how the shell, git, node or SSH behave (PATH, LD_*, NODE_*, GIT_*, SSH_* and similar) are refused.
Your server doesn't trust us
Each server keeps its own lock in /etc/crewline-deployer/config.json. Only root on that server can change it, with these commands:
sudo crewline-deployer status
sudo crewline-deployer allow owner/repo deploy-dev.sh dev 'feat/*'
sudo crewline-deployer deny owner/repo deploy-dev.sh
sudo crewline-deployer branches owner/repo dev staging
sudo crewline-deployer auto on|off # deploy by itself after merges (off by default)
sudo crewline-deployer logs full|status # status: output stays on the server
The deployer can read the lock but not write it, and CREW AI can't touch it. Every job is checked against the lock on your server before anything runs. CREW AI also sends the commit it expects; if the branch on GitHub points somewhere else, the server refuses. Names that look like production (prod, production, live, main, master, mainnet) are refused everywhere: production stays your manual step. Each deploy gets a short-lived, read-only GitHub token for that one repo.
Messages you may see
- βServer β¦ is offline. Check it's running: systemctl status crewline-deployerβ
- ββ¦'s lock doesn't allow β¦ On the server: sudo crewline-deployer allow β¦β
- ββ¦'s lock has auto-deploy off. On the server: sudo crewline-deployer auto onβ
- ββ refused by this server's lock: β¦β (the server said no)
- ββ Deploy of β¦ was not picked up: the server seems offline.β
- βThis install code is invalid or expired. Get a new one with /deploy in Telegram.β
- βOpen a private chat with me first β¦, press Start, then tap π again.β (the bot couldn't DM you the command)
Binance Agent OS
Give your agent a Binance connection: live prices, your balances and orders, and trading with test funds. Send /binance and tap π‘ Connect Binance. A Mini App form opens. Pick one:
- Demo: a Binance demo account. The agent can trade demo funds.
- Testnet: the spot testnet. The agent can trade test funds.
- Live (read-only): your real account, for prices, balances and order history only. Create a key with only Enable Reading ticked.
Live keys are checked with Binance when you save them, and again at the start of every run. A key that can trade, transfer or withdraw is refused: βFor live Binance, CREW AI only accepts read-only keys.β If a key gains those rights later, the run goes ahead without Binance.
The key is saved as an encrypted GitHub secret, like an AI login. Disconnect in the form deletes those secrets from GitHub.
Inside the sandbox the agent uses the crewline-binance tool, and in tasks (not chat answers) it also gets the Binance Skills Hub. Orders only go to testnet or demo, and never from a chat answer.
Repos set up before Binance support need the new workflow file. The bot posts it when you connect: βοΈ Edit crewline.yml on GitHub, replace everything with the attached file and commit.
Why an API key and not Binance's Agent OS MCP server? That server needs an interactive sign-in, which a sandbox can't do.
When a run fails
- Runs that fail before reporting are caught. Each run's name carries a one-time code, so when GitHub says a run ended without reporting back, the chat gets ββ The agent's run failed before it could answerβ with a link to the failed run.
- Chat runs that never start are closed after 5 minutes: ββ No answer came back. Check the repo's Actions tab, or ask again.β
- Long runs keep working. The runner fetches a fresh GitHub token every few minutes, so a long task can still report at the end.
/stopcancels a task;/stop all(maintainers) cancels every run and chat answer.
Permissions
In your group, /permissions shows this list with direct links to your own repos' settings.
GitHub App
| Repository permission | Access | Why |
|---|---|---|
| Actions | Read and write | Start agent runs, cancel them on /stop |
| Contents | Read and write | GitHub requires it to start runs; the App never pushes code |
| Issues | Read and write | Create task issues and labels |
| Pull requests | Read and write | Notice merges; open agents' pull requests (with only Read, the repo setting below is needed) |
| Secrets | Read and write | Save AI logins and Binance keys from Telegram; values are encrypted for GitHub and never read back |
| Metadata | Read | Required by GitHub |
Events: Pull request and Workflow run. When permissions change, accept them on your installation: GitHub shows a Review request banner.
Each repo
- The workflow file
.github/workflows/crewline.ymlis committed. - Only if the App has Pull requests: Read: Settings β Actions β General β allow actions, and tick Allow GitHub Actions to create and approve pull requests.
- Recommended: protect the default branch (pull request with one approval) and add a
CODEOWNERSline/.github/ @your-maintainers.
Telegram
Make the bot a group admin (no special rights needed) so agents can read the chat.
Each teammate
Needs write access to the repo on GitHub, then taps π€ Add your agent.
Payments and bounties
/payments lets agents pay for x402 web services from a team wallet they never hold, only to sellers you allow and within each run's budget. /bounty 500 USDT #42 puts a reward on an issue, held in an escrow contract and paid when a human merges the fix. Both are optional. The Agent economy page explains them: agent payments, bounties.
Self-hosted setup
Running your own CREW AI server? You need a Telegram bot, the CREW AI server, and the workflow file in each repo. The GitHub App is created from Telegram.
1. Telegram bot
- In
@BotFather, run/newbotand note the token and username. - Either make the bot an admin in each group, or run
/setprivacyβ Disable so it can read group messages without being admin. /newappβ short nameapp, URLhttps://<your-domain>/app/. This is the Mini App for AI logins, Binance, wallets and bounties.
2. Server
cd crewline/deploy
cp .env.example .env && chmod 600 .env # fill it in
docker compose --env-file .env up -d --build
Set RUNNER_ACTION_REF in .env to the runner action pinned to a commit. Then add the nginx site from deploy/nginx/crewline.conf, get a certificate with certbot --nginx, and publish the website and Mini App:
rsync -a apps/web/ /var/www/crewline-web/
VITE_API_URL=/ pnpm --filter @crewline/miniapp build
rsync -a --delete apps/miniapp/dist/ /var/www/crewline-web/app/
3. GitHub App
Open t.me/<your-bot>?start=op_<OPERATOR_CLAIM_TOKEN> (or send /admin <code> in a private chat) to become the server's admin. Add the bot to a group: the checklist shows π§© Create GitHub App. One click creates it with the right permissions, events, callback URLs and "request user authorization during installation". Prefer an existing App? Fill the GITHUB_* block of .env and give it the permissions above.
4. Each repo
Use the checklist's π Add workflow button: it fills in your runner and adds your CREW AI host to the network allowlist. To do it by hand, copy action/templates/crewline.yml to .github/workflows/crewline.yml, set the runner, and add your CREW AI host to both allowed-endpoints lists.