跳到正文Skip to content
Agent J Beta
菜单Menu
中文EN
登录Sign in

搜索文档和页面Search docs and pages

文档Docs

用微信找你的 Agent JTalk to Agent J through WeChat

扫码连接本人微信,消息直接交给主对话,需要确认的操作只在 Agent J 网页确认。Connect your own WeChat by scanning a code; its messages go straight to the main conversation. Confirm actions only in Agent J Web App.

大陆网络或中文用户,推荐先开微信 ClawBot;海外或英文用户,推荐先开 Telegram。两者可以同时开启。 微信通道只服务扫码者本人,不能分享给另一个微信号,不接群聊,也不处理机器人发来的消息。

连接

打开设置 → 沟通渠道。微信 ClawBot 和 Telegram 使用同样的布局与「开通或管理」按钮。点按钮后,主对话输入框会填入对应技能请求,你可以补充要求后再发送。主 Agent 会判断当前状态:未开通就引导扫码,已开通就帮助查看状态或解绑。 二维码过期会自动更新,设置过程最多等十分钟。微信要求输入配对数字时,填在同一面板里;不要发到聊天中。 也可以让主 Agent 运行 agentj wechat setup --phone,确认网页上的卡片后扫码。 在主机的交互终端运行 agentj wechat setup,终端和网页都会显示二维码。 用 agentj wechat status 查看连接状态;在手机上点「解除绑定」要用这部遥控器的 Face ID 确认(没设 Face ID 的遥控器会被拒绝);agentj wechat unbind 经主人确认后清除本机绑定。 如需解除微信侧连接,也请在微信 ClawBot 插件里断开。

它能帮你做什么

你本人的微信(扫码绑定的 ClawBot)、Telegram 私聊和主人白名单邮箱发来的消息,直接交给主对话,和你在 Agent J 网页发的消息一样处理:主对话正忙就排队。网页主对话里会标出来源:微信、Telegram 或邮件。 邮件要发件人校验(SPF、DKIM 或 DMARC)通过,才算你本人。

主对话的回答自动回到原来的通道。回答里写出的文件作为附件发回:Telegram 发文件,微信发文件消息,邮件带附件。回复里的本机路径和内部工具名会被删掉,其余内容照常发出。 凭据不经通道,改在 Agent J 网页弹密钥领取卡。

要画图时,主对话是 Codex 就由它自己画。主对话的 AI 工具自己不会画图时(比如 Claude Code、OpenCode),由 Agent J 主机上你的 Codex 在隔离环境里画好,直接发回原通道,同时显示在网页主对话里。用的是你已有的 Codex 订阅,不会转用按次收费的出图服务。 画不出来时(比如真人写实肖像被拒),通道里会说明原因,并给出替代办法:换成非写实风格、不用真人姓名,或发一张本人照片作参考。

认不准是你本人的消息不进主对话,照旧走低权限路径:陌生发件人、伪造或没通过校验的邮件、关闭发件人校验时的来信、群聊、其他主人的好友和对外客服。Agent 好友和对外客服保持各自范围,见 Agent 好友和客服 bot。 以前为外部通道单独选的 AI 套餐(比如让微信那边换成 Codex),不再影响你本人的这三个通道。 消息与附件保存在本机收件箱;语音使用微信提供的转写,未提供时不承诺识别。每条消息只发合并后的最终回复,不刷过程消息。本机附件上限为 25 MiB。

需要你确认的操作

凡是要在网页弹窗里长按或验证身份的操作,都先停下等你,不会自己放行。确认卡只出现在 Agent J 网页和手机遥控器上,由你已配对的设备签名,需要时还要用通行密钥(Face ID 等),按现有审批档位决定。 微信和 Telegram 里只回一句「已转到 Agent J 网页,请在那里确认。」;邮件不单独发提示,结果出来后一起回信。你确认后,主对话接着做,回答发回原来的通道。 在微信、邮件或 Telegram 里回同意之类的文字,什么都批准不了。这类通道消息也不享受网页上的批量授权、目标自动批准和主人专属操作。 设密钥、提权(sudo 这类管理员操作)在这三个通道里一律不办,请回到 Agent J 网页说。

