One Open Source Project a Day (No. 220): WeKnora — Tencent's Enterprise Knowledge Framework, From RAG Q&A to a Self-Evolving Wiki

WeKnora is Tencent's open-source LLM knowledge framework, combining fast RAG Q&A, multi-step ReAct agent reasoning, and a Wiki mode that auto-generates an interlinked knowledge base. Supports 20+ LLM providers, 10+ document formats, and enterprise-grade multi-workspace RBAC — it's the core technology behind the WeChat Dialog Open Platform. 25.4k Stars, MIT License.

·10 min read·AI Engineering

Introduction

"A document shouldn't just be retrievable — it should be understood, organized, and continuously maintained."

This is the 220th article in the "One Open Source Project a Day" series. Today's project is WeKnora.

Most enterprise knowledge base products today still stop at the standard RAG pipeline: upload a document → vectorize it → similarity search → stuff results into a prompt. That pipeline handles simple questions fine, but falls apart when the task requires multi-step reasoning, synthesis across multiple documents, or something like "figure out what this document actually says and organize it into something I can browse like an encyclopedia."

WeKnora is Tencent's answer to that gap. It isn't another RAG framework — it stacks three capabilities together: fast Q&A via RAG, autonomous multi-step reasoning via a ReAct agent that orchestrates tools on its own, and long-term knowledge accumulation via a Wiki mode that auto-generates an interlinked knowledge graph. It's the core technology framework behind the WeChat Dialog Open Platform, meaning it's already been through a round of real enterprise deployment.

25.4k Stars, MIT License, Go backend.

What You Will Learn

  • WeKnora's three core capabilities: RAG Q&A, ReAct agent, and Wiki mode
  • The modular pipeline architecture: document parsing → vectorization → retrieval → inference
  • The design behind its cross-session long-term memory mechanism
  • What the 29 tools in its official MCP Server can do
  • Enterprise deployment considerations: multi-workspace RBAC, security encryption, observability

Prerequisites

  • Basic understanding of RAG (Retrieval-Augmented Generation)
  • Familiarity with Agent tool-calling and the MCP protocol
  • Optional: knowledge of vector databases (pgvector/Milvus, etc.)

Project Background

What It Is

WeKnora's official positioning: "an open-source, LLM-powered knowledge framework built for enterprise-grade document understanding, semantic retrieval, and autonomous reasoning."

The core problem it's solving: turning scattered documents into a queryable, reasoning-capable, continuously evolving knowledge asset. Those three adjectives map directly to its three capabilities — queryable (RAG), reasoning-capable (ReAct agent), continuously evolving (Wiki mode's self-maintaining version control).

Team and Background

  • Organization: Tencent
  • Website: weknora.weixin.qq.com
  • Related product: Core technology framework of the WeChat Dialog Open Platform
  • License: MIT License

Project Stats

  • ⭐ GitHub Stars: 25,400+
  • 🍴 Forks: 3,500+
  • 👀 Watchers: 118
  • 📦 Current version: 0.8.0
  • 💻 Primary language: Go (backend)
  • 📄 License: MIT

What It Does

The Problem It Solves

Traditional enterprise knowledge base (pure RAG):
  Upload document → chunk → vectorize → similarity search → prompt stuffing → answer
  ↑ Handles "what does this document say about X" fine
  ↑ Struggles with "synthesize a trend analysis across three documents"
  ↑ The knowledge base never organizes itself — it stays a pile of raw documents forever
 
WeKnora (three-in-one):
  Simple query   → RAG fast Q&A (low latency, good enough)
  Complex task   → ReAct agent
                   ├── decides autonomously whether to retrieve
                   ├── calls MCP tools / web search / sandboxed code execution
                   └── returns a synthesized answer after multi-step reasoning
  Long-term      → Wiki mode
                   ├── agent distills raw documents into an interlinked Markdown knowledge base
                   ├── generates an interactive knowledge graph
                   └── supports manual editing, version history, and one-click rollback

