- 概要
- はじめに
- 概念
- UiPath CLI を使用する
- 使用ガイド
- CI/CD レシピ
- コマンド リファレンス
- 概要
- 終了コード
- グローバル オプション
- uip codedagent
- UIP コーダー
- UIP のコンテキスト グラウンディング
- uip docsai
- uip 関数
- UIP ガードレール
- uip llm - 構成
- uip llm-gateway
- UIP Maestro のオーサリング
- UIP Maestro レジストリ
- uip model-hub
- アクティビティ検索
- アクティビティ get-default-xaml
- 分析
- アナライザー - ルールのリスト
- 開発
- クリーンアップ
- data-fabric-entities をインストールする
- data-fabric-entities リスト
- ファイル差分
- get-library-object-repository
- オブジェクト リポジトリを取得
- Init
- インスタンス リスト
- パッケージ化
- パッケージ検査
- パッケージのインストール
- パッケージ バージョン
- パブリッシュ
- リモート
- 元に戻す
- 実行、デバッグ、実行
- 設定
- Studio での起動
- テンプレートの検索
- test-data add-entity
- test-data add-queue
- test-data add-variation
- TM
- UIA
- 検証
- workflow-examples get
- ワークフロー - 例のリスト
- UIP タスク
- uip traces
- UIP トレースのフィードバック
- 移行
- 参照とサポート
UIP エージェントのデバッグ
サンプル入力を使用して Studio Web に対してローコード エージェントを実行し、「uip agent debug」で結果をストリーミングします。
uip agent debug は、ユーザーが指定した入力を使用して Studio Web に対してローコード エージェントをエンドツーエンドで実行し、実行が完了してストリーミングのステートが変わるまでポーリングを行います。ログインが必要です。
プロジェクトでは project.uiproj マニフェストを使用する必要があります。古い project.json レイアウトを使用しているプロジェクトは、変換指示ですぐに失敗します ( uip solution pack/publish などのパッケージ化コマンドは引き続き project.jsonを受け入れます。このような Studio Web にバインドされたコマンドでのみ、新しいマニフェストが必要です)。
概要
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>]
すべての呼び出しは、 グローバル オプション (--output、 --output-filter、 --log-level、 --log-file) に従います。終了コードは 標準契約に従います。
引数
<project-path>(必須) — エージェント プロジェクト ディレクトリへのパスです (agent.jsonを含む)。
オプション
| フラグ | 既定 (Default) | 目的 |
|---|---|---|
-i, --inputs <json> | {} | JSON オブジェクトとしての入力引数 (例:'{"input":"hello"}'です。プレーン オブジェクトとして解析する必要があります。ジョブの添付ファイル フィールドには、既存の Orchestrator の添付ファイル参照 {"ID": "<attachment-id>"}渡すか、 を使用してローカル ファイルをアップロード --attachment 。 |
--attachment <field=path> | — | ローカル ファイルを [ジョブの添付ファイル] 入力フィールドにアップロードします agent.json。繰り返し可能。このフィールドは、 inputSchemaで {"$ref": "#/definitions/job-attachment"} として宣言する必要があります。スキーマがジョブ添付ファイルの配列である場合にのみ、同じフィールドを繰り返します。このパスは、エージェント プロジェクト ディレクトリからではなく、現在の作業ディレクトリから解決されます。アップロードされた添付ファイル ID は Data.Attachmentsで返されます。 |
--poll-interval <ms> | 2000 | ポーリング間隔 (ミリ秒)。 |
--timeout <seconds> | 600 秒 (10 分) | 実行が完了するまで待機する最大秒数です。 |
--login-validity <minutes> | 10 | 続行するには、トークンの有効期限が切れるまでの最小残り時間 (分) を指定します。 |
例
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?"}'
--inputsにも存在するフィールドの--attachment値は--inputs値を上書きし、コマンドは警告をログに記録します。必須のジョブの添付ファイルの入力に、 --attachment も --inputs の値も持たない場合、警告が生成されます。
データシェイプ(--output json)
成功 (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 は、実行で が生成された場合にのみ存在します。 Info は、サービスが追加の診断情報を返した場合にのみ存在します。
を実行して --attachmentを含むファイルをアップロードすると、 Data.Attachments に各アップロードのリストが表示されます。
{
"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
}
]
}
}
アップロードしたファイルを再アップロードせずに後から実行で再利用するには、その参照を --inputsで渡します (例: '{"fileIn":{"ID":"c3d4e5f6-0000-0000-0000-000000000002"}}')。
添付ファイルのエラー — 無効な --attachment 値 ( field=path 形式が間違っている、ジョブの添付ファイルの入力ではないフィールド、見つからない、空、またはディレクトリ パス) は、アップロードまたは実行する前に失敗し、 Retry: "RetryWillNotFix"になります。Orchestrator がアップロードを拒否した場合、デバッグ ジョブは開始されません。
非成功の終了ステート — 同じ Code: "AgentDebug"ですが、失敗 (終了コード 1) として返され、実行を検査するために Message: "Debug run <state>." と Instructions が uip traces spans get <TraceId> を指しています。
非対応のプロジェクト マニフェスト:
{
"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— 最初に実行を実行して、プロジェクトが正しい形式であることを確認します。アップロードに失敗する手順で推奨されます。uip traces spans get— デバッグ実行が失敗ステートになった後にトレースを調べます。