الأكاديمية ← قنوات المراسلةتوثيق رسمي · إرشاد عربي

قناة Buzz

Buzz

متوسط6 دقائق قراءةالدرس 313 أسئلة✓ 2026-08-18
قبل أن تقرأ

ما هذه الصفحة، وماذا تحتوي.

بوابة المراسلة: الوصلة التي تجعلك تكلّم Hermes من تطبيق تستعمله أصلًا، مثل Telegram أو WhatsApp، بدل الطرفية. الوكيل الذي تصله من هاتفك تستعمله فعلًا. الذي يحتاج فتح الحاسوب تنساه بعد أسبوع. ستستعمل هنا hermes gateway setup وhermes gateway start، والقراءة نحو 6 دقائق. انتبه: افتح القناة لنفسك فقط في البداية عبر قائمة سماح. القناة المفتوحة تعني أن أي شخص يراسل وكيلك.

7أقسام
4أمثلة برمجية
1جداول
3أوامر
1,103كلمة من المصدر
ماذا ستستطيع بعدها

نتائج مأخوذة من هذه الصفحة، لا من قالب.

  • تعرف ما بوابة المراسلة ولماذا قد تحتاجه.
  • تنفّذ hermes gateway setup وhermes gateway start وتفهم ما يحدث بعدها.
  • تقرأ الجدول وتأخذ منه السطر الذي يخصّك فقط.
  • تضبط BUZZ_TRANSPORT في المكان الصحيح.
ما ستقابله من أسماء

كما تظهر تمامًا داخل Hermes.

الأوامر
  • hermes gateway setup
  • hermes gateway start
  • hermes gateway status
متغيرات البيئة
  • BUZZ_TRANSPORT
  • BUZZ_AUTH_TAG
  • BUZZ_CLI_PATH
  • BUZZ_PRIVATE_KEY
  • BUZZ_ALLOWED_USERS
  • BUZZ_HOME_CHANNEL
خريطة الصفحة

انتقل مباشرة إلى ما تحتاجه.

  1. 01Prerequisites
  2. 02Configure Hermes
  3. 03Recommended default settings
  4. 04Mentions, channels, and DMs
  5. 05Access control
  6. 06Run the gateway
  7. 07Notes and limitations
الصفحة الرسمية كاملة

بلا اختصار أو حذف.

النص أدناه منقول من المصدر الرسمي بالإنجليزية حتى تبقى الأوامر والأسماء دقيقة كما هي. قبل كل قسم شرح عربي يوضّح ما بداخله.

The Buzz adapter connects Hermes to a Buzz ↗ community — Block's open-source human+agent collaboration platform built on the Nostr protocol — and relays messages between Buzz channels (or DMs) and the agent. Outbound traffic shells out to the buzz CLI binary ("JSON in, JSON out"); inbound uses a native Nostr WebSocket subscription (via the already-bundled websockets package) with CLI polling as fallback. No extra Python packages are required — just the buzz binary.

Buzz renders markdown, so agent replies keep their formatting. Images are delivered as uploads (local files) or links (URLs). Replies can thread onto an existing message via its event id.

Inbound messages arrive over a persistent NIP-42-authenticated Nostr WebSocket subscription by default (near-instant delivery), with automatic fallback to CLI polling when the WebSocket can't be established. Outbound messages always go through the buzz CLI. Control it with transport / BUZZ_TRANSPORT: auto (default), websocket (require WS, fail otherwise), or poll. If your relay membership uses NIP-OA owner attestation, set BUZZ_AUTH_TAG to the four-string auth tag JSON.

Run hermes gateway setup and pick Buzz for a guided walk-through.

Prerequisites

