Introduction

Welcome to Lumen — the embeddable AI assistant that reads your website, learns from your documents, and answers customer questions instantly.

Lumen combines four things in one platform:

New here? Start with the Quick start guide — you can have Lumen running on your site in under 10 minutes.

Quick start

Get Lumen live on your website in four steps.

1. Create your account

Sign up at app.lumen.ai. Your 14-day trial starts immediately — no credit card required.

2. Create a workspace

A workspace is your isolated AI tenant. Each workspace has its own knowledge base, chat history, and API keys.

3. Add knowledge

Connect your data sources from the dashboard:

4. Embed the widget

Copy this code into your site's <body>:

<div id="lumen-widget" data-tenant="your-workspace-id"></div>
<script type="module" src="https://cdn.lumen.ai/widget.es.js"></script>

That's it. Your AI assistant is live.

Core concepts

Workspaces

A workspace is a fully-isolated tenant. Each workspace has:

Agentic RAG

Lumen doesn't just match keywords. The AI agent decides which retrieval tool to use:

The agent can chain up to 4 tool calls before answering. This means accurate answers with sources, not hallucinations.

Live context

Push real-time data from your page into the AI's context — current user, cart contents, page state. The bot answers using what's currently on screen, no server-side polling needed.

Embed code

The simplest embed:

<div id="lumen-widget" data-tenant="your-workspace-id"></div>
<script type="module" src="https://cdn.lumen.ai/widget.es.js"></script>

With full configuration:

<div id="lumen-widget"
     data-tenant="your-workspace-id"
     data-config='{"botName":"Aria","color":"#0891b2","theme":"auto"}'
     data-context='{"page":"pricing","plan":"pro"}'>
</div>
<script type="module" src="https://cdn.lumen.ai/widget.es.js"></script>

Configuration

Configure the widget via data-config JSON:

OptionTypeDefaultDescription
botNamestring"Lumen"Display name of the bot
taglinestring"AI assistant"Tagline shown under bot name
colorhex"#0891b2"Primary brand color
themestring"auto""light", "dark", or "auto"
suggestionsstring[]3 defaultsQuick-start question buttons
streamingbooleantrueUse SSE streaming responses
startOpenbooleanfalseOpen widget on page load

Theming

The widget auto-detects your site's theme by watching for .dark class on <html> or <body>. You can also force a theme:

data-config='{"theme":"dark"}'

JavaScript API

Control the widget programmatically via window.Lumen:

Lumen.ask(question)

Open the widget and send a question:

document.getElementById('help-btn').addEventListener('click', () => {
    Lumen.ask('How do I reset my password?');
});

Lumen.updateContext(data)

Push live data into the AI's context:

Lumen.updateContext({
    user: { name: "Sarah", plan: "Pro" },
    cart: { items: 3, total: "$142" }
});

Live context

Live context is what makes Lumen powerful for dynamic sites. The bot answers using whatever data is currently on the page.

Stocks / dashboard example

setInterval(() => {
    Lumen.updateContext({
        prices: { AAPL: 189.45, TSLA: 248.12 },
        marketStatus: "OPEN"
    });
}, 5000);

Now ask the bot: "What's Apple trading at?" — it answers from the page's data.

Web crawling

Lumen's crawler handles modern websites including JavaScript-rendered SPAs.

Starting a crawl

From the dashboard, navigate to Web Crawling, paste your URL, choose page count (5–100), and click Start. The crawler:

  1. Reads robots.txt and respects directives
  2. Fetches sitemap.xml if available
  3. Falls back to crawling links from your homepage
  4. For each page: extracts text, summarizes, chunks, embeds, stores in Qdrant

Re-crawling

Crawl the same URL again to refresh content. Lumen deduplicates by content hash — only changed pages are re-indexed.

File ingestion

Upload documents from the Files page in your dashboard. Drag-and-drop or click to browse.

Supported formats

FormatExtensionsMax size
PDF.pdf20 MB
Word.docx20 MB
CSV.csv20 MB
JSON.json20 MB
HTML.html, .htm20 MB
Markdown.md20 MB
Text.txt20 MB

Authentication

API requests use one of two methods:

API key header

x-api-key: lumen_pk_a1b2c3d4...

Chat API

Send messages and receive AI responses.

POST /api/chat

POST /api/chat
Headers: { "x-api-key": "lumen_pk_..." }
Body: {
  "message": "What is your refund policy?",
  "context": { "page": "pricing" }
}

Response:
{
  "answer": "We offer a 30-day money-back guarantee...",
  "sources": [{ "url": "/refund-policy", "title": "Refund Policy" }],
  "tools_used": ["search_knowledge_base"]
}

POST /api/chat/stream

Same as /chat but streams tokens via Server-Sent Events.

Crawl API

POST /api/crawl

POST /api/crawl
Body: {
  "url": "https://example.com",
  "maxPages": 50,
  "usePuppeteer": true
}

Response: { "jobId": "abc-123" }

GET /api/crawl/jobs/:jobId

Poll job status: pending → running → done | failed

Files API

POST /api/files/upload

Upload a file via multipart/form-data.

GET /api/files

List uploaded files for the workspace.

DELETE /api/files/:id

Delete a file and remove its vectors.

Rate limits

Per-IP rate limits across the platform:

EndpointLimit
POST /api/chat30 / minute
POST /api/crawl5 / 10 minutes
POST /api/files/upload10 / minute
All endpoints300 / 15 minutes
Plan limits are checked monthly per workspace and are separate from per-IP rate limits. See pricing for plan details.

Error codes

CodeMeaning
400Bad request — missing or invalid parameters
401Invalid or missing API key
403Forbidden — insufficient permissions
404Resource not found
409Conflict — duplicate file or workspace
422Unprocessable — content extraction failed
429Rate limit exceeded
500Server error
503AI service unavailable

Need help? Email support@lumen.ai or visit our homepage.