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

UiPath CLI ユーザー ガイド

uip エージェントの初期化

uip agent init は、新しいローコード エージェント プロジェクトをディスク上にスキャフォールディングします。エージェントのプロジェクト ファイルのみが作成され、ソリューションの作成やリンクは行われません。uip solution new に続けて uip solution project add を使用して、スキャフォールディングされたエージェントをソリューション内に配置します。

次の 2 つのスキャフォールディング モードを使用できます。

  • スタンドアロン (既定) — エージェントの完全なプロジェクト ツリーです。 agent.jsonentry-points.jsonproject.uiprojflow-layout.jsonevals/ ツリー (既定の評価セット、セマンティック エバリュエーター、トラジェクトリ エバリュエーターを含む)、さらに空の features/ ディレクトリと resources/ ディレクトリで構成されます。
  • Inline-in-flow (--inline-in-flow) — 既存のフロープロジェクト内の UUID という名前のサブディレクトリで、 agent.json と空の flow-layout.jsonが含まれ、空の evals/eval-sets/features/resources/ フォルダーがあります。entry-points.jsonproject.uiprojはありません。フローのインライン エージェント ノードは、生成された projectIdを参照する必要があります。

概要

uip agent init <path> [--model <model>] [--system-prompt <prompt>] [--force] [--inline-in-flow]
uip agent init <path> [--model <model>] [--system-prompt <prompt>] [--force] [--inline-in-flow]

すべての uip agent init 呼び出しでは、 グローバル オプション (--output--output-filter--log-level--log-file) が優先されます。終了コードは 標準コントラクトに従います。

引数

  • <path> (必須) — エージェント プロジェクトのターゲット ディレクトリ (相対または絶対) です。ディレクトリ名は、スタンドアロン モードではエージェント名になります。 [a-zA-Z0-9_ -]+と一致する必要があります。--inline-in-flowを使用すると、代わりにフロープロジェクトディレクトリ<path>、その中にUUIDという名前のサブディレクトリが作成されます。

オプション

フラグ既定 (Default)目的
--model <model>gpt-4o-2024-11-20LLM モデル: エージェントによって使用されます。agent.jsonsettings.model に書き込まれます。
--system-prompt <prompt>最初のシステム プロンプトは、agent.jsonmessages[0] に書き込まれます。スタンドアロン モードでのみ意味があります。
--force無効ターゲット ディレクトリが空でなくても上書きします。スタンドアロンモードのみ — インラインモードは常に新しいUUIDフォルダに書き込みます。
--inline-in-flow無効フロー プロジェクト内のインライン エージェントをスキャフォールディングします。<path>引数は、既存のフロープロジェクトディレクトリを指している必要があります(それ以外の場合はエラー)。

スタンドアロン モードでは、ターゲット ディレクトリが存在し、ファイルが含まれている場合、実行が設定されていない限り、続行 --force 拒否されます。

# Simplest: scaffold with defaults into ./my-agent
uip agent init ./my-agent

# Override the model and seed a system prompt
uip agent init ./invoice-agent \
  --model gpt-4o-2024-11-20 \
  --system-prompt "You are an invoice triage agent."

# Overwrite an existing non-empty directory
uip agent init ./my-agent --force

# Scaffold an inline agent inside an existing flow project
uip agent init ./my-flow --inline-in-flow
# Simplest: scaffold with defaults into ./my-agent
uip agent init ./my-agent

# Override the model and seed a system prompt
uip agent init ./invoice-agent \
  --model gpt-4o-2024-11-20 \
  --system-prompt "You are an invoice triage agent."

# Overwrite an existing non-empty directory
uip agent init ./my-agent --force

# Scaffold an inline agent inside an existing flow project
uip agent init ./my-flow --inline-in-flow

データシェイプ(--output json)

スタンドアロン(Code: "AgentInit"):

{
  "Code": "AgentInit",
  "Data": {
    "Status": "Agent project created",
    "Path": "./my-agent",
    "Name": "my-agent",
    "Model": "gpt-4o-2024-11-20",
    "ProjectId": "a1b2c3d4-0000-0000-0000-000000000301",
    "NextSteps": "# Edit agent.json to configure prompts and resources\n…"
  }
}
{
  "Code": "AgentInit",
  "Data": {
    "Status": "Agent project created",
    "Path": "./my-agent",
    "Name": "my-agent",
    "Model": "gpt-4o-2024-11-20",
    "ProjectId": "a1b2c3d4-0000-0000-0000-000000000301",
    "NextSteps": "# Edit agent.json to configure prompts and resources\n…"
  }
}

インライン (Code: "AgentInitInline"):

{
  "Code": "AgentInitInline",
  "Data": {
    "Status": "Inline agent created inside flow project",
    "Path": "/abs/path/my-flow/<uuid>",
    "ProjectId": "<uuid>",
    "Model": "gpt-4o-2024-11-20",
    "NextSteps": "# Edit agent.json to configure prompts and settings\n…"
  }
}
{
  "Code": "AgentInitInline",
  "Data": {
    "Status": "Inline agent created inside flow project",
    "Path": "/abs/path/my-flow/<uuid>",
    "ProjectId": "<uuid>",
    "Model": "gpt-4o-2024-11-20",
    "NextSteps": "# Edit agent.json to configure prompts and settings\n…"
  }
}

ProjectId は、 agent.json にスタンプされた新しいUUIDであり、インラインモードではフォルダ名でもあります。スタンドアロンモードでは、エントリポイント、セマンティックエバリュエーター、軌跡エバリュエーター、およびデフォルトの評価セットに対して追加のUUIDが生成されます。

生成されたファイル

スタンドアロンでは 以下が作成されます。

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

インライン イン フロー では、フロー プロジェクト内で作成します。

<flow-path>/<new-uuid>/
  agent.json
  flow-layout.json           # empty ({})
  evals/eval-sets/
  features/
  resources/
<flow-path>/<new-uuid>/
  agent.json
  flow-layout.json           # empty ({})
  evals/eval-sets/
  features/
  resources/
  • uip agent validate — スキャフォールディングされたagent.jsonを編集した後、静的チェックとスキーマの移行を実行します。
  • uip agent config — ファイルを手作業で編集せずにagent.json内の個々のキーを更新します。
  • uip agent input / uip agent output — スキャフォールディング後のエージェントの入力および出力スキーマを管理します。
  • uip agent push — スキャフォールディング プロジェクトを Studio Web にプッシュします。

参照

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

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得