Get Started
Quickstart
From an empty machine to chatting with an ingested codebase, in six steps.
1. Start Ollama and pull the models
bash
ollama serve # if not already running
ollama pull nomic-embed-text # embeddings — REQUIRED before ingestion
ollama pull qwen2.5-coder # chat / generation
ollama pull qwen2.5-coder:3b # descriptor model — REQUIRED before ingestionOllama must be up before you run the pipeline — Weaviate calls it to embed each chunk, and
POST /instances/pipeline rejects the request with 400 if the descriptor model isn't pulled.2. Start Weaviate and Postgres
bash
docker compose up -dThis brings up both Weaviate (vector storage) and Postgres (conversation and job history).
3. Configure the environment
Create a .env in the project root:
dotenv
DATABASE_URL=postgresql://dokkai:dokkai@localhost:5432/dokkai
WEAVIATE_HOST=localhost
COLLECTION_NAME=CodeEntity
# Embeddings (Ollama)
VECTORIZER_PROVIDER=ollama
EMBED_MODEL=nomic-embed-text
OLLAMA_EMBED_ENDPOINT=http://host.docker.internal:11434
# Chat LLM (Ollama)
OLLAMA_BASE_URL=http://localhost:11434
OLLAMA_CHAT_MODEL=qwen2.5-coder:latest
# Descriptions (required for ingestion)
DESC_MODEL=qwen2.5-coder:3b
DESC_CONCURRENCY=44. Run the API
bash
./dev.sh # serves on http://localhost:8000
PORT=9000 ./dev.sh # custom portFirst boot seeds an
admin/admin user. Log in and change that password before exposing the API beyond your own machine — see Authentication.5. Ingest a repository
Every route below / is authenticated — grab a bearer token first:
bash
TOKEN=$(curl -s -X POST localhost:8000/auth/login -H 'Content-Type: application/json' \
-d '{"username":"admin","password":"admin"}' | python3 -c 'import sys,json;print(json.load(sys.stdin)["token"])')
curl -X POST localhost:8000/instances/pipeline \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"repo_path":"/absolute/path/to/your/repo"}'This runs the full pipeline: graph extraction → chunking → descriptions → embedding. The project_name is taken from the repo's top-level folder name.
6. Chat with the codebase
bash
curl -N -X POST localhost:8000/chat \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{"message":"how does a request move through the system?","project_name":"your-repo","audience":"developer"}'Prefer a coding agent? Skip curl entirely and wire Dokkai into Claude Code or Codex — see the MCP Server and CLI sections.