Skip to main content

Brain Manifest

Every brain needs a manifest file package.json at the root of the project. This file contains the brain metadata and settings.

NameRequiredTypeDetails
brain.nameYstringThe name of the brain - only letters. The name must be unique to the package registry.
versionYstringSemVer compatible version.
publisherYstringThe publisher name
enginesYobjectAn object containing at least the hubai key matching the versions of HubAI that the extension is compatible with. Cannot be *. For example: ^0.10.5 indicates compatibility with a minimum HubAI version of 0.10.5.
licensestringRefer to npm's documentation. If you do have a LICENSE file in the root of your extension, the value for license should be "SEE LICENSE IN <filename>".
brain.displayNamestringThe display name for the extension used in the Marketplace.The display name must be unique to the Marketplace.
brain.descriptionstringA short description of what your brain does.
brain.capabilitiesarrayArray of supported brain capabilities. Possible values: [conversation, voice_transcription, image_recognition, image_generation].
categoriesstring[]The categories you want to use for the extensions. Allowed values: [chat, brain, workbench, ai, themes, other]
keywordsarrayAn array of keywords to make it easier to find the package. These are included with other package Tags on the Marketplace. This list is currently limited to 5 keywords.
mainstringThe entry point to your extension.
brain.settingsMaparrayArray of LocalBrainSettingMap. Use this field to specify all the settings that your brain needs to work
iconstringPath of the icon file for your brain (must be a path relative to the root folder of your project)

Full Manifest example

Here's a complete example of how a package.json for a brain must look like (with all the settings above):

{
"name": "test-brain",
"version": "1.0.0",
"type": "commonjs",
"main": "./src/main.js",
"icon": "assets/icon.png",
"engines": {
"node": ">= 18.12 <19",
"hubai": "^0.0.1"
},
"scripts": {...},
"brain": {
"name": "TestBrain",
"displayName": "Test Brain",
"description": "This is a brain created for testing",
"capabilities": [
"conversation",
"voice_transcription"
],
"settingsMap": [
{
"displayName": "Test parameter",
"description": "You can insert any value here :)",
"name": "test",
"type": "string",
"required": false
},
{
"displayName": "Scoped parameter",
"description": "User can override this parameter in the chat window",
"name": "scopedTest",
"type": "string",
"required": false,
"scope": "chat_overridable"
}
]
},
"publisher": "test",
"author": "Author Name",
"keywords": [
"TestBrain",
"test"
],
"categories": [
"brain"
],
"license": "Apache-2.0",
"dependencies": {
"@hubai/brain-sdk": "^1.0.1",
"tslib": "~2.5"
},
"volta": {
"node": "18.12.1"
}
}