INFEREN Documentation
This documentation describes how to use and operate INFEREN (Admin UI + AI Chat), plus a practical API reference for the endpoints those UIs use.
It is written for two audiences:
- Admins / Operators: manage knowledge bases and monitor the system.
- Developers: configure environments, understand URL/base-path rules, and troubleshoot UI/API behavior.
Note: Superadmin-only tools exist, but the primary focus here is the standard Admin experience.
Quick Links
- Getting started:
/docs/getting-started - Knowledge bases:
/docs/knowledge-bases - AI chat:
/docs/chat - Dashboard:
/docs/dashboard - Sessions:
/docs/sessions - Tracing:
/docs/tracing - API reference:
/docs/api
System Overview
INFEREN is composed of:
- Backend (FastAPI): HTML pages,
/staticassets, and JSON APIs for admin + public chat. - Frontend (Jinja templates + JS): Admin UI, Chat UI, and Docs UI.
- Storage: a database (for configs, sessions, traces, documents) and a vector store (for retrieval), depending on your deployment.
Core Concepts (Glossary)
Knowledge Base (KB)
A knowledge base is a named collection of content that can be searched and used to answer chat queries.
Document
A document is a single ingested source inside a KB (commonly a URL, but may also be an uploaded file). Documents are chunked and indexed.
Scraping / Extraction
The process of fetching a source and extracting text/content in a structured way.
Indexing
The process of chunking extracted content and producing embeddings so retrieval can find relevant chunks.
Session
A conversation thread containing user messages and assistant messages. Sessions power “continue the conversation” behavior.
Trace
A deeper diagnostic record of a pipeline execution (query, retrieved chunks, scoring, timing, and other debug metadata).
URL & Base Path Rules (Very Important)
This project uses two different “bases”:
- Navigation & static assets must be same-origin:
- Internal page links should be root-relative:
/admin/...,/ai-chat/...,/docs/... -
Static assets should be root-relative:
/static/... -
API calls may use
window.API_BASE_URL: - JavaScript uses
window.API_BASE_URLto build API fetch URLs (for examplefetch(${API_BASE_URL}/api/...)).
Why it matters
If templates build links like {{ API_BASE_URL }}/admin/... and your API_BASE_URL points to a different origin/port than the UI, clicking a sidebar item becomes a cross-origin navigation. That typically causes:
- slower perceived navigation (full reload + asset re-download)
- confusing auth/cookie behavior
- different browser storage scopes (localStorage/sessionStorage)
Recommended rule:
- Use
/admin/...and/static/...in templates. - Use
window.API_BASE_URLonly for APIfetch()calls.