# Working effectively

> How to prompt, plan, and review when you work with a coding agent on UiPath projects.

Set the goal, watch the work, and approve anything that changes state.

## Set up the session

- Give the agent the task's files, goals, and standards.
- Name the UiPath [skill](skills-overview.md), such as `uipath-rpa`, and confirm it loaded.
- Start a fresh session per task.
- Put repeated conventions in a [context file](agent-context-files.md).

## Habits

- [Review output](reviewing-agent-output.md) before you rely on it.
- Validate with the Workflow Analyzer (Analyze Project) and a local run.

## Prompts

- The exact file or project, and its location.
- Named inputs and outputs, with types.
- The expected behavior.
- Activities or packages to use and to avoid.
- Existing dependencies.

Example: "create `UploadInvoice.xaml` that reads `in_FilePath (String)`, uploads it to SharePoint, and returns `out_Url (String)`".

## Start from a PDD or SDD

For a substantial automation, give the agent a Process Definition Document (PDD) or Solution Design Document (SDD). It can turn a PDD into an SDD and a build plan, then build piece by piece.

Remove real customer data from the document first.

## Plan first

Use your agent's plan mode, if it has one. Correct the approach, file layout, or order of work, then approve.

## Iterate

Check after each meaningful step.

The agent delivers once validation and the build report no errors. To also resolve warnings and confirm a local run, ask or add the rule to your context file.

| Iterate when | Start over when |
|---|---|
| You can name the fix | The agent loops on the same broken output |
| The structure is right | The structure is wrong |
| You are within a fix or two | You are on your third or fourth fix |

## Stay in control

- Explicitly approve changes to shared systems, such as publishing or deploying to Orchestrator.
- Keep secrets out of prompts. Store them as UiPath assets or in a credential store, referenced by name.
- Keep real customer data out of prompts. Give the agent only the data structure.
- Review every package change, and pin versions in `project.json`.

The agent acts under the UiPath identity of the `uip` session, with its permissions and audit trail. See [Governance and trust](governance-and-trust.md).
