Skip to content

AI Assistant Knowledge Base

A plugin can ship its own documentation for the AI assistant. After installation the assistant answers from it as well as from the core documentation, and can offer to open the matching menu item of the plugin at the end of its answer.

No permission or manifest field is needed: a knowledge-base/ folder in the package is enough.

my-app/
├── manifest.json
├── menu.json
├── locales/
└── knowledge-base/
├── hu/
│ ├── _overview.md
│ └── leave-requests.md
└── en/
└── _overview.md
  • The language folders are hu and en. When there are not enough matches in one language, the assistant also uses the documentation in the other language and translates it to the user’s language, so one language is enough.
  • Only .md and .mdx files are allowed, at most 2 MB in total. Any other file makes the installation fail.
  • Subfolders can be used freely.

The build-package.js generated by the CLI (bun run package) includes the knowledge-base/ folder. For an older plugin, add it to the packaged folders:

build-package.js
if (existsSync(join(ROOT, 'knowledge-base'))) entries.push('knowledge-base');
knowledge-base/en/leave-requests.md
---
title: Requesting leave
tags: [leave, request, approval]
aliases: [holiday, time off]
---
# Requesting leave
## Summary
You can submit a leave request in the Leave requests menu...
  • title is the document title; without it, the first # heading is used.
  • Words in tags and aliases get a higher weight in search. Put the words users will ask with here, even if they do not appear in the text.
  • Search is keyword based, so write with the users’ words: “request leave”, not only “absence management”.
  • Write short, self-contained sections. A document is split into chunks of about 1000 characters, and the best few chunks for the question are passed to the model.
  • In step-by-step guides, name menu items exactly as they appear in the UI.

The assistant only answers from a plugin’s documentation for users who can access the plugin: the same rules decide this as for the app list (role, group, public app). A disabled plugin’s documentation is not used.

Permissions inside the plugin (e.g. requiredCapability in the menu) do not filter the documentation: anyone who can access the plugin can get answers from all of it. It is only a description and exposes no data; if a feature is only available to certain roles, say so in the document.

The assistant’s system prompt lists the accessible plugins that have a knowledge base, together with their menu.json items (id = href without #, label from the locales/ files). This way the button at the end of the answer opens the right menu item directly, e.g. [APP:my-app:settings/leave].

  • Install and update: the knowledge base is reloaded from the package right away.
  • Uninstall: the plugin’s documentation is removed from search.
  • Admin UI: the Settings → Knowledge Base panel shows the number of documents per plugin; “Reindex all” reloads the plugins too.