Use Cases

  1. Enterprise internal knowledge Q&A

    • Centralize employee handbooks, product docs, and technical specs; employees query directly via WeCom/Feishu
  2. Customer service / pre-sales auto-response

    • Connect IM channels (Slack/Telegram/WeCom), turn product documentation into an auto-answering knowledge base
  3. Automating complex research tasks

    • The ReAct agent calls web search + internal document retrieval + code sandbox to complete multi-step "research → analyze → produce a report" tasks
  4. Continuous knowledge asset maintenance

    • Wiki mode lets the document knowledge base self-update and interlink like an encyclopedia, instead of staying a pile of isolated PDFs
  5. Zero-code Q&A deployment

    • Through the WeChat Dialog Open Platform, non-technical staff can configure a working knowledge Q&A system

Quick Start

# Prerequisites: Docker, Docker Compose, Git
 
git clone https://github.com/Tencent/WeKnora.git
cd WeKnora
cp .env.example .env
docker compose pull
docker compose up -d
 
# Visit http://localhost after startup

Optional feature modules (Profiles):

# Enable knowledge graph (Neo4j)
docker compose --profile neo4j up -d
 
# Enable object storage (MinIO)
docker compose --profile minio up -d
 
# Enable observability tracing (Langfuse)
docker compose --profile langfuse up -d
 
# Enable all features
docker compose --profile full up -d

If using a local Ollama model, run ollama serve first. To upgrade, set WEKNORA_VERSION in .env, then run docker compose pull && docker compose up -d.

Core Features

1. Three Core Capabilities

CapabilityBest ForKey Mechanism
RAG fast Q&AEveryday simple queriesVector retrieval + direct generation
ReAct agentComplex multi-step tasksAutonomous orchestration of retrieval/tools/sandbox/search
Wiki modeLong-term knowledge accumulationAuto-distillation + interlinking + version control

2. Cross-Session Long-Term Memory

Unlike most Q&A systems that start from zero every conversation, WeKnora maintains memory across sessions along several dimensions:

  • Profile: user identity and background
  • Preferences: historical choice patterns
  • Facts: specific facts confirmed during conversation
  • Tasks: multi-turn tasks being tracked
  • Interests: topic areas the user cares about

3. Official MCP Server: 29 Tools

WeKnora ships an official MCP Server that exposes its own capabilities as standard MCP tools, letting Claude Code, Cursor, and other AI tools call WeKnora's knowledge base functions directly — retrieval, writing, Wiki editing, all reachable via MCP.

4. Multi-Source Data Ingestion

Source TypeSpecific Support
Enterprise collaboration toolsFeishu, Tencent IMA, DingTalk Docs, Yuque
Dev platformsGitLab
General platformsNotion, RSS
Document formatsPDF, Word, images, Excel, XMind, and 10+ other formats

5. 20+ LLM Provider Support

Covers major international providers (OpenAI, Azure OpenAI, Anthropic Claude, Gemini) and major Chinese providers (DeepSeek, Qwen, Zhipu, Hunyuan), plus LiteLLM and Ollama as unified access layers.

6. Enterprise Security and Permissions

  • Multi-workspace RBAC: four-tier role matrix with fine-grained permission control
  • Encryption: AES-256-GCM data encryption
  • Transport security: gRPC TLS
  • SSRF protection: guards against server-side request forgery
  • Scoped API keys: limit the access range of any given key

A Deeper Look

The Modular Pipeline Architecture

WeKnora's architecture emphasizes that every stage is swappable:

Document Parsing
   ↓ parsers for PDF / Word / Excel / images / XMind and more
Vectorization
   ↓ supports multiple embedding models
Retrieval
   ↓ supports PostgreSQL(pgvector) / Elasticsearch / OpenSearch / Milvus / Weaviate / Qdrant
LLM Inference
   ↓ supports 20+ LLM providers, unified through LiteLLM

The benefit of this design: enterprises can swap in whatever infrastructure they already have. Teams already using Milvus don't need to migrate their vector store; teams with a privately deployed model can plug it in directly. This is also the technical foundation of the "data sovereignty" promise — the entire pipeline can run in a closed loop entirely within a private environment, with no data ever needing to leave the corporate network.

The Design Logic Behind RAG, ReAct, and Wiki

Why not build one "universal" mode instead of splitting into three?

Pure RAG mode's limitation:
  Retrieve → prompt → generate
  ↑ Low latency, low cost, but weak reasoning
  ↑ Good for "does this document mention X"-type questions
 
Pure Agent mode's problem:
  Every query walks the full reasoning chain
  ↑ Even simple questions trigger multi-round tool calls — high latency, high cost
  ↑ Users perceive the system as "slower"
 
WeKnora's layered design:
  Simple query   → straight to RAG (fast)
  Complex query  → escalates to ReAct (accurate)
  Knowledge accumulation → runs asynchronously via Wiki mode (doesn't affect real-time Q&A)

This "escalate complexity on demand" design is fundamentally a dynamic trade-off between latency/cost and capability — not every question needs agent-level reasoning.

Wiki Mode: From a Pile of Documents to a Self-Maintaining Knowledge Base

Wiki mode is WeKnora's most distinctive capability. Most RAG systems treat documents as raw material for retrieval — once retrieval is done, the documents themselves never change.

WeKnora's Wiki mode flips this: the agent actively reads raw documents, distills them into structured Markdown pages, and interlinks those pages into a Wikipedia-like knowledge network. That network:

  • Has an interactive knowledge graph visualization
  • Supports manual editing (what the agent generates isn't final — it's a draft)
  • Has complete version history (Git-like diff comparison)
  • Supports one-click rollback to any historical version

This solves a common RAG pain point: when raw documents are low-quality (disorganized structure, duplicated information, stale content mixed with current), what gets retrieved is also low-quality. Wiki mode essentially has the AI do a round of "document cleanup" first, so subsequent Q&A is built on organized knowledge rather than raw mess.

How It Compares to Similar Projects

DimensionLangChain + Custom RAGDifyRAGFlowWeKnora
Out-of-the-box❌ Requires heavy custom dev
ReAct agentMust build yourselfLimitedLimited✅ Native
Self-maintaining Wiki knowledge base
Cross-session long-term memoryMust implement yourselfLimited
Official MCP ServerPartial✅ 29 tools
Enterprise RBACMust implement yourselfYesLimited✅ Four-tier roles
Chinese LLM ecosystem supportMust integrate yourselfAverageAverage✅ Native coverage

WeKnora's differentiation lies in its native Wiki mode and ReAct agent integration, plus native support for the Chinese LLM ecosystem (DeepSeek, Qwen, Hunyuan) and Chinese enterprise collaboration tools (Feishu, DingTalk, WeCom) — a clear advantage for deployment in Chinese enterprises.


Official Resources

  • Model Context Protocol — The standard protocol underlying WeKnora's official MCP Server
  • Langfuse — The observability/tracing tool WeKnora integrates with
  • pgvector — One of WeKnora's supported vector retrieval backends

Summary

Key Takeaways

  1. A three-in-one capability matrix: RAG for simple queries, a ReAct agent for complex tasks, Wiki mode for long-term knowledge — escalating complexity on demand
  2. Wiki mode is the standout feature: distilling raw documents into a self-maintaining, rollback-capable, interlinked knowledge base, rather than leaving documents permanently "raw"
  3. A modular pipeline: every stage — parsing, vectorization, retrieval, inference — is swappable to fit existing enterprise infrastructure
  4. An official MCP Server: 29 tools that let Claude Code and other AI tools call WeKnora's capabilities directly
  5. Native support for the Chinese ecosystem: DeepSeek/Qwen/Hunyuan plus Feishu/DingTalk/WeCom — deeply localized

Who This Is For

  • Enterprise IT / knowledge management teams: need to turn scattered documents into a maintainable knowledge asset, not just "something searchable"
  • Developers building for the Chinese AI ecosystem: need a knowledge framework with native support for domestic LLMs and enterprise collaboration tools
  • Teams building complex agent applications: need ReAct-level multi-step reasoning rather than settling for plain RAG
  • Organizations prioritizing data sovereignty: the entire pipeline can be deployed privately with no data leaving the internal network

One-Line Verdict

WeKnora is trying to solve this: a knowledge base shouldn't just be a pile of retrievable documents — it should be a living knowledge system that organizes itself, reasons, and keeps evolving.


Check out PrimeSkills — a curated marketplace of AI agents and skills that have been validated in real-world, enterprise-grade workflows. No fluff, just what actually works.

Find more useful knowledge and interesting products on my Homepage