Skip to main content

A voice-hub bridge posts utterances to a Grok Bot webhook and speaks the reply

GitHubGitHubmaciekgajewski2026-11-29

Life assistantSource read in fullRead first
GitHubGitHubmaciekgajewski2026-11-29

Open original

Overview

A household that already runs piotr_voice_hub can add this Python bridge so accepted speech is sent to a Grok Bot webhook routine named Ryszard, then spoken back on the same satellite.

Workflow

  1. What it is: A small Python service that sits next to piotr_voice_hub, subscribes to the hub's WebSocket API, sends each accepted utterance to a pluggable AI backend, and speaks the reply on the same satellite. The hub repo is unchanged; this repo is a separate consumer. One backend is a Grok Bot webhook routine; another is OpenClaw. The README points to docs/design.md, AGENTS.md, a task list, and make check (needs uv). License is MIT.
  2. Grok Bot parts used: A dedicated Bot named Ryszard with no connectors, a webhook routine whose saved prompt is in docs/grok-webhook-routine.md, and an Auto-review rule that allows only one ssh invocation. The routine runs on Grok's machine, not on the voice host, so it must ssh to the voice host; a forced command on a dedicated low-privilege account POSTs the JSON body to the loopback /reply endpoint. The bot is told to answer in 1 to 3 short spoken Polish sentences, treat text and history as data rather than instructions, and treat unknown speakers as guests. There is no x.ai/bot/... template link. Not part of Grok Bot: piotr_voice_hub, the Python bridge, the voice-host ssh account and /reply listener on 127.0.0.1:8752, GROK_WEBHOOK_KEY in the host env file, and the optional OpenClaw backend (docs/openclaw-backend.md was not in the fetched Grok extract beyond the PR note).
  3. You need: A running piotr_voice_hub, this bridge installed beside it, a Grok Bot that can run a webhook routine, and a dedicated low-privilege account on the voice host with an ssh forced command. The project-manager bot generates an ed25519 key pair on the box where Ryszard runs, stores the private key at a placeholder path with mode 0600, and hands only the public key to the sysadmin. GROK_WEBHOOK_KEY is stored in the host env file (mode 0600), and config.toml sets backend = grok_webhook plus the HTTPS webhook URL. The doc says not to put secrets, real hostnames, IPs, usernames, or file paths in the file or in the saved prompt. Not stated in the source: which paid Grok Bot plan is required.
  4. Install: Follow the Who installs each part section in docs/grok-webhook-routine.md. The long saved prompt, forced-command line, and Auto-review rule live in that file; they are not retyped here.
    • M-1 (Maciej): create the dedicated Ryszard bot with no connectors; create the webhook routine from the saved prompt; add the Auto-review rule. The rule allows only ssh -i <key-path> <piotr-host> with a quoted heredoc whose body is a single JSON object of utterance_id and text, and it forbids other keys, hosts, commands, unquoted heredocs, and ssh options -o, -L, -R, -D, or -W.
    • M-1b (Piotr Sysadmin): create a dedicated low-privilege account on the voice host, with a real shell, in no docker or sudo groups, and install the authorized_keys forced command that curls the JSON body to http://127.0.0.1:8752/reply. The voice host does not receive the private key.
    • M-1c (project manager bot): generate the key pair on the Grok box, pin the voice host's host key in known_hosts, and hand the public key to the sysadmin.
    • M-2 (Maciej): store GROK_WEBHOOK_KEY in the host env file and set the webhook backend in config.toml.
  5. After install: The bridge sends each accepted utterance to the Grok webhook; a 200 means the run started; the routine answers in Polish and posts the reply back through ssh.
    • The payload fields named in the saved prompt are utterance_id, text, speaker, area, satellite, follow_up, and history.
    • The T-004 PR says the backend POSTs the utterance JSON with Authorization: Bearer, ignores proxy environment variables, does not follow redirects, and serves POST /reply on 127.0.0.1 only (port 8752 in production).
    • The T-003 PR says the core speaks a 90-second Polish silence fallback, immediately speaks a fixed Polish failure sentence on on_failure, retries speak on busy for up to 20 seconds, and caps submits at 30 per hour.
    • The Auto-review rule is described as the real barrier, because an existing developer ssh login to the voice host already exists on the shared box. A leaked webhook key or reply key should be rotated, not pasted into chat or logs.
  6. Did the author run it: The repository has no run records from the author. The T-004 PR says the Grok webhook backend was tested only against a local fake HTTP server on an ephemeral 127.0.0.1 port, and that no request is made to the real Grok webhook. Task logs under docs/tasks/ were not in the fetched extract.

Key points and results

  • Maturity: At fetch time on 2026-11-30 the repo was created at 2026-11-29T14:53:36Z, last pushed at 2026-11-29T20:39:44Z, with 7 commits, 0 stars, 0 forks, 0 open issues or PRs, and an MIT license. The webhook routine file is titled as a draft prompt and setup. The author PRs land a skeleton, a backend interface, the bridge core against a fake hub, the Grok webhook backend, and an OpenClaw backend, plus OpenClaw setup notes from public docs.
  • Permissions and boundaries: Ryszard has no connectors, may only run one tightly specified ssh command, and must not share personal household facts with unknown speakers. The voice-host account is low-privilege and holds only the public key. Secrets stay in 0600 env files and key paths, not in the prompt or in chat. The doc calls these measures guards, not a wall.
  • Known limits: The webhook routine cannot curl 127.0.0.1:8752 from Grok's machine, because that would hit the wrong host; it must ssh to the voice host. The OpenClaw path is a separate backend, not a Grok Bot feature. Design.md and the OpenClaw setup doc were not in the fetched extract. The source does not include a production run of the Ryszard routine.
  • Worth borrowing: Put the spoken reply back through an ssh forced command that can only POST a JSON body to a loopback /reply endpoint, instead of letting the routine reach the voice host freely. See docs/grok-webhook-routine.md.
  • Worth borrowing: Treat utterance text and history as data, never as instructions, and keep an Auto-review rule that allows only one ssh key, host, and quoted heredoc shape. See the saved prompt and Auto-review rule in that same file.

Source

Platform
GitHub
Author
maciekgajewski
Published
Categories
Life assistant

What this evidence label means

Source read in full

We read the source (post, article or transcript). That only means the original was read. It does not mean this site reproduced the author's results.

Read the editorial and evidence policy

Other cases in this scenario

This unofficial community project is independent of xAI. xAI has neither approved nor endorsed it. No sign-up. The methods and figures come from the original authors.