Incidents & alerts
How detectors open incidents, the nine steps each incident is tracked through, how recovery is verified and what is learned, and how alerts reach email, Slack and webhooks.
On this page
Worksi watches your AI traffic and opens an incident when something goes wrong: a loop, a failing tool, a provider outage, a cost spike, a stuck workflow or a policy violation. Each incident comes with evidence, a diagnosis and suggested next steps, and can reach your team by email, or by Slack or webhook from the Startup plan. From the failing span to what your team learned from it, every incident is tracked through nine recorded steps.
The incident journey#
Every incident moves through nine steps, and the incident page tracks them live above its tabs. Each step shows its state — done, in progress, waiting for a person, skipped (with the reason), not applicable, or failed — with the time and who or what completed it.
- Incident detected: a detector or a person opens it; repeated detections are counted as occurrences.
- Evidence collected: the evidence pack is built from the spans around the failure. An incident you declare yourself gets one once you link a run or trace to it.
- AI diagnosis: deterministic checks first, then a model when a credential is available. The step says which method ran and, when no model contributed, why.
- Blast radius calculated: affected versus total runs and the workflows and environments involved in the incident window, from your telemetry, from the Startup plan; spend, tokens, end users and exposure from Scale, and incidents up to 7 days and 100,000 runs on Enterprise. When your app identifies end users (
X-AIW-End-Useror the SDK’send_user), they are counted, never listed. - Runbook recommended: the best‑matching approved runbook once the diagnosis has run, or a note that none matches.
- Human approval: every recovery action is run by a person with a recorded reason, and it is audited. On Enterprise, high‑risk actions wait for a second person’s approval, and nobody approves their own request except through an owner’s audited emergency override. On Developer a person runs each recovery action and records a reason; approval requests start on Startup.
- Recovery executed: the fix that took effect. A pause or stop contains the problem; recovery needs a fix such as a resume, a retry, a model switch or a recorded manual fix.
- Recovery verified: after the fix, Worksi re‑checks the detector’s condition on new traffic of the failing component. It reports verified only with enough traffic and when the failure was present before the action; otherwise it says why. A person can confirm or reject a verdict, with a note, and the step shows who did. Included from the Startup plan; on Developer the step says it is not included.
- Incident resolved & learned: resolving writes a learning record of what happened, the root cause and who confirmed it, the recovery, timings and follow‑ups. Once someone stands behind it, later diagnoses, similar incidents and runbook ranking use it. Learning records are included from the Startup plan.
Steps 3 and 4 run side by side, and you can resolve at any time; a step that did not happen says why, for example Recovered without action when a failure stopped on its own. Click a step for its details and, when your role allows it, the next action. In Operations → Incidents, the Journey column shows where each incident stands, and two views list the incidents that need someone: Waiting on a person (a run to link, an approval or a verdict to give) and Needs review (resolved incidents whose learning record nobody has confirmed yet). The same steps are in the API (GET /api/v1/incidents/{id}/journey) and the MCP tool get_incident.
Detectors#
Eleven detectors run continuously. Stream detectors react to spans as they arrive; sweep detectors check aggregates on a schedule. Tune them in Operations → Detectors: switch them on or off, override the severity and adjust thresholds.
| Detector | Fires when (default thresholds) | Severity |
|---|---|---|
| Agent loop | One agent sends 4 or more model calls with an identical prompt in one run, or the run exceeds the agent’s maximum steps (25) | High |
| Repeated tool call | The same tool is called with the same arguments 3 or more times in one run | Medium |
| Timeout | A call times out, or runs longer than 60 s (model) or 30 s (tool) | Medium |
| Provider failure | A provider or model’s error rate reaches 20% over 5 minutes (at least 5 requests), or 5 calls fail in a row | High |
| Tool failure | One tool fails 3 or more times in 10 minutes, or a run ends in error at a tool call | High |
| Token anomaly | A call uses more than 60,000 tokens, or more than 4× the agent’s 7‑day p95 | Medium |
| Cost anomaly | An agent’s cost per request in the last hour is more than 3× its 7‑day average, or one run costs more than the agent’s limit ($5 by default) | High |
| Stuck workflow | A run started but did not finish within the workflow’s threshold (5 minutes by default) | High |
| Policy violation | A request or tool call was blocked by, or violated, a policy | Medium |
| Error rate | An agent’s error rate reaches 25% over 15 minutes (at least 20 requests) | High |
| Budget threshold | Spend crosses a spend-limit policy’s alert thresholds; an incident at 100% | High |
Production environments and critical workflows raise the severity by one level. Repeated detections of the same problem are merged into one open incident instead of opening new ones.
Lifecycle and response times#
Incidents are numbered INC-1, INC-2, … per organization and move through open, acknowledged, investigating, mitigated, resolved and closed. Each severity has a target response time — critical 15 minutes, high 1 hour, medium 4 hours, low 24 hours — and Worksi notifies you when an incident passes it. Acknowledge, assign, escalate, comment, resolve and reopen from Operations → Incidents; everything is audited and shown on the incident’s timeline.
Evidence and diagnosis#
Each incident carries an evidence pack built from up to 200 spans: a headline, the exact failure location (span, agent, tool, step and error), numbered evidence items, the run’s span sequence, cost and token metrics, and the affected agents, workflows, models and tools. Previews follow your capture mode.
The diagnosis runs deterministic checks first, then, when a model credential is available, asks a model to reason over the evidence: through the platform’s OpenAI key, your organization’s OpenAI credential, or the OpenAI‑compatible credential you set to Use for platform diagnosis and embeddings in Settings → Providers. The model must cite evidence items; citations that don’t exist are discarded, and without a valid citation the diagnosis stays deterministic. You see the root cause and its category, a confidence score, the cited evidence, alternative hypotheses and a suggested next step. Earlier incidents of the same kind whose learning record a person confirmed are cited as a Resolved precedent evidence item. Similar past incidents and the best‑matching runbook are linked automatically.
LLM‑assisted diagnoses with the platform key are counted per month by plan (50 on Developer, 1,000 on Startup, 5,000 on Scale; custom on Enterprise). With your own credential they are unlimited.
Blast radius#
The Blast radius card on the incident’s Overview measures what the failing component reached in the incident window, with the incident type’s own meaning of affected: runs that failed, timed out, looped, went over the token or cost limit, got stuck, or were blocked. It counts affected versus total runs and requests, the spend and tokens of the affected runs (calls without a price are flagged), and the workflows, agents, environments and owner teams involved, with critical workflows and production marked. End users are counted when your app identifies them, otherwise the card says they are not identified; their ids are never stored. The radius is computed from your telemetry, kept up to date while the incident is open, and frozen when it is resolved. Plans set its depth: from the Startup plan it counts the affected runs and requests and the workflows, agents and environments reached; from Scale it adds the spend, tokens, end users, exposure and related incidents, for incidents up to 24 hours and 10,000 runs; on Enterprise it covers incidents up to 7 days and 100,000 runs. On Developer the card says it is not included. What the detector measured when it fired stays under At detection (detector view).
Recovery#
Recommendations on each incident propose concrete actions with their risk: stop a run, pause an agent or workflow, resume it, retry through a signed webhook, switch model, escalate, or follow a runbook. Nothing runs automatically: you execute an action with a reason, every action is permission-checked, audited and recorded on the incident timeline, and on Enterprise a high‑risk action, such as pausing a production agent, also waits for a second person’s approval (four‑eyes). Once an incident is resolved, its recommendations stay on it for the record: reopen the incident to act on one.
- Contain, then fix. A pause or stop contains the problem within seconds: the gateway refuses the agent’s model calls (
423 agent_paused), and an app that calls the SDK’scheck_status()between steps stops before the next one. Containment is not recovery. Once the cause is gone, resume: after a pause, the incident recommends resuming what it paused. A retry, a model switch and a raised limit are fixes too. - Manual fixes. If you fixed the problem outside Worksi, record it on a linked runbook: mark its steps done as you work through them (the last one records the fix), or choose Record use when you applied it another way. A Manual step recommendation is done by hand: choose Mark done and say what you did. A recorded manual fix counts as both the approval and the fix, and, from the Startup plan, its recovery is verified like any other.
Every organization gets Worksi’s standard runbook library (10 runbooks; 3 on Developer). They are read‑only: duplicate one to customize it (custom runbooks from the Startup plan), or hide the ones you don’t want suggested.
Verification#
From the Startup plan, after a fix, Worksi watches the failing component — the incident’s tool, model, agent or workflow — on new, completed traffic and re‑checks the detector’s own condition over its verification window: 10 minutes for tool failures and timeouts, 5 for provider failures, 15 for error rates and budgets, 30 for token anomalies and 60 for cost anomalies and policy violations; loops, repeated tool calls, stuck workflows and runs over their cost limit wait for the next 3 finished runs. Tune both per detector in Operations → Detectors (Verification window, Runs to verify). The Verification section of the incident’s Recovery tab shows the window, the traffic seen against the minimum the detector needs, and every signal behind the verdict:
| Verdict | What it means |
|---|---|
| Verified | Enough new calls or runs passed the detector’s condition in the window, and the failure was there before the first action: the actions are credited as recovered. |
| Recovered before the action | The window is clear, but the failure had stopped before the first action, so no action is credited. |
| Not recovered | The detector’s condition holds again, the failure came back as a new incident, or a model switch or retry did not take. |
| Could not verify | Too little traffic, even after the window was extended, or telemetry was unavailable. Check recovery now starts a new check. |
| Contained, Not enforced | After a pause or stop, over 2 minutes: Contained when no model call of the target got through (it counts the runs the SDK’s pause check refused and the calls the gateway blocked); Not enforced when one did. |
| Confirmed by, Rejected by | A person’s verdict, given with Confirm or reject… and a note. It is never shown as verified. |
Blocked and refused calls never count as traffic, and a telemetry error is never read as verified. Verification says recovered after, never fixed by: a clear window shows the failure stopped after the action, not that the action caused it. When a failure stops without any action, Worksi verifies that too, and names any recovery action another incident took on the same agent or workflow meanwhile. If the detector sees the failure again after a verified window while the incident is open, the journey says the recovery did not hold and waits for a new decision.
Resolve and learn#
Resolve with a note and the root cause. When the diagnosis suggested a category, the dialog shows it as Suggested by the diagnosis — confirm or change: resolving with it confirms it, and Not set clears it. If something the incident paused is still paused, the dialog says so and asks you to confirm that it stays paused.
From the Startup plan, within seconds the Learned tab holds the incident’s learning record: what happened, the impact, the root cause and who confirmed it, the recovery that followed and how it was verified, the timings, follow‑ups (every sentence of your note that starts with Follow-up:, plus suggestions), detector feedback, and earlier incidents of the same kind. Review it, edit it (each edit is a new version), mark follow‑ups done or create a runbook draft from it. A record nobody confirmed reads Recorded, not reviewed until someone reviews it, and only records a person stands behind feed later diagnoses, similar incidents and runbook ranking. Reopening an incident supersedes its record; the next resolution writes a new one.
Alerts#
Create channels in Operations → Alert channels: email on every plan, Slack and webhooks from the Startup plan. Pick the events (incident.created, incident.escalated, incident.sla_breached, incident.resolved, incident.recovery_verified, incident.recovery_failed, approval.requested, budget.threshold, action.executed) and a minimum severity, then send a test. Escalations reach every channel regardless of severity. Each delivery gets up to three attempts and is logged per channel. New organizations start with an email channel to their owners and admins for high and critical incidents, escalations, missed response times, approval requests, budget limits and recovery actions that failed verification.
Webhook deliveries are JSON:
{"event_type": "incident.created", "organization": "…", "incident": {"id": "…", "number": 42, "title": "…", "severity": "high", "status": "open", "type": "tool_failure", "agent": "resolver-agent", "workflow": "support-ticket-resolution", "url": "https://worksi.ai/operations/incidents/…"}, "occurred_at": "…"}Recovery events carry the verdict in data: check_id, reason and summary, for example "Verified: 52 of 52 lookup_order calls succeeded in the 3 min after the resume".
Every delivery is signed: X-AIW-Timestamp carries the Unix time and, when the channel has a secret, X-AIW-Signature carries sha256= plus the HMAC-SHA256 of "<timestamp>." + body. Reject deliveries with a missing timestamp or one more than five minutes off:
import hashlib, hmac, time def verify(secret: str, raw_body: bytes, timestamp: str, signature: str) -> bool: # X-AIW-Timestamp: reject anything older than five minutes if not timestamp.isdigit(): return False if abs(time.time() - int(timestamp)) > 300: return False signed = f"{timestamp}.".encode() + raw_body digest = hmac.new(secret.encode(), signed, hashlib.sha256) # compare with X-AIW-Signature in constant time expected = "sha256=" + digest.hexdigest() return hmac.compare_digest(expected, signature)Questions? Email info@worksi.ai.