UiPath Documentation
uipath-cli
2026.10
false
UiPath-CLI-Benutzerhandbuch

UIP-Agent-Debugging

Führen Sie einen Low-Code-Agent für Studio Web mit Beispieleingaben aus und streamen Sie das Ergebnis mit „uip agent debug“.

uip agent debug runs a low-code agent end-to-end against Studio Web with the inputs you provide, polling until the run finishes and streaming state changes. Requires login. The run starts as you, in your personal workspace, so your user needs a personal robot on the tenant.

Das Projekt muss ein project.uiproj -Manifest verwenden – ein Projekt, das sich noch auf dem älteren project.json -Layout befindet, schlägt schnell mit Konvertierungsanweisungen fehl (Paketbefehle wie uip solution pack/publish akzeptieren immer noch project.json; nur Studio-Web-gebundene Befehle wie für dieses ist das neuere Manifest erforderlich).

Zusammenfassung​

uip agent debug <project-path> [-i <json>] [--attachment <field=path>]... [--poll-interval <ms>] [--timeout <seconds>] [--login-validity <minutes>]
uip agent debug <project-path> [-i <json>] [--attachment <field=path>]... [--poll-interval <ms>] [--timeout <seconds>] [--login-validity <minutes>]

Alle Aufrufe berücksichtigen die globalen Optionen (--output, --output-filter, --log-level, --log-file). Austrittscodes folgen dem Standardvertrag.

Argumente​

  • <project-path> (erforderlich) – Der Pfad zum Agent-Projektverzeichnis (enthält agent.json).

Optionen​

MarkierenStandardZweck
-i, --inputs <json>{}Geben Sie Argumente als JSON-Objekt ein, z. B. '{"input":"hello"}'. Muss als einfaches Objekt geparst werden. Übergeben Sie für ein Auftragsanhang-Feld eine vorhandene Orchestrator-Anhangreferenz, {"ID": "<attachment-id>"}, oder verwenden Sie --attachment um eine lokale Datei hochzuladen.
--attachment <field=path>–Laden Sie eine lokale Datei in ein Eingabefeld für einen Auftragsanhang von agent.json hoch. Wiederholbar. Das Feld muss als {"$ref": "#/definitions/job-attachment"} in inputSchema deklariert werden. Wiederholen Sie dasselbe Feld nur dann, wenn das Schema ein Array von Auftragsanhängen ist. Der Pfad wird aus dem aktuellen Arbeitsverzeichnis aufgelöst, nicht aus dem Agent-Projektverzeichnis. Hochgeladene Anhangs-IDs werden in Data.Attachments zurückgegeben.
--poll-interval <ms>2000Abrufintervall in Millisekunden.
--timeout <seconds>600 Sekunden (10 Minuten)Maximale Sekunden, die gewartet werden soll, bis die Ausführung abgeschlossen ist.
--login-validity <minutes>10Die verbleibenden Minuten vor dem Ablauf des Tokens sind erforderlich, um fortzufahren.

Beispiele​

uip agent debug ./my-agent -i '{"input":"hello"}'

uip agent debug ./my-agent --timeout 120 --poll-interval 5000

# Upload a local PDF into the job-attachment input field fileIn
uip agent debug ./my-agent --attachment fileIn=./invoice.pdf -i '{"question":"What is the total?"}'
uip agent debug ./my-agent -i '{"input":"hello"}'

uip agent debug ./my-agent --timeout 120 --poll-interval 5000

# Upload a local PDF into the job-attachment input field fileIn
uip agent debug ./my-agent --attachment fileIn=./invoice.pdf -i '{"question":"What is the total?"}'

Ein --attachment -Wert für ein Feld, das auch in --inputs vorhanden ist, überschreibt den --inputs -Wert und der Befehl protokolliert eine Warnung. Eine erforderliche Eingabe für einen Auftragsanhang, die weder einen --attachment noch einen --inputs -Wert hat, erzeugt ebenfalls eine Warnung.

Datenform (--output json)​

Erfolg (Code: "AgentDebug"):

{
  "Code": "AgentDebug",
  "Data": {
    "JobKey": "a1b2c3d4-0000-0000-0000-000000000401",
    "TraceId": "b2c3d4e5-0000-0000-0000-000000000001",
    "State": "Successful",
    "Output": { "content": "hi there" }
  },
  "Instructions": "Debug run completed: Successful"
}
{
  "Code": "AgentDebug",
  "Data": {
    "JobKey": "a1b2c3d4-0000-0000-0000-000000000401",
    "TraceId": "b2c3d4e5-0000-0000-0000-000000000001",
    "State": "Successful",
    "Output": { "content": "hi there" }
  },
  "Instructions": "Debug run completed: Successful"
}

Output ist nur vorhanden, wenn die Ausführung eines erzeugt hat; Info ist nur vorhanden, wenn der Dienst zusätzliche Diagnoseinformationen zurückgegeben hat.

Wenn die Ausführung Dateien mit --attachment hochlädt, listet Data.Attachments jeden Upload auf:

