社交渠道
广播/社交动态集成。与聊天频道不同,这类集成有两个特点:消息通常是公开的,且代理通常充当发布者,而非双向响应者。
Bluesky(AT 协议)
[channels.bluesky]
enabled = true
handle = "you.bsky.social"
app_password = "xxxx-xxxx-xxxx-xxxx" # create at bsky.app/settings/app-passwords
- 认证: Bluesky 应用密码(不是你的真实密码)。在设置中创建一个。
- 出站: 300 字符的帖子;更长的回复会自动分段。
- Protocol: AT Protocol via the
atrium-apicrate.
诺斯特
[channels.nostr]
enabled = true
private_key = "..." # nsec bech32 or hex
relays = [
"wss://relay.damus.io",
"wss://nos.lol",
"wss://relay.primal.net",
]
allowed_pubkeys = ["npub1..."] # empty = deny all, "*" = allow all
- Auth: raw private key (
nsecbech32 or hex). Store in the encrypted secrets backend — never in a checked-in config. - 入站消息: kind-1(文本)、kind-4(DM,NIP-04)和 kind-1059(礼品包装,NIP-17)。
- 出站: 相同类型。Zap 处理功能处于实验阶段。
- Relays: the agent connects to all listed relays; use 3–5 for reliability. If
relaysis omitted, ZeroClaw connects to a built-in set of popular public relays.
Twitter / X
[channels.twitter]
enabled = true
bearer_token = "..." # Twitter API v2 OAuth 2.0 Bearer Token
allowed_users = ["singlerider"] # usernames or user IDs; empty = deny all, "*" = allow all
- Auth: Twitter API v2 OAuth 2.0 Bearer Token only.
- 入站: 通过 Filtered Stream 端点提及。
- **出站:**帖子、回复、主题。
- 注意: 免费层的速率限制非常严格,几乎无法正常使用。请据此规划预算。
[channels.reddit]
enabled = true
client_id = "..."
client_secret = "..."
refresh_token = "..." # OAuth 2.0 refresh token (required)
username = "your-bot-username" # without `u/` prefix
subreddit = "rust" # optional: filter to a single subreddit (without `r/` prefix)
- Auth: OAuth 2.0 with a refresh token. Generate one with a script-type Reddit app and the
passwordorcodeflow, then save the refresh token here for persistent access. - Inbound: new posts and comments in the configured subreddit (or all subreddits the bot has access to when
subredditis unset), plus replies to the agent’s own posts. - **出站:**帖子、评论、私信。
安全地运营社交媒体渠道
公共社交网络上的机器人会吸引对抗性输入。两个预防措施:
- Restrict who the agent will respond to. Use
allowed_pubkeys(Nostr) orallowed_users(Twitter) to whitelist senders. Bluesky has no per-channel allowlist field — gate at the autonomy / tool layer instead. The default empty-list behaviour is deny all for the channels that have an allowlist field. - Keep autonomy level at
Supervisedor lower. A public-facing agent inFullautonomy is effectively a public shell. For public-facing channels, restrict the tool surface in the global tool-policy config rather than expecting per-channeltools_allow(no such per-channel field exists).
速率限制与退避
All social channels are subject to aggressive rate limits. ZeroClaw’s outbound queue uses exponential backoff on 429 responses. If you hit persistent rate-limiting, throttle the agent’s posting cadence at the source rather than relying on per-channel streaming knobs (none of these channels expose draft-update intervals; their schema is intentionally minimal).