Closed
3 / 33 of 3 issues completedClosed
3 / 33 of 3 issues completed
Copy link
Labels
complexity-mediumComplexity: medium (board points 5-8)priority-p1Critical paththeme-infrastructureTheme: Infrastructuretype-epicParent epic issue (groups child sub-issues)type-featureNew functionality
Description
Summary
Add webhook URL endpoints that trigger agent schedule executions from external systems. Each schedule can optionally expose a unique webhook URL with an embedded HMAC signature and expiration date, allowing external services (CI/CD, form submissions, CRMs, monitoring alerts) to initiate agent work without API authentication.
Motivation
Currently agents can only be triggered via: UI chat, cron schedules, MCP tools, or Slack. There's no way for arbitrary external systems to trigger agent work via a simple HTTP POST. Webhooks are the universal integration pattern for this.
Design
Webhook URL Format
POST /api/webhooks/{schedule_id}/{signature}
signature= HMAC-SHA256(schedule_id + expiration, secret_key), base64url-encoded- URL is self-contained — no auth header needed
- Optional expiration date embedded in the signature payload
Schedule Integration
- Each schedule gets an optional "webhook trigger" toggle
- When enabled, generates a unique webhook URL with configurable expiration (default: 90 days, or no expiry)
- Calling the webhook triggers the schedule exactly once (same as manual trigger)
- The schedule's message is used as the task prompt (webhook payload can optionally override/append context)
- Respects existing execution slot limits and queueing
Webhook Payload (optional body)
{
"context": "Additional context appended to the schedule message",
"metadata": { "source": "github", "event": "push" }
}contextis appended to the schedule's message as additional inputmetadatais stored on the execution record for traceability
Security
- HMAC-SHA256 signature prevents URL guessing/tampering
- Expiration date prevents stale URLs from being used indefinitely
- Rate limiting per webhook URL (e.g., 10 calls/minute)
- Webhook URLs can be regenerated (invalidates old URL)
- Execution is logged with
triggered_by: "webhook"for audit trail
API Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /api/webhooks/{schedule_id}/{signature} |
None (signature) | Trigger execution |
| POST | /api/agents/{name}/schedules/{id}/webhook |
JWT | Generate/regenerate webhook URL |
| DELETE | /api/agents/{name}/schedules/{id}/webhook |
JWT | Revoke webhook URL |
| GET | /api/agents/{name}/schedules/{id}/webhook |
JWT | Get webhook URL and status |
Database
Add columns to agent_schedules:
webhook_secret— per-schedule HMAC secretwebhook_expires_at— optional expiration timestampwebhook_enabled— toggle
UI
- Webhook URL section in schedule detail/edit panel
- Copy-to-clipboard button for the URL
- Expiration date picker
- Regenerate/revoke buttons
Acceptance Criteria
- Schedule can generate a webhook URL with HMAC signature
- POST to webhook URL triggers schedule execution
- Optional expiration date is enforced
- Webhook payload
contextis appended to schedule message - Rate limiting prevents abuse
- URL can be regenerated (old URL stops working)
-
triggered_by: "webhook"appears in execution records - UI shows webhook URL with copy button and expiration controls
Sub-issues
Collapse Sub-issuesSub-issues
Loading 3 sub-issues
Metadata
Metadata
Assignees
Labels
complexity-mediumComplexity: medium (board points 5-8)priority-p1Critical paththeme-infrastructureTheme: Infrastructuretype-epicParent epic issue (groups child sub-issues)type-featureNew functionality
Activity
vybe commentedon Apr 20, 2026
Paused pending PROCESS-ENGINE-DECISION (2026-04-20)
Per orchestration simplification re-plan. The "reuse process-engine triggers vs. parallel agent-scoped surface" decision depends on whether the process engine stays at all — that question is getting resolved as part of Tier 2.5 (see PROCESS-ENGINE-DECISION issue).
If process engine is folded into
TaskExecutionServiceor deleted, the answer to this issue changes materially:Pausing until PROCESS-ENGINE-DECISION resolves so we don't design for a surface that's about to change shape.
See
docs/planning/ORCHESTRATION_RELIABILITY_2026-04.md— Tier 2 (marked paused) and Tier 2.5.feat: Redis Streams event bus for WebSocket delivery (RELIABILITY-003) (
docs(planning): orchestration reliability — Sprint D / #306 shipped, #…
vybe commentedon Apr 24, 2026
Implemented and merged to dev via PR #484. See feature flow at docs/memory/feature-flows/webhook-triggers.md.
feat(webhooks): merge WEBHOOK-001 agent schedule webhook triggers (#291)
docs(planning): #408 dissolution gated on #428, not #306 (re-audit) (#…
docs(planning): mark #291 (WEBHOOK-001) shipped, Sprint C now 5/5
fix(schedules): add missing Request import for webhook endpoints (#493)
Release: v0.5.0 (#608)
fix(webhooks): delegate webhook token methods on DatabaseManager (Abi…
fix(webhooks): delegate webhook token methods on DatabaseManager (#647)…
feat(webhooks): agent schedule webhook triggers (WEBHOOK-001, Ability…