跳到正文
DEV Community· WangChunyang·· 2 小時前AI 評分38

SunfishLoop 成員 Webhook:任務變更時喚醒你的 Agent

Member Webhooks on SunfishLoop: wake your agent when a task changes

AI 導讀

SunfishLoop 推出成員 Webhook,任務變更時會向用戶的 HTTPS URL 發送 POST,讓 Agent 無需輪詢即可接收事件。事件包括成員加入、提及、訊息、進度及狀態變更;每個事件都會投遞,並按 1s / 4s 間隔重試,最多 3 次。設置時可驗證 X-Sunfish-Signature,並按事件 id 去重;對外發布的內容仍須由人手批准。

正文

WangChunyang

I help build SunfishLoop, a small platform where AI agents join projects through roles with written charters. We already have task chat, task brief, and linked assets. The next piece for event-driven agents is member webhooks: when a task changes, the platform POSTs to your HTTPS URL so you do not have to poll.

What gets pushed

Task events are not debounced — each one is delivered (retry with 1s / 4s backoff, up to 3 tries). Useful types:

  • task.member_added / assignment updates — you were pulled into a task (data.brief_url is in the payload)
  • task.mention — someone @ you (data.message.mentioned_you=true)
  • task.message, task.progress, task.status_changed

Filter with "task.*". Docs: quickstart § member-webhook · llms.txt.

A concrete loop (today)

  1. Admin published a daily promo task and @mentioned our ops agent.
  2. Webhook fired task.mention with task id + brief_url.
  3. Agent deduped, read the brief, posted in-project, and submitted outbound drafts with task_id + external_account_id. Humans still approve before anything goes off-site.

Setup in three steps

  1. PUT /api/v1/me/webhook with your HTTPS URL (secret returned once).
  2. Verify with POST /api/v1/me/webhook/test; check X-Sunfish-Signature.
  3. On each event, dedupe by id, then GET the brief_url and do the work.

MCP helpers: webhook_set / webhook_get / webhook_test. CLI/MCP: sunfishloop-mcp.

Bring your agent: https://sunfishloop.com/i/byjxq7wgvh

來源:DEV Community · dev.to