Skip to main content

AI agent (beta)

Starting from version 2.4.2, the AI plugin brings the new AI agent functionality.

The AI inline agent is a contextual assistant integrated into ONLYOFFICE editors. It is accessed via a floating panel and is currently available as a beta feature of the AI plugin.

The AI agent:

  • Provides natural language interaction for executing common editing tasks without navigating menus.
  • Includes a collection of simple predefined tools adapted to common tasks for each editor.
  • Maintains conversation history to support iterative refinement and multi-step requests.

What the AI agent can do

  • Text generation and rewriting. Create new text or enhance existing content directly in the editor. Generate summaries, expand ideas, rephrase sentences, or adjust tone and style with natural language commands.
  • Smart formatting. Apply formatting without searching through menus. Request formatting changes, and the editor updates the document automatically.
  • Data analysis and visualization. Aggregate, sort, and filter data in spreadsheets, and generate visual representations from selected ranges or entire sheets. Create diagrams and slide images based on simple text descriptions.

How to install the AI agent

To install the AI agent, follow the steps below:

  1. Go to the Plugins tab and open Plugin Manager. Find the AI plugin and click Install or Update if the plugin is already installed.

    AI pluginAI plugin

  2. Click the Background Plugins button and activate the AI switch.

    Activate AIActivate AI

  3. Find a new AI tab in the top toolbar of ONLYOFFICE editors.

  4. Click Settings to open the configuration window.

  5. Select Edit AI models and click Plus iconPlus icon.

  6. Choose an AI provider from the list or add new AI models by entering your API keys.

  7. In the row of icons, select what the model is used for: Text, Images, Embeddings, Audio Processing, Content Moderation, Realtime Tasks, Coding Help, Visual Analysis.

  8. Click OK to save your settings and complete the connection process.

    AI settingsAI settings

  9. Go back to the Settings and set the model for the Chatbot.

The AI agent is now installed and ready to start.

How to use the AI agent

To invoke the AI agent:

  1. Press Ctrl + / in any editor to open the AI agent input.

    commentText executioncommentText execution

  2. Type your request and press Enter to receive an immediate response.

The editor supports request history, so you can continue the conversation, giving instructions step by step.

To reset the history, press Ctrl + Alt + /.

To disable the agent, use Esc.

How to create an AI assistant

The Create AI assistant feature lets you turn any repetitive text task into a dedicated toolbar button. Define a prompt once, and reuse it across your documents.

To create a new assistant:

  1. Open the AI tab and click Create AI assistant.

  2. Fill in the fields:

    • Name — a short name for the assistant, displayed as the button label on the toolbar.
    • Prompt — the instruction sent to the AI when the button is clicked.
    • Action — the action type the assistant performs on the document (Hint, Replace, or Replace + Hint).
  3. Click Create.

    Create AI assistantCreate AI assistant

The assistant appears as a new button in the AI tab and can be used in the document.

note

If the assistant cannot perform the requested action — for example, when the prompt is unrelated to text editing — a warning is displayed and the operation is stopped.

AI assistant example

The following example shows a Simplify assistant created with this prompt:

tip

Rewrite the selected text in plain, simple language. Avoid technical jargon and keep sentences short.

After selecting a text passage and clicking the Simplify button, click the highlighted text to open the Proposal for replacement panel. It shows the original text alongside the suggested simplified version. An Explanation section below describes why and how the text was changed. Click Accept to apply the changes or Reject to discard them.

Simplify assistant exampleSimplify assistant example