docmd-assistantv0.1.20 162k+ installs

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
Zero UI Dependencies Hardware KMS Security AST Index Grounding Local Ollama & Cloud
How do I run docmd-assistant completely offline with a local model?
⌘I
Searching "offline local model" in docs...

Configure DocmdAssistantEngine to connect directly to your local Ollama instance. Both embeddings and responses compute locally with zero cloud API keys or telemetry.

TYPESCRIPT
import { DocmdAssistantEngine } from 'docmd-assistant';

const engine = new DocmdAssistantEngine({
  provider: 'ollama',
  model: 'llama3.2',
  baseUrl: 'http://localhost:11434'
});

How it works

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

Headless, Framework-Agnostic Core

docmd-assistant is a standalone engine with zero UI dependencies. Import into React, Vue, Svelte, Node.js, or vanilla JavaScript.

Server-Side BYOK & Hardware KMS

Provider credentials never touch the browser. API keys stay securely encrypted with hardware KMS envelopes on your server or relay.

Grounded AST & Search RAG

Queries your site's pre-compiled @docmd/plugin-search vector and lexical index before querying the model, eliminating hallucinations.

100% Offline with Local Models

Seamlessly connect to local Ollama (llama3, mistral, qwen) for air-gapped, zero-cloud operations.

Works with 100+ AI providers and bespoke endpoints

Powered by the AIPlug universal transport runtime. Connect directly to frontier cloud models, route via Cloud Relay, run completely offline on local hardware, or dispatch to bespoke enterprise APIs with zero vendor lock-in.

docmd assistant orchestrates connections via AIPlug (@memoryblock/aiplug), a lightweight runtime unifying 100+ providers and bespoke API endpoints under a single standard protocol.
Explore AIPlug on GitHub →
Provider Supported Models Connection Mode Security Architecture
OpenAI gpt-4o, gpt-4o-mini, o1, o3-mini Direct / Relay Hardware KMS Secure
Anthropic claude-3-7-sonnet, haiku Direct / Relay Hardware KMS Secure
Google Gemini gemini-2.0-flash, pro Direct / Relay Hardware KMS Secure
DeepSeek & Groq deepseek-chat, deepseek-r1, llama-3.3 Direct / Relay Hardware KMS Secure
Ollama (Local) llama3.3, mistral, qwen2.5, phi-4 Direct Offline 100% Local / Zero Cloud
Bespoke & Enterprise APIs vLLM, LocalAI, internal OpenAI-compatible relays, custom models Custom Base URL Zero Telemetry / On-Premise
100+ via AIPlug Runtime Mistral, Cohere, Bedrock, Together AI, Azure OpenAI, OpenRouter AIPlug Unified Transport Unified BYOK & KMS Secure

Free docmd Cloud Relay for static docs

Deploying on GitHub Pages, Cloudflare Pages, Netlify, or Vercel? Enable AI documentation assistance with zero server setup.

01

Connect Your Domain

Sign in to cloud.docmd.io with GitHub and associate your documentation domain name.

02

Save Encrypted BYOK Key

Store your OpenAI, Anthropic, or Gemini API key. Encrypted at rest via hardware KMS envelopes.

03

Paste Project ID in Config

Add projectId to docmd.config.json. The client connects securely via domain-verified sessions.

Zero Backend Infrastructure
Domain Whitelisting & Abuse Guard
Hardware KMS Envelope Encryption
100% Free for Open Source
Launch Cloud Relay Console →

Integrate in a few lines of code

Choose between the zero-config framework plugin, the headless TypeScript engine, or extensible tool execution.

docmd.config.json

JSON

Zero-config framework plugin. Enable the floating AI assistant and link Cloud Relay directly in your project configuration.

assistant-engine.ts

TypeScript

Headless engine for Node.js and modern runtimes. Initialise Anthropic, OpenAI, or Ollama and stream token deltas directly.

register-tools.ts

TypeScript

Extensible tool execution. Register custom functions, documentation navigation, or server-side domain lookups.

docmd.config.json
// 1. Drop into docmd.config.json — zero server maintenance
{
  "plugins": {
    "search": { "indexBody": true },
    "ai": {
      "assistant": true,
      "projectId": "docmd_aiv77jc8ms8qtpvd",
      "position": "bottom-center",
      "greeting": "How can I help with these docs today?"
    }
  }
}
import { DocmdAssistantEngine } from 'docmd-assistant';

// Initialise headless engine with any provider or custom gateway
const assistant = new DocmdAssistantEngine({
  provider: 'anthropic',
  model: 'claude-3-5-haiku-20241022',
  apiKey: process.env.ANTHROPIC_API_KEY,
  systemPrompt: 'You are an expert technical guide for our documentation.'
});

// Subscribe to streaming response deltas
assistant.on('chunk', (event) => process.stdout.write(event.data));

const response = await assistant.sendMessage('How do I configure custom plugins?');
console.log(response.message);
import { DocmdAssistantEngine, createStandardTools } from 'docmd-assistant';

// Connect via Cloud Relay with zero API key exposure on clients
const assistant = new DocmdAssistantEngine({
  projectId: 'docmd_aiv77jc8ms8qtpvd',
  endpoint: 'https://api.docmd.io/v1/ai/chat'
});

// Register built-in search & navigation tools
for (const tool of createStandardTools()) {
  assistant.registerTool(tool);
}

// Register custom domain tool (executed securely on server)
assistant.registerTool({
  name: 'lookup_account',
  description: 'Retrieve user account plan details',
  execute: async ({ email }) => ({ plan: 'enterprise', active: true })
});

Frequently asked questions

Common questions about docmd-assistant, security, and the AI plugin.

How does the assistant ground answers in my docs?
Before querying the language model, the engine retrieves relevant passages from your documentation's pre-compiled search index and includes them in the prompt. Every response cites the exact documentation file it used.
How does docmd Cloud Relay keep my API keys secure?
Your provider API keys are encrypted with AWS KMS hardware envelope encryption at rest. The relay decrypts keys only in memory during the request lifecycle, enforces domain whitelisting, and never transmits credentials to the browser.
Can I run the assistant completely offline?
Yes. By connecting to local Ollama (e.g. http://localhost:11434), the entire pipeline – vector search retrieval and LLM response generation – runs 100% offline on your own hardware with zero cloud calls.
Does docmd retain user questions or documentation data?
No. docmd operates on a zero-retention policy. Questions and answers are streamed transiently and never stored, logged, or used for model training.

Add an AI assistant to your docs

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