- Overview
- Get started
- Concepts
- Using UiPath CLI
- How-to guides
- CI/CD recipes
- Command reference
- Overview
- Exit codes
- Global options
- uip codedagent
- uip docsai
- add-test-data-entity
- add-test-data-queue
- add-test-data-variation
- analyze
- build
- create-project
- diff
- find-activities
- get-analyzer-rules
- get-default-activity-xaml
- get-errors
- get-manual-test-cases
- get-manual-test-steps
- get-versions
- get-workflow-example
- indicate-application
- indicate-element
- inspect-package
- install-data-fabric-entities
- install-or-update-packages
- list-data-fabric-entities
- list-workflow-examples
- pack
- restore
- run-file
- search-templates
- start-studio
- stop-execution
- uia
- uip traces
- Migration
- Reference & support
UiPath CLI user guide
uip agent publish packs an agent project and pushes the resulting package to Orchestrator as a new solution package version. The returned PackageVersionKey is the input to uip agent deploy.
Internally, publish runs a multi-stage pipeline:
- If the input is a directory, it validates the project structure and packs it to a temporary
.uis. - It extracts the
.uis, migrates anyagent.json/resource.jsondown to the expectedstorageVersion(currently44.0.0), and repacks. - It shells out to
uip solution packto produce a solution.zip(containing one or more.nupkgfiles). - It uploads the solution — either through the standard Solutions API (default), or directly to Orchestrator's package feed when
--directis set.
Requires an active CLI session (uip login).
Synopsis
uip agent publish [path] [-t <tenant>] [-l <locationKey>] [-n <name>]
[--package-version <version>]
[--folder-id <id>] [--direct]
[--login-validity <minutes>]
uip agent publish [path] [-t <tenant>] [-l <locationKey>] [-n <name>]
[--package-version <version>]
[--folder-id <id>] [--direct]
[--login-validity <minutes>]
All uip agent publish invocations honor the global options (--output, --output-filter, --log-level, --log-file). Exit codes follow the standard contract.
Arguments
[path](optional, default.) — Path to the agent project directory or an already-packed.uisfile. A.uisinput skips the pack step; everything downstream (migrate, repack, solution pack, upload) still runs.
Options
| Flag | Default | Purpose |
|---|---|---|
-t, --tenant <tenant> | login tenant | Target tenant. Required if the login session has no default tenant. |
-l, --location-key <guid> | — | Optional GUID forwarded to the Solutions API packagesUpload call (used by the default upload path only). |
-n, --name <name> | agent metadata.name → path basename | Package name. Becomes the .uis / .zip filename and the package name in Orchestrator. |
--package-version <version> | 1.0.0 | Version string for the uploaded package. |
--folder-id <id> | login folder's org unit ID | Orchestrator folder Org Unit ID. Only consulted when --direct is set; the default Solutions upload path ignores it. |
--direct | off | Upload each .nupkg directly to Orchestrator's package feed and create a Release per package, bypassing the Solutions API. Use this when the Solutions deployment path fails or you want releases created immediately in a specific folder. |
--login-validity <minutes> | 10 | Minimum minutes of token validity required. See Authentication. |
Examples
# Publish the current project to the login tenant
uip agent publish --package-version 1.0.0
# Publish a specific project folder
uip agent publish ./my-agent --package-version 1.0.0
# Publish a pre-packed .uis
uip agent publish ./dist/my-agent.uis --package-version 1.0.0
# Direct upload into a specific folder (creates releases in that folder)
uip agent publish ./my-agent \
--package-version 1.1.0 \
--direct --folder-id 42
# Override tenant and name
uip agent publish ./my-agent \
-t production \
-n invoice-agent \
--package-version 2.0.0
# Publish the current project to the login tenant
uip agent publish --package-version 1.0.0
# Publish a specific project folder
uip agent publish ./my-agent --package-version 1.0.0
# Publish a pre-packed .uis
uip agent publish ./dist/my-agent.uis --package-version 1.0.0
# Direct upload into a specific folder (creates releases in that folder)
uip agent publish ./my-agent \
--package-version 1.1.0 \
--direct --folder-id 42
# Override tenant and name
uip agent publish ./my-agent \
-t production \
-n invoice-agent \
--package-version 2.0.0
Data shape (--output json)
Default upload path (Code: "AgentPublish"):
{
"Code": "AgentPublish",
"Data": {
"Status": "Published successfully",
"Name": "my-agent",
"Version": "1.0.0",
"PackageVersionKey": "a1b2c3d4-0000-0000-0000-000000000050"
}
}
{
"Code": "AgentPublish",
"Data": {
"Status": "Published successfully",
"Name": "my-agent",
"Version": "1.0.0",
"PackageVersionKey": "a1b2c3d4-0000-0000-0000-000000000050"
}
}
The PackageVersionKey is what you pass to uip agent deploy.
--direct path:
{
"Code": "AgentPublish",
"Data": {
"Status": "Published to Orchestrator (direct)",
"Name": "my-agent",
"Version": "1.0.0",
"Releases": [
{
"Name": "InvoiceAgent",
"Key": "a1b2c3d4-0000-0000-0000-000000000055",
"ProcessKey": "com.uipath.agent.InvoiceAgent"
}
]
}
}
{
"Code": "AgentPublish",
"Data": {
"Status": "Published to Orchestrator (direct)",
"Name": "my-agent",
"Version": "1.0.0",
"Releases": [
{
"Name": "InvoiceAgent",
"Key": "a1b2c3d4-0000-0000-0000-000000000055",
"ProcessKey": "com.uipath.agent.InvoiceAgent"
}
]
}
}
In --direct mode, each .nupkg inside the solution .zip is uploaded separately, and a release is created per package. There is no PackageVersionKey; the corresponding concept is the per-release Key — usable directly with uip agent run start.
Migration behaviour
publish expects a storageVersion no higher than 44.0.0, while fresh Studio Web projects may be 47.0.0. It silently rewrites agent.json and tool resource.json files inside the temporary extract directory to the expected schema before repacking. Your on-disk project is never modified.
Each migrated file produces a Message log entry (for example, Migrated /tmp/…/agent.json: storageVersion 47.0.0 → 44.0.0).
Related
uip agent pack— the local packing step (included internally).uip agent deploy— install and activate the uploaded package version.uip agent validate— run static checks and migration against your on-disk project before publishing.
See also
- Authentication — sessions, tenants, and
--login-validity. - Orchestrator: jobs — where released agent processes ultimately run.
- Global options, Exit codes.