# WeKnora

> Open-source RAG framework that turns documents into a queryable knowledge base

- Category: Retrieval & Knowledge (RAG) / RAG Frameworks & Platforms
- Language: Go
- Repository: https://github.com/Tencent/WeKnora
- Website: https://weknora.weixin.qq.com
- Canonical page: https://ai-tldr.dev/tools/weknora/

## In short

WeKnora is an open-source, LLM-powered knowledge framework from Tencent, built for understanding documents, searching them by meaning, and reasoning over the results. It is self-hostable and modular, so you can swap the language model, vector database, and storage backend to fit your setup. It sits in the RAG Frameworks & Platforms category of the Retrieval & Knowledge (RAG) tools and is open-source, written in Go.

## Overview

WeKnora is an open-source, LLM-powered knowledge framework from Tencent, built for understanding documents, searching them by meaning, and reasoning over the results. It is self-hostable and modular, so you can swap the language model, vector database, and storage backend to fit your setup.

It is organized around three core jobs. RAG-based Quick Q&A answers everyday questions over your knowledge base. A ReAct agent handles harder, multi-step tasks by orchestrating retrieval, MCP tools, and web search on its own. Wiki Mode has agents turn raw documents into a structured, interlinked Markdown knowledge base with an interactive knowledge graph.

WeKnora can pull content in from sources like Feishu, Notion, and Yuque, handles formats including PDF, Word, images, and Excel, and can serve answers through chat channels such as WeCom, Feishu, Slack, and Telegram. It works with major LLM providers including OpenAI, Anthropic (Claude), DeepSeek, Qwen, Gemini, and Ollama.

## What it does

- Three knowledge modes: RAG-based Quick Q&A, a ReAct agent that autonomously orchestrates retrieval, MCP tools, and web search, plus a Wiki Mode that auto-generates interlinked Markdown pages with a knowledge graph
- Wide model support: OpenAI, Azure OpenAI, Anthropic (Claude), DeepSeek, Qwen, Zhipu, Hunyuan, Gemini, MiniMax, NVIDIA, and Ollama, with swappable embeddings and vector databases
- Multi-format ingestion across PDF, Word, Txt, Markdown, HTML, images, CSV, Excel, PPT, and JSON, plus auto-sync from Feishu, Notion, and Yuque
- Multiple retrieval strategies including BM25 sparse search, dense retrieval, GraphRAG, parent-child chunking, and HNSW-accelerated pgvector
- Enterprise access control with tenant RBAC (Owner / Admin / Contributor / Viewer roles), per-knowledge-base ownership, and a per-tenant audit log
- Built-in Langfuse observability for tracing ReAct loops, token usage, tool calls, and the document-parsing pipeline

## Getting started

WeKnora runs through Docker Compose. You need Docker, Docker Compose, and Git installed, then clone the repo, set up the environment file, and bring up the services.

1. Clone and start the services

   Clone the repository, copy the example environment file (edit it as needed), then start the core services with Docker Compose.

```bash
git clone https://github.com/Tencent/WeKnora.git
cd WeKnora
cp .env.example .env   # Edit .env as needed
docker compose up -d   # Start core services
```

2. Open the Web UI

   Once the services are running, visit http://localhost to start. The backend API is available at http://localhost:8080.

3. Enable optional services

   Add Docker Compose profile flags to turn on extra components such as the Neo4j knowledge graph, MinIO object storage, or Langfuse tracing. Profiles can be combined.

```bash
docker compose --profile full up -d              # All features
docker compose --profile neo4j --profile minio up -d
```

4. Drive it from the CLI

   The official weknora CLI lets you log in, manage knowledge bases, upload documents, and chat straight from the terminal.

```bash
weknora auth login --host https://kb.example.com
weknora kb list
weknora doc upload notes.md
weknora chat "summarise the design doc"
```

## When to use it

- Build a private, self-hosted question-answering system over internal PDFs, Word docs, and spreadsheets, keeping all data on your own infrastructure
- Auto-generate a maintained internal wiki from scattered documents, complete with interlinked pages and a knowledge graph
- Deploy a ReAct agent that combines document retrieval, MCP tools, and web search to handle complex multi-step research questions
- Serve knowledge-base answers directly inside chat channels like WeCom, Feishu, Slack, or Telegram for team self-service
