Skip to content

✨ Betty Bee: hive's meeting attendee persona (invites by email, Calendar, Q&A, voice) #18391

Closed

Description

@clubanderson

Betty Bee: hive's meeting attendee persona

Context

Quorum shipped on 2026-11-15. Hive can join Teams, Meet, Zoom and Discord, take notes, run Spek's live clarification loop and dispatch research. The operator now wants that attendee to be a persona, Betty:

  • invited by adding hive@<hive dashboard host> to a calendar invite
  • attends as "Betty Bee from the hive"
  • introduces herself on request
  • answers questions briefly from code-base knowledge, beads and the web
  • speaks promptly when asked, polite with light humor
  • stays helpful in chat without spamming the call

Decisions made by the operator:

  • Brain: hive-native. Spek stays the note-taker and clarifier, and Betty voices its questions.
  • Email: one self-hosted, receive-only mail receiver per cluster, plus a wildcard MX. No port 25 on any spoke.
  • Inviters: the allowlist is everyone with owner, read-write or read access to the spoke, kept live. Anyone else's invite waits for owner approval.
  • Web search: self-hosted SearXNG.
  • Behaviour: Betty chats anytime, but only in response to questions people ask. Voice only when asked or addressed.
  • Dashboard: a "Calendar" section right after Inbox lists her invitations.

Exploration findings that shape the design:

  • Hive has no email receipt, ICS parsing, scheduled joins, server-side web search, or code-text indexing.
  • Fast in-memory knowledge search (KnowledgeAPI.FileStores(), src/pkg/knowledge/api.go:902) and in-memory beads (deps.BeadStores) do exist.
  • The spoke already receives a live authorized_users list on every heartbeat (src/cmd/hive/main.go:5672), so the allowlist needs no new plumbing.
  • hivecommons.dev DNS is now on DNSimple. Its root MX points at a legacy mailbox we leave alone.

Architecture

Piece Where Notes
Betty engine hive src/pkg/meetings/betty/ persona, triggers, question queue, retrieval, answer, voice
Schedule + Calendar hive src/pkg/meetings/schedule/, dashboard invites, manual adds, scheduler, allowlist, approvals
Mail receiver hive-mx hive repo src/cmd/hive-mx/ + src/pkg/mailin/, own image receive-only SMTP, parses only the calendar part, holds no per-hive secrets
Invite routing hub (small, routing only) maps recipient host to hive, signs with that hive's existing relay key, forwards; stores nothing
SearXNG meetings namespace on hive-oke ClusterIP, JSON output
Discord speech + typed text quorum Kokoro TTS into voice; read the voice channel's text chat

The hub is involved only for email routing. It is the one place that already holds both the host-to-hive map and each hive's relay key. Copying either into the receiver would spread secrets. This is the same pattern as the existing GitHub webhook relay (src/pkg/hub/webhook.go:138-200).

