Skip to content

Channels

ruozhuoruoyu edited this page Aug 13, 2026 · 3 revisions

🌐 English | 中文

Channels

Philont runs one server process that drives all interfaces simultaneously. Channels are independent — enable any combination. Most channel settings are configured from the Settings panel in the Web UI.

Web UI (default)

No configuration needed. Start the server and open http://localhost:5173 (or let the launcher open it). It provides chat, memory browsing (the Memory tab shows the facts, skills, and notes Philont builds as you talk to it), and the autonomy dashboard.

⚠️ The Web UI ships without authentication and binds to localhost. Do not expose it to the internet without a reverse proxy with auth + TLS. See Permission & Security.

Telegram

  1. Create a bot with @BotFather and copy the token.
  2. Web UI → Settings → Channels → enable Telegram → paste the token.
  3. Set DM and group access policies (allowlist is the safe default) and add allowed user/group IDs.
  4. Save and restart — send the bot a message to verify.

If api.telegram.org is blocked in your region, set TELEGRAM_PROXY in Settings → Advanced to route only Telegram traffic through a proxy.

WeChat

Philont connects to WeChat via an iLink Bot bridge (web-protocol login — no WeCom or API account needed). The bridge — login state machine, message extraction, and a lenient decrypt path — is adapted from the Hermes WeChat adapter (credited in the README).

  1. Scan in from the command line (one-time; state persists across restarts):
(cd server && npm run wechat:login)
# Opens a URL — open it in a browser and scan the QR code with WeChat.
  1. Web UI → Settings → Channels → enable WeChat → configure DM and group access policies.
  2. Save and restart. Re-run wechat:login only if the session expires.

Proactive-message recovery

The iLink bridge may reject a proactive send with ret=-2 even while inbound messages and direct replies still work. Philont treats this as a conversational-channel limit, not as proof that the login expired:

  • the unsent remainder is stored in a durable per-peer mailbox;
  • urgent notices are retained for 72 hours and digests for 48 hours;
  • on the next DM, up to three notices are selected (urgent first) within a 1,500-character budget and appended to the normal reply, so they share one send allowance;
  • an authorization card takes priority—deferred notices remain queued instead of being sent before it;
  • notices are removed only after the combined reply is fully delivered; a later direct success for the same notice also removes its stale mailbox copy;
  • truncation is marked explicitly; a channel-independent hourly maintenance pass expires old notices, logs aggregate kind/channel counts without message content, and exposes the daily count in the self-check.

This recovery is specific to WeChat's observed iLink behavior. Telegram continues to use normal proactive delivery. A registered gateway means the channel can be attempted; successful direct delivery is the stronger reachability signal.

Headless CLI

The same server can be driven headless (no UI), which is how scheduled/autonomous runs and demos operate. See the demo/ directory.

A note on language

Philont decouples response language from prompt language (response_language.ts): the internal prompts are English, but the agent replies to a person in their language — so a WeChat conversation stays in Chinese even though the system prompts are English.


中文

English | 中文

渠道

Philont 跑一个 server 进程,同时驱动所有界面。渠道相互独立 —— 任意组合启用。多数渠道设置在 Web UI 的 Settings 面板配置。

Web UI(默认)

无需配置。启动 server 后打开 **http://localhost:5173**(或让 launcher 自动打开)。它提供对话、记忆浏览(Memory 标签页展示 Philont 在与你交谈中构建的 facts、skills、notes)以及自主面板。

⚠️ Web UI 不带鉴权且绑定 localhost。没有带鉴权 + TLS 的反向代理时不要暴露到公网。见 权限与安全。

Telegram

  1. 用 @BotFather 创建 bot 并复制 token。
  2. Web UI → Settings → Channels → 启用 Telegram → 粘贴 token。
  3. 设置私聊与群组访问策略(白名单是安全默认)并添加允许的用户/群组 ID。
  4. 保存并重启 —— 给 bot 发条消息验证。

若你所在地区屏蔽 api.telegram.org,在 Settings → Advanced 设 TELEGRAM_PROXY,只把 Telegram 流量走代理。

微信

Philont 经 iLink Bot 桥接入微信(网页协议登录 —— 无需企业微信或 API 账号)。该桥 —— 登录状态机、消息提取、宽松解密路径 —— 改编自 Hermes 微信适配器(README 已致谢)。

  1. 命令行扫码登录(一次性;状态跨重启保留):
(cd server && npm run wechat:login)
# 会打开一个 URL —— 在浏览器打开并用微信扫二维码。
  1. Web UI → Settings → Channels → 启用微信 → 配置私聊与群组访问策略。
  2. 保存并重启。仅当会话过期时才需重跑 wechat:login。

主动消息恢复

即使收消息和直接回复仍然正常,iLink 也可能用 ret=-2 拒绝主动发送。Philont 会把它视为对话渠道限制,而不是直接判定登录过期:

  • 未发出的 remainder 会进入按联系人持久化的 mailbox;
  • urgent 通知保留 72 小时,digest 保留 48 小时;
  • 下一次私聊时,最多选择 3 条通知(urgent 优先),在 1,500 字符预算内附加到正常回复,共用一次发送机会;
  • 授权卡优先,存在授权卡时 deferred 通知继续保留,不会抢在前面消耗额度;
  • 只有合并回复完整送达后才删除通知;同一通知后来直接发送成功,也会清理陈旧 mailbox 副本;
  • 截断会明确标注;与渠道无关的每小时维护任务负责清理过期通知,按 kind/渠道记录不含正文的聚合告警,并在日检中呈现当天数量。

这条恢复路径针对微信 iLink 的实际表现;Telegram 仍走正常主动推送。Gateway 已注册只表示可以尝试投递,真实发送成功才是更强的可达性证据。

无头 CLI

同一个 server 可无头驱动(无 UI),这正是调度/自主运行与示例的工作方式。见 demo/ 目录。

关于语言

Philont 把回复语言与提示词语言解耦(response_language.ts):内部提示词是英文,但 agent 用对方的语言回复 —— 因此即便系统提示词是英文,微信对话仍保持中文。

Clone this wiki locally