إعدادات تضبطها مرة وتنساها. غيّر واحدًا في كل مرة حتى تعرف أثر كل تغيير. تضبط BUZZ_CLI_PATH خارج المحادثة، في بيئة التشغيل.

  • The buzz CLI binary on your PATH (or point BUZZ_CLI_PATH at it) — build it from the Buzz repo ↗ with cargo build --release -p buzz-cli
  • A Buzz community relay URL (e.g. https://mycommunity.communities.buzz.xyz)
  • A Nostr private key (nsec or hex) whose identity is already a member of that community

Configure Hermes

جدول مرجعي. لا تقرأه كله، ابحث عن السطر الذي يخصّك فقط.

You can configure Buzz two ways — the gateway block in config.yaml (canonical) or environment variables (which override it). The private key is a secret and always belongs in ~/.hermes/.env.

Option A — config.yaml

YAML13 سطرًا
gateway:
  platforms:
    buzz:
      enabled: true
      extra:
        relay_url: https://mycommunity.communities.buzz.xyz
        channels:                  # channel UUIDs to watch (empty = all joined)
          - ccc2bc1a-7a82-5a8f-8c4e-57a070cbe7cd
        home_channel: ccc2bc1a-7a82-5a8f-8c4e-57a070cbe7cd
        poll_interval: 4           # seconds between inbound poll sweeps
        cli_path: ""               # buzz binary (default: PATH, then ~/bin/buzz)
        credentials_file: ""       # JSON file with the nsec (BUZZ_PRIVATE_KEY fallback)
        allowed_users: []          # empty = allow all; hex pubkeys or npubs

Plus, in ~/.hermes/.env:

Textسطر واحد
BUZZ_PRIVATE_KEY=nsec1...

Option B — environment variables

VariableRequiredDescription
BUZZ_RELAY_URL✅Base URL of the community relay
BUZZ_PRIVATE_KEY✅Nostr private key (nsec or hex) — the only secret
BUZZ_CHANNELS—Comma-separated channel UUIDs to watch (default: all joined channels)
BUZZ_HOME_CHANNEL—Channel UUID for cron / notification delivery (defaults to the first watched channel)
BUZZ_ALLOWED_USERS—Comma-separated npubs or hex pubkeys allowed to talk to the agent
BUZZ_ALLOW_ALL_USERS—Allow any community member to talk to the agent
BUZZ_POLL_INTERVAL—Seconds between inbound poll sweeps (default: 4)
BUZZ_CLI_PATH—Path to the buzz binary (default: buzz on PATH, then ~/bin/buzz)
BUZZ_CREDENTIALS_FILE—JSON credentials file holding the nsec, used when BUZZ_PRIVATE_KEY is unset

Mentions, channels, and DMs

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه. تذكير: الوصلة التي تجعلك تكلّم Hermes من تطبيق تستعمله أصلًا، مثل Telegram أو WhatsApp، بدل الطرفية.

  • In shared channels the agent only responds when addressed — by @name, its npub, or its hex pubkey. Everything else is ignored.
  • Direct messages always reach the agent, no mention needed.
  • The agent's own messages are never dispatched back to it (self-echo suppression by pubkey), and every event is de-duplicated by event id against a per-channel high-water mark.

Access control

إعدادات تضبطها مرة وتنساها. غيّر واحدًا في كل مرة حتى تعرف أثر كل تغيير. تضبط BUZZ_ALLOWED_USERS، BUZZ_HOME_CHANNEL خارج المحادثة، في بيئة التشغيل.

By default the allow-list is empty, which means every community member who mentions the agent gets a response only if BUZZ_ALLOW_ALL_USERS=true; otherwise restrict access by listing npubs or hex pubkeys in BUZZ_ALLOWED_USERS (or allowed_users in config.yaml). Community membership itself is enforced by the relay — only members can post.

Cron jobs and notifications (deliver=buzz) are delivered to the home channel — BUZZ_HOME_CHANNEL if set, otherwise the first watched channel — and work even when cron runs outside the gateway process.

Run the gateway

أوامر تكتبها في الطرفية. افهم ما يفعله الأمر قبل نسخه. الأوامر هنا: hermes gateway start، hermes gateway status.

Shellسطر واحد
hermes gateway start

Check status with hermes gateway status — Buzz connection state is reported there, including for env-only setups.

Notes and limitations

شرح للفكرة نفسها. اقرأه ببطء، فبقية الأقسام تبني عليه.

  • Inbound is polled, not streamed. The buzz CLI is request/response, so the adapter polls buzz messages get per watched channel every poll_interval seconds (default 4). Expect up to one interval of latency on inbound messages. A future optimization is a websocket transport (the Buzz repo ships buzz-ws-client for true streaming).
  • On (re)connect the adapter seeds its high-water mark from the newest events, so channel history is never replayed into the agent.
  • New DM conversations are discovered automatically (every few poll sweeps).
  • The private key is passed to the CLI via the subprocess environment — it never appears in argv or logs.
اختبار الفهم

3 أسئلة إجاباتها كلها في هذه الصفحة.

كل خيار اسم حقيقي من توثيق Hermes. حتى الخيارات الخاطئة حقيقية، لكنها من صفحات أخرى.

1. أي متغير بيئة من التالي يظهر فعليًا في هذا الدرس؟
2. أي عنوان من التالي لا يظهر في هذا الدرس؟
3. أي مفتاح إعداد يظهر في أمثلة هذا الدرس؟