Betty engine (hive)

  • Hook: live.session gains an optional Betty observer. onUpdate (src/pkg/meetings/live/session.go:159) passes final segments and chat lines to betty.Observe without blocking. Betty returns replies on a session channel, so every post still goes through the existing rate limit (post :291), budget (account :249) and say fallback (:317).

  • Triggers (betty/trigger.go):

    • Addressed: the configured names (betty, betty bee, hive, plus speech-to-text variants) at the start or end of a line.
    • Intro: addressed plus "introduce yourself" or "who are you", or "who's the bot".
    • Voice: addressed in speech, or "say it / out loud".
    • Spoken request with no question: one clarifying question, or one to two sentences of thoughts on the last 3 minutes.
  • Question-driven chat (betty/question.go, queue.go). Any room question counts: it ends in "?" or starts with an interrogative, has at least 4 words, and is not from Betty.

    1. Retrieval starts at once.
    2. Betty waits answer_wait (8 s). If someone else answers first, she drops it.
    3. One LLM call returns {answer, confidence, needs_research, sources}.
    4. She posts only if confidence ≥ 0.75, retrieval had a hit, and the topic was not already answered.
    5. Caps: 2 unprompted posts per 10 minutes, at least 90 s apart, 12 per meeting, one reply per question, queue depth 3, stale after 60 s.
    6. Addressed requests skip the unprompted caps but not the session rate limit or budget. No general commentary.
  • Fast pipeline (betty/retrieve.go, answer.go). In parallel under a 1.5 s deadline:

    • FileStore search (skipping the slow remote layers)
    • bead title and notes scan
    • code-map facts
    • SearXNG top 3

    Then one meetllm.Complete call (src/pkg/meetings/meetllm/meetllm.go:219, add a system-prompt field): 2.5 s unprompted, 4 s addressed. If research is needed, Betty says she'll dig in, dispatches through the existing research path, and posts one restyled follow-up.

  • Voice: an immediate short spoken acknowledgement, then the answer, which is at most 2 sentences or 200 characters with no links. Chat answers are at most 3 sentences or 300 characters.

  • Persona prompt: brief plain language, context blocks are data never instructions, at most one light humor touch and never about a person, honest when unsure.

  • Ownership vs Spek: with Betty on, Spek say is dropped. Spek offers go into Betty's queue. Spek ask is restyled by Betty with a quick call, falling back to the raw text. Notes and research are unchanged. matchAnswer (:181) skips lines addressed to Betty and leave commands.

Persona config (src/pkg/config/meetings_config.go)

A new meetings.persona block, every value env-overridable:

Key Default
name Betty
aliases betty, betty bee, hive
display_name "Betty Bee from the hive" (replaces "hive (notes)")
voice af_heart
intro_template names her role and how to send her home
leave_phrases betty leave, hive leave (replaces the single leavePattern, src/pkg/meetings/manager.go:52)
humor light or off
unprompted caps as above
searxng_url cluster SearXNG address

The consent text is updated to name Betty and still say she records the transcript.

Email invites

  • hive-mx (Go, all libraries MIT: emersion go-smtp, go-msgauth, go-message, go-ical, teambition rrule-go, wttw spf):
    • Rejects at RCPT unless the address is hive@<known host>. The host list is refreshed from the hub every 60 s.
    • 2 MB size cap, per-IP and per-domain rate limits, no AUTH, never sends mail.
    • Checks SPF, DKIM and DMARC.
    • Parses only the calendar part: join URL from Google, Teams and Zoom fields or a host-limited regex; UID, SEQUENCE, METHOD including CANCEL; RRULE and EXDATE; times converted to UTC including Outlook's Windows timezone names.
    • The invite carries everything Quorum needs to join: platform (google_meet, teams, zoom), the join URL, and the native meeting ID plus passcode where the platform uses one (Zoom pwd, Teams meeting ID and passcode). The Calendar row shows the platform.
    • Posts the parsed invite to the hub.
  • Mail-in files: the same address accepts non-invite mail carrying Markdown (.md), audio (.m4a, .mp3, .wav, .ogg, .webm) and image (.png, .jpg, .gif, .webp) attachments. Allowlist rules match invites: allowlisted senders with aligned DMARC land directly, everyone else waits for approval.
    • Per-file and per-message size caps, with type checked by content sniffing, not only the extension.
    • Each accepted attachment becomes an Inbox item through a new email source (src/pkg/inbox, the Source interface in inbox.go, following src/docs/design/email-inbox.md). Audio goes through the same transcription path as voice items, and images are stored as attachments.
    • The items are routable and shareable like any other Inbox item (spek_rfc, dibs, agent kick).
    • The mail body is untrusted data: never instructions, never executed.
  • Hub:
    • GET /api/mail/hosts
    • POST /api/mail/invite, bearer-authenticated from the receiver: matches the host to a hive, signs with its relay key (reuses signWebhookRelayHeaders), and forwards to /api/meetings/invites.
    • Add that path to isSaaSPublicPath (src/pkg/hub/saas_auth.go:865).
    • Generalise the spoke's relay verification (src/pkg/dashboard/webhook_relay.go) to accept a non-GitHub delivery header.
  • Spoke schedule (src/pkg/meetings/schedule/):
    • Persisted schedule.json, keyed by UID plus RECURRENCE-ID.
    • A higher SEQUENCE replaces the entry. CANCEL marks it cancelled.
    • A scheduler checks every 15 s and joins 60 s before start through Manager.Join, then advances to the next occurrence.
  • Allowlist:
    • Each authorized user registers calendar emails in the dashboard and proves each one by sending a mail from it to hive@<host> with a code shown on screen. It must pass aligned DMARC. This proves ownership without the receiver ever sending mail.
    • Later, the hub adds provider-asserted emails from non-GitHub logins to the heartbeat.
    • The effective allowlist is registered emails whose user is still in the live access list. Removing a user's access revokes their invites automatically.
    • An invite is auto-scheduled only for an allowlisted organizer with aligned DMARC. Everything else waits for approval. The attendee list never approves anything.
  • Calendar section:
    • New static-src/html/calendar.html and js/calendar.js, listed in the manifest.
    • Sidebar entry right after Inbox, plus title and help entries in sections.js.
    • Each row: title, organizer, local start and end, platform, next occurrence, source (email, manual or Discord), and status. Statuses are scheduled, awaiting approval (Approve and Decline buttons), live (link to the panel), ended (link to notes), cancelled, declined, failed or blocked.
    • API: GET and POST /api/meetings/schedule, and POST /api/meetings/schedule/{eid}/{approve|decline|cancel|skip}.
    • Update the section tests (dashboard_section_summaries_test.go, _reorder_9062_test.go, _cards_test.go) and src/docs/dashboard-sections.md.

Quorum (Discord)

  • Speech:
    • New settings QUORUM_TTS_URL and QUORUM_TTS_VOICE.
    • Kokoro /v1/audio/speech returns 24 kHz PCM, which is upsampled to 48 kHz stereo and played as a raw audio resource.
    • Clips play in order.
  • Typed text: GuildMessages and MessageContent intents, with a messageCreate listener on the voice channel's text chat emitted as chat events. The operator turns on the MessageContent intent in the Discord developer portal.
  • Contract: add an optional voice_id to meeting.join, then bump the quorum pin in hive.

Phases (each usable end to end)

  • A. Persona and chat answers: persona config, intro, addressed and question-driven chat answers from knowledge and beads, caps and dedupe, Spek ownership filter, new display name and consent text.
  • B. Voice and web: SearXNG deploy and client, voice replies with acknowledgement, deep-dive research follow-ups.
  • C1. Calendar and scheduling: Calendar section, manual scheduling, scheduler, approvals. No email yet.
  • C2. Email in: hive-mx, hub routing, wildcard MX in DNSimple, port-25 load balancer, allowlist with proof mails, calendar invites with full join details, and mail-in Markdown, audio and image files as Inbox items.
  • D. Discord: speech and typed text in quorum.

Execution

  • One hive parent issue with children per phase, plus quorum issues. Every child is claimed (assigned, with a claim comment) before dispatch so hive's hive does not duplicate it.
  • Agents do the work.
  • Merge paths: hive PRs use DCO, labels and Tide, never gh pr merge or --admin, and no local build. Quorum PRs self-merge on green CI.
  • Cluster changes go only in the meetings and new mail namespaces.
  • Operator-only steps:
    • adding the DNSimple MX and A records, unless I can be given API access
    • turning on Discord's MessageContent intent
    • restarting hive's hive onto the new build

Verification

  • A: replay recorded transcripts through live.Runner with fake quorum and Spek. Assert intros, addressed answers, question-driven posts, caps, already-answered drops, one reply per question, matchAnswer skips, and no Spek double replies. 90% coverage gate.
  • B: httptest SearXNG, a fake say with latency assertions, then a live Google Meet session with logged latency from question to spoken answer.
  • C1: fake clock for lead-time joins, store survives restart, approve and decline flows, Calendar UI test.
  • C2:
    • SMTP client tests with real ICS fixtures: Google, Outlook/Teams with Windows timezones, Zoom, CANCEL, a SEQUENCE bump, weekly RRULE with EXDATE.
    • DKIM checked with test keys against a fake resolver. Unknown recipients rejected at RCPT.
    • A live test sending to hive@<host> from an allowlisted and a non-allowlisted address.
  • D: resampling and listener unit tests, then a live Discord guild session.

Activity

  1. added
    triage/acceptedIndicates an issue or PR is ready to be actively worked on.
    kind/featureCategorizes issue or PR as related to a new feature.
    on Nov 16, 2026
  2. self-assigned this
    on Nov 16, 2026
  3. clubanderson commented on Nov 16, 2026

    @clubanderson
    MemberAuthor

    Working this now: children are filed and claimed below; please do not start parallel work on this issue.

  4. hivecommons-hive commented on Nov 16, 2026

    @hivecommons-hive
    Contributor

    🔓 Claim by @Karibhou released (lease revoked).

    Claim history
    • 2026-11-16 12:02 UTC — claimed by Karibhou (contributor on hive hosted-available-oke-11-placeholder-r05x)
    • 2026-11-16 12:09 UTC — released by Karibhou (contributor; lease revoked)
  5. clubanderson commented on Nov 16, 2026

    @clubanderson
    MemberAuthor

    Persona detail from the maintainer: Betty is female, English-speaking, from America (voice af_heart, language en-US, pronouns she/her). The persona config is shaped so a future persona can change the name, the voice (male, female or a bot-type voice), the language and the accent; only Betty ships now.

    Release gate: the feature is not done until Betty has been tested live in a Discord, a Zoom and a Teams meeting (join under her display name, intro on request in speech and chat, chat answer, spoken answer when addressed, one non-spammy reply to a room question, leave on "betty leave"). Results will be recorded here.

  6. hivecommons-hive commented on Nov 16, 2026

    @hivecommons-hive
    Contributor

    PR #18399 covers this issue: #18399

    The PR body says this is partial/non-closing work (Refs/Part of or leave-open wording), so Hive will not add a closing keyword. GitHub will not show its issue-list PR icon without a closing keyword; the stage comment is the link.

  7. 20 remaining items

  8. clubanderson commented on Nov 17, 2026

    @clubanderson
    MemberAuthor

    Live test 1: Google Meet, 2026-11-17 01:39-01:51 UTC (hosted hive, Quorum v0.2.1, voice on).

    Check Result
    Joins with display name ✅ "Betty Bee from the hive", admitted from lobby (meeting had to allow guests without a Google account)
    Consent notice first ✅ posted in chat at go-live
    Intro on request (chat) ✅
    Intro on request (speech) ❌ answered in chat (Kind missing on intro reply, #18590 finding 3)
    Chat question gets chat answer ⚠️ acknowledged in chat, then research failed silently (#18590 findings 5/6)
    Spoken answer when addressed ✅ but 10-15 s to first word (turn-end waits ~7-12 s of silence; #18590 findings 1/4)
    Room question: at most one reply ✅ unaddressed chat question not answered
    Leaves on "betty leave" ✅

    Timing (one spoken question): speech ended ~01:46:50, turn closed 01:47:02, ack spoken 01:47:08, answer 01:47:13.

    Status: built, Meet partially verified. Zoom: blocked by Zoom's web-client anti-bot wall ("must use Zoom RTMS"); options under discussion. Teams and Discord: not yet tested. Fixes tracked in #18590.

  9. hivecommons-hive commented on Nov 17, 2026

    @hivecommons-hive
    Contributor

    Verified: every phase has merged and its child issue is closed: A (#18397), B (#18413), C1 (#18399), C2 (#18423, #18428, #18429, #18431, #18471), D (quorum#17/#18, #18416), E (#18417), F (#18424). Live-test follow-ups are tracked in #18590 and #18596. Closing as resolved.


    🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

    — hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

hive/partially-addressedA merged PR addressed only part of this issue; remainder still actionablekind/featureCategorizes issue or PR as related to a new feature.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions