agentleFS
williamcorrea23williamcorrea23/sap-router-skill/.agents/skills/automation-pilot-debugger/SKILL.md

automation-pilot-debugger

Skill1 starsChanged 4 months agoMITView on GitHub

Debug and troubleshoot SAP Automation Pilot execution failures. Use when executions fail, need to investigate errors, check execution health (pass/fail summary), or understand error patterns. Provides error pattern matching with suggested fixes.

  • Sends data out

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Hardcode values in command definition: - put the values directly in the executor input mappings instead of using …

    line 52
  2. Distinctive:

    Use a different SMTP server that allows unauthenticated relay

    line 86
  3. Distinctive:

    Use SAP Alert Notification Service (ANS) instead of direct SMTP

    line 87
  4. Very specific:

    Fix: Remove defaultValue from sensitive fields.

    line 97
  5. Distinctive:

    Wait for delay/polling to complete

    line 153
  6. Very specific:

    Fix: Add null checks with // "default" operator:

    line 185
  7. Distinctive:

    Look up the error message in the Error Pattern Reference above.

    line 210

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

SAP Automation Pilot Debugging & Troubleshooting

Debug failed Executions, check recent execution health, and investigate error patterns. Use this skill when things go wrong — not for normal operations.

Quick Diagnostics

Check Recent Executions Summary

# Last 10 executions summary
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  "https://$AUTOPI_HOSTNAME/api/v1/executions?limit=10"

# Last 5 failed executions
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  "https://$AUTOPI_HOSTNAME/api/v1/executions?status=FAILED&limit=5"

# Last 5 successful executions
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  "https://$AUTOPI_HOSTNAME/api/v1/executions?status=FINISHED&limit=5"

Investigate a Specific Execution

EXEC_ID="your-execution-id"

curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID"

curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/logs"

Error Pattern Reference

"Parameter 'X' is required but not provided"

Error: API returns 400 with message like "Parameter 'smtpHost' is required but not provided" even when the parameter IS provided in the JSON payload.

Root Cause: Known issue (possibly canary environment specific or permission-related) where the execution API fails to recognize required input parameters passed at trigger time.

Workaround:

  1. Avoid required input parameters - make all inputs optional with default values, OR
  2. Hardcode values in command definition - put the values directly in the executor input mappings instead of using $(.execution.input.paramName)
  3. Commands with NO required inputs (empty inputKeys: {} or all required: false) work correctly

Example - Before (fails):

"inputKeys": {
  "smtpHost": { "type": "string", "required": true }
},
"executors": [{
  "input": { "host": "$(.execution.input.smtpHost)" }
}]

Example - After (works):

"inputKeys": {},
"executors": [{
  "input": { "host": "mail.example.com" }
}]

"Missing valid combination of input values for authentication"

Full Error: "Missing valid combination of input values for authentication. Please select a valid option: 1) 'clientCert' for X509 2) 'user' & 'password' for Basic authentication"

Context: Typically occurs with email-sapcp:SendEmail:1 command.

Root Cause: The SMTP server requires authentication. Internal mail relays like mail.sap.corp that work from on-premise networks require authentication when accessed from cloud services (Automation Pilot runs in the cloud).

Fix Options:

  1. Provide user and password for SMTP authentication
  2. Provide clientCert for X509 certificate authentication
  3. Use a different SMTP server that allows unauthenticated relay
  4. Use SAP Alert Notification Service (ANS) instead of direct SMTP

"The following input keys can only have default values from input, because they are marked as sensitive"

Context: Occurs when deploying a command.

Root Cause: Sensitive input keys (like passwords) cannot have hardcoded defaultValue. This is a security feature.

Fix: Remove defaultValue from sensitive fields. Use defaultValueFromInput to reference an Input object instead, or leave no default.

Wrong:

"password": {
  "type": "string",
  "sensitive": true,
  "defaultValue": "<your-password>"
}

Correct:

"password": {
  "type": "string",
  "sensitive": true
}

"Command not found" or 404 on execution trigger

Root Cause Options:

  1. Command ID is wrong (check catalog, name, version)
  2. Command exists but is not released (still in draft state)
  3. Command was deleted

Fix:

# Check if command exists
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  "https://$AUTOPI_HOSTNAME/api/v1/commands/catalog:CommandName:1"

⚠️ If the command is in draft state, release it only after verifying it works correctly and only if the user explicitly requests it:

curl -s -X PUT -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  "https://$AUTOPI_HOSTNAME/api/v1/commands/catalog:CommandName:1/release"

Execution stuck in RUNNING

Possible Causes:

  1. Delay:1 step is waiting (check progressMessage for "Waiting X minutes")
  2. External HTTP call is timing out
  3. Polling loop (repeat) hasn't met exit condition
  4. Execution is paused or waiting for user input
curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID"

Fix Options:

  1. Wait for delay/polling to complete
  2. Abort if stuck:
curl -s -X POST -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"type": "ABORT", "reason": "Aborting stuck execution"}' \
  "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/actions"

HTTP executor returns unexpected status

Common Issues:

  • 401/403: Authentication failed - check credentials, token expiry
  • 404: Resource not found - verify URL and resource exists
  • 429: Rate limited - add retry logic with backoff
  • 500/502/503: Server error - retry with autoRetry configuration
  • -1 or 0: No response / timeout - check connectivity, increase timeout

Expression evaluation errors

Symptoms: Error mentions jq, expression, or shows $(.something.output) in error.

Common Causes:

  1. Previous step failed, so output doesn't exist
  2. JSON parsing failed (toObject on non-JSON string)
  3. Null value in expression chain
  4. Array index out of bounds

Fix: Add null checks with // "default" operator:

$(.step.output.body | toObject.field // "default")

Debugging Workflow

Step 1: Get Execution Status and Error Details

curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID"

Step 2: Check Execution Logs

curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/logs?maxPageSize=20"

Step 3: Check Input That Was Used

curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/executions/$EXEC_ID/input"

Step 4: Match Error to Pattern

Look up the error message in the Error Pattern Reference above.

Step 5: Verify Command Definition

curl -s -u "$AUTOPI_USERNAME:$AUTOPI_PASSWORD" "https://$AUTOPI_HOSTNAME/api/v1/commands/$COMMAND_ID"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.