AI Chat
Since Jmix 3.1
The AI Chat add-on provides Flow UI components for building AI chat interfaces in a Jmix application: a complete chat, the parts it is assembled from, and a code block that renders source code in and outside a conversation.
The add-on supplies the user interface, not the model. Answers are produced by an LLMProvider that the application implements, so the components work with any backend: Spring AI, a vendor SDK, or your own service.
Key features:
-
Ready-made chat: aiChat composes aiMessageList and aiMessageInput with an empty state over a streaming provider. One element and a provider are enough to get a working chat.
-
Streaming answers: tokens appear as they arrive, with a thinking indicator and an optional live feed of what the assistant is doing.
-
Markdown messages: assistant messages render Markdown, including fenced code blocks, which become real aiCodeBlock components.
-
Attachments: files are attached by drag and drop or from a file picker, stored in Jmix file storage, and remain downloadable from the conversation history.
-
Data binding and persistence: bind the chat to a collection container over your own message entity and persist the conversation.
-
Per-message actions: ordinary Jmix actions per message role, with built-in copy and regenerate actions.
-
Standalone components: the message list, the message input, and the code block are usable on their own, outside a chat.
-
Your own chat: the application can drive the message list from end to end, appending a message, streaming an answer into it, and reporting progress and errors. A chat that the ready-made one does not fit can be assembled from the parts.
|
The add-on is experimental. Its API may change in future releases, and Studio and IntelliJ IDEA mark calls to its classes with an experimental API warning. The warning is expected on correct code. |
Relation to the AI Tools Add-on
The AI Tools add-on solves a different problem. It ships a finished assistant: a chat UI with conversation history, a registry of tools the assistant can call, and predefined tools that inspect and query application data. You install it and configure a model.
This add-on ships the building blocks. There is no assistant, no tool registry, and no persistence. You decide what a message is, where it is stored, and what answers it.
Choose AI Tools when you want an assistant over your application data. Choose AI Chat when the conversation is part of your own domain, or when you need a chat interface the ready-made one does not provide.
Installation
|
This add-on requires the Enterprise subscription. If you don’t have the subscription, see the Enterprise Trial section for how to get a trial version. |
For automatic installation through Jmix Marketplace, follow instructions in the Add-ons section.
For manual installation, follow the steps below.
-
Configure access to the premium repository.
-
Add the premium repository to your
build.gradle:repositories { // ... maven { url = 'https://global.repo.jmix.io/repository/premium' credentials { username = rootProject['premiumRepoUser'] password = rootProject['premiumRepoPass'] } } } -
Add premium repository credentials to
~/.gradle/gradle.properties:premiumRepoUser=123456123456 premiumRepoPass=abcdefabcdefGet the repository credentials from your license key: the first part of the key before dash is the repository user name, the part after dash is the password. For example, if your key is
123456123456-abcdefabcdef, then the user name is123456123456and the password isabcdefabcdef.
-
-
Add dependency to your
build.gradle:implementation 'io.jmix.aichat:jmix-aichat-flowui-starter'
The components stream their answers over a server push connection, so the application must enable push. Add @Push to the application class if it is not there already:
@Push
@SpringBootApplication
public class AiChatEx1Application implements AppShellConfigurator {