> 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/powershell-universal/de/powershell-befehle/set-psuaiagent.md).

# Set-PSUAiAgent

Set-PSUAiAgent aktualisiert einen vorhandenen KI-Agenten in PowerShell Universal und ändert nur die von Ihnen angegebenen Felder, wie Anweisungen, Modell oder Tools.

## SYNOPSIS

Aktualisiert eine vorhandene KI-Agenten-Definition.

## SYNTAX

```powershell
Set-PSUAiAgent -Id <Int64> [-Name <String>] [-Description <String>] [-Instructions <String>] [-Model <String>] [-ApiKey <Variable>] [-Provider <AiProvider>] [-Endpoint <String>] [-Tool <String[]>] [-Role <String[]>] [-AvailableInChat] [<ConnectionOptions>] [<CommonParameters>]
Set-PSUAiAgent -AiAgent <AiAgent> [-Name <String>] [-Description <String>] [-Instructions <String>] [-Model <String>] [-ApiKey <Variable>] [-Provider <AiProvider>] [-Endpoint <String>] [-Tool <String[]>] [-Role <String[]>] [-AvailableInChat] [<ConnectionOptions>] [<CommonParameters>]
```

`<ConnectionOptions>`: `[-ComputerName <String>] [-AppToken <String>] [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]`.

## BESCHREIBUNG

Lädt einen Agenten nach ID oder Pipelineobjekt und aktualisiert nur die angegebenen Felder. Die Angabe von `-Tool` ersetzt die Liste der zulässigen Tools; `-AvailableInChat` steuert, ob der Agent in den Chat-Auswahllisten der Verwaltungskonsole und generierter Apps erscheint. Der Anbieter kann `OpenAI`, `Anthropic` oder `Custom` sein; wenn der resultierende Anbieter `Custom` ist, muss sein Endpunkt eine absolute URL sein.

## BEISPIELE

```powershell
Set-PSUAiAgent -Id 12 -Instructions 'Escalate billing issues to humans.' -Tool GetInvoices,CreateTicket
Set-PSUAiAgent -Id 12 -AvailableInChat -Tool GetTickets,CreateTicket
```

## PARAMETER

| Parameter                | Beschreibung                                                                       |
| ------------------------ | ---------------------------------------------------------------------------------- |
| `-Id`                    | Numerische ID des zu aktualisierenden Agenten.                                     |
| `-AiAgent`               | Zu aktualisierendes Agentenobjekt; akzeptiert Pipelineeingabe.                     |
| `-Name`                  | Neuer Agentenname.                                                                 |
| `-Description`           | Neue Beschreibung.                                                                 |
| `-Instructions`          | Neue Systemanweisungen.                                                            |
| `-Model`                 | Neue Modellkennung.                                                                |
| `-ApiKey`                | PSU-Variable, die den API-Schlüssel des Anbieters enthält.                         |
| `-Provider`              | KI-Anbieter: `OpenAI`, `Anthropic` oder `Custom`.                                  |
| `-Endpoint`              | Absolute Anbieter-URL, erforderlich, wenn der resultierende Anbieter `Custom` ist. |
| `-Tool`                  | Ersatzliste der zulässigen Toolnamen (Alias `-Tools`).                             |
| `-Role`                  | Ersatzliste der zulässigen Rollen (Alias `-Roles`).                                |
| `-AvailableInChat`       | Legt die Verfügbarkeit in der Chat-Benutzeroberfläche fest.                        |
| `-ComputerName`          | URL oder Hostname des Zielservers (Alias `-Uri`).                                  |
| `-AppToken`              | App-Token der Verwaltungs-API.                                                     |
| `-Credential`            | Anmeldeinformationen für die Basic-Authentifizierung der Verwaltungs-API.          |
| `-UseDefaultCredentials` | Verwendet die aktuellen Windows-Anmeldeinformationen.                              |
| `-Integrated`            | Verwendet den prozessinternen Verwaltungsclient.                                   |
| `-TrustCertificate`      | Ignoriert Fehler bei der Zertifikatsvalidierung.                                   |
| `-Cookies`               | Verwendet die Authentifizierungscookies der Sitzung erneut.                        |

## EINGABEN

`PowerShellUniversal.Models.Intelligence.AiAgent`.

## BERECHTIGUNGEN

Das Zugriffstoken erfordert `intelligence.agents/update`, um dieses Cmdlet remote auszuführen.


---

# 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/powershell-universal/de/powershell-befehle/set-psuaiagent.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.
