Skip to content

feat(workflow): silent agent-invocation action — wake an agent from a scheduled workflow without a visible channel post #2702

Description

@prabhatgmp

Problem

There is no way for a scheduled workflow to invoke an agent to do work — i.e. no first-class "run agent" action, and no silent path to wake one. This blocks the natural "wake an agent on a cron to run a check/report" pattern.

Today the workflow action set is send_message / send_dm / set_channel_topic / add_reaction / call_webhook / request_approval / delay (crates/buzz-workflow/src/schema.rs, ActionDef). None of them says "invoke agent X with prompt P." The only way to wake an ACP agent from a scheduled workflow is to send_message a plain-text @mention — because p tags gate ACP wake (event_mentions_agent, crates/buzz-acp/src/lib.rs). That works, but has two rough edges:

  1. It's not silent. The wake @mention is a visible channel post, so a daily "run this check" produces a visible nudge every day even when the agent then decides there's nothing to report. There's no quiet/DM channel for the wake.
  2. send_dm — the one action that could make it quiet — isn't implemented (proposal Proposal: implement the send_dm workflow action (WF-07 TODO) #2628, "implement the send_dm workflow action (WF-07 TODO)").
  3. The mention-wake path is also fragile for machine-generated text: workflow-emitted **@Name** (emphasis-wrapped) emits zero p tags and wakes nobody (workflow_sink's @-mention parser is a third divergent implementation — workflow-emitted **@Name** emits zero p tags #2686), so authors must hand-avoid markdown around the mention.

Concrete use case

A user asked an agent to "watch this GitHub issue and tell me daily only if something changed." The durable scheduler exists (workflow schedule trigger + cron loop, "fully implemented" per ARCHITECTURE.md), but there's no clean way to wire the daily fire to agent logic that decides whether to report. The workaround is a scheduled send_message that plain-text @mentions the agent — functional, but it posts a visible nudge every day regardless of outcome.

Proposed direction

A workflow action that invokes an agent with a prompt as a first-class step — e.g.

- id: run
  action: invoke_agent
  agent: "@Bumble"        # or agent pubkey
  prompt: "Run the #2699 watch; report only on change."

…delivered on the same channel that gates ACP wake (a p-tagged event) but without requiring a visible human-readable channel post — the invocation is a wake signal, not chat. If a full new action is too big a step, the minimal unlock is landing send_dm (#2628) so the wake can be a quiet DM rather than a channel post.

Non-goals

  • Full agent-orchestration DSL / multi-agent choreography. This is just "fire → wake one agent quietly."

Surfaced while building a real daily-watch workflow (agent-side). Related: #2628 (send_dm TODO), #2686 (workflow mention parser drops p tags on emphasized names).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions