Repository navigation
Description
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_userslist 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.sessiongains an optional Betty observer.onUpdate(src/pkg/meetings/live/session.go:159) passes final segments and chat lines tobetty.Observewithout blocking. Betty returns replies on a session channel, so every post still goes through the existing rate limit (post:291), budget (account:249) andsayfallback (: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.
- Addressed: the configured names (
-
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.- Retrieval starts at once.
- Betty waits
answer_wait(8 s). If someone else answers first, she drops it. - One LLM call returns
{answer, confidence, needs_research, sources}. - She posts only if confidence ≥ 0.75, retrieval had a hit, and the topic was not already answered.
- 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.
- 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.Completecall (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
sayis dropped. Spek offers go into Betty's queue. Spekaskis 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.
- Rejects at RCPT unless the address is
- 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
emailsource (src/pkg/inbox, theSourceinterface ininbox.go, followingsrc/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/hostsPOST /api/mail/invite, bearer-authenticated from the receiver: matches the host to a hive, signs with its relay key (reusessignWebhookRelayHeaders), 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.
- Persisted
- 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.
- Each authorized user registers calendar emails in the dashboard and proves each one by sending a mail from it to
- Calendar section:
- New
static-src/html/calendar.htmlandjs/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:
GETandPOST /api/meetings/schedule, andPOST /api/meetings/schedule/{eid}/{approve|decline|cancel|skip}. - Update the section tests (
dashboard_section_summaries_test.go,_reorder_9062_test.go,_cards_test.go) andsrc/docs/dashboard-sections.md.
- New
Quorum (Discord)
- Speech:
- New settings
QUORUM_TTS_URLandQUORUM_TTS_VOICE. - Kokoro
/v1/audio/speechreturns 24 kHz PCM, which is upsampled to 48 kHz stereo and played as a raw audio resource. - Clips play in order.
- New settings
- Typed text: GuildMessages and MessageContent intents, with a
messageCreatelistener on the voice channel's text chat emitted aschatevents. The operator turns on the MessageContent intent in the Discord developer portal. - Contract: add an optional
voice_idtomeeting.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 mergeor--admin, and no local build. Quorum PRs self-merge on green CI. - Cluster changes go only in the
meetingsand newmailnamespaces. - 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.Runnerwith fake quorum and Spek. Assert intros, addressed answers, question-driven posts, caps, already-answered drops, one reply per question,matchAnswerskips, and no Spek double replies. 90% coverage gate. - B: httptest SearXNG, a fake
saywith 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
clubanderson commentedon Nov 16, 2026
Working this now: children are filed and claimed below; please do not start parallel work on this issue.
hivecommons-hive commentedon Nov 16, 2026
🔓 Claim by @Karibhou released (lease revoked).
Claim history
Karibhou(contributor on hive hosted-available-oke-11-placeholder-r05x)Karibhou(contributor; lease revoked)clubanderson commentedon Nov 16, 2026
Persona detail from the maintainer: Betty is female, English-speaking, from America (voice
af_heart, languageen-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.
hivecommons-hive commentedon Nov 16, 2026
PR #18399 covers this issue: #18399
The PR body says this is partial/non-closing work (
Refs/Part ofor 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.20 remaining items
✨ images: build and publish hive-mx (Betty C2, part 2)
✨ meetings: Betty drafts issues, RFCs, Spek sessions and knowledge no…
✨ images: build and publish hive-mx (Betty C2, part 2) (#18428)
✨ meetings: email invites with an allowlist of proven calendar emails…
✨ meetings: email invites with an allowlist of proven calendar emails…
✨ meetings: email invites with an allowlist of proven calendar emails…
✨ inbox: mail-in files as email items with an owner approval queue (B…
✨ inbox: mail-in files as email items with an owner approval queue (B…
✨ meetings: Settings, Meeting attendee Email section wired to email-i…
clubanderson commentedon Nov 17, 2026
Live test 1: Google Meet, 2026-11-17 01:39-01:51 UTC (hosted hive, Quorum v0.2.1, voice on).
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.
hivecommons-hive commentedon Nov 17, 2026
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