buzz icon indicating copy to clipboard operation
buzz copied to clipboard

feat: structured interaction events — agent-postable buttons, forms, and polls

Open seterhenakbar opened this issue 4 months ago • 2 comments

Problem

Agents in Buzz can post messages, but they can't ask a structured question. Today, any agent workflow that needs an explicit human decision — "approve this payment," "pick one of three options," "fill in these two fields" — has to be improvised over free text or emoji reactions, then parsed back out of replies. That's lossy exactly where auditability matters most: the decision.

Coming from Slack, this is the one integration surface with no Buzz equivalent yet. Slack's Block Kit (buttons, select menus, modals) is what makes human-in-the-loop agent workflows practical there — an agent posts an approval card, a human clicks, the click is attributable and machine-readable. We're evaluating migrating a production agent system (payment-approval flows run by an agent, human clicks approve/reject/hold) from Slack to Buzz, and this is our only hard blocker.

Buzz is arguably in a position to do this better than Slack: a button click here could be a signed event — an attributable, non-repudiable decision by a keypair — rather than an ephemeral webhook payload.

Proposal sketch (in Buzz's own idiom)

Two new event kinds, following the existing pattern in CONTRIBUTING → "How to Add a New Event Kind":

  1. interaction.prompt — posted by any member (human or agent) into a channel/DM. Payload: prompt text + a typed schema of the requested input — buttons (n choices), form (fields with types), or poll (choices + close condition). Tags: who may respond (default: channel members), expiry, whether responses are public or sender-only.
  2. interaction.response — signed by the responder, e-tagged to the prompt. Payload validates against the prompt's schema; the relay (or client) rejects mismatches.

Clients render kind 1 as buttons/form UI and emit kind 2 on interaction; clients that don't support the kinds degrade to showing the prompt text with reply-by-message fallback. Agents (via buzz-acp / buzz-cli / buzz listen) receive responses as ordinary events — no webhook infrastructure needed.

Why signed interactions matter beyond parity

  • Auditable approvals: "who approved this spend" becomes a signature chain, not a screenshot of a green checkmark.
  • Reputation-weighted or role-scoped responses: because responders are keypairs, a poll can be scoped to a role, a channel, or holders of some attribute — primitives Slack can't express.
  • Agent↔agent negotiation: structured prompts aren't only for humans; two agents can exchange typed offers/acceptances with the same mechanism.

What we're asking

Mainly: is this direction on the roadmap, and if not, would a design proposal / PR along these lines be welcome? We'd rather align with maintainer intent than invent kinds unilaterally. Happy to write the fuller spec (schema validation rules, expiry semantics, privacy of responses) and prototype against a self-hosted relay.

Context: we run a Slack-integrated agent system (Hermes-based) for a software agency + talent community in Indonesia, and are evaluating Buzz as the shared workspace where employees, external community talents, and agents coexist. The BYOH Hermes preset landing in v0.5.0 removes our other blocker — thanks for that.

seterhenakbar avatar Jul 28 '26 03:07 seterhenakbar

Strong +1 on this direction, from a different angle than the Slack-migration case: a self-hosted single-operator workspace (one human + a small agent team, Claude Code runtime via the desktop app and buzz-acp).

The need shows up even without any external integration. Claude Code agents already produce structured multiple-choice questions natively — the runtime has an AskUserQuestion tool that requirement-elicitation sessions use heavily (question + 2–4 labeled options). In Buzz today all of that arrives as free text, and the human types an answer back. The decision data is structured on the agent side and gets flattened to prose exactly at the point the issue describes as the lossy one.

Half the plumbing already exists. ACP carries structured options today via session/request_permission. Buzz currently consumes that channel instead of rendering it: buzz-acp auto-approves with allow_once (crates/buzz-acp/src/acp.rs::handle_permission_request), and the desktop harness launches Claude Code with --permission-mode auto, so the options never reach a UI. An incremental first step — before the full new-event-kinds design — could be: render agent-initiated permission/question requests as an interaction card in the channel, send the click back over ACP. That would make human-in-the-loop flows clickable with no protocol additions, and could later migrate onto signed interaction.prompt/interaction.response events as the durable, auditable form.

Supporting data point for the "improvised over free text or emoji reactions" claim: emoji reactions don't even reach ACP agents in the default configuration — kind:7 isn't in the default mentions subscription (kinds 9/46010/40007), so a 👍 on an agent's post is never delivered. Workspaces converge on typed @Agent 👍 confirmation messages for approval gates (ours does, including gates in a billing workflow where we'd much rather have a click that is a signed, attributable event). That's exactly the parse-decisions-out-of-replies failure mode this proposal would fix.

Happy to test a prototype against a self-hosted relay.

diripper avatar Aug 01 '26 10:08 diripper

Hey, adding our use case here since it's a bit different to the Slack Block Kit one.

We're a small clothing brand in Melbourne running 8 agents (OpenClaw, through buzz-acp) for customer service, stock, marketing and dev. We moved the whole team off Slack onto a self hosted Buzz this week and approvals are the one thing we're missing.

Most of ours are an agent asking one named person to sign off. Our customer service agent drafts a reply and our CS lead approves it before it goes to the customer, or the stock agent proposes a fix and someone in ops says yes or no. Right now we do it with emoji reactions or send people off to a separate web inbox, and neither is great.

The answer often comes hours later from someone who wasn't in the conversation, so the agent can't sit in a turn waiting for it like #5120 does. We'd need the prompt and the response to be normal events that the agent, or a cron using buzz-cli, can pick up later.

Only the named person should be able to answer, and only once. That's pretty much R1-R3 in #7566.

I'm happy to build it if you're open to it, either on top of the kinds in #5120 or whatever shape you'd rather it take. Let me know which way you want to go and I'll put up a PR.

joshgaskin avatar Oct 24 '26 17:10 joshgaskin