{
  "Code": "AgentDebug",
  "Data": {
    "JobKey": "a1b2c3d4-0000-0000-0000-000000000401",
    "TraceId": "b2c3d4e5-0000-0000-0000-000000000001",
    "State": "Successful",
    "Output": { "answer": "1,234.00 USD" },
    "Attachments": [
      {
        "Field": "fileIn",
        "AttachmentId": "c3d4e5f6-0000-0000-0000-000000000002",
        "FileName": "invoice.pdf",
        "MimeType": "application/pdf",
        "Size": 48213
      }
    ]
  }
}
{
  "Code": "AgentDebug",
  "Data": {
    "JobKey": "a1b2c3d4-0000-0000-0000-000000000401",
    "TraceId": "b2c3d4e5-0000-0000-0000-000000000001",
    "State": "Successful",
    "Output": { "answer": "1,234.00 USD" },
    "Attachments": [
      {
        "Field": "fileIn",
        "AttachmentId": "c3d4e5f6-0000-0000-0000-000000000002",
        "FileName": "invoice.pdf",
        "MimeType": "application/pdf",
        "Size": 48213
      }
    ]
  }
}

Um eine hochgeladene Datei in einer späteren Ausführung wiederzuverwenden, ohne sie erneut hochzuladen, übergeben Sie ihre Referenz in --inputs, z. B. '{"fileIn":{"ID":"c3d4e5f6-0000-0000-0000-000000000002"}}'.

Anhangsfehler – Ein ungültiger --attachment -Wert (falses field=path -Format, ein Feld, das keine Eingabe für einen Auftragsanhang ist, ein fehlender, leerer oder Verzeichnispfad) schlägt fehl, bevor etwas hochgeladen oder ausgeführt wird, mit Retry: "RetryWillNotFix". Wenn der Orchestrator ein Hochladen verweigert, wird kein Debug-Auftrag gestartet.

Nicht erfolgreicher Endstatus – derselbe Code: "AgentDebug", wird aber als Fehler zurückgegeben (Exitcode 1), wobei Message: "Debug run <state>." und Instructions auf uip traces spans get <TraceId> verweisen, um die Ausführung zu überprüfen.

Invalid file name — a project file whose name holds a control character or any of : * ? " < > | fails the command before anything is uploaded, with ErrorCode: "invalid_argument" and exit code 1. Message names the files. Rename them, or leave them out of the debug bundle with a .uipignore pattern.

No personal robot — when your user has no personal robot on the tenant, Orchestrator refuses to start the job:

{
  "Result": "ConfigError",
  "ErrorCode": "configuration_error",
  "Message": "Your user has no personal robot on this tenant, and 'uip agent debug' runs the agent as you.",
  "Instructions": "Ask a tenant administrator to give your user a personal robot (Orchestrator > Tenant > Manage Access > your user > Robot setup), then run 'uip agent debug' again.",
  "Retry": "RetryWillNotFix",
  "Context": { "HttpStatus": 409, "ErrorCode": "1230", "TraceId": "d4e5f6a7-0000-0000-0000-000000000003" }
}
{
  "Result": "ConfigError",
  "ErrorCode": "configuration_error",
  "Message": "Your user has no personal robot on this tenant, and 'uip agent debug' runs the agent as you.",
  "Instructions": "Ask a tenant administrator to give your user a personal robot (Orchestrator > Tenant > Manage Access > your user > Robot setup), then run 'uip agent debug' again.",
  "Retry": "RetryWillNotFix",
  "Context": { "HttpStatus": 409, "ErrorCode": "1230", "TraceId": "d4e5f6a7-0000-0000-0000-000000000003" }
}

The command exits 1. Any other refusal of the job start keeps the Orchestrator message in Message (Orchestrator refused to start the debug job: …) and is classified by its HTTP status like other service failures: for example, a 401 or 403 returns AuthenticationError and exits 2, and a 400 returns ValidationError and exits 3. No job starts in either case.

Inkompatibles Projektmanifest:

{
  "Result": "Failure",
  "ErrorCode": "invalid_argument",
  "Message": "...",
  "Instructions": "Convert the listed project(s) to a project.uiproj manifest before debugging: scaffold the accepted layout with 'uip api-workflow init <name>' inside the solution and move Workflow.json (plus entry-points.json and bindings_v2.json) into it, then remove the project.json-based entry from the .uipx. Note that 'uip solution pack' and 'uip solution publish' accept project.json — only Studio Web-bound commands require project.uiproj."
}
{
  "Result": "Failure",
  "ErrorCode": "invalid_argument",
  "Message": "...",
  "Instructions": "Convert the listed project(s) to a project.uiproj manifest before debugging: scaffold the accepted layout with 'uip api-workflow init <name>' inside the solution and move Workflow.json (plus entry-points.json and bindings_v2.json) into it, then remove the project.json-based entry from the .uipx. Note that 'uip solution pack' and 'uip solution publish' accept project.json — only Studio Web-bound commands require project.uiproj."
}
  • uip agent validate – Zuerst ausführen, um zu bestätigen, dass das Projekt gut formatiert ist; vorgeschlagen in Anweisungen zum Hochladen.
  • uip traces spans get – überprüft die Ablaufverfolgung einer Debug-Ausführung nach einem nicht erfolgreichen Status.

Siehe auch​

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support(opens in new window)

Möchten Sie lernen? UiPath Academy(opens in new window)

Haben Sie Fragen? UiPath-Forum(opens in new window)

Auf dem neuesten Stand bleiben