UiPath Documentation
uipath-cli
latest
false
UiPath CLI ユーザー ガイド
重要 :
このコンテンツは機械翻訳によって処理されています。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

方法: UiPath エージェントをデプロイする

「uip エージェント」および「uip ソリューション」ツールを使用して、ローコードの UiPath エージェントをベースとして作成、更新、検証し、Orchestrator に出荷します。

このページでは、CLI から使用するローコード UiPath エージェントのライフサイクル全体について説明します。つまり、ディスク上に素早く作成し、同期を維持し、検証およびレビューしてから、uip solutionを使用して Orchestrator に送信します。(Python uip agentuip codedagentベースのコード化されたエージェント) とは異なる ツールを使用します。

uip agent には独自の pack、 publish、 deploy コマンドはありません。エージェント プロジェクトは常にソリューションの一部として出荷されます。uip agent init は、新しいプロジェクトを周囲のソリューションの .uipxに自動登録するか、親 <Name>Solution の外部で実行する場合は親のスキャフォールディングします。

ライフサイクル​

init → refresh → validate → review → (uip solution) pack → publish/upload → deploy
init → refresh → validate → review → (uip solution) pack → publish/upload → deploy
動詞入力出力ログインが必要です。
agent initターゲット ディレクトリソリューションに登録されたエージェントのプロジェクト ツリーいいえ
agent refreshプロジェクト ディレクトリ移行されたファイル + 再生成された entry-points.json/bindings_v2.jsonいいえ
agent validateプロジェクト ディレクトリ合格/不合格 — 何も書きませんいいえ
agent reviewプロジェクト ディレクトリスコア、成績、課題いいえ
solution packソリューション ディレクトリ.zip パッケージいいえ
solution publish / solution uploadパックされた .zip またはソリューションディレクトリパブリッシュ済みのパッケージ バージョン / Studio Web ソリューションはい
solution deploy runパブリッシュされたパッケージデプロイされたフォルダー + リリースはい

局動詞 (agent init、 agent refresh、 agent validate、 agent review、 solution pack) では、アクティブなセッションは必要ありません。Studio Web または Orchestrator と通信するすべての機能を最初に uip login する必要があります。

1.足場​

uip agent initを使用して新しいエージェント プロジェクトを作成します。

uip agent init ./invoice-agent \
  --model gpt-5.4 \
  --system-prompt "You are an invoice triage agent."
uip agent init ./invoice-agent \
  --model gpt-5.4 \
  --system-prompt "You are an invoice triage agent."

既存のソリューション ディレクトリ内から実行してプロジェクトを登録するか、スタンドアロンで実行します。親 InvoiceAgentSolution/ が自動的にスキャフォールディングされ、プロジェクトはその中に入れ子になります。両方の動作をオプトアウトするには、 --skip-solution-registration 渡します。

これにより、完全なスタンドアロン プロジェクト ツリーが書き込まれます。

invoice-agent/
  agent.json
  project.uiproj
  entry-points.json
  flow-layout.json
  evals/
    evaluators/<semantic>.json
    evaluators/<trajectory>.json
    eval-sets/evaluation-set-default.json
  features/
  resources/
invoice-agent/
  agent.json
  project.uiproj
  entry-points.json
  flow-layout.json
  evals/
    evaluators/<semantic>.json
    evaluators/<trajectory>.json
    eval-sets/evaluation-set-default.json
  features/
  resources/

ディレクトリ名がエージェント名になります。 [a-zA-Z0-9_ -]+と一致する必要があります。空でないディレクトリを上書きするには、[ --force を渡します。

Maestro フロー内に存在するエージェントの場合は、代わりに --inline-in-flow を使用します。これにより、 agent.json と flow-layout.jsonのみを含む UUID の名前付きサブフォルダーが生成され、ソリューションは自動登録されません。init --inline-in-flowをご覧ください。

2. オーサリングリソース​

ツール、コンテキスト、エスカレーション、または I/O スキーマのエントリを追加するための専用の CLI 動詞はありません。これらは、 agent.json 直接手編集して作成します (ファイルベースのツール リソースの場合は resources/<name>/resource.json)。uip agent tool list と uip agent memory は読み取り/添付ヘルパーであり、一般的なリソース エディターではありません。

# See what tools are already configured
uip agent tool list --path ./invoice-agent

# Attach a memory space for retrieval-augmented recall
uip agent memory add InvoiceHistory \
  --memory-space invoice-recall --folder-path Shared --path ./invoice-agent

# Check available guardrails before wiring one into agent.json
uip agent guardrails list
# See what tools are already configured
uip agent tool list --path ./invoice-agent

# Attach a memory space for retrieval-augmented recall
uip agent memory add InvoiceHistory \
  --memory-space invoice-recall --folder-path Shared --path ./invoice-agent

# Check available guardrails before wiring one into agent.json
uip agent guardrails list

agent.jsonに何らかの手作業で編集を加えたら、手順 3 に進みます。更新すると、これらの編集が依存する派生ファイルが再生成されます。

3. 更新して検証する​

agent.jsonを編集するたびに uip agent refreshを実行します。保留中のスキーマの移行を適用し、entry-points.json/bindings_v2.jsonを再生成します。これは、ライフサイクルでファイルを書き込む唯一のコマンドです。

uip agent refresh ./invoice-agent
uip agent refresh ./invoice-agent

次に、strict で読み取り専用の uip agent validate を実行すると、何も入力せずに「Studio Web はこのディレクトリをそのまま受け入れますか?」と回答します。

uip agent validate ./invoice-agent
uip agent validate ./invoice-agent

どちらも ローカル専用 です (ログイン不要)。refreshを実行し、パック前のゲートとして CI でvalidateします。これらを組み合わせると、ずっと後になって不透明なアップロードの失敗として表面化される一連のエラー (無効なモデル、破損したmessages[].contentTokens、スキーマのrequiredエントリの欠落、古い派生ファイル) をキャッチします。

4. レビュー​

uip agent review は、スコア付けされた品質評定に対して決定論的なルール セットを実行します。これは、検証の構造的な合格/不合格とは異なります。

uip agent review ./invoice-agent
uip agent review ./invoice-agent

任意で、経時的な追跡のために勾配を記録しますuip agent review-history add

uip agent review-history add A --path ./invoice-agent
uip agent review-history add A --path ./invoice-agent

5. デバッグ (任意)​

出荷の前に、Studio Web に対してエージェントを 1 回実行し、uip agent debug を使用したサンプル入力を使用します (ログインとproject.uiprojマニフェストが必要です)。

uip agent debug ./invoice-agent -i '{"invoicePath":"/tmp/sample.pdf"}'
uip agent debug ./invoice-agent -i '{"invoicePath":"/tmp/sample.pdf"}'

6. uip ソリューションとともに出荷する​

エージェント プロジェクトは、手順 1 で登録されたソリューションの一部として出荷されます。Studio Web の場合は、他のソリューションとまったく同じように梱包してパブリッシュします (Studio Web の場合は、アップロード)。

# Pack the solution containing the agent project
uip solution pack ./InvoiceAgentSolution ./dist --version 1.0.0

# Publish the packed .zip to a tenant feed
uip solution publish ./dist/InvoiceAgentSolution_1.0.0.zip
# Pack the solution containing the agent project
uip solution pack ./InvoiceAgentSolution ./dist --version 1.0.0

# Publish the packed .zip to a tenant feed
uip solution publish ./dist/InvoiceAgentSolution_1.0.0.zip

次に、Orchestrator フォルダーにデプロイします。

uip solution deploy run ./dist/InvoiceAgentSolution_1.0.0.zip \
  --folder-name invoice-agent-prod
uip solution deploy run ./dist/InvoiceAgentSolution_1.0.0.zip \
  --folder-name invoice-agent-prod

同じソリューションを同じ --folder-name に再デプロイしても、既存のデプロイは更新されず、常に新しいデプロイが作成され deploy run 。uip solution deploy upgrade を uip solution deploy list のデプロイ キーとともに使用して、既存のデプロイをその場で新しいパッケージ バージョンに移動します。

パイプライン対応の完全なスクリプト​

#!/usr/bin/env bash
set -euo pipefail

AGENT_DIR="./invoice-agent"
SOLUTION_DIR="./InvoiceAgentSolution"
VERSION="${AGENT_VERSION:-1.0.0}"

# 1. Auth (External App in CI)
uip login \
  --client-id env.UIPATH_CLIENT_ID \
  --client-secret env.UIPATH_CLIENT_SECRET \
  --tenant "$UIPATH_TENANT"

# 2. Refresh + validate locally - fail fast before packing
uip agent refresh "$AGENT_DIR"
uip agent validate "$AGENT_DIR"

# 3. Pack and publish the solution
uip solution pack "$SOLUTION_DIR" ./dist --version "$VERSION"
uip solution publish "./dist/InvoiceAgentSolution_${VERSION}.zip"

# 4. Deploy (or upgrade an existing deployment - see uip solution deploy upgrade)
uip solution deploy run "./dist/InvoiceAgentSolution_${VERSION}.zip" \
  --folder-name "invoice-agent-${ENVIRONMENT}"
#!/usr/bin/env bash
set -euo pipefail

AGENT_DIR="./invoice-agent"
SOLUTION_DIR="./InvoiceAgentSolution"
VERSION="${AGENT_VERSION:-1.0.0}"

# 1. Auth (External App in CI)
uip login \
  --client-id env.UIPATH_CLIENT_ID \
  --client-secret env.UIPATH_CLIENT_SECRET \
  --tenant "$UIPATH_TENANT"

# 2. Refresh + validate locally - fail fast before packing
uip agent refresh "$AGENT_DIR"
uip agent validate "$AGENT_DIR"

# 3. Pack and publish the solution
uip solution pack "$SOLUTION_DIR" ./dist --version "$VERSION"
uip solution publish "./dist/InvoiceAgentSolution_${VERSION}.zip"

# 4. Deploy (or upgrade an existing deployment - see uip solution deploy upgrade)
uip solution deploy run "./dist/InvoiceAgentSolution_${VERSION}.zip" \
  --folder-name "invoice-agent-${ENVIRONMENT}"

その後、評価の実行 ( uip agent eval run start ) を行い、デプロイがグリーンと見なされる前に、評価セットに対する動作を検証します。

参照​

  • uip agentの概要 — エージェント ツール内のすべての動詞。
  • uip solutionの概要 — エージェント プロジェクトが存在するソリューションのパッケージ化、パブリッシュ、デプロイ
  • 認証 — セッション、テナント、 env. プレフィックス。
  • 方法: CI から Orchestrator にデプロイ する — CI 固有の認証、キャッシュ、バージョンのピン留め。

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得