- Home
- Skills
- Agents & Orchestration
- AI Workflow Doctor — Diagnose AI Failures
Works with the AI Agents you already use
AI Workflow Doctor — Diagnose AI Failures
Trace AI workflow failures to the first divergence, test root-cause hypotheses, and define the smallest safe repair with regression checks.
$9.99
AI Workflow Doctor — Diagnose AI Failures
Example session with this skill installed
A webhook creates duplicate CRM tickets after intermittent timeouts. Here are a sanitized trace and workflow description. Find the first divergence, rank root-cause hypotheses, recommend the smallest safe fix, and design regression tests for success, timeout, retry, and crash recovery. Do not assume the CRM API behavior unless the evidence or current docs confirm it.
- Read your context and instructions
- Compiled the ai workflow doctor
Diagnostic summary
Most likely failure layer: side-effect retry/idempotency.
Confidence: medium, based only on the supplied trace excerpt. One ticket creation appears to succeed before the caller times out, followed by a retry that produces another ticket. This is consistent with a lost response and a non-idempotent create request, but the excerpt does not prove the CRM's behavior or the exact retry path.
Evidence and unknowns
| Observation | Status | Diagnostic significance |
|---|---|---|
| First create request is followed by a timeout at the caller | Buyer-supplied trace | The external side effect may have completed even though acknowledgement was not received |
| A later create request is followed by a second ticket ID | Buyer-supplied trace | Duplicate creation is observed in the provided excerpt |
| No idempotency key is shown in the captured request | Not observed in excerpt | Could be missing or simply omitted from the logging view |
| CRM support for idempotency / lookup by external ID | Unknown | Must check the exact endpoint and current official API docs |
Hypothesis ranking
Retry repeats a completed create (most likely): verify by correlating request IDs, timestamps, event ID, and both ticket records.
2.
Webhook redelivery is processed as a new event: compare provider event IDs and delivery-attempt metadata; inspect deduplication storage.
3.
Concurrent workers race: check queue concurrency, lock scope, and whether both workers pass a dedupe check before either writes.
4.
The apparent duplicate is a distinct upstream event: compare the source event/object IDs before treating both records as duplicates.
Smallest safe repair
Use a stable source-event or business-object key as an idempotency key if the exact CRM create endpoint supports it. Otherwise, add an atomic deduplication record keyed to the source event before the side effect, with a recoverable pending/completed state. On timeout, reconcile against the CRM using a documented external identifier before issuing another create. Do not treat an unconfirmed timeout as proof that no ticket was created. Make retries bounded and observable; preserve a manual recovery path for ambiguous outcomes.
Regression tests
- Normal delivery creates exactly one ticket and records the external result.
- Same event replayed sequentially returns the prior result and creates no second ticket.
- Timeout after remote success, followed by retry, reconciles to one ticket.
- Timeout before remote success permits a safe retry.
- Two workers process the same event concurrently; atomic dedupe still yields one ticket.
- Worker crashes between remote success and local completion; recovery reconciles rather than blindly recreating.
- Distinct source events for the same customer remain distinct when policy requires separate tickets.
- Logs contain correlation IDs and outcome state, but redact credentials and sensitive ticket content.
Before release: confirm the exact CRM endpoint's idempotency/lookup contract, reproduce with a sanitized fixture, verify external ticket count, and deploy behind a reversible change with monitoring and rollback criteria. This diagnosis is not a verified fix until those tests pass.
Connects securely to your tools. The creator never sees your data.
About this skill
Diagnose the failure before redesigning the system
AI Workflow Doctor investigates unreliable prompts, agents, RAG pipelines, tool calls, APIs, and automations. It starts from intended versus observed behavior, traces the workflow layer by layer, and looks for the first meaningful divergence. The result is an evidence-based diagnosis, a minimal repair, and a plan to verify the fix and prevent recurrence.
What it investigates
- Prompt conflicts, unclear instructions, missing examples, weak output contracts, and context competition.
- Structured output and schema failures, unsupported claims, citation gaps, retrieval misses, stale or duplicated memory, and truncation.
- Tool selection, arguments, results, authorization, timeouts, retry behavior, and duplicate side effects.
- Agent loops, drift, false completion, state transitions, handoffs, persistence, concurrency, queues, and recovery.
- API errors, browser/no-code automation failures, webhooks, schedules, observability, cost, and latency.
- Evaluation blind spots, model/prompt/tool migrations, regression risk, canary/rollback plans, and incident response.
Diagnostic method
- Capture the business goal, expected behavior, actual behavior, severity, frequency, and recent changes.
- Reproduce safely and preserve only the evidence needed; redact secrets and personal data.
- Map the workflow from input through prompts, context, model, tools, state, and external effects.
- Identify the first divergence; distinguish root cause from downstream symptoms and test counter-hypotheses.
- Propose the smallest repair that addresses the evidence, then define positive, negative, edge, adversarial, retry, and regression tests.
- Add rollout, rollback, monitoring, ownership, and business-completion checks where relevant.
Modes and deliverables
Use rapid triage, prompt, agent, automation, RAG, security, cost, or incident mode. Produce a diagnostic report, prompt conflict graph, agent trace review, test cases, root-cause hypotheses, minimal fix, regression plan, runbook, or portable project state.
Evidence boundaries
The skill never claims access to logs, prompts, files, models, connectors, accounts, production systems, or dashboards unless they were actually provided or authorized and inspected. If reproduction or execution is unavailable, it gives testable next steps without claiming the issue is fixed. Current provider or tool behavior requires current documentation; uncertain causes remain hypotheses. Protect secrets and privacy, contain harmful side effects, and require qualified human oversight for high-stakes changes.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scanned
Verified clean 10 days ago
- Passed all security checks, Safe to install