AI-powered document assistant for Outline wiki
Query, summarize, and reason over your internal documentation using RAG.
🔄 Auto-Sync with Outline — Periodically fetches documents from your Outline wiki
🔍 Semantic Search — Find relevant content using vector similarity search
💬 Chat Interface — Natural language queries with AI-powered responses
📝 Citations — Every answer includes source document references
🔒 Security — PII detection and prompt injection defense
⚡ Fast — Lightweight stack with ChromaDB and LiteLLM
- Python 3.11+
- Node.js 20+
- uv (Python package manager)
- An Outline account with API access
- An OpenAI API key (or compatible LLM provider)
git clone https://github.com/carakawedhatama/outline-llm.git
cd outline-llm
# Copy environment template
cp .env.example .envEdit .env with your credentials:
# Required: Outline API (get token from Settings → API)
OUTLINE_API_URL=https://app.getoutline.com
OUTLINE_API_TOKEN=your_outline_api_token
# Required: OpenAI
OPENAI_API_KEY=your_openai_api_key
# Optional: For production deployments with custom domain
CORS_ORIGINS=https://your-domain.com
VITE_API_URL=https://api.your-domain.commake installmake devThis starts:
- API: http://127.0.0.1:8000
- Web: http://127.0.0.1:5173
Open the web app and click "Sync Now" in the sidebar, or:
curl -X POST http://127.0.0.1:8000/api/sync/trigger| Variable | Description | Default |
|---|---|---|
OUTLINE_API_URL |
Outline instance URL | https://app.getoutline.com |
OUTLINE_API_TOKEN |
API token from Outline settings | — |
SYNC_INTERVAL_MINUTES |
Auto-sync frequency | 15 |
LLM_MODEL |
LLM model to use | gpt-4o-mini |
EMBEDDING_MODEL |
Embedding model | text-embedding-3-small |
CORS_ORIGINS |
Allowed origins (comma-separated or *) |
* |
VITE_API_URL |
API URL for frontend (cross-origin) | (empty = same-origin) |
See .env.example for all options.
┌──────────────────────────────────────────────────────────┐
│ React Frontend │
│ Chat UI + Sync Dashboard │
└─────────────────────────┬────────────────────────────────┘
│ API Calls
┌─────────────────────────▼────────────────────────────────┐
│ FastAPI Backend │
│ ┌─────────────┐ ┌──────────────┐ ┌─────────────────┐ │
│ │ Sync Service│ │ RAG Service │ │ Security Layer │ |
│ │ (APScheduler)│ │ (Retrieval) │ │ (PII/Injection)│ |
│ └──────┬──────┘ └──────┬───────┘ └─────────────────┘ |
│ │ │ │
│ ┌──────▼──────┐ ┌──────▼───────┐ │
│ │ Outline API │ │ LiteLLM │ │
│ └─────────────┘ └──────────────┘ │
└─────────────────────────┬────────────────────────────────┘
│
┌─────────────┴─────────────┐
│ │
┌──────▼──────┐ ┌──────▼──────┐
│ ChromaDB │ │ SQLite │
│ (Vectors) │ │ (Sync State)│
└─────────────┘ └─────────────┘
outline-llm/
├── apps/
│ ├── api/ # FastAPI backend
│ │ ├── src/
│ │ │ ├── models/ # Pydantic schemas
│ │ │ ├── routes/ # API endpoints
│ │ │ ├── services/ # Business logic
│ │ │ └── main.py
│ │ ├── Dockerfile
│ │ └── pyproject.toml
│ └── web/ # React frontend
│ ├── src/
│ │ ├── components/ # UI components
│ │ └── App.tsx
│ ├── Dockerfile
│ └── package.json
├── docker-compose.yml
├── Makefile
├── .env.example # ← Root env file (used by both apps)
└── README.md
make dev # Start dev servers
make install # Install dependencies
make build # Build Docker images
make up # Start Docker containers
make down # Stop Docker containers
make logs # View container logs
make test # Run all tests| Method | Endpoint | Description |
|---|---|---|
POST |
/api/chat |
Send a RAG query |
GET |
/api/sync/status |
Get sync status |
POST |
/api/sync/trigger |
Trigger manual sync |
GET |
/api/sync/documents |
List indexed documents |
GET |
/health |
Health check |
# Build and start
docker compose up -d
# View logs
docker compose logs -f
# Stop
docker compose downFor deploying with a custom domain, set these in .env:
CORS_ORIGINS=https://docs.example.com
VITE_API_URL=https://api.example.comMIT License. See LICENSE for details.
