User Guides
Step-by-step guides for every role — from platform admins to students.
Getting Started
Welcome to InfoLens! This guide will have you running your first RAG query in under 5 minutes.
First, make sure Docker is installed and running. Clone the repository, copy the .env.example file to .env, and add your Gemini API key. Then run docker compose --profile postgres -f compose.yaml up -d from the docker/ directory. Wait about 30 seconds for all services to start.
Open http://localhost:24001 in your browser and sign in with the default admin credentials. Navigate to Documents, upload a PDF or text file, and wait for ingestion to complete (status should show "success"). Then go to Chat, type a question about your document, and see the AI generate an answer with source citations.
Agents are the core building block of InfoLens. Each agent is an AI-powered assistant that answers questions using a specific set of document collections.
To create your first agent, navigate to the Agents page and click "New Agent." Give it a name and description, then select which document collections it should have access to. The description helps the AI generate a better system prompt -- you can also write your own or use the "Generate with AI" button.
Once created, go to the agent's detail page to configure its behavior (temperature, model, max tokens), set up API keys, and grab the embed code. Paste the embed snippet into any website to deploy a chat widget that answers questions from your documents.
Administrator Guides
InfoLens supports a wide range of document formats: PDF, TXT, DOCX, HTML, CSV, JSON, PPTX, XLSX, and Markdown. Files are automatically chunked into semantic segments and embedded using the configured embedding model.
To upload documents, navigate to the Documents page and click "Upload" or drag and drop files directly. You can upload multiple files at once. Each file goes through ingestion: parsing, chunking, embedding, and optional summarization.
For best results, use well-structured documents with clear headings and paragraphs. Large files are supported up to the tenant's configured upload size limit. Check the document's status on the Documents page -- it should show "success" once ingestion is complete.
The InfoLens widget is a lightweight JavaScript snippet that adds an AI-powered chat interface to any website. It works on static HTML sites, WordPress, Shopify, React apps, and any platform that allows custom scripts.
To get the embed code, open your agent's detail page and go to the "Embed & SDK" tab. You will find a ready-to-copy HTML snippet that includes your agent's API key and configuration. Paste it just before the closing tag of your website.
The widget supports customization: change the welcome message, placeholder text, colors, and position. For advanced use cases, you can use the TypeScript or Python SDK to build a fully custom chat interface.
Each agent in InfoLens can be fine-tuned through its configuration panel. The key settings include the system prompt (which defines the agent's personality and behavior), temperature (controls creativity vs. precision), model selection, and max tokens.
The system prompt is the most important configuration. It tells the AI how to behave, what tone to use, and what boundaries to respect. Use the "Generate with AI" button to create a starting prompt based on the agent's description, then refine it manually.
Rate limits can be set per agent to control daily and monthly usage. Access levels determine whether the widget is public or requires authentication. All changes take effect immediately after saving.
InfoLens uses a dynamic RBAC (Role-Based Access Control) system powered by Casbin. The permission model includes 14 resources and 35 permissions, covering everything from document management to agent configuration.
As an admin, you can invite users to your tenant and assign them roles. Default roles include owner, admin, teacher, student, and auditor. Each comes with a pre-configured set of permissions. You can also create custom roles with any combination of permissions to match your organization's needs.
To manage users, go to Admin > Users. To configure roles, go to Admin > Roles. Changes to roles take effect immediately for all users with that role. The owner and admin roles are protected system roles that cannot be deleted.
Content Creator Guides
InfoLens integrates with virtually any website or platform. The simplest method is the embed widget -- a single script tag that adds a chat interface to your site.
For WordPress: install a plugin like "Insert Headers and Footers" or use your theme's custom script area. Paste the embed code snippet there. For Shopify: go to Online Store > Themes > Edit code, and add the snippet to your theme.liquid file before .
For React/Next.js applications, use the @infolens/sdk TypeScript package for deeper integration. It provides typed client methods for all API operations, so you can build custom search interfaces, chat components, or document management features directly into your application.
InfoLens supports two authentication methods: JWT bearer tokens and API keys. Both work across all API endpoints.
To get a JWT token, sign in with the passwordless email flow: send a POST request to /v1/users/login/otp/request with your email, then POST /v1/users/login/otp/verify with the 6-digit code that arrives by email. The response includes an access_token that you include in the Authorization header as "Bearer {token}". Tokens expire after the configured TTL. Google and GitHub OAuth sign-in is also available when configured — discover the enabled methods via GET /v1/users/auth/methods.
API keys are ideal for server-to-server integrations and the MCP server. Generate one from your profile page or via the API at /v1/users/{id}/api-keys. Include the key in the Authorization header as "Bearer {api-key}". API keys are scoped to your user's permissions and tenant.
InfoLens can ingest content directly from web pages. To scrape a website, use the document upload API with a URL instead of a file. The system will fetch the page content, extract the text, chunk it, and generate embeddings -- just like any other document.
For bulk scraping, you can provide multiple URLs via the API. Each URL becomes a separate document in your collection. The scraper handles HTML content extraction, removing navigation, footers, and other boilerplate.
Note that web scraping respects robots.txt and requires the target site to be accessible from your server. For authenticated or JavaScript-rendered pages, consider using a headless browser to export the content first, then upload the resulting HTML or text files.
InfoLens includes several features to support GDPR and data privacy compliance. The multi-tenant architecture ensures complete data isolation between organizations, so no tenant can access another's data.
The audit log (Admin > Audit) tracks all significant actions: user creation, role changes, document uploads, and settings modifications. This provides a clear trail for compliance audits. Each log entry includes the action, actor, resource, and timestamp.
For data retention, configure limits per tenant via Admin > Settings. You can set maximum document counts, user limits, and storage caps. To handle data deletion requests (right to erasure), admins can delete individual documents, users, or entire tenants. All associated data, chunks, and embeddings are permanently removed.