WeKnora Documentation

Comprehensive documentation for WeKnora, covering installation, configuration, usage, and advanced features.

Table of Contents

Installation & Setup

WeKnora can be installed using Docker Compose for the easiest setup experience.

System Requirements

Quick Installation

# Clone repository git clone https://github.com/Tencent/WeKnora cd WeKnora # Start all services ./scripts/start_all.sh

For detailed installation instructions, see our Getting Started Guide.

Configuration

WeKnora can be configured through the Web UI or configuration files.

Web UI Configuration

The recommended way to configure WeKnora is through the Web UI:

  1. Access the Web UI at http://localhost
  2. Create or select a knowledge base
  3. Navigate to the configuration page
  4. Configure models, prompts, and retrieval settings

Model Configuration

You can configure different models for various tasks:

Environment Variables

Key environment variables can be set in .env file:

# API Configuration API_PORT=8080 API_KEY_PREFIX=sk # Database DB_HOST=postgres DB_PORT=5432 DB_NAME=weknora DB_USER=weknora DB_PASSWORD=your_password # Vector Database VECTOR_DB_URL=your_vector_db_url

Document Parsing

WeKnora supports parsing documents in various formats and extracting structured information.

Supported Formats

Parsing Features

Upload Methods

Retrieval Configuration

Configure how WeKnora retrieves relevant information from your knowledge bases.

Retrieval Strategies

Retrieval Parameters

Reranking

Reranking improves retrieval precision by reordering results based on relevance:

Agent Mode Configuration

Agent mode enables ReACT (Reasoning and Acting) agents that can use tools and reason through problems.

Enabling Agent Mode

  1. Navigate to conversation settings
  2. Select "Agent Mode" in the conversation interface
  3. Configure agent model and tools
  4. Enable/disable web search as needed

Agent Tools

Agent Behavior

Knowledge Graph Configuration

Enable knowledge graph generation to visualize relationships between document sections.

Enabling Knowledge Graphs

  1. Navigate to knowledge base settings
  2. Enable "Knowledge Graph" feature
  3. Configure relationship extraction parameters
  4. Process documents to generate graph

Graph Features

Graph Visualization

The knowledge graph provides:

MCP Server Configuration

Configure WeKnora to work as an MCP (Model Context Protocol) server.

Installation

pip install weknora-mcp-server

Configuration

Set environment variables:

export WEKNORA_API_KEY="your_api_key" export WEKNORA_BASE_URL="http://localhost:8080/api/v1"

Running the Server

python -m weknora-mcp-server

Client Configuration

Configure your MCP client to connect to WeKnora:

{ "mcpServers": { "weknora": { "args": ["path/to/run_server.py"], "command": "python", "env": { "WEKNORA_API_KEY": "your_key", "WEKNORA_BASE_URL": "http://localhost:8080/api/v1" } } } }

Development Environment

Set up a development environment for contributing to WeKnora or customizing it for your needs.

Fast Development Mode

Use development mode to avoid rebuilding Docker images:

# Start infrastructure make dev-start # Start backend (new terminal) make dev-app # Start frontend (new terminal) make dev-frontend

Development Advantages

Project Structure

WeKnora/ ├── client/ # Go client library ├── cmd/ # Main entry points ├── config/ # Configuration files ├── docker/ # Docker images ├── docreader/ # Document parsing app ├── docs/ # Documentation ├── frontend/ # Vue.js frontend ├── internal/ # Core business logic ├── mcp-server/ # MCP server ├── migrations/ # Database migrations └── scripts/ # Shell scripts

Building from Source

# Backend cd cmd/app go build # Frontend cd frontend npm install npm run build

Production Deployment

Deploy WeKnora to production environments using Docker or Kubernetes.

Docker Compose Deployment

For single-server deployments:

docker-compose up -d

Kubernetes Deployment

WeKnora includes Helm charts for Kubernetes:

# Install using Helm helm install weknora ./helm

Production Considerations

Troubleshooting

Common issues and their solutions.

Services Won't Start

Document Processing Fails

Retrieval Issues

API Errors

Additional Resources

View API Reference See Examples