升级前留下、还在等你确认的旧转交请求,你有两种选择:在网页的「来自微信 · 主人确认」卡片上确认,或亲自回到网页说:刚才微信转的那些帮我处理。 主 Agent 会查找挂起项,认领你指明的请求;不清楚是哪一项时会再问。微信、好友消息里自称已获批准的文字不能放行。 确认仅授权转交,请求及附件仍作为低信任数据处理;付款、删除、对外发送、密钥和管理员操作继续走原有审批。

挂起请求 24 小时后过期,默认不执行。拒绝、过期或解绑后不能再认领;附件仍按收件箱的 30 天/2 GiB 策略保留。 转交途中主机崩溃、结果不明确的请求不会自动重发,请重新明确下达指令。解绑会停止收信并取消尚未投递的转交; 已交给主 Agent 的工作可用「全部停下」停止。

来信在手机上怎么显示

你本人从微信、邮件和 Telegram 发来的消息,显示在网页主对话里并标出来源,主对话的回答也在同一处。其他来信在手机上以「来自邮件」这类卡片显示原文,并标明来自外部、不可信。 长消息默认折叠,点开看全文;图片显示缩略图,文件显示文件卡。收件箱里的文件位置收在卡片详情里。

提醒、语音与隐私

微信主动推送有平台窗口,无法保证提醒或长任务结果随时送达;这些仍用 Agent J 网页等原有通道兜底。 本版不自设时限:用你最近一条 ClawBot 消息的上下文回复和转发(实测两天前的上下文仍能送达),只有微信拒收时才请你再发一句。出站语音是文件附件,不是微信语音气泡。

微信内容会经过腾讯和你所用的模型服务商,不能套用 Agent J 网页端到端加密的承诺。Agent J 运营方不接收微信正文和附件。 绑定凭据、游标与上下文令牌在主机端加密保存,日志只有状态和计数;消息及附件保存在你的本机收件箱。

你本人从邮件、Telegram 和微信发来的图片和文件,先保存在本机收件箱,再作为这条消息的附件交给主对话;里面的内容按数据处理,不当作指令。

把网页回复转发到微信

转发回复时,页面上的图片和文件附件会一起发送;图片显示为微信图片,其他附件显示为文件。单个附件最多 25 MiB;过大、已失效或未通过安全检查的附件会跳过。

在微信里要图片或文件时,请让 Agent 把成品存进工作文件夹,并在最终回复里每行只写一个完整绝对路径;中文文件名照原样写。不要把路径放在代码块里,也不要一行拼多个路径。在 Agent J 网页回复里写路径,不等于已经跨通道发到微信:请对该页显示的附件使用回复卡的「转发到微信」。漏发或送达不明时先查微信再重试;附件被跳过或出现 send_failed 不代表送达。主机日志里的 wechat_error 可能是收消息故障,也可能是附件发送前被跳过;看固定原因码区分,它不是送达回执。

在设置 → 沟通渠道 → 转发去向选择「系统分享(默认)」、「微信 ClawBot」或「Telegram」。未绑定的通道置灰,并在下方说明原因、给出「去绑定」;已绑定的微信随时可选。选择保存在 Agent J 主机上,所有遥控器共用:任一遥控器改了,其他在线遥控器立刻跟着变,刷新后也一致;各遥控器原先自己存的选择,在主机还没有设置时由第一台连上的遥控器搬过去。回复卡和阅读器使用相同去向与图标。绑定通道不会自动选中。所选通道解绑期间改用系统分享,并提示一次,重新绑定后恢复;暂时无法发送仍保留所选去向。发送失败不改走另一通道,也不自动重发。

