- Einleitung
- Erste Schritte mit UiPath Agents
- Erste Schritte mit UiPath Agents mit LangGraph
- Erstellen eines Low-Code-Agents in Studio Web
- Hinzufügen von Tools zu Ihrem UiPath Agent
- Einleitung
- Erstellen Sie den API-Workflow
- Stellen Sie eine Verbindung mit Ihrem Agent her
- Durchgängig testen
- Evaluate agent trajectory
- Getting Started with the Flow canvas in UiPath Maestro
Stellen Sie eine Verbindung mit Ihrem Agent her
Register the API workflow as a tool in the quest classifier agent, describe when to call it, and replace the system prompt so the agent uses it.
Step 2 - Open the quest classifier agent
Your solution now holds two projects: the quest classifier agent and the API Query - 5e Monsters workflow you just built. In the project explorer, select the agent project to open it in the agent builder. If you deployed the starter, the agent project is Quest-Classifier-Agent.
Review the agent's current configuration before making changes:
- Project Input:
questDescription(string). - Project Outputs:
tier(string, one of four values) andreasoning(string). - System prompt: describes the four tiers. If Autopilot wrote it, or you deployed the starter, it most likely also tells the agent to classify from the description alone and not to use tools.
- Evaluation set: the five cases from the low-code lab. You rerun them in Step 6.
In this lab, you do not change the input or the outputs. You add a tool, and you replace the system prompt so the agent knows how to use it.
Schritt 3 – Verbinden Sie den API-Workflow als Tool
Register the API Query - 5e Monsters workflow as a tool on the agent, then give it the name and description the agent reads at runtime.
Fügen Sie das Tool hinzu
Stellen Sie sicher, dass Sie sich in der Canvas- Ansicht befinden: Verwenden Sie den Umschalter Canvas/Formular oben im Agent Builder. Die Schaltfläche + unter Tools ist nur in der Canvas-Ansicht sichtbar.
- Wählen Sie auf der Agent-Arbeitsfläche die Option + unter Tools aus.
- Wählen Sie im Bereich Tool wählen die Option API-Workflow unter Toolbox aus.
- Under Available resources, select
API Query - 5e Monsters, the workflow you added to this solution in Step 1. You can also filter the list with the Search API workflows box.
If the workflow isn't listed, check the project explorer: API Query - 5e Monsters should be listed in the same solution as the agent. If you created it as a separate solution instead, publish it first (Publish > For me), and it appears here under its project name.
Keeping the tool in the agent's solution needs no publish step, and the agent's evaluations call it like any other tool. In your own projects, give a tool its own solution and publish it when more than one agent needs to call it.
Konfigurieren Sie die Toolbeschreibung
Give the tool a name and description. Write the description as an instruction to the agent:
- Name:
Monster Query - Beschreibung:
Searches the 5e SRD for monsters whose name contains the search text. Search with the most specific creature name the quest gives; a general term such as a creature type can return many matches and miss the one you need. Returns up to 10 candidates with key, name, type, size, challenge rating, and alignment. Call this tool when a quest names or strongly implies a specific creature, to look up its challenge rating. - searchName (if blank):
The monster name or partial name to search for
The description drives tool selection. The agent reads this description, not the tool name, to decide when and how to call the tool.
The "most specific creature name" instruction matters for this API. A search for dragon matches 43 creatures, and the 10 that come back are all adult dragons, so a quest about an ancient red dragon never sees the right candidate. A search for ancient red dragon returns exactly one result.
An API workflow is one kind of tool. The steps to connect and describe a tool are the same for every type, and an agent can also call:
- RPA-Workflows
- Integration Service connectors, for systems such as Slack, Outlook, or an enterprise resource planning (ERP) system
- Document understanding
- Maestro cases and flows
- DeepRAG
- Model Context Protocol (MCP) servers
- Other agents, including remote agent-to-agent calls
Step 4 - Replace the system prompt
The current system prompt was written for an agent with no tools. Replace it in full rather than adding to it: if it tells the agent not to use tools, an appended instruction to call Monster Query contradicts it, and the agent may never make the call.
To open the Properties panel, select the agent on the canvas or select the wrench icon in the upper-right corner. Replace the system prompt with:
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)
- 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)
Using the Monster Query tool:
- Call Monster Query when the quest description names or strongly implies a specific creature the adventurers must face.
- Creatures include people the party may have to fight, such as bandits or guards.
- Search with the most specific creature name the quest gives.
- Only search for creatures in the quest itself, never for a creature you are using as a comparison or reference point.
- If a search returns no results, you may try one shorter or more general name. Stop after three searches in total.
- If the tool returns more than one result, pick the best fit: name match first, then number (a group of rats fits "Swarm of Rats" better than "Rat"), then type.
Using the challenge rating:
- When the tool returns a challenge_rating, use this map to set the minimum tier: Trivial 0-5, Standard 6-12, Heroic 13-20, Legendary 21 and above.
- Raise the tier above that minimum when the quest describes many opponents, a powerful leader or patron, or a history of failed attempts. One creature's challenge rating is not the difficulty of the whole quest.
- Cite the exact challenge rating in your reasoning.
- Never guess or invent a challenge rating. Only cite one the tool actually returned.
- If you do not call the tool, or it returns nothing that fits, classify from the quest description alone.
Return the tier and a brief, two-sentence 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)
- 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)
Using the Monster Query tool:
- Call Monster Query when the quest description names or strongly implies a specific creature the adventurers must face.
- Creatures include people the party may have to fight, such as bandits or guards.
- Search with the most specific creature name the quest gives.
- Only search for creatures in the quest itself, never for a creature you are using as a comparison or reference point.
- If a search returns no results, you may try one shorter or more general name. Stop after three searches in total.
- If the tool returns more than one result, pick the best fit: name match first, then number (a group of rats fits "Swarm of Rats" better than "Rat"), then type.
Using the challenge rating:
- When the tool returns a challenge_rating, use this map to set the minimum tier: Trivial 0-5, Standard 6-12, Heroic 13-20, Legendary 21 and above.
- Raise the tier above that minimum when the quest describes many opponents, a powerful leader or patron, or a history of failed attempts. One creature's challenge rating is not the difficulty of the whole quest.
- Cite the exact challenge rating in your reasoning.
- Never guess or invent a challenge rating. Only cite one the tool actually returned.
- If you do not call the tool, or it returns nothing that fits, classify from the quest description alone.
Return the tier and a brief, two-sentence reasoning.
The challenge rating map sets the minimum tier, and the quest's context can raise it:
| Creature | Challenge rating | Minimum tier |
|---|---|---|
| Guard | 0.125 | Trivial |
| Swarm of Rats | 0.25 | Trivial |
| Wyvern | 6 | Standard |
| Adult Red Dragon | 17 | Heroic |
| Ancient Red Dragon | 24 | Legendary |
A quest with guards starts at Trivial, but one that says the guards are many and nobody has come back raises the tier.
Keep the examples in the prompt consistent with the map. An example can sit above its creature's minimum tier, but never below it: listing "hunt a wyvern" as a Trivial example contradicts the map, because a wyvern's minimum is Standard. A contradiction like that makes the agent's tier unpredictable.
The input and output schemas do not change. The challenge rating goes into the reasoning text.
Agents are non-deterministic. Your agent's search terms and reasoning vary from run to run. A correct run calls the tool when a quest names a creature, skips it when one does not, and cites only challenge ratings the tool returned.
With the tool connected and the system prompt replaced, you can test the agent in the next section.