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

uip agent init

「uip agent init」の構文とオプション - ディスク上の新しいローコード エージェント プロジェクトをスキャフォールディングします。

uip agent init は、ディスク上に新しいローコード エージェント プロジェクトをスキャフォールディングします。ソリューション ディレクトリ内で実行すると、プロジェクトは周囲のソリューションの .uipxに自動登録されます。ソリューションの外部で実行すると、親 <name>Solution が自動的にスキャフォールディングされ、エージェント プロジェクトはその中に入れ子になります。 --skip-solution-registration 渡すと両方の動作がオプトアウトされ、未登録のむき出しのプロジェクト ツリーが取得されます。

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

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

概要​

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

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

引数​

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

オプション​

フラグ既定 (Default)目的
--conversational無効自律型エージェントではなく会話型エージェントをスキャフォールディングします。
--model <model>既定の静的なし — 自律型/会話型エージェントの種類に推奨されるモデルを選択します使用する LLM モデルです。agent.jsonで settings.model に書き込まれます。
--system-prompt <prompt>—最初のシステム プロンプトは、agent.jsonmessages[0] に書き込まれます。スタンドアロン モードでのみ意味があります。
--force無効ターゲット ディレクトリが空でなくても上書きします。スタンドアロンモードのみ — インラインモードは常に新しいUUIDフォルダに書き込みます。
--skip-solution-registration無効周囲のソリューションにプロジェクトを自動登録したり、親 <name>Solutionを自動作成したりしないでください。
--inline-in-flow無効フロー プロジェクト内のインライン エージェントをスキャフォールディングします。<path>引数は、既存のフロープロジェクトディレクトリを指している必要があります(それ以外の場合はエラー)。

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

# Simplest: scaffold an autonomous agent with the recommended default model
uip agent init ./my-agent --model gpt-5.4

# Scaffold a conversational agent
uip agent init ./my-agent --conversational --model anthropic.claude-sonnet-4-5-20250929-v1:0

# Scaffold outside any solution — a parent MyAgentSolution is auto-created
uip agent init ./my-agent

# Skip solution auto-registration entirely
uip agent init ./my-agent --skip-solution-registration

# 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 an autonomous agent with the recommended default model
uip agent init ./my-agent --model gpt-5.4

# Scaffold a conversational agent
uip agent init ./my-agent --conversational --model anthropic.claude-sonnet-4-5-20250929-v1:0

# Scaffold outside any solution — a parent MyAgentSolution is auto-created
uip agent init ./my-agent

# Skip solution auto-registration entirely
uip agent init ./my-agent --skip-solution-registration

# 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": "/abs/path/MyAgentSolution/my-agent",
    "Name": "my-agent",
    "Model": "gpt-5.4",
    "ProjectId": "a1b2c3d4-0000-0000-0000-000000000301",
    "NextSteps": "# Edit agent.json to configure prompts and resources\n...",
    "SolutionRegistration": {
      "Status": "Registered"
    },
    "AutoCreatedSolution": {
      "...": "present only when a parent solution was scaffolded automatically"
    },
    "ProjectArtifacts": {
      "...": "present only when the project was registered into a parent solution"
    }
  }
}
{
  "Code": "AgentInit",
  "Data": {
    "Status": "Agent project created",
    "Path": "/abs/path/MyAgentSolution/my-agent",
    "Name": "my-agent",
    "Model": "gpt-5.4",
    "ProjectId": "a1b2c3d4-0000-0000-0000-000000000301",
    "NextSteps": "# Edit agent.json to configure prompts and resources\n...",
    "SolutionRegistration": {
      "Status": "Registered"
    },
    "AutoCreatedSolution": {
      "...": "present only when a parent solution was scaffolded automatically"
    },
    "ProjectArtifacts": {
      "...": "present only when the project was registered into a parent solution"
    }
  }
}

SolutionRegistration.Status 常に存在します ( Registered、 AlreadyRegistered、 NotInSolution (親 .uipx 見つからず、新しい親が自動作成されなかった)、または OptedOut (--skip-solution-registration が渡されました) のいずれかです。AutoCreatedSolution は、この実行のために親 <Name>Solution がスキャフォールディングされている場合にのみ存在します。ProjectArtifacts は、 SolutionRegistration.Status が Registered または AlreadyRegistered されている場合にのみ存在します。生成される成果物とリソースのエントリ uip solution projects add 反映されているため、後でプロジェクトが省略されることはありません uip solution pack 。

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

{
  "Code": "AgentInitInline",
  "Data": {
    "Status": "Inline agent created inside flow project",
    "Path": "/abs/path/my-flow/<uuid>",
    "ProjectId": "<uuid>",
    "Model": "gpt-5.4",
    "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-5.4",
    "NextSteps": "# Edit agent.json to configure prompts and settings\n..."
  }
}

インラインモードでは溶液の登録は行われません。この図形には SolutionRegistration / AutoCreatedSolution / ProjectArtifacts は存在しません。

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 refresh — 編集のたびに を実行して、entry-points.jsonとbindings_v2.jsonを再生成します。
  • uip agent validate — 出荷前に厳密な読み取り専用チェックを実施します。
  • uip solution projects add — スキャフォールディングされたエージェントを、自動登録されたソリューションとは異なるソリューションにリンクします。

参照​

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

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得