- 概要
- UiPath Agents の利用を開始する
- LangGraph を使用した UiPath Agents の利用を開始する
- Studio Web でローコード エージェントを構築する
- UiPath エージェントにツールを追加する
Extend a low-code UiPath agent with an API Workflow tool that queries the 5e SRD at runtime.
This lab builds part of UiPathfinder, an RPG Adventure system built on UiPath for a fictional Adventurer's Guild. It extends an agent built in the Getting Started with UiPath Agents lab. You build a live API connector that searches the 5e SRD (System Reference Document), then give your Monster Selector agent that connector as a tool. The agent uses it autonomously at runtime: deciding what to search for, calling the API, and selecting the best match from the results.
最後には、クエストの説明のみを受け取り、何を検索するかを決定し、モンスター クエリ ツールを呼び出し、選択したモンスターのキー フィールドを返すエージェントが UiPathfinder.QuestParser、事前に入力されたリストを必要としません。
ツールを使用しない場合、エージェントは呼び出し元に依存して候補をプリフェッチし、データとして渡します。ツールを追加すると、エージェントが実行時に検索対象を決定し、API を呼び出し、ライブ結果に基づいて推論を行うという変更が行われます。これは、ほとんどの運用エージェントのワークフローの背後にあるパターンです。エージェントの価値は、単に手渡されたものを分類するだけでなく、取得して推論する能力から生まれます。
次の操作を行います。
- Build a Monster Query API Workflow that calls the 5e SRD.
- モンスターセレクターエージェントにツールとして接続します。
- エージェント コントラクトを更新して、新機能を反映させます。
- ツールを使用しているエージェント全体をエンドツーエンドでテストします。
推定時間: 30 分から 45 分
構築する内容
| コンポーネント | 詳細 |
|---|---|
| API ワークフロー | Accepts searchName (string), calls the Open5e 5e SRD API, returns monsterResults array |
エージェントの入力: questDescription | string;クエストの説明。エージェントは、ツールを使用して独自の候補を取得します |
エージェントの出力: monsterIndex | string; the API's key identifier for the selected monster, for example srd_goblin |
エージェントの出力: monsterName | string;選択したモンスターの表示名 |
エージェントの出力: monsterType | string; creature type (for example, beast, undead, dragon). The API returns this as an object, so the agent reads type.name |
エージェントの出力: monsterCr | string; challenge rating. The API returns a number, such as 0.25, which the agent renders as text |
エージェントの出力: monsterReasoning | string;なぜこのモンスターをクエストに選んだのかというエージェントの説明 |
前提条件
- Studio Web - ブラウザーで実行されます。デスクトップでのインストールは不要です。開始する前に、Chrome、Edge、または Firefox で Studio Web を開きます。
- UiPath アカウント - 開始する前に UiPath Automation Cloud に登録またはログインしてください。
- Node.js 18+ - UiPath CLI をインストールするために必要です。必要に応じて nodejs.org からインストールします。
- UiPath CLI v1.198.0+ - required to deploy the starter. Check with
uip --version; install or upgrade withnpm install -g @uipath/cli. - Studio Web のモンスター セレクター エージェント - このラボは、「 UiPath Agents の利用を開始する」に記載されているエージェントをベースにしています。そのラボを完了すると、エージェントはすでにそこにいます。そうでない場合は、スターターをデプロイします。
git clone https://github.com/cliff-simpkins/UiPath-Workshops.git
cd UiPath-Workshops/starters/monster-selector
uip login
uip solution upload .
git clone https://github.com/cliff-simpkins/UiPath-Workshops.git
cd UiPath-Workshops/starters/monster-selector
uip login
uip solution upload .
手順 1 を開始する前に、 Studio Web を開き、ワークスペースに MonsterSelector が表示されることを確認します。