SDK Setup
Webhooks
Configure webhook handlers to extend Argus with custom actions.
Overview
Argus can invoke webhooks on your servers to execute custom actions during AI investigations. This enables the AI to take remediation steps like restarting services, scaling resources, or running diagnostics.
How Webhooks Work
- Configure a webhook endpoint in the Argus dashboard
- Argus signs each request with HMAC-SHA256
- Your handler verifies the signature and executes the requested tool
- Results are returned to the AI investigation
Webhook Signing
All webhook requests are signed using HMAC-SHA256. The signature is included in the request headers:
| Header | Description |
|---|---|
X-Argus-Signature | HMAC-SHA256 signature of the request body |
X-Argus-Timestamp | Unix timestamp of the request |
Verifying Signatures
import hmac
import hashlib
def verify_signature(body: bytes, signature: str, timestamp: str, secret: str) -> bool:
message = f"{timestamp}.{body.decode()}"
expected = hmac.new(
secret.encode(),
message.encode(),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(expected, signature)Configuring Webhooks
- Navigate to Settings > Webhooks in the dashboard
- Click Add Webhook
- Enter the endpoint URL and select which tools to expose
- Copy the signing secret
Webhook Modes
| Mode | Description |
|---|---|
| Passive | Receives notifications only (alerts, status changes) |
| Active | Exposes tools that the AI can invoke during investigations |
Testing Webhooks
Use the Test button in the webhook configuration to send a ping request to your endpoint and verify connectivity.