AnchorAI
AnchorAI Docs
← AnchorAI main site Contact
Technical documentation

AnchorAI installation & operations guide

On-premises document intelligence for SharePoint using local Ollama models. Indexes libraries, answers questions, summarizes, and compares — all without sending data off your network.

Overview

AnchorAI runs entirely on your infrastructure:

  • FastAPI service handles SharePoint ingest and query/summarize/compare routes.
  • Ollama provides local LLM + embeddings.
  • Chroma stores vectors locally.
  • SPFx components surface results inside SharePoint.
  • Admin UI at /admin for management.

Core flow: Ingest documents → store embeddings → query with permission checks → LLM generates response.

Architecture

SharePoint (on-premises) ├─ SPFx Chat web part └─ Library commands ───────────────┐ │ X-API-Key ▼ AnchorAI API (your server) ├─ Ingest from SharePoint ├─ Chroma vector store └─ Ollama (local LLM/embeddings)

High-level flow:

  • Ingest (admin): Pulls documents, chunks, embeds into Chroma.
  • Query/Summarize/Compare (users): SPFx sends request → permission check → retrieve chunks → Ollama generates answer.

SPFx loads config from SiteAssets/anchorai-config.txt.

Requirements

  • SharePoint Server SE or 2019 (modern libraries).
  • Service account with read access to target sites/libraries (NTLM).
  • App Catalog + App Management Service in the farm.
  • Python 3.10+ server for the API.
  • Ollama running locally or on the network with a suitable model.
  • Modern browser access from SharePoint clients to the API host.

Deployment

  1. Install the AnchorAI API on a server you control (see below).
  2. Upload the provided anchorai-chat.sppkg to the SharePoint App Catalog and add it to sites.
  3. Place anchorai-config.txt in each site's Site Assets (configure API URL and key).
  4. Run ingest via the Admin UI or API.
  5. Add the chat web part and use library toolbar actions.

anchorai-config.txt (example)

{
  "apiUrl": "http://your-api-server:8000",
  "apiKey": "your-ANCHORAI_API_KEY",
  "locale": "en"
}

API install (core)

Clone or copy the project, create venv, pip install -e ., copy and edit config.json + .env, then anchorai serve.

Use systemd (Linux) or a service manager (Windows) for production. Set up a reverse proxy for HTTPS if SharePoint uses it.

Ingestion

Use admin interfaca to configure your sources, ingest content and track the vector store.

Run POST /ingest-sharepoint (admin key) to pull and index libraries defined in config.json.

Key options: ?force=true to reindex everything, ?incremental=false.

Check status with GET /ingest/status. Use the Admin UI for convenience.

Only successfully ingested files (with chunks in Chroma) can be used for chat/summarize/compare. Failed files return 404 on query.

Using the features

  • Chat: Add the web part or use library toolbar → /query.
  • Summarize: Select one file → /documents/summarize.
  • Compare: Select 2–5 files → /documents/compare.

Responses include sources. Live SharePoint permission checks (service account only for ingest).

Configuration

config.json

Copy config.example.json and edit key values:

{
  "locale": "en",
  "sharepoint": {
    "domain": "CORP",
    "username": "svc-anchorai",
    "password_env": "SP_PASSWORD"
  },
  "sources": [ ... ]
}

Key .env variables

  • ANCHORAI_API_KEY — For SPFx queries.
  • ANCHORAI_ADMIN_API_KEY — For ingest and admin.
  • CORS_ORIGINS — Your SharePoint URLs.
  • OLLAMA_BASE_URL, OLLAMA_LLM_MODEL.

Admin UI

Available at /admin. Requires admin key in the top bar for protected actions.

  • View health and auth status.
  • Trigger and monitor ingest.
  • Manage sources in config.json.
  • See failed files.

Troubleshooting

  • 401 on queries: Check apiKey in SiteAssets config matches ANCHORAI_API_KEY. Re-deploy SPFx if needed.
  • 401 on ingest/admin: Use the admin key.
  • Empty answers: Run ingest first. Verify Ollama is running and models are pulled.
  • 404 on summarize/compare: File not successfully ingested.
  • Swedish not working: Use a model that handle Swedish well and remember to set locale sv in the config file.
  • SPFx can't reach API: Check CORS, mixed content, config.txt URL.

2026 Goda Vindar AB Questions: anchorai@godavindar.se