> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nextedy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Admin AI Assistant

> How the Admin AI Assistant works in Nextedy POWERSHEET: a documentation-grounded chat in the configuration editor, scoped to the Powersheet documentation, free with the Nextedy AI package, and designed so the rest of Powersheet keeps working even when the assistant does not.

The **Admin AI Assistant** is a documentation-grounded chat in the Powersheet configuration editor, added by the separately installed **Nextedy AI** package — opened from the sparkle button in the editor toolbar, its window titled **✦ Powersheet AI**. While an administrator is editing a sheet configuration or data model, they can ask natural-language questions about Powersheet configuration and get answers drawn from the Powersheet documentation, with links to the relevant pages. This page explains what it is, why it works the way it does, how its answers stay grounded in the documentation, and the architecture behind it -- the mental model you need to reason about when it is available and what it can and cannot do.

<Note title="The same assistant appears in other products">
  The assistant is not part of Powersheet itself. It arrives with the separately installed **Nextedy AI** package, which plugs into the configuration editor that Nextedy products share. In Risksheet the same button opens a **✦ Risksheet AI** window scoped to the Risksheet documentation. Everything on this page applies there too, except that the data-model attachment is specific to Powersheet sheet configurations.
</Note>

For the task of actually opening and using it, see [Use the Admin AI Assistant](/powersheet/guides/administration/use-admin-ai-assistant).

## Why it exists

Switching context to a separate documentation site or a support channel breaks the configuration workflow and slows down problem solving. The assistant puts the answer one click away from where the question arises -- inside the editor, while you are still looking at the YAML -- so administrators spend less time hunting through documentation and more time configuring. Typical questions are the ones that come up mid-task: how to make a column read-only, how to hide a field, which property controls a behavior, why a column is not updating, or the difference between a field and a column.

## A guide, not an operator

The assistant answers questions and points to the right documentation. It does **not** change, save, or apply configuration on your behalf -- the administrator stays in control of the YAML and makes every edit themselves in the editor.

<Info title="Distinct from Polarion-side AI actions">
  The Admin AI Assistant is the **documentation chat**. It is deliberately separate from the Polarion-side **actions** capability, which does let an AI act on the product -- the Risksheet AI Assistant, for example, proposes work items you can apply into a sheet. The two are different features with different backends, different availability signals, and different licensing: actions run against the Polarion server and require a valid Nextedy AI license, while the documentation chat does not.

  The documentation chat only reads documentation and answers. It has no path to mutate your configuration.
</Info>

## Grounded in the documentation

The assistant runs in a **documentation-search** mode rather than as an open-ended chatbot: its answers are grounded in documentation content, not generated freely. Two design choices keep the answers relevant and accurate:

| Aspect                      | How it works                                                                                                                                                                                                                                                                           |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Product scoping**         | Queries are tagged with the product (`powersheet`), so answers are drawn from the Powersheet documentation index rather than from unrelated products.                                                                                                                                  |
| **Streaming responses**     | Answers stream in incrementally as they are generated, with a typing indicator while the first content is still arriving, so the administrator sees progress immediately.                                                                                                              |
| **Conversation continuity** | The conversation is held on the AI service, so a short follow-up such as "only for computed fields" is understood against the earlier turns. It survives closing and reopening the panel, and is not kept indefinitely: once the service has dropped it, the panel starts a fresh one. |
| **Starter questions**       | When the panel is empty, it offers a set of suggested starter questions fetched from the AI service for the current product.                                                                                                                                                           |

Because answers come from a language model over documentation, the assistant shows a standing reminder that *"AI can make mistakes. Verify important information."* Treat its answers as guidance and confirm property names and behavior against the linked documentation before relying on them in production.

## What the assistant sees

By default, the assistant answers from the documentation alone -- it does **not** receive your configuration data. When a question is specifically about the file being edited, the administrator can **explicitly** attach context, and only then is that content sent:

* **Current file** -- attaches the YAML currently open in the editor (for example, the sheet configuration being worked on).
* **Data model** -- when editing a sheet configuration, attaches the data model it references, so the assistant can reason about the entity types and relationships behind the columns.

Attachments are opt-in, added by the administrator for the questions asked after attaching, and removable at any time. Nothing about the open configuration is transmitted unless the administrator chooses to attach it.

<Note title="Privacy by default">
  Sending no configuration data unless explicitly attached is deliberate. The assistant is built to answer documentation questions, not to inspect a customer's live configuration -- so the default path keeps customer configuration data out of the request entirely.
</Note>

## Availability

The assistant needs **no Nextedy AI license**. It is free for every installation of the Nextedy AI plugin, regardless of license status, because it answers only from public documentation and carries no customer data. Two things must be true for it to be available:

* The **Nextedy AI plugin** is installed on the Polarion server, providing the endpoint that issues the signed proof.
* A **Polarion user is signed in**, so that proof can be issued for someone.

The editor resolves an availability status before enabling the assistant, and reflects it on the toolbar button:

| Status           | What it means                                                         | In the editor                                                                                   |
| ---------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| **Available**    | The proof endpoint answered and a session token was minted.           | The **AI Assistant** button is enabled and opens the chat.                                      |
| **Unauthorized** | Polarion could not identify a signed-in user for the proof request.   | The button is disabled; its tooltip reads *"AI Assistant requires a valid Nextedy AI license"*. |
| **Unavailable**  | The Nextedy AI plugin or the Nextedy AI service could not be reached. | The button is disabled; its tooltip reads *"AI Assistant is currently unavailable"*.            |

<Warning title="The Unauthorized tooltip is misleading">
  Despite its wording, *"AI Assistant requires a valid Nextedy AI license"* does **not** indicate a licensing problem — the documentation assistant is never license-gated. The tooltip appears when the Polarion server could not resolve a signed-in user. Check that your session is still valid and sign in again.

  A Nextedy AI license *is* required for the separate in-product assistants, such as the Risksheet AI Assistant. See [Install and Manage License](/powersheet/guides/administration/install-manage-license) for those.
</Warning>

### Graceful degradation

Availability of the assistant is an independent signal from the rest of Powersheet. If the Nextedy AI service is unreachable, only the **AI Assistant** button is disabled -- the configuration editor and the rest of Powersheet continue to work normally. The assistant is an addition to the editor, never a dependency of it.

## Related Pages

<Columns cols={2}>
  <Card title="Use the Admin AI Assistant" icon="sparkles" href="/powersheet/guides/administration/use-admin-ai-assistant">
    Step-by-step: open the assistant in the editor, ask questions, and attach
    context.
  </Card>

  <Card title="Install and Manage License" icon="key" href="/powersheet/guides/administration/install-manage-license">
    Activate a Nextedy AI license -- required for in-product assistants, not for
    this one.
  </Card>

  <Card title="Powersheet Architecture" icon="sitemap" href="/powersheet/concepts/architecture">
    How the server extension, client, and configuration layers fit together.
  </Card>

  <Card title="Data Model vs Sheet Configuration" icon="diagram-project" href="/powersheet/concepts/data-model-vs-sheet-config">
    The two configuration files the assistant can take as context.
  </Card>
</Columns>

<Accordion title="Sources">
  **Source Code**

  Configuration editor (`com.nextedy.editor`, shared across products):

  * `EditorChat.tsx`
  * `FloatingWindow.tsx`
  * `Toolbar.tsx`
  * `ContentArea.tsx`
  * `aiApi.ts`
  * `aiToken.ts`
  * `aiAvailable.ts`

  Nextedy AI plugin and service:

  * `AiTokenServlet.java`
  * `UniversalLicense.java`
  * `MintServer.java`
</Accordion>
