# uip agent

> Scaffold, validate, refresh, review, and manage low-code agents using the `uip agent` tool.

`uip agent` is the Agent tool: it scaffolds, validates, migrates, and reviews **low-code agents** — the `agent.json`-driven projects authored in Agent Builder / Studio Web. Install it with `uip tools install agent`, or invoke `uip agent …` and let auto-install run. See [Tools (plugins)](./concepts-tools.md) for the install model and [uip tools](./uip-tools.md) for the command that manages tool installation.

This tool is distinct from the **coded agent** tool (`uip codedagent`), which targets Python agents built with LangGraph / LlamaIndex / OpenAI Agents. `uip agent` only operates on low-code agent projects: a directory containing `agent.json`, `entry-points.json`, `project.uiproj`, an `evals/` tree, and `features/` / `resources/` folders — or, for an agent embedded in a flow in Maestro, a UUID-named subdirectory inside the flow project (`--inline-in-flow`).

Packaging and shipping an agent project goes through [`uip solution`](./uip-solution.md): the agent project is one project inside a solution. Resources (tools, contexts, escalations, I/O schema) are authored by editing `agent.json`.

## What a UiPath Agent is

A low-code agent is described declaratively by a single `agent.json` file — model, prompts, input/output schemas, tools, contexts, escalations, and settings. Supporting files describe the entry points that Studio Web uses to invoke the agent, the default evaluation set, and any RAG / HITL resources.

The real lifecycle covered by `uip agent` is:

1. **Scaffold** a project on disk with `uip agent init` (standalone, or `--inline-in-flow` inside a Flow project). By default the project auto-registers into a surrounding solution's `.uipx`, or a new `<Name>Solution` is scaffolded automatically when none exists.
2. **Author** by hand-editing `agent.json` (and the files under `resources/`, `evals/`).
3. **Refresh** the project (`uip agent refresh`) after every edit — applies pending schema migrations and regenerates `entry-points.json` / `bindings_v2.json`. This is the only command that writes derived files.
4. **Validate** the project (`uip agent validate`) — strict, read-only: answers "would Studio Web accept this directory as-is?" without writing anything.
5. **Review** the project against a deterministic rule set (`uip agent review`) for a scored quality verdict, and optionally record the grade over time (`uip agent review-history add`).
6. **Configure** LLM models (`uip agent model list`), memory spaces (`uip agent memory`), guardrails (`uip agent guardrails`), and tools (`uip agent tool list`) as needed.
7. **Debug** the agent against Studio Web (`uip agent debug`) to run it end-to-end with sample inputs before shipping.
8. **Ship** with [`uip solution pack` / `publish` / `upload` / `deploy`](./uip-solution.md) — `uip agent` has no packaging or deployment verb of its own.
9. **Evaluate** the agent against an evaluation set (`uip agent eval run start`) — works against a cloud-pushed solution (`--solution-id`, or auto-detected from `SolutionStorage.json`) or, when neither is available, an implicit local-workspace evaluation path.

## Verbs

| Command | Purpose |
|---|---|
| [init](./uip-agent-init.md) | Scaffold a new agent project on disk (standalone, or inline inside a flow project). |
| [validate](./uip-agent-validate.md) | Strict read-only check: would Studio Web accept this project as-is? |
| [refresh](./uip-agent-refresh.md) | Apply pending schema migrations and regenerate `entry-points.json` / `bindings_v2.json`. |
| [review](./uip-agent-review.md) | Score the project against a deterministic rule set (verdict, score, grade, issues). |
| [review-history](./uip-agent-review-history.md) | Record a review grade in the project's local review-history file. |
| [tool list](./uip-agent-tool-manage.md) | List the tool resources configured on the agent. |
| [memory](./uip-agent-memory.md) | Attach, list, and remove memory spaces, and add, list, disable, enable, or remove the items a deployed memory space holds. |
| [eval](./uip-agent-eval.md) | Manage evaluators, evaluation sets, test cases, and evaluation runs. |
| [guardrails](./uip-agent-guardrails.md) | List guardrail definitions, BYOG guardrails, LLM-as-judge models, and the guardrail catalog. |
| [model](./uip-agent-model.md) | List LLM models available for the authenticated tenant. |
| [debug](./uip-agent-debug.md) | Run the agent against Studio Web with sample inputs and stream the result. |

## Synopsis

```
uip agent <verb> [subverb] [arguments] [options]
```

Always `uip agent`, never `uip agents` or `uip a`. `agent` is the tool's `commandPrefix` (see `uip tools list`).

All `uip agent` verbs honor the four [global options](./global-options.md) (`--output`, `--output-filter`, `--log-level`, `--log-file`). Exit codes follow the shared [contract](./exit-codes.md).

## End-to-end flow

```bash
# 1. Scaffold (auto-registers into the surrounding solution, or creates one)
uip agent init ./my-agent --model gpt-5.4

# 2. Refresh after any edit to agent.json (migrates + regenerates derived files)
uip agent refresh ./my-agent

# 3. Validate the project is ready for upload (strict, read-only)
uip agent validate ./my-agent

# 4. Review for quality issues before shipping
uip agent review ./my-agent

# 5. Ship via the solution the project was registered into
uip solution pack . ./dist
uip solution upload .

# 6. Evaluate (against the cloud project once pushed, or the local workspace)
uip agent eval run start --set default --path ./my-agent --wait

# 7. Debug a specific run against Studio Web
uip agent debug ./my-agent -i '{"input":"hello"}'
```

## Authentication

`debug`, `eval run *`, the `memory item` verbs, `guardrails list`, `guardrails llm-as-judge-models`, `guardrails catalog`, and `model list` call UiPath services and require an active CLI session. Run `uip login` first. Refer to [Authentication](./authentication.md) for the session model.

`init`, `validate`, `refresh`, `review`, `review-history`, `tool list`, `memory add`, `memory list`, and `memory remove` are local-only and do not require a session.

## See also

- [Concepts: tools (plugins)](./concepts-tools.md) — the plugin model and version pinning.
- [uip solution](./uip-solution.md) — packaging, publishing, and deploying the solution an agent project lives in.
- [Authentication](./authentication.md) — sessions, tenants, and folders.
- [Global options](./global-options.md), [Exit codes](./exit-codes.md).
