> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/agent/guides/unigetui-package-broker.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Devolutions UniGetUI package broker

Turn on the Devolutions Agent UniGetUI Package Broker so standard Windows users install the apps your package policy allows, without administrator rights.

The ***UniGetUI Package Broker*** feature lets standard Windows users install, update and uninstall software without administrator rights. **Devolutions UniGetUI sends each package operation to Devolutions Agent, which checks it against the package policy written by an administrator and, if it is allowed, runs it with the rights it needs.** Without a policy, every request is refused.

This page covers the Devolutions Agent side. Turning the broker on in Devolutions UniGetUI, writing the policy with its policy editor and the messages users see are described in Devolutions UniGetUI: [Install approved apps without admin rights](https://docs.devolutions.net/unigetui/for-it-teams/organization/devolutions-agent).

The package broker is available on Windows only.

## Turn on the package broker

{% tabs %}
{% tab title="Installer" %}

1. Run the Devolutions Agent installer (or run it again and choose ***Change***).
2. On the feature selection page, select ***UniGetUI Package Broker***. It is off by default.
3. Complete the installation.
   {% endtab %}

{% tab title="Silent installation" %}
Add `F.PackageBroker` to `ADDLOCAL`. `ADDLOCAL` installs only the features it lists, so list every feature you want:

```powershell
msiexec /i DevolutionsAgent.msi /qn ADDLOCAL=F.Agent,F.Updater,F.Session,F.PackageBroker
```

See [Deploy Devolutions Agent silently](https://docs.devolutions.net/agent/for-administrators/deploy/silent-install.md).
{% endtab %}
{% endtabs %}

The feature sets `PackageBroker.Enabled` to `true` in `C:\ProgramData\Devolutions\Agent\agent.json`. The installer does not deploy a policy: until a valid policy exists, Devolutions UniGetUI shows "Package operations are paused" and the broker refuses every request.

## Settings

<table><thead><tr><th width="300">SETTING (AGENT.JSON)</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><code>PackageBroker.Enabled</code></td><td>Turns the package broker on. Set by the installer to match the <em><strong>UniGetUI Package Broker</strong></em> feature. Every installation, upgrade or repair writes it again, so turn the broker on or off with the installer feature rather than by editing <code>agent.json</code>. An upgrade from a version without this feature keeps a broker that was turned on by hand.</td></tr><tr><td><code>PackageBroker.PolicyPath</code></td><td>Optional. Absolute path of the policy file, which must end in <code>.json</code>. Default: <code>C:\ProgramData\Devolutions\PackageBroker\package-broker-policy.json</code>.</td></tr><tr><td><code>PackageBroker.PipeName</code></td><td>Optional. Name of the local named pipe the broker listens on. Keep the default, <code>\\.\pipe\Devolutions.Now.PackageBroker.v1</code>, which Devolutions UniGetUI uses.</td></tr></tbody></table>

Restart the Devolutions Agent service after you change these settings. The broker reloads the policy file by itself when the file changes.

## The package policy

The policy is a JSON file. Create and edit it with the policy editor of Devolutions UniGetUI, or deploy the file with your usual tools.

* **Default decision:** the policy's `Enforcement.DefaultDecision` applies when no rule matches. Keep it on `Deny`.
* **Rules:** each rule allows or denies operations by operation, package manager, package source, package identifier (exact identifiers, or patterns that can match several packages), version (exact versions or a version range), scope (user or machine), architecture, elevation and request options (custom parameters, pre and post commands, skipped hash checks, install location and others). A rule that names package sources must name exactly one package manager.
* **Unknown details:** when a detail of a request is not known in advance, a `Deny` rule matches the request and an `Allow` rule does not.
* **Audit mode:** with `Enforcement.AuditMode` set to `true`, the broker runs every request, including the ones the policy would deny, and only reports the decision it would have made ("\[Audit mode] Not enforced. Policy decision was …"). Denied operations then run with the rights they need, so use audit mode only for testing.
* **Validity period:** `Metadata.ValidFrom` and `Metadata.ValidUntil` are optional UTC dates. Before `ValidFrom` or after `ValidUntil`, every request is refused.
* **File protection:** the broker accepts only a policy file and folder that only SYSTEM and the Administrators group can modify. YAML files are not accepted.

## How the broker decides

1. A request with a custom install location that isn't a single absolute path on a local drive, without relative segments, is refused, even in audit mode.
2. The broker compares the request with every enabled rule.
3. Among the matching rules, the rule with the lowest `Priority` value decides. When an `Allow` rule and a `Deny` rule have the same priority, `Deny` wins; other ties keep the order of the file.
4. When no enabled rule matches, `Enforcement.DefaultDecision` applies.

* An operation is elevated when it installs for the whole machine (scope `Machine`) or when the client asks for elevation. The elevation condition of a rule uses this effective elevation.
* Version conditions apply to install and update requests only: a rule with a version condition never matches an uninstall. An install or update request without a precise version matches `Deny` rules that have a version condition and not `Allow` rules, so Devolutions UniGetUI sends the resolved version.
* The additional limits of an `Allow` rule (`Constraints`) apply after the rule matches: interactive installs, skipped hash checks, prereleases, custom install locations (with allowed folder patterns) and custom parameters (with allowed and denied lists, where denied wins). `Constraints` aren't allowed on `Deny` rules.
* Custom parameters are passed as is to WinGet and Scoop. Requests with custom parameters for the other package managers are refused.
* WinGet `--override` and `--custom` pass any argument to the installer, which the broker can't check. For `Allow` rules that cover elevated WinGet operations, set `AllowCustomParameters` to `false`, or list `--override*` and `--custom*` in `DeniedCustomParameters`.

## Operation limits

* An operation still running after one hour is stopped and reported as failed.
* When a user cancels an operation, the broker asks the process to stop, then ends it after 60 seconds if it is still running.
* The broker keeps the result of a finished operation for 5 minutes and returns at most the last 10 KB of its output.

## Supported package managers

WinGet, Chocolatey, Scoop, Windows PowerShell, PowerShell 7, pip, npm, Bun, Cargo, .NET Tool and vcpkg. The broker reports only the package managers available to the user who makes the request, and checks again every 60 seconds.

## What the broker checks

* The request comes from a signed, unmodified client, such as Devolutions UniGetUI installed for all users in `C:\Program Files`.
* The user in the request is the Windows user connected to the named pipe, and package managers are found as that user.
* Pre-operation and post-operation commands are refused for elevated operations, as are unsafe install locations and ambiguous source names.
* Replacing the policy through the broker requires an elevated administrator.
* At most 16 connections are served at the same time.

## Policy events in the Windows Event Log

The broker writes policy changes to the ***Application*** log, source "Devolutions Agent".

<table><thead><tr><th width="120">EVENT ID</th><th>MEANING</th></tr></thead><tbody><tr><td>8000</td><td>Policy management write attempted.</td></tr><tr><td>8001</td><td>Policy management write denied. The event lists the context, the user SID, the program, the intent, the path and the reason.</td></tr><tr><td>8002</td><td>Policy creation failed.</td></tr><tr><td>8003</td><td>Policy creation succeeded.</td></tr><tr><td>8004</td><td>Policy change failed.</td></tr><tr><td>8005</td><td>Policy change succeeded.</td></tr><tr><td>8010</td><td>External policy change applied (the file was changed outside the broker).</td></tr><tr><td>8011</td><td>External policy change rejected.</td></tr><tr><td>8090</td><td>Summary of denied writes, at most once per caller every 60 seconds.</td></tr></tbody></table>

## If it doesn't work

* Devolutions UniGetUI shows "Agent broker unavailable" or "The Devolutions Agent package broker is not running": Devolutions Agent is not installed, its service is stopped, or `PackageBroker.Enabled` is `false`. Install the ***UniGetUI Package Broker*** feature and check the ***Devolutions Agent Service*** service.
* "Package operations are paused": no valid policy exists at the policy path.
* "UniGetUI is not authorized to use the Devolutions Agent" or "Devolutions Agent refused this copy of UniGetUI": install an official Devolutions UniGetUI for all users in `C:\Program Files`.
* "Operation denied by policy": the policy does not allow the operation. Review the rules.
* The configured policy path is refused: it must name a `.json` file, as an absolute path.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/agent/guides/unigetui-package-broker.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
