Build a UiPath coded agent without leaving your IDE

Share at:

People working

UiPath Python SDK

Guess what? You don’t have to leave your IDE to build and evaluate them. The UiPath Python SDK does a great job of bringing the power of the platform into your IDE’s terminal – scaffolding, deploying, and evaluation testing.

In this quick and approachable tutorial, we’ll build an address-parsing agent using LangGraph and the UiPath SDK. And here’s the fun part: we’ll keep it light and quick using our coding agent (Copilot, Claude Code, whatever you like) to generate our coded agent. Agents building agents may sound like science fiction, but it’s really productive once you get the hang of how to structure your prompts. The workshop on GitHub includes additional details, edge cases, and additional screenshots.

No prior UiPath experience needed. And we will be staying in the IDE until we explore your evaluation results visually. Let’s get into it.

Prerequisite

  • A UiPath account. If you don’t have one, grab a free Community Edition. Takes about two minutes.

  • VS Code with Python 3.11+ and a Bash-compatible terminal. I’m using Git Bash in VS Code to maximize applicability to your OS and IDE of choice.

  • uv—a fast and powerful Python package manager. Install with pip install uv or check the uv docs. If corporate restrictions get in the way, you can use uipath directly after activating your venv manually.

  • A coding agent in your IDE (Copilot, Claude Code, Cursor, etc.). While not strictly required, this tutorial uses one to generate agent code from prompts. It makes the whole experience faster, more fun, and it gives you the opportunity to see how the coding agent makes use of the agent skills the SDK pulls in.

Set up the SDK

Start by opening/creating a workspace folder in VS Code for your project and install the UiPath Python SDK following the CLI getting started guide. Quick check to make sure it’s working: uipath --version

Now let’s connect to your UiPath account. This will open a browser window for login: uipath auth

Pick your organization (in the web browser) and tenant (in the terminal) when prompted. The CLI creates a .env file with your credentials and token. Note that this token is good for an hour, so you will need to use the auth command again if the token times out (if you get lots of errors rooted in a 401 HTTP error code).

With an activated and authorized Python environment setup, let’s initialize the project: uipath init

This scaffolds everything you need: a main.py with a placeholder, an uipath.json config file, and an AGENTS.md that describes what the SDK can do. That last file is important because your coding agent will reference it to understand the UiPath SDK’s conventions.

CodedAgents-IDE_Step-02

Generate the agent with your coding agent

Now let’s have fun – let's create our agent. BUT - instead of writing boilerplate by hand - we are going to describe what you want ‌your coding agent​ to do. Open Copilot, Claude Code, or your tool of choice, and give it a prompt like this:

Code documentation showing UiPath agent implementation using LangGraph with address parsing instructions

A couple of things worth calling out. Referencing AGENTS.md gives your coding agent the context it needs about UiPath’s conventions. And that async reminder? It’ll save you a debugging detour. The SDK’s LLM service methods are async, so LangGraph nodes need to be too.

Your coding agent will generate main.py with the LangGraph agent and an input.json with a sample address. You’ll also need to update uipath.json to point to the agent entry: "agents": {"agent": "./main.py:main"}

Initialize to pull in the new dependencies, then run it:

uipath init

uv run uipath run agent --file input.json

And just like that, the agent parses your address and returns structured output right in the terminal. Street number, street name, city, state, zip code—all neatly broken out.

CodedAgents-IDE Step-04b

Add the USPS validation API

Parsing text with an LLM is a good start, but coded agents get really interesting when they reach out to the real world. To give you a taste for what is involved here, let's give ours the ability to validate addresses against the USPS API.

Before we can call the API, you need to register for a free developer account at USPS Web Tools, create an app, and add your credentials to.env:

USPS_CLIENT_ID=your_client_id

USPS_CLIENT_SECRET=your_client_secret

Now prompt your coding agent to wire it up. The key details to include in your prompt: use the USPS addresses/v3 endpoint, authenticate with OAuth2 client credentials, and (this one will save you time) note that DPV validation fields live under additional Info in the response, not address. Getting that response structure hint right prevents a lot of head-scratching.

Here is the prompt that I used that got it right the first time:

USPS address validation workflow showing authentication, lookup, and response structure for LangGraph agent integration
Code documentation showing USPS address validation API error handling and delivery confirmation logic

One really cool thing in that prompt that is worth noting is the ‘AFTER IMPLEMENTATION’ note – I added that to have the coding agent test out their work and iterate through their implementation, doing initial triage and bug fixes on its own. It’s a neat prompt hack.

Now that we have the tool successfully added, run the agent again:

uv run uipath run agent --file input.json

This time, the agent doesn’t just parse—it validates. You can see the USPS API calls in the terminal, and the result now includes the normalized address with deliverability status and correction notes.

CodedAgents-IDE Step-05c

Test with evaluation sets

Building an agent is satisfying. But knowing that it works well across a range of inputs? Even more so. The UiPath SDK includes an evaluation framework that lets you define test cases and score your agent automatically. For those that were big fans of test-driven development, eval-driven development is that for the agent age.

Add a tailored EVALS.md skill file into your.agent directory and use the following prompt your coding agent to create evaluation sets covering different scenarios: invalid addresses, misspelled cities, messy formatting.

Instructions for creating evaluation test cases for address validation using UiPath agentic AI framework

Then run them:

uv run uipath eval agent evaluations/eval-sets/evaluation-set-default.json --workers 3 --output-file eval-results.json

Results are saved locally in eval-results.json, so you can inspect them right in your editor. But here’s where things get really nice: once you connect your project to UiPath Studio (add your project ID to.env and run uipath push), evaluation results also show up in the Studio Web interface. You get detailed traces showing the agent’s reasoning, API calls, and scoring breakdowns for each test case.

CodedAgents-IDE Step-08d

Push to the UiPath Platform

When your agent is working and your eval scores look good, push it to UiPath: uipath push

This creates a versioned snapshot in UiPath Studio. From there you can deploy the agent, add human-in-the-loop approval steps through Action Center, or plug it into larger agentic processes. And any future eval runs from your IDE will automatically appear in Studio’s evaluation dashboard, giving you a centralized view of agent quality over time.

What to try next?

You’ve just built a coded agent entirely from your IDE, using your coding agent as the authoring tool. That’s a pattern that works well beyond address parsing.

  • Experiment with a different agent framework. We used LangGraph here, but the UiPath Python SDK also supports LlamaIndex, OpenAI Agents SDK, Google ADK, PydanticAI, and Microsoft Agent Framework. Same deployment pipeline, your choice of library.

  • Connect with real enterprise tools. Swap the USPS API for your company’s CRM, ERP, or internal services. The tool-calling pattern stays the same.

  • Add human-in-the-loop. UiPath Action Center lets your agent pause and wait for human input before proceeding. Perfect for high-stakes decisions that need a human eye.

For the full lab with every substep, the complete prompts used for the USPS integration, and troubleshooting tips, check out the full step-by-step workshop on GitHub. And if you have questions or issues, let me know by posting a GH issue or starting a thread in the UiPath Forum.

Cliff Simpkins
Cliff Simpkins

Senior Director - Developer Relations, UiPath

Get articles from automation experts in your inbox

Subscribe
Get articles from automation experts in your inbox

Sign up today and we'll email you the newest articles every week.

Thank you for subscribing!

Thank you for subscribing! Each week, we'll send the best automation blog posts straight to your inbox.

Ask AI about...Ask AI...