Cognik
A self-hosted knowledge base where an AI agent not only answers questions over retrieval-augmented generation but also searches the web, fetches pages and writes newly found knowledge back into the index automatically.
Cognik answers questions using a hybrid retrieval pipeline combining BM25 keyword search, pgvector vector search, reciprocal rank fusion, cross-encoder reranking and a sufficiency check, built from scratch without LangChain. When retrieval finds a gap, the agent searches the web, fetches pages, extracts knowledge and publishes it into the pipeline automatically, with semantic deduplication to prevent redundant entries, so the next question can retrieve the newly captured knowledge.
A six-stage context-compression pipeline keeps context usage bounded and circuit-breaker protected. A ticket workflow automatically opens review tickets when an upload or metadata gap needs a human decision, and a memory system keeps per-session and global memory with cross-session review.
The stack is Go with Gin and GORM on the backend, PostgreSQL with pgvector for storage, and a Next.js, React and TypeScript frontend; deployment is via Docker Compose. Access control uses JWT and role-based permissions, and the system can run against a local llama.cpp inference backend.