AI Assistant Knowledge Base
Overview
Section titled “Overview”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.
Folder structure
Section titled “Folder structure”my-app/├── manifest.json├── menu.json├── locales/└── knowledge-base/ ├── hu/ │ ├── _overview.md │ └── leave-requests.md └── en/ └── _overview.md- The language folders are
huanden. 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
.mdand.mdxfiles 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:
if (existsSync(join(ROOT, 'knowledge-base'))) entries.push('knowledge-base');A document
Section titled “A document”---title: Requesting leavetags: [leave, request, approval]aliases: [holiday, time off]---
# Requesting leave
## SummaryYou can submit a leave request in the Leave requests menu...titleis the document title; without it, the first#heading is used.- Words in
tagsandaliasesget 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.
Access
Section titled “Access”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.
Opening from the answer
Section titled “Opening from the answer”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].
Lifecycle
Section titled “Lifecycle”- 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.