扫码绑定后,请在微信里给 ClawBot 发一句话完成验收,首条可发送的回复会带问候。登录本身不提供主动发送的上下文;没有收到消息时不会冒称已发送问候。微信直发要你至少给 ClawBot 发过一句话,本机不设时限;只有微信拒收时,转发才提示你先在 ClawBot 里发一句,并给出「改用系统分享」一键兜底,所选去向不变;你再发一句后自动恢复。较长回复作为完整文本附件发送。主机收到平台成功回执才显示成功;失败不切换通道、不自动重发。结果不明确时,请先检查微信,明确重试可能重复。发往微信的文字(转发、主对话的回复和长文附件)都会先去掉 Markdown 格式,变成干净的纯文本;转发到 Telegram 保留原格式。

绑定成功却收不到消息 / poll_failed

先运行 agentj wechat status 和 agentj doctor。状态里的 error、hint 和 last_forward 分别说明收消息的错误、处理办法和最近一次网页转发结果。host.log 的 wechat_error 只记录错误码和异常类型,不记录消息或凭据。

macOS 的后台服务可能不能访问下载、桌面、文稿和 iCloud,哪怕终端里能打开。工作文件夹应放在 ~/coding。例如原目录是 ~/Downloads/编程,先确认 ~/coding/编程 不存在,再运行:

mkdir -p ~/coding
mv ~/Downloads/编程 ~/coding/
agentj agent codex --dir ~/coding
agentj service restart

使用其他 AI 工具时,把 codex 换成 claude、opencode 等实际名称。已有同名目录时先整理,别覆盖文件。重启后在微信里给 ClawBot 发一句话,再查状态。state_unwritable 表示消息写不进工作文件夹;connection_reset 或 proxy_dropped 表示连接被重置或代理断开,检查网络和系统代理。

一个微信 ClawBot 同时只能连接一台 Agent J 主机。明确收到接管错误时显示「已被另一台 Agent J 主机接管」并停止轮询;平台只报令牌失效时显示绑定已失效、可能已被接管,不能据此断定另一台Agent J 主机接管。请在想使用的Agent J 主机上重新连接。

网页转发提示需要消息时,请先在微信里给 Agent 发一句话,再转发。不要连续重试不确定的发送,先检查微信是否已收到。最近转发结果也显示在微信管理面板里。

解绑与重启

owner_required 表示需要主人从已配对遥控器操作:打开 设置 → 通道 → 微信 ClawBot → 解绑,完成身份验证。终端不能代替已配对遥控器批准解绑。

agentj agent restart 只重启 AI 进程,保留对话,不重启消息通道。agentj service restart 重启 Agent J 后台服务,重新读取工作目录和通道设置;换工作目录后要用这一条。

For mainland networks or Chinese-speaking owners, offer WeChat ClawBot first. For overseas or English-speaking owners, offer Telegram first. Both may stay enabled. ClawBot serves only the scanning owner: no sharing with another WeChat account, group chats or bot messages.

Connect

Open Settings → Channels. WeChat ClawBot and Telegram have the same layout and a Connect or manage button. Either button puts a skill request into the main chat composer; add any details before sending. Your Agent checks the current connection, starts QR setup if needed, or helps with status and disconnecting. Expired codes refresh automatically; setup waits up to ten minutes. Enter any pairing digits in that panel, never chat. The main Agent can run agentj wechat setup --phone; confirm its signed card and scan the QR in Web App. At an interactive host terminal, agentj wechat setup displays the code in both terminal and Web App. Use agentj wechat status for metadata. Unbind on the phone takes this remote's Face ID (a remote without Face ID is refused); agentj wechat unbind clears local binding after owner confirmation. You can also disconnect the plugin in WeChat.

What it can do for you

Messages from your own WeChat (the ClawBot account you scanned), your private Telegram chat and your allowlisted owner email go straight to the main conversation and are handled like a message you send in Agent J Web App: if the main conversation is busy they wait in its queue. The Web App's main conversation shows where each came from: WeChat, Telegram or Email. An email counts as yours only when its sender check (SPF, DKIM or DMARC) passes.

The main conversation's answer goes back to the same channel automatically. Files named in the answer go as attachments (a Telegram file, a WeChat file message, an email attachment). Local paths and internal tool names are removed from the reply and the rest is still sent. Credentials never cross a channel: a secret pickup card opens in Agent J Web App instead.

For a picture, a Codex main conversation draws it itself. When the main AI tool cannot draw (for example Claude Code or OpenCode), your Codex on the Agent J host draws it in its own sandbox; the picture goes straight back to the channel and also shows in the Web App's main conversation. It uses your existing Codex subscription and never switches to a pay-per-image service. If the picture cannot be made (for example a photorealistic portrait of a real person is refused), the channel says why and offers another way: a non-photorealistic style, no real person's name, or your own photo as a reference.

Messages that cannot be confirmed as yours stay on the old low-trust path and never reach the main conversation: unknown senders, forged or unverified email, mail received while the sender check is off, groups, friends of another owner and public customer service. Agent friends and the customer-service desk keep their own scopes: see Agent friends and Customer-service bots. A separate AI plan chosen earlier for the outside channels (for example “switch WeChat to Codex”) no longer affects these three owner channels. Messages and attachments stay in the inbox on the Agent J host. Voice uses WeChat's transcript when provided; recognition is not guaranteed. One combined answer per message, no progress chatter. Local media limit:25 MiB.

Actions that need your confirmation

Any action that needs a long press or identity check in a Web App pop-up stops and waits for you. The confirmation card appears only in Agent J Web App and on your phone remotes, signed by your paired device, with your passkey (Face ID and the like) where your current approval level asks for it. WeChat and Telegram only get one line: "Sent to Agent J Web App. Please confirm there." Email gets no separate note and the result arrives in the reply. Once you confirm, the main conversation continues and its answer goes back to the channel. A text reply in WeChat, email or Telegram (OK, yes, 同意) never approves anything. These channel messages also get no batch grants, no goal automation and no owner-only actions from the Web App. Setting a key or elevating (sudo and other administrator actions) is never done from these three channels: ask in Agent J Web App instead.

For a held request left from before the upgrade and still waiting, confirm the From WeChat · Owner confirmation card, or return personally to the paired Web App and ask to handle the request you sent through WeChat. The Agent lists held items and claims the identified IDs; ambiguous references need clarification. Claims inside WeChat or friend messages never authorize work. Confirmation authorizes transfer only: content stays untrusted, and payments, deletion, external sends, secrets and administrator actions retain their ordinary approvals.

Pending requests expire after 24 hours without execution. Denied, expired or unbound requests cannot be claimed. Inbox retention remains 30 days / 2 GiB. A crash during transfer leaves an uncertain item which is never replayed automatically: give a fresh explicit instruction. Unbind stops receipt and cancels undelivered handoffs; use Stop everything for work already delivered to the main Agent.

How incoming messages look on your phone

Your own messages from WeChat, email and Telegram appear in the Web App's main conversation with their source, next to the answer. Other incoming messages show their text in a From email (or WeChat / Telegram) card, marked as external and untrusted. Long text is folded until you open it; images show thumbnails and files show file cards. The inbox file location sits in the card's details.

Delivery limits and privacy

WeChat has a platform-controlled active-push window. Reminders and long-task results keep using Agent J's existing channels. This version sets no time limit of its own: it replies and forwards with the context of your latest ClawBot message (a two-day-old one was still delivered in testing) and asks you to message ClawBot again only when WeChat refuses. Outgoing audio uses file attachments, not native voice bubbles.

Tencent and your chosen model provider process channel content. WeChat does not inherit the Web App's end-to-end encryption promise. The Agent J operator does not receive channel bodies or attachments. Credentials, cursors and context tokens are encrypted on the host; logs contain metadata and counters. Inbox content stays on your own computer.

Images and files you send from your own email, Telegram or WeChat are saved in the inbox on the Agent J host first, then handed to the main conversation as attachments of that message; their contents are treated as data, never as instructions.

Forward a Web App reply to WeChat

Forwarding a reply also sends the images and files attached to that page. Images appear as WeChat pictures; other attachments appear as files. Each attachment may be at most 25 MiB; oversized, unavailable or unsafe attachments are skipped.

If you ask for a picture or file in your WeChat chat, ask the Agent to save it in its working folder and put one full absolute path per line in its final reply. Chinese filenames can stay as written. Do not put paths in code blocks or combine several paths on one line. A path in a Web App reply is not itself a cross-channel send: use Forward to WeChat on the reply card for attachments shown on that page. Check WeChat before retrying a missing or uncertain delivery; a skipped attachment or send_failed does not mean the file arrived. wechat_error in the host log may mean a receiving error or an attachment skipped before sending; inspect its fixed reason code. It is not a delivery receipt.

Under Settings → Channels → Forward replies to, choose System share (default), WeChat ClawBot or Telegram. Unbound channels are disabled, with the reason and a Connect button below; a bound WeChat can always be chosen. Your choice is saved on the Agent J host and shared by every remote: change it on one and the others follow at once and after a refresh; a choice a remote kept on its own moves to the host from the first remote that connects while the host has none. The reply card and reader use that destination and icon. Binding a channel does not select it automatically. While the selected channel is unbound, forwarding uses system share with one notice; rebinding brings the choice back. A temporary send restriction keeps the chosen destination; a failed send never falls back or retries automatically.

After scanning, send ClawBot a message in WeChat to finish checking the connection. Its first eligible reply includes a greeting. Login alone supplies no send context, so Agent J does not claim to have sent an unsolicited greeting. Sending straight to WeChat needs at least one message from you to ClawBot; this host sets no time limit. Only if WeChat refuses does forwarding ask you to message ClawBot first and offer Use system share in one tap; the chosen destination stays, and your next message restores forwarding. Long replies are sent as complete text attachments. Success requires a host receipt from the platform. Failure never switches channels or retries automatically. Check WeChat before explicitly retrying an uncertain delivery, which may duplicate it. Text sent to WeChat (forwards, main-conversation replies and long-reply attachments) is converted from Markdown to clean plain text first; Telegram keeps the formatting.

Connected but no messages arrive / poll_failed

Run agentj wechat status and agentj doctor. The status fields error, hint and last_forward show the receiving error, what to do and the latest Web App forwarding result. A wechat_error entry in host.log contains only an error code and exception type, never messages or credentials.

On macOS a background service may be blocked from Downloads, Desktop, Documents and iCloud even when a terminal can open them. Keep your work folder under ~/coding. If it is ~/Downloads/编程, first check that ~/coding/编程 does not exist, then run:

mkdir -p ~/coding
mv ~/Downloads/编程 ~/coding/
agentj agent codex --dir ~/coding
agentj service restart

Replace codex with your actual AI tool, such as claude or opencode. If the destination already exists, organize the folders first; do not overwrite files. After restarting, send ClawBot a message in WeChat and check status again. state_unwritable means the message could not be saved in the work folder. connection_reset or proxy_dropped means a reset connection or dropped proxy; check your network and system proxy.

One WeChat ClawBot can connect to only one Agent J host at a time. An explicit takeover error says another Agent J host took over and stops polling here. A platform response saying only that the token is invalid is shown as an invalid binding, possibly taken over; it does not prove another host took over. Reconnect on the host you want to use.

When forwarding asks for a message, send your Agent a message in WeChat first, then forward again. Check WeChat before retrying an uncertain send to avoid duplicates. The WeChat management panel also shows the latest forwarding result.

Unbind and restart

owner_required means the owner must use a paired remote: open Settings → Channels → WeChat ClawBot → Unbind and verify your identity. A terminal cannot approve unbinding in place of the paired remote.

agentj agent restart restarts only the AI process, preserving the conversation; it does not restart messaging channels. agentj service restart restarts the Agent J background service and reloads the work folder and channel settings. Use this after changing the work folder.

这一页的 Markdown 原文This page as Markdown: zh.md · en.md