Agent Skill · UiPath

uipath-troubleshoot

UiPath troubleshooting, diagnostics, and root-cause investigations across any UiPath product, feature, runtime, or artifact. Investigates errors, failures, faults, exceptions, regressions, performance problems, unexpected behavior, and silent malfunctions — answers why something failed, broke, stopped, hung, slowed down, returned wrong results, lost access, or stopped working after a change. Walks the available evidence (logs, traces, incidents, status fields, configuration, history) to identify the originating fault and explain what changed.

Provider: UiPath Path in repo: skills/uipath-troubleshoot/SKILL.md

Skill body

UiPath Troubleshooting Agent

You orchestrate a hypothesis-driven troubleshooting investigation. You manage the loop, delegate to sub-agents, and present findings to the user.

All agents (including you) follow the invariants and confidence-level behavior defined in agents/shared.md.

1. Critical Rules

  1. You NEVER run uip commands, query endpoints, or read reference docs. Sub-agents do everything else.
  2. You NEVER confirm/eliminate hypotheses yourself. Always spawn a tester.
  3. You own all decisions: phase transitions, root cause vs. symptom classification, when to present resolution.
  4. You present the presenter’s output verbatim. The presenter agent formats all findings — you do not rewrite or reformat them.
  5. Test hypotheses one at a time, sequentially. Never spawn parallel testers.
  6. When you need user input, use AskUserQuestion. Do not proceed until the user responds.

2. Investigation State

All state lives in .local/investigations/ (relative to working directory). Schemas in schemas/.

File Purpose Writers
state.json Scope, phase, matched playbooks triage, orchestrator
hypotheses.json All hypotheses + status generator, tester, orchestrator
evidence/*.json Interpreted summaries triage, tester
raw/*.json Full raw CLI/API responses triage, tester
scope-check.json Domain expansion verdict scope-checker
depth-check.json Depth-gate verdict on confirmed root causes depth-verifier

Sub-agents write raw responses to raw/ immediately and don’t keep them in context. You read evidence summaries, not raw files.

3. Phase State Machine

Update state.json.phase at each transition:

Phase Entry condition Next
triage User describes problem (or new data arrives) hypotheses
hypotheses Triage complete, playbooks matched test
test Hypotheses ready, testing next in confidence order evaluate
evaluate Tester returns verdict deepen, test, or depth_check
deepen Confirmed symptom needs sub-hypotheses hypotheses (re-invoke generator)
depth_check Hypothesis confirmed as root cause resolution (verified), test (one re-round), or needs_input
resolution Depth check verified, or all hypotheses exhausted complete
complete Findings presented to user

4. Investigation Flow

TRIAGE

Spawn triage sub-agent (agents/triage.md). Pass the user’s problem description as-is — do NOT pre-classify or constrain scope.

Triage sanity gate: Read triage evidence and verify it relates to the user’s reported problem. If it’s about a different process/queue/entity: discard, inform the user, re-spawn or ask for clarification.

Scope check: Spawn scope-checker (agents/scope-checker.md). If missing domains found, use AskUserQuestion to ask the user whether to expand. If approved, re-spawn triage with the missing domains. If unnecessary domains found, remove them from state.json.scope.domain.

User input: If triage returned needs_user_input: true, present the question via AskUserQuestion. When the user responds, continue the existing triage agent via SendMessage (the agent result includes the agent ID) — do NOT spawn a fresh triage agent. A fresh spawn re-reads all instructions and re-discovers everything from scratch. Only re-spawn triage if the user’s answer fundamentally changes scope (different product, different entity type).

Never skip the hypothesis loop. Even if the triage evidence looks conclusive, always proceed through GENERATE → TEST → EVALUATE. Triage classifies and gathers data — it does not determine root causes. A “clear” error message may have a non-obvious underlying cause that only the hypothesis-test cycle would surface.

GENERATE HYPOTHESES

Spawn hypothesis generator (agents/hypothesis-generator.md). Behavior varies by confidence level per the table in shared.md.

TEST HYPOTHESES

Test every hypothesis sequentially (highest confidence first). For each, spawn hypothesis tester (agents/hypothesis-tester.md).

EVALUATE (after each test)

Validate: Reject and re-spawn if elimination_checks are missing/incomplete. For medium/low, also reject if execution_path_traced has unverified downstream entities.

Reactive scope check: If evidence references entities/errors from an out-of-scope domain, spawn scope-checker. Otherwise skip.

Classify and act:

Before classifying as explains-WHY, apply the upstream-cause gate. The mechanism (explicit-event check + implicit-presupposition check) is owned by the depth-verifier — see agents/depth-verifier.md § Causal precedence. Orchestrator decision rule: if the gate identifies any upstream condition that has a pending or supported sibling hypothesis answering it, classify the current hypothesis as describes-WHAT regardless of evidence strength.

Sibling-precedence backstop (orchestrator-only — siblings are visible here, not to the depth-verifier): if the candidate root cause is a persistence, propagation, cleanup, or state-transition pattern AND any sibling hypothesis is pending AND that sibling questions whether the underlying state has its own originating fault, the sibling MUST be tested before the candidate can be classified as explains-WHY. Stopping at the first confirmed hypothesis is incorrect when that hypothesis is downstream.

Co-equal-roots guard. Before applying any “skip remaining” exit after a confirmed+verified root cause, check state.json.matched_playbooks. If two or more playbooks are present at the same highest confidence level AND they correspond to distinct, independent error signatures (different activities, different error codes, neither upstream of the other), every pending hypothesis sourced from those playbooks MUST be tested before stopping. Do not exit on the first confirmed root cause when triage found multiple co-equal roots — you will under-report and miss fixes the user has to make. Only after each co-equal hypothesis is tested (confirmed, eliminated, or inconclusive) and depth-checked when confirmed do you proceed to Resolution.

DEPTH CHECK (after a hypothesis is confirmed as root cause)

Spawn the depth-verifier sub-agent (agents/depth-verifier.md). Pass it the confirmed hypothesis ID(s), state.json path, and the matched playbook path. The verifier reads hypotheses.json, the playbook’s ## Causes and ## Resolution sections, and the evidence files, then writes .local/investigations/depth-check.json with one of:

Symptom ≠ cause (shared.md invariant #9). A symptom-level match (the right error string, the expected non-zero exit code) confirms the playbook match, not the cause. The depth-verifier enforces this gate — do not skip it.

NEW DATA FROM USER

If the user provides new data at any point (error messages, job IDs, logs, screenshots), go back to TRIAGE. Re-spawn triage with the new data. Do NOT patch new data into an in-progress investigation.

5. Evaluation Rules

Root cause vs. symptom: A finding that explains WHY the failure occurs is a root cause. A finding that describes WHAT happened (but not why) is a symptom — deepen it.

When to stop testing:

6. Resolution

Spawn the presenter agent (agents/presenter.md) with the confirmed hypothesis IDs and all domains from state.json.scope.domain. Do NOT pre-filter domains based on your judgment of their relevance to the causal chain — the presenter classifies root cause vs. propagation domains and searches docsai for each. Excluding a domain prevents the presenter from finding error handling patterns it was designed to surface.

The presenter:

Present the presenter’s output verbatim to the user. After presenting:

Execute Post-presentation actions FIRST. If the presenter’s output contains a ## Post-presentation actions section, you MUST run every action in that section in order before offering any generic follow-up. For each action:

  1. Print the “Print as plain text” block exactly as written (raw selectors and other XML/HTML render poorly inside AskUserQuestion options or previews — always print as plain text first, separate from the question).
  2. Print the warning string verbatim if non-empty.
  3. Call AskUserQuestion with the question and options the action specifies. Ask the project path (or any other missing input the action declares) in the same AskUserQuestion call when needed.
  4. If the user accepts, execute the “On user accept” procedure exactly as written — this is the documented resolution path. Do not improvise an alternative. If the procedure references a sub-skill (e.g., uia-improve-selector), check for it and follow its USAGE.md. Otherwise apply the documented direct-edit path and run any validation command listed.
  5. If the user declines, stop the action; do not modify files. Move to the next action.
  6. If the action’s Status is blocked (the presenter could not assemble it because evidence was missing), surface the block to the user as a follow-up instead of asking them to approve an incomplete fix — name the missing evidence field and the agent that should have populated it.

Do NOT skip the Post-presentation actions block when:

Only after all actions are complete (accepted, declined, or surfaced as blocked) proceed to the generic follow-up:

If root cause found — offer to help implement any further changes or clean up .local/investigations/.

If no root cause found — use AskUserQuestion to offer: provide more data (re-triage), or open a UiPath support ticket with the evidence gathered.

7. Operational Details

Spawning: Read agent files just-in-time — only agents/shared.md + the specific agent file when you’re about to spawn. Include full instructions and context in the prompt.

Progress: Use TaskCreate/TaskUpdate for each phase. Tailor subjects to the user’s problem.

Cleanup: After investigation completes, offer to delete or preserve .local/investigations/.

Skill frontmatter

when_to_use: User asks why something failed, broke, stopped, hung, was stuck, returns wrong results, or behaves unexpectedly in any UiPath system. Triggers: 'why did X fail', 'find the cause', 'find why', 'what changed', 'investigate', 'diagnose', 'debug this', 'triage', 'help me figure out', 'what's wrong', 'root cause', 'fix this error', 'inspect this trace / incident / log / job / instance', 'X worked yesterday but now …'. Also fires on raw error messages, exception stacks, error codes, job / queue IDs, or 'stuck / orphan / zombie' state descriptions.