| 1 | # Codewhale Agent: one identity, several surfaces |
| 2 | |
| 3 | "Codewhale Agent" is the name Codewhale acts under when it works somewhere |
| 4 | other than your terminal: a pull-request review on GitHub, a commit credit, a |
| 5 | chat bot. This page lists those surfaces and the rules they share. |
| 6 | |
| 7 | ## Surfaces |
| 8 | |
| 9 | | Surface | Appears as | Set up | |
| 10 | | --- | --- | --- | |
| 11 | | Pull-request review | The GitHub App bot `codewhale-agent[bot]`, or the workflow's own token when no App is configured | [GitHub review bot](GITHUB_ACTION.md), [GitHub App setup](GITHUB_APP.md). `codewhale review --pr N` prints a review locally; it is published only with `--post`. | |
| 12 | | Commit co-author | The contributor named in `.github/AUTHOR_MAP` | Maintainers keep the map; harvested work is credited to its author. | |
| 13 | | Chat bots | A bot you register and pair with your Codewhale account | The open-source bridges under `integrations/` (Telegram, Feishu, DingTalk, WeCom, Weixin) connect a chat to a local `codewhale serve --http`. Account-paired Telegram and Slack bots depend on the deployed account service. | |
| 14 | |
| 15 | Slack bot commands control Codewhale. They do not give an agent tools to |
| 16 | search or read a Slack workspace; for that, configure a Slack MCP server |
| 17 | ([MCP](MCP.md)). The Slack bot needs a Slack app, credentials and webhook that |
| 18 | you manage, and a hosted Slack delivery has not been qualified, so treat it as |
| 19 | source, not as a ready integration. |
| 20 | |
| 21 | Personal WeChat is supported only through Tencent's official ClawBot (iLink) |
| 22 | channel, never through unofficial account automation. The |
| 23 | `integrations/weixin-bridge` bridge uses it with a local |
| 24 | `codewhale serve --http` and stops when Tencent's risk control objects. |
| 25 | Official Account (公众号/服务号) APIs are not used. |
| 26 | |
| 27 | ## Rules every surface follows |
| 28 | |
| 29 | - One engine. Every surface is input and output around the same turn loop |
| 30 | (`crates/engine/src/core/engine/turn_loop.rs`). No surface has its own |
| 31 | engine. |
| 32 | - One account. Account-backed surfaces authenticate to the Codewhale account |
| 33 | you sign in to with `codewhale login`; see [Account](ACCOUNT.md). |
| 34 | - Approvals are decisions, not messages. An approval from any surface is |
| 35 | routed back as a permission decision to the same engine. A plain chat |
| 36 | message never runs an action that needs approval. |
| 37 | - Commands and approvals are recorded on every channel. |
| 38 | |
| 39 | ## Chat bot behaviour |
| 40 | |
| 41 | - Commands are allowlisted per channel. The default set is read-only: |
| 42 | `status`, `jobs`, `receipts`, `help`. `new task`, `approve` and `deny` are |
| 43 | opt-in. |
| 44 | - Approve and deny buttons act as permission decisions. |
| 45 | - The bot can be set to message only when something changed, to observe quiet |
| 46 | hours and to send a digest. |
| 47 | - A channel is paired with one code issued inside the signed-in app. |
| 48 | Unpairing revokes it at once. |
| 49 | |
| 50 | ## Naming |
| 51 | |
| 52 | - Product: Codewhale. Agent surface: "Codewhale Agent". |
| 53 | - Bot handle, wherever it can be chosen: `codewhale-agent`. |
| 54 | - In the cloud the agent introduces itself as "Codewhale cloud agent", not by |
| 55 | a model provider's name. |
| 56 |