Installation

Install Knowledge Tree from prebuilt binaries, Docker, Helm, or source.

The fastest way to get started is with Docker Compose:

git clone https://github.com/knowledge-tree/knowledge-tree.git
cd knowledge-tree/deploy/docker
docker compose up -d

This starts PostgreSQL with AGE and pgvector, the API server, the enricher service, and the web UI. Configuration is read fromconfigs/dev.yaml.

Prebuilt Binaries

Download the latest release for your platform from GitHub Releases:

# macOS (Apple Silicon)
curl -LO https://github.com/knowledge-tree/knowledge-tree/releases/latest/download/kt-server-darwin-arm64
chmod +x kt-server-darwin-arm64

# Linux (amd64)
curl -LO https://github.com/knowledge-tree/knowledge-tree/releases/latest/download/kt-server-linux-amd64
chmod +x kt-server-linux-amd64

# Run
./kt-server-darwin-arm64 --config configs/dev.yaml

The release includes three binaries: kt-server (API server),kt-discover (CLI discovery tool), and kt-agent(interactive AI agent).

Helm Chart (Kubernetes)

helm repo add knowledge-tree https://knowledge-tree.github.io/charts
helm install knowledge-tree knowledge-tree/knowledge-tree \
  --namespace knowledge-tree --create-namespace \
  --set storage.host=postgresql \
  --set auth.enabled=true \
  --set auth.secret=$(openssl rand -hex 32)

The Helm chart supports configuring storage, auth, plugins, LLM providers, and ingress. See Helm deployment for full options.

Build from Source

git clone https://github.com/knowledge-tree/knowledge-tree.git
cd knowledge-tree
make build

Requires Go 1.22+. Builds three binaries into bin/:kt-server, kt-discover, kt-agent.

PostgreSQL Setup

Knowledge Tree requires PostgreSQL with the Apache AGE and pgvector extensions. The Docker image includes these automatically. For manual setup:

-- Install extensions
CREATE EXTENSION IF NOT EXISTS age;
CREATE EXTENSION IF NOT EXISTS vector;

-- Load AGE
LOAD 'age';
SET search_path = ag_catalog, "$user", public;

Schema migrations run automatically on server startup. No manual migration steps required.