Skip to main content

Build Your First Agent

This walkthrough builds a simple agent in Agent Builder (Studio Web) using the low-code canvas.

Prerequisite

Sign up for a free UiPath Automation Cloud account (no credit card required) so you can access Studio Web and Agent Builder.

1. Start a new agent

In Studio Web, create a new agent project. Give it a clear, narrow purpose to start — for example: "Given an invoice dispute, determine whether it's a duplicate charge, a pricing error, or a legitimate charge, and draft a response."

2. Write the system prompt

Define the agent's system prompt: its role, the categories it should choose between, and any tone or policy constraints (for example, "never approve a credit over $500 without escalation"). Be specific — vague prompts produce inconsistent agent behavior.

3. Add tools

Add the tools this agent needs to do its job — for example, an Integration Service connector to look up the original invoice, and an existing UiPath automation that checks payment history. Only add tools the agent genuinely needs for this goal; every additional tool is another thing the agent has to reason correctly about.

4. Add context grounding

Link a Context Grounding index containing your dispute-resolution policy documents, so the agent's decisions are grounded in your actual rules rather than general assumptions. If you don't have an index set up yet, you can skip this for a first test and add it once the basic flow works.

5. Configure an escalation

Add at least one escalation — for example, requiring human approval in Action Center before the agent issues any credit above a set threshold. This gives you a safety net while you're still validating the agent's judgment.

6. Test with Debug chat

Use the built-in Debug chat to run the agent through several sample disputes, including ambiguous ones. Check whether it picks a sensible category, cites the right policy when context grounding is enabled, and correctly triggers the escalation when it should.

7. Publish

Once you're satisfied with test results, publish the agent as a solution package to Orchestrator. From there it can be run on its own, or added as a step inside a larger Maestro process alongside existing robots and human tasks.

What's next

From here, natural next steps are: adding a second tool for more complex disputes, tightening the system prompt based on test failures, and wiring the agent into a Maestro process so it becomes one step in a larger, orchestrated workflow.