- はじめに
- UiPath Agents の利用を開始する
- LangGraph を使用した UiPath Agents の利用を開始する
- Studio Web でローコード エージェントを構築する
- はじめに
- エージェントを構築する
- エージェントをテストする
- エージェントを評価する
- UiPath エージェントにツールを追加する
- UiPath Maestro のフロー キャンバスの使用を開始する
エージェントを構築する
Autopilot を使用してエージェントの設定を生成し、システム プロンプト、入力、出力を確認して調整します。
Studio Web でエージェント プロジェクトを作成し、平易な言葉での説明から Autopilot にシステム プロンプト、入力スキーマ、出力スキーマを生成させます。次に、生成された設定を、このラボの残りの部分が依存する入力および出力と照合します。
手順 1 - Studio Web を開く
Studio Web を開き、クラウド ワークスペースから新しいエージェント プロジェクトを開始します。
- UiPath Automation Cloud にログインします。
- 左側のナビゲーションから Studio Web を開きます。クラウド ワークスペースが開き、既存のソリューションと [新規作成 ] ボタンが表示されます。
- [ 新規作成] の横のドロップダウン メニューを開きます。
- プロジェクトの種類のリストから [ エージェント ] を選択します。
手順 2 - Autopilot を使用してエージェントを生成する
Studio Web の Autopilot では、平易な言葉での説明からエージェントを設定できます。どういうものがほしいかを説明すると、Autopilot がシステム プロンプト、入力スキーマ、出力スキーマを提案します。
-
エージェントの種類として [ 自律型 ] を選択します。
-
[ エージェントは何をすべきか] フィールドに、次の説明を貼り付けます。
Build an autonomous agent that classifies quests for a fantasy RPG Adventurer's Guild. Keep it simple: build the system prompt and input/output schemas only. You do not need to add any tools, contexts, or escalations.
Given a quest description, the agent should consider the quest, what monster the party is likely to face while completing the quest, and then classify the quest's difficulty as one of four tiers:
- Trivial: simple errands anyone can handle (e.g., deliver a letter, clear rats from a cellar)
- Standard: moderate quests requiring some adventuring skill (e.g., escort a merchant caravan, hunt a wyvern, drive back the kobolds)
- Heroic: difficult quests requiring significant adventuring expertise (e.g., slay an adult dragon, infiltrate a thieves' guild)
- Legendary: extreme quests requiring top-tier heroes to complete (e.g., defeat a lich, slay an ancient dragon)
Return the tier and a brief, two-sentence reasoning. Use these exact field names:
- Input: questDescription (string, required)
- Outputs: tier (string, restricted to exactly "Trivial", "Standard", "Heroic", or "Legendary", so the agent can't return any other value) and reasoning (string)
Build an autonomous agent that classifies quests for a fantasy RPG Adventurer's Guild. Keep it simple: build the system prompt and input/output schemas only. You do not need to add any tools, contexts, or escalations.
Given a quest description, the agent should consider the quest, what monster the party is likely to face while completing the quest, and then classify the quest's difficulty as one of four tiers:
- Trivial: simple errands anyone can handle (e.g., deliver a letter, clear rats from a cellar)
- Standard: moderate quests requiring some adventuring skill (e.g., escort a merchant caravan, hunt a wyvern, drive back the kobolds)
- Heroic: difficult quests requiring significant adventuring expertise (e.g., slay an adult dragon, infiltrate a thieves' guild)
- Legendary: extreme quests requiring top-tier heroes to complete (e.g., defeat a lich, slay an ancient dragon)
Return the tier and a brief, two-sentence reasoning. Use these exact field names:
- Input: questDescription (string, required)
- Outputs: tier (string, restricted to exactly "Trivial", "Standard", "Heroic", or "Legendary", so the agent can't return any other value) and reasoning (string)
-
[ エージェントを生成] を選択します。
-
[ Autopilot ] ウィンドウで提案を確認します。Autopilot は、ユーザーが指定したプロンプトからエージェントを構築および設定する手順を順番に進めます。
-
提案を受け入れてエージェントを作成します。
プロンプトは意図的に構成されており、各部分が次のような役割を果たします。
- 除外を事前に設定します。ツール、コンテキスト、エスカレーションを追加しないように Autopilot に指示することで、エージェントは最小限に保たれるため、あらゆる部分が求められた内容になります。
- リストとしての階層1 行につき 1 つの層を設定し、それぞれに例が表示されることで、Autopilot がシステム プロンプトにコピーできる明確な境界が与えられます。
- 正確なフィールド名を独自の行に表示します。Autopilot はこれらの名前をスキーマ内でそのまま使用し、後で構築する評価セットはそれらによって異なります。
- 制約とその理由。
tier値を 4 つに制限し、その理由を言うと、エージェントが「中程度」などの 5 番目の層を考案するのを阻止します。
Autopilot は非決定論的であるため、生成された設定はスクリーンショットとは異なる場合があります。エージェントのキャンバスが読み込まれたら、 questDescription 入力と tier および reasoning の出力で続行します。キャンバスにエラーが表示されたり、読み込みに失敗したりする場合は、ページを更新してこの手順を繰り返します。
手順 3 - エージェント キャンバスを確認する
このラボの残りの部分で依存する入力値、出力値、層の値が Autopilot によって構築されたことを確認し、不足している箇所や余分な箇所を修正します。
- エージェント キャンバスが開いたら、エージェント ノードを選択して [プロパティ] パネルを開きます。キャンバスの右上隅にあるレンチ アイコンを使用してプロパティを開くこともできます。
- 生成された設定で以下を確認します。
- 入力 -
questDescription(文字列) が一覧表示されます。 - 出力 -
tier(文字列) とreasoning(文字列) が一覧表示されます。 - システム プロンプト - 4 つの層について説明し、それぞれの例を挙げて説明します。
- 入力 -
- データ マネージャー (左側のレールにあるクリップボード アイコン) を開きます。
- 出力
tierを選択します。 - の 4 つの値が正確に
Trivialであることを確認します (Standard)、Heroic、Legendaryです。Autopilot がスキーマをどのように生成したかに応じて、値は許容値のリストとして、またはフィールドの説明に表示されます。どちらでも機能します。 - リストまたは説明に層がない場合、または層を追加している場合は、編集します。
システム プロンプト (任意)を改良します
Autopilot は、説明から動作するシステム プロンプトを生成しますが、その文言は実行ごとに異なります。このラボで期待される出力に一致する一貫した結果が必要な場合は、[プロパティ] パネルのシステム プロンプトを次のように置き換えます。
You are a quest intake classifier for an adventurer's guild in a fantasy RPG world.
Classify the incoming quest description into exactly one difficulty tier:
- Trivial: simple errands anyone can handle (for example, deliver a letter, clear rats from a cellar)
- Standard: moderate quests requiring some adventuring skill (for example, escort a merchant caravan, hunt a wyvern, drive back the kobolds)
- Heroic: difficult quests requiring significant adventuring expertise (for example, slay an adult dragon, infiltrate a thieves' guild)
- Legendary: extreme quests requiring top-tier heroes to complete (for example, defeat a lich, slay an ancient dragon)
Consider the quest and the creatures the adventurers are likely to face. If no monster is stated, infer only a reasonable threat from the description and say when it is uncertain.
Return the tier and a brief, two-sentence reasoning.
- `tier` must be exactly one of "Trivial", "Standard", "Heroic", or "Legendary"; never return another value.
- `reasoning` must be exactly two concise sentences and mention both the quest's challenge and the likely monster or threat.
- Never add markdown, extra keys, or extra text.
Final reminder: make one consistent tier decision and return exactly two sentences of reasoning.
You are a quest intake classifier for an adventurer's guild in a fantasy RPG world.
Classify the incoming quest description into exactly one difficulty tier:
- Trivial: simple errands anyone can handle (for example, deliver a letter, clear rats from a cellar)
- Standard: moderate quests requiring some adventuring skill (for example, escort a merchant caravan, hunt a wyvern, drive back the kobolds)
- Heroic: difficult quests requiring significant adventuring expertise (for example, slay an adult dragon, infiltrate a thieves' guild)
- Legendary: extreme quests requiring top-tier heroes to complete (for example, defeat a lich, slay an ancient dragon)
Consider the quest and the creatures the adventurers are likely to face. If no monster is stated, infer only a reasonable threat from the description and say when it is uncertain.
Return the tier and a brief, two-sentence reasoning.
- `tier` must be exactly one of "Trivial", "Standard", "Heroic", or "Legendary"; never return another value.
- `reasoning` must be exactly two concise sentences and mention both the quest's challenge and the likely monster or threat.
- Never add markdown, extra keys, or extra text.
Final reminder: make one consistent tier decision and return exactly two sentences of reasoning.
エージェントを設定したら、次のセクションで実際のクエストの説明に対してテストできます。