docmd-assistant v0.1.0 is now available →

AI assistant grounded in your docs.
Any LLM provider. Your keys never leave your server.

Reads your documentation, answers questions in context. Works with 100+ models, any website, and keeps your API keys secure.

Get Started
Headless Core Engine Server-Side BYOK Search-Aware RAG 100+ AI Models
docmd-assistant runtime demo
docmd assistant response
RAG Context: /configuration/workspaces & docmd.config.json
OpenAI gpt-4o-mini
To configure multi-workspace routing, define a top-level workspaces array inside your docmd.config.json with prefix and src properties for each project site.

How it works

A headless engine and a framework plugin, designed to work independently or together.

Headless, Use Anywhere

docmd-assistant is a standalone library with no UI opinions. Integrate it into React, Vue, Svelte, Node.js, or any JavaScript application.

DocmdAssistantEngine (ESM/CJS)

API Keys Stay on Your Server

Your AI provider credentials remain securely on the server. The browser client never holds, transmits, or exposes raw API keys.

KMS Envelope Encryption

Answers Grounded in Your Content

Before answering, the engine retrieves relevant passages from your documentation using docmd-search indices, so responses are accurate and context-aware.

RAG Search Index Binding

Works with any AI provider

Connect to cloud providers directly or route securely through a relay. Run entirely offline with local models.

Provider Supported Models Connection Mode Security Architecture
OpenAI gpt-4o, gpt-4o-mini Direct / Relay Server-side KMS Envelope Encryption
Anthropic claude-3-5-sonnet, haiku Direct / Relay Server-side KMS Envelope Encryption
Google Gemini gemini-1.5-flash, pro Direct / Relay Server-side KMS Envelope Encryption
DeepSeek & Groq deepseek-chat, llama-3.3 Direct / Relay Server-side KMS Envelope Encryption
Ollama (Local) llama3, mistral, qwen Direct Offline 100% Local / Zero Cloud

Integrate in a few lines of code

Create an engine instance, connect your search index, and start answering questions. Supports streaming, custom tools, and full conversation history.

import { DocmdAssistantEngine } from 'docmd-assistant';
import * as Search from '@docmd/plugin-search/client';

// 1. Initialise engine instance with provider configuration
const engine = new DocmdAssistantEngine({
  provider: 'openai',
  model: 'gpt-4o-mini',
  systemPrompt: 'You are a helpful software documentation assistant.',
  ragCallback: async (query) => {
    const matches = await Search.search(query, 5);
    return matches.map(m => m.chunk.text).join('\\n\\n');
  }
});

// 2. Register custom client-side execution tool
engine.registerTool({
  name: 'fetch_user_workspace',
  description: 'Retrieve active workspace configuration',
  parameters: { type: 'object', properties: { workspaceId: { type: 'string' } } },
  handler: async ({ workspaceId }) => ({ activeTheme: 'summer', mode: 'spa' })
});

// 3. Listen to real-time stream events and execute query turn
engine.on('token', (chunk) => process.stdout.write(chunk));
await engine.sendMessage('How do I set up custom navigation in docmd?');

Frequently asked questions

Common questions about docmd-assistant and the AI plugin.

How does it know the right answer?
Before querying the language model, the engine retrieves relevant passages from your documentation's search index and includes them in the prompt. This grounds every answer in your actual content.
Are my API keys safe?
Yes. API keys are decrypted and used only on the server side. The browser client never receives, stores, or transmits raw credentials.
Can it run completely offline?
Yes. By connecting to a local model provider like Ollama, the entire pipeline — search retrieval and AI response — runs on your own hardware with no external network requests.

Add an AI assistant to your docs

Open source, works with any documentation site. Set up in minutes.