UiPath Documentation
uipath-cli
latest
false

UiPath CLI user guide

Last updated May 7, 2026

uip agent publish

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:

  1. If the input is a directory, it validates the project structure and packs it to a temporary .uis.
  2. It extracts the .uis, migrates any agent.json / resource.json down to the expected storageVersion (currently 44.0.0), and repacks.
  3. It shells out to uip solution pack to produce a solution .zip (containing one or more .nupkg files).
  4. It uploads the solution — either through the standard Solutions API (default), or directly to Orchestrator's package feed when --direct is 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 .uis file. A .uis input skips the pack step; everything downstream (migrate, repack, solution pack, upload) still runs.

Options

FlagDefaultPurpose
-t, --tenant <tenant>login tenantTarget 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 basenamePackage name. Becomes the .uis / .zip filename and the package name in Orchestrator.
--package-version <version>1.0.0Version string for the uploaded package.
--folder-id <id>login folder's org unit IDOrchestrator folder Org Unit ID. Only consulted when --direct is set; the default Solutions upload path ignores it.
--directoffUpload 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>10Minimum 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).

  • 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

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated