Using the AI Assistant

The AI Assistant is a chat agent in Liferay CMS that helps you generate, refine, and translate content inside the editor. It works as a supervisor, coordinating the agents available in your account and selecting the right one to fulfill each request.

Available agents include:

  • Built-in writing agents: Change Tone, Fix Spelling and Grammar, Improve Writing, Make Longer, and Make Shorter.
  • Liferay Search, to find existing site content.
  • Custom agents configured in your account.

Access the AI Assistant from the content and file creation screens in Liferay CMS. The supervisor agent logic runs in AI Hub, using your configured agents.

The AI Assistant becomes available once AI Hub is integrated with your Liferay DXP instance.

Opening the AI Assistant

Follow these steps to use the AI Assistant while creating or editing content, such as a blog or a web content article:

  1. Click AI Assistant in the top toolbar.

    A chat panel opens with a greeting: “Hi! I can help you generate content, titles, tags, or translate your work. What would you like to do?”

  2. In the Ask me anything field, enter your request.

    For example, ask the AI Assistant to draft a blog introduction, rewrite a paragraph in a more formal tone, or translate text into another language.

  3. Send the message.

    The AI Assistant responds in the panel. Continue the conversation to refine the result; it keeps the context of your earlier messages in the same session. When you’re satisfied, copy the response into your content.

How the AI Assistant Chooses an Agent

When you send a request, the supervisor compares it against the agents available in your account and routes the work to the best match. A single request can draw on more than one agent: asking it to “translate this blog to Spanish and shorten it by half” combines a translation agent and the Make Shorter agent into one response.

Because the AI Assistant works only with the agents in your account, it can act on a request only when a matching agent exists. If you ask for something no agent covers—such as translating to a language no translation agent supports—it tells you so rather than guessing. When that happens, you can create a custom agent for it, provided you have agent-management access in AI Hub. See Building a Custom Agent.

Running a Single Agent on Selected Text

You can run a built-in writing agent directly on selected text without opening the chat. This works in any Liferay rich text editor, not only in Liferay CMS. The selection menu appears wherever you edit rich text, such as web content and Object entries, and it offers the built-in writing agents only. To use Liferay Search or a custom agent, open the AI Assistant chat.

  1. In the rich text editor, select the text you want to change.

  2. Choose an agent, such as Improve Writing or Fix Spelling and Grammar, from the menu that appears.

  3. Review the suggestion.

  4. Click Accept to replace the selected text.

For a walkthrough that uses both the chat and the selection menu to write and correct a blog post, see Enhancing Content Management.