- Introdução
- Introdução aos agentes da UiPath
- Introdução aos agentes da UiPath usando o LangGraph
- Construção de um agente de pouco código no Studio Web
- Introdução
- Crie o agente
- Testar o agente
- Avaliar o agente
- Adicionando ferramentas ao seu agente UiPath
- Introdução à tela Flow no UiPath Maestro
Crie o agente
Use o Autopilot para gerar a configuração do agente, em seguida, revise e refine a solicitação do sistema, as entradas e as saídas.
Crie um projeto de agente no Studio Web e deixe o Autopilot gerar sua solicitação do sistema, esquema de entrada e esquema de saída a partir de uma descrição em linguagem simples. Em seguida, verifique a configuração gerada em relação às entradas e saídas das quais o restante deste laboratório depende.
Etapa 1 - Abrir Studio Web
Abra o Studio Web e inicie um novo projeto de agente a partir do seu Espaço de Trabalho do Cloud.
- Faça login no UiPath Automation Cloud.
- Abra o Studio Web na navegação à esquerda. Seu Espaço de trabalho na nuvem abre, mostrando suas soluções existentes e um botão Criar novo .
- Abra o menu suspenso ao lado de Criar novo.
- Selecione Agente na lista de tipos de projetos.
Etapa 2 - Gerar o agente com o Autopilot
O Autopilot no Studio Web pode configurar um agente a partir de uma descrição em linguagem simples. Você descreve o que deseja e o Autopilot propõe o prompt do sistema, o esquema de entrada e o esquema de saída.
-
Selecione Autônomo como o tipo de agente.
-
No campo O que seu agente deve fazer? , cole a seguinte descrição:
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)
-
Selecione Gerar agente.
-
Revise as sugestões na janela do Autopilot . O Autopilot orienta você na criação e configuração do agente a partir do prompt que você deu a ele.
-
Aceite as sugestões para criar o agente.
A solicitação é estruturada de propósito e cada parte faz um trabalho:
- Exclusões na frente. Dizer ao Autopilot para não adicionar ferramentas, contextos ou escalonamentos mantém o agente mínimo, então cada parte dele é algo que você solicitou.
- Níveis como uma lista. Um nível por linha, cada um com exemplos, dá ao Autopilot limites claros para copiar no prompt do sistema.
- Nomes de campos exatos em suas próprias linhas. O Autopilot usa esses nomes literalmente no esquema, e o conjunto de avaliação que você cria posteriormente depende deles.
- Uma restrição com seu motivo. Restringir
tiera quatro valores e dizer o motivo, impede o agente de criar um cinco níveis, como "Moderar".
O Autopilot é não determinístico, então sua configuração gerada pode ser diferente das capturas de tela. Continuar quando a tela do agente for carregada com a entrada questDescription e as saídas tier e reasoning . Se a tela mostrar um erro ou falhar ao carregar, atualize a página e repita esta etapa.
Etapa 3 - Revisar a tela do agente
Verifique se o Autopilot criou os valores de entrada, saídas e nível dos quais o restante deste laboratório depende e corrija tudo o que esteja faltando ou extra.
- Quando a Tela de agentes for aberta, selecione o nó do agente para abrir seu painel Propriedades . Você também pode abrir propriedades usando o ícone de chave no canto superior direito da tela.
- Verifique o seguinte na configuração gerada:
- Entrada -
questDescription(string) está listado. - Saídas -
tier(string) ereasoning(string) são listados. - Prompt do sistema - descreve os quatro níveis com um exemplo de cada.
- Entrada -
- Abra o Data Manager (o ícone da área de transferência ao longo do trilho esquerdo).
- Selecione a
tier. - Verifique se os quatro valores são exatamente
Trivial,Standard,HeroiceLegendary. Dependendo de como o Autopilot gerou o esquema, os valores aparecem como uma lista de valores permitidos ou na descrição do campo. Qualquer uma funciona. - Se a lista ou descrição tiver um nível sem um nível ou adicionar um, edite-o.
Refinar o prompt do sistema (opcional)
O Autopilot gera um prompt do sistema em funcionamento com base na sua descrição, mas suas palavras variam de execução para execução. Se você quiser resultados consistentes que correspondam às saídas esperadas neste laboratório, substitua o prompt do sistema no painel Propriedades pelo seguinte:
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.
Com o agente configurado, você pode testá-lo em relação a descrições de perguntas reais na próxima seção.