Plugins
Three classes of plugins
| Class | Defined in | Source format |
|---|---|---|
| Built-in (compiled into the app) | src/utils/plugins.ts | TypeScript Plugin object literal |
| Always-on (shipped as separate modules) | src/utils/web-search-plugin.ts, doc-parse-plugin.ts, artifacts-plugin.ts, code-exec-plugin.ts, file-ops-plugin.ts, local-fs-native-plugin.ts | TypeScript module exporting a Plugin default |
| User-installed | db.installedPluginsV2 | LobeChat JSON / Gradio manifest / MCP server config |
Built-in plugins (compiled in)
| Plugin id | Purpose | Enabled by default |
|---|---|---|
aiaw-time | Returns current time | No (deemed useless) |
aiaw-calculator | Math via expr-eval | Yes |
aiaw-whisper | Audio transcription | Yes |
aiaw-video-transcript | Video transcript extraction | Yes |
aiaw-flux | Image generation (Gradio) | Yes |
aiaw-emotions | Audio emotion classification | Yes |
aiaw-mermaid | Mermaid diagram rendering | Yes |
Always-on built-in modules
These live in their own files in src/utils/:
| Module | Capability | Critical detail |
|---|---|---|
web-search-plugin.ts | SearXNG meta-search + Jina Reader crawl | Needs SEARXNG_BASE_URL env. Without it, the plugin throws at first use. Supports engines: google/bing/baidu/duckduckgo/npm/pypi/github/arxiv/google_scholar/z-library/reddit/imdb/brave/wikipedia/pinterest/unsplash/vimeo/youtube/bilibili |
doc-parse-plugin.ts | Parse PDF/Word/Excel to text | Needs DOC_PARSE_BASE_URL. Without it, no parsing. |
code-exec-plugin.ts | Run Python in browser via Pyodide 0.26.4 | Loads from https://cdn.jsdelivr.net/pyodide/v0.26.4/full/pyodide.js on first use. Supports matplotlib/numpy/pandas via Pyodide packages. No backend needed. |
file-ops-plugin.ts | Read/write/list/mkdir/copy/move/delete on the device filesystem | Native side uses capacitor-plugin-shell-exec. Sandbox index in localStorage under key aiaw_file_index_v2. |
local-fs-native-plugin.ts | Desktop-only filesystem access via Tauri shell | Only loaded on Tauri; throws on mobile/web. |
artifacts-plugin.ts | Convert assistant replies to editable Artifact documents | Disabled by default; toggle in Settings → Artifacts Settings. |
User-installed plugins (third-party)
Add via Plugins page (top toolbar + button):
| Plugin type | Source format | How to add |
|---|---|---|
| LobeChat | LobeChat plugin JSON (manifest with identifier, api, version) | Paste JSON or import .json file |
| Gradio | Gradio app URL or manifest | Provide URL; client introspects the manifest |
| HuggingFace | HF Space URL | Converted internally to a Gradio manifest |
| MCP | Server config (see below) | "+" → Add MCP Plugin |
MCP (Model Context Protocol) in detail
The MCP client (src/utils/mcp-client.ts) supports three transports:
| Transport | Required setup | Where it works |
|---|---|---|
stdio | Spawn a subprocess with a shell command | Desktop only (Tauri). Throws on web/Capacitor. |
http | Streamable HTTP URL with optional headers | Everywhere |
sse | Server-Sent Events URL | Everywhere |
For stdio, the platform runs sh -c "<command>" (Windows: cmd /c) via Tauri shell. Connection pool keeps each MCP client alive for 5 minutes (idle timeout), refreshable via the Refresh button on the Plugins page.
An MCP plugin entry looks like:
{
"id": "mcp-searxng",
"title": "SearXNG MCP",
"transport": {
"type": "http",
"url": "https://mcp.example.com/searxng",
"headers": { "Authorization": "Bearer ..." }
}
}
Discovery: the app fetches the URL, queries the MCP tools/list, prompts/list, resources/list endpoints, and exposes them as assistant tools.
Enabling a plugin on an assistant
- Open the assistant (Settings → Assistants → pick one, or via workspace → Assistants).
- Click the plugin chip area; a dropdown shows available plugins.
- Select plugins → configure per-plugin settings (e.g. for web-search, set SearXNG URL).
- Save assistant. From now on, the model can call those tools during conversations.