Workflows

Webhook Management

Open Astra supports outbound webhooks that fire on agent events. Webhooks include a signing secret for verification, delivery history tracking, a test mode for development, and a dispatch inspector for debugging.

Creating webhooks

Each webhook subscribes to specific events and receives a unique signing secret.

bash
# Create a webhook
curl -X POST http://localhost:3000/webhooks \
  -H "Authorization: Bearer ${JWT_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/webhook",
    "events": ["agent_completed", "tool.executed", "memory.written"],
    "description": "Notify external system on agent completions"
  }'

# Response (201 Created) — includes the signing secret
{
  "id": "wh_abc123",
  "url": "https://example.com/webhook",
  "events": ["agent_completed", "tool.executed", "memory.written"],
  "secret": "whsec_...",
  "enabled": true
}

Testing webhooks

Send a test payload to verify your endpoint is configured correctly.

bash
# Send a test webhook
curl -X POST http://localhost:3000/webhooks/wh_abc123/test \
  -H "Authorization: Bearer ${JWT_TOKEN}"

# View delivery history
curl http://localhost:3000/webhooks/wh_abc123/deliveries \
  -H "Authorization: Bearer ${JWT_TOKEN}"

Test mode

Enable test mode to intercept all webhook dispatches without actually sending them. Useful during development.

bash
# Enable test mode (intercepts all webhooks instead of dispatching)
curl -X POST http://localhost:3000/webhooks/test-mode/enable \
  -H "Authorization: Bearer ${JWT_TOKEN}"

# View intercepted webhooks
curl http://localhost:3000/webhooks/test-mode/log \
  -H "Authorization: Bearer ${JWT_TOKEN}"

# Disable test mode (resume normal dispatch)
curl -X POST http://localhost:3000/webhooks/test-mode/disable \
  -H "Authorization: Bearer ${JWT_TOKEN}"

Webhook inspector

The inspector provides a paginated view of webhook dispatch history including payloads, response status codes, response bodies, and latency.

bash
# Inspect webhook dispatch history (paginated)
curl "http://localhost:3000/webhook-inspector?limit=50&eventType=agent_completed" \
  -H "Authorization: Bearer ${JWT_TOKEN}"

# Get details for a specific dispatch
curl http://localhost:3000/webhook-inspector/dispatch_abc123 \
  -H "Authorization: Bearer ${JWT_TOKEN}"

Endpoint reference

MethodEndpointDescription
POST/webhooksCreate webhook
GET/webhooksList webhooks
GET/webhooks/:idGet webhook
PUT/webhooks/:idUpdate webhook
DELETE/webhooks/:idDelete webhook
GET/webhooks/:id/deliveriesDelivery history
POST/webhooks/:id/testSend test payload
POST/webhooks/test-mode/enableEnable test mode
POST/webhooks/test-mode/disableDisable test mode
GET/webhooks/test-mode/logView intercepted webhooks
DELETE/webhooks/test-mode/logClear test log
GET/webhook-inspectorDispatch history (limit default 50, max 200)
GET/webhook-inspector/:idDispatch details