Self-host Utopia
Bitemporal knowledge graph with ontology-driven RAG
- Stars
- 8 692
- Port
- 1516 (Web UI and API served by the Utopia app container)
- Requires
- PostgreSQL with pgvector
ghcr.io/deeplethe/utopiaWhat is Utopia?
Utopia is an open-source knowledge foundation for enterprises from DeepLethe, pitched as an "enterprise world model" rather than just another vector store. Time and ontology sit in its base layer: every stored fact notes the period it held and the document it came from, and a correction seals off the earlier statement instead of erasing it, leaving the graph with two parallel timelines (bitemporal). Ingest accepts PDFs, Word, PowerPoint, spreadsheets, Markdown, HTML and plain text; scans and pictures go to MinerU or a vision model from Volcengine Ark, and recordings are transcribed with speaker labels. Scheduled connectors bring in web pages, RSS feeds, S3-compatible buckets, plus Jira, Notion, GitHub and WebDAV sources. Retrieval fuses Tantivy full-text with pgvector embeddings through RRF; chat answers stream with clickable citations, and model endpoints only need to be OpenAI-compatible (DeepSeek, Qwen, GLM, Ollama, vLLM), which makes fully offline, air-gapped operation possible. A built-in agent lets you converse with the whole system, and an MCP server exposes its read-only tools to frameworks like Claude Desktop and Cursor. New bases start from bundled ontology packs (the W3C Org, FOAF, PROV-O, IOF Core and schema.org sets); axioms compile into forward-chaining derivation rules that stay off by default, while doubtful or clashing extractions land in a human review queue. Mounted external databases — Postgres, MySQL, ClickHouse, Trino, Databricks or Snowflake — can be queried in chat alongside the documents. Bases carry owner/admin/editor/viewer roles, and every confirm, merge or rebuild is logged in an append-only decision ledger. Self-hosting means one Docker Compose stack: a single Rust binary plus a Postgres container with pgvector, with the web UI on port 1516. Caveats: the project is still v0.1, migrations roll forward only with no rollback, published images target linux/amd64 and linux/arm64, and decision replay/reasoning remains on the roadmap.
Utopia alternatives
GaiaNet NodeOpen-source, self-hosted GaiaNet node: pick any Hugging Face LLM, add a RAG knowledge base, serve an OpenAI-compatible API and web chat UI.CompareGaiaNet Node with Utopia
Deep Research Web UISelf-hosted AI agent generates cited reports via web searches, browsing real sources, and verifying evidence. Supports many AI providers and search APIs via Docker.CompareDeep Research Web UI with Utopia
memgraphSelf-hosted, open-source in-memory graph database with Cypher, vector indexes and the MAGE algorithm library for GraphRAG and real-time graph analytics.Comparememgraph with Utopia
Open ResponsesA self-hosted, open-source server implementing the OpenAI Responses API specification with support for multiple LLM providers and the Agents SDK.CompareOpen Responses with Utopia
Personal External Brain Knowledge GraphSelf-hosted, open-source personal knowledge graph for notes, web pages, PDFs, audio/video with topic-isolated recall and source citations — refuses ungrounded answers.ComparePersonal External Brain Knowledge Graph with Utopia
supermemorySelf-hosted AI memory and context server: Supermemory Local extracts facts, builds user profiles, and blends RAG with memory search through one API on port 6767.Comparesupermemory with Utopia
databendSelf-hosted, open-source data warehouse in Rust for large-scale analytics plus vector and full-text search, with Python UDF sandboxes and git-like data branching.Comparedatabend with Utopia
yantrikdb-serverSelf-hosted memory DB for AI agents with recall, graph, contradiction detection, decay. Embedded lib, MCP server, or replicated cluster.Compareyantrikdb-server with Utopia
Should you self-host Utopia?
Utopia scores 62/100 on selfhost.directory (how scoring works) and ranks #11 of 42 in Knowledge Management. It has 8 692 GitHub stars, +94 in the last 30 days.
There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.
Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Rust.
Its closest alternative on selfhost.directory is Project N.O.M.A.D. (86/100, 42 688 stars). It scores higher overall, so compare the two before you pick. See Utopia vs Project N.O.M.A.D. side by side.
Features
- Agentic RAG
- Bitemporal knowledge graph
- Chat with inline citations
- Conflict Detection
- Document Ingestion
- Entity Resolution
- Hybrid full-text and vector search
- MCP Server
- Ontology-driven database querying
- Ontology packs
- Review Queue
- Roles and append-only decision ledger
- Rule-based derivation from ontology axiomsDerivation is off by default.
- Scheduled source sync
- Web UI with console, graph browser and ontology workbench
Utopia README
The enterprise world model built by DeepLethe. It is the first open substrate for knowledge engineering that learns passively and governs itself. Where a knowledge graph or a vector store works to hold present knowledge, Utopia puts time awareness and ontology in the base layer: the knowledge system evolves as material arrives, and conflict detection, reasoning and decision making all run against that ontology. It deploys offline, so a company can stand up a knowledge foundation, a decision core its agents can trust, and a compliance audit trail on hardware it controls.
Please note: we would rather this project were not framed as an open-source take on Palantir. It is a different route to enterprise intelligence, built bottom up from knowledge governance to trustworthy decisions and simulation.
Utopia.Bitemporal.graph.and.Derivation.mp4
We gave it a somewhat romantic name, Utopia. Ptolemy's geocentric model was taken for truth for a very long time, then falsified step by step by Copernicus, Kepler, Galileo and Newton. Looking back, what we keep is not only that heliocentrism turned out to be right; it is how that history unfolded.
Where existing vector stores and knowledge graphs work to get present knowledge right, one of Utopia's founding aims is to record the whole course of changing understanding. Engineered, that becomes a bitemporal knowledge graph. When a decision is reviewed later, the system can produce the full course it took and the grounds it rested on. To make this hold up in practice we have iterated at length against public corpora spanning enterprise records, education, finance, law and research. Temporality is only one facet; for how knowledge is taken in, how the future is reasoned about, and how logic bounds action, see utopia.bi/philosophy.
What Utopia is for, in the shape of the question someone brings. Each is available today unless it says otherwise; each needs a chat model configured, and each leaves the doubtful cases to a person in Review.
| Who and what | Input | Question, and what comes back | What the base adds over search or RAG |
|---|---|---|---|
| A contract chain. Legal or procurement, a master agreement amended several times. | The agreement and its amendments, as PDF or Word. | Which payment terms applied on 15 March 2024, and who were the parties? The terms in force on that date, the amendment they came from, the sentence. | Each fact carries when it held and where it was said; a later amendment closes the earlier term instead of overwriting it. The contracts corpus is this scenario, with the questions it has to answer. |
| Who held what, when. HR, finance or research records that change: handovers, corrections, restatements. | Announcements, minutes, filings, dated as they were written. | Who led project X in Q2 2023, and what did we believe about it at the time? The holder for that period, and separately what the base knew then. | Two clocks: when something was true, and when the base learned it. A correction links to what it replaced. The temporal QA bench measures this. |
| An agent that reads the base. Engineering or operations teams with Claude Desktop, Cursor or their own agent. | An existing base; the agent connects over MCP with a token scoped to it. | Facts about this entity as of a date; the path between two things; what changed last week. Structured answers with stable identifiers and evidence; anything the agent wants to record goes to a person first. | Reads are typed and dated, not passages; writes are proposals. The MCP guide lists the tools. |
| Observations from a system. Robotics, monitoring, security tooling: a system that already knows what it saw and when. | One push per observation, in the extraction contract itself, with the observation's time. New in rc7. | Where was this object at 08:05, and where is it now? The value that held at that moment and the observation it rests on. | No model between the system and the graph; a functional attribute closes its earlier value when a later observation arrives. The walkthrough runs this end to end with curl. |
The walkthrough is the shortest way to see the whole path: sample data, ingestion, a question, the answer with its evidence, and what the base does not do.
One Rust binary and one Postgres. Full-text search is embedded in the binary, vectors go in pgvector, and the job queue is a table: nothing else to run.
| A complete application | A system console, a graph browser and an ontology workbench in one web UI. A product, not a library: install it and it works. |
| Knowledge ingest | Upload PDF, DOCX, PPTX, XLSX, XLS, ODS, CSV, TSV, Markdown, HTML or plain text, with legacy encodings detected on the way in. Scans and images are read by a MinerU service or a Volcengine Ark vision model, recordings by a transcription model that labels speakers. Web pages, RSS, GitHub, Jira, Notion, WebDAV and S3-compatible buckets sync on a schedule; everything else comes in through the API. |
| Search and chat | Full-text on Tantivy, vectors on pgvector, fused with RRF. Answers stream with inline citations that open the passage they came from. Any OpenAI-compatible endpoint works (DeepSeek, Qwen, GLM, Ollama, vLLM), so the whole system can run air-gapped. |
| Agent harness and agentic RAG | The whole system can be driven through conversation. The built-in agent searches documents, walks the graph (an entity's facts as of any date, or what changed in a period) and queries a mounted database. The same read-only tools are exposed over MCP. |
| Agents over MCP | An MCP server for every knowledge base, so Claude Desktop, Cursor, Workbuddy and other agent frameworks can connect, with fine-grained permissions. |
| Ontology and cold start | A new knowledge base has no vocabulary of its own; it starts from the packs you pick at creation. Five ship inside the binary: schema.org, W3C Org, PROV-O, FOAF and IOF Core (ask for your industry). Terms outside the packs are counted as they appear; confirm the common ones and they join the ontology. |
| Bitemporal graph | Extraction turns documents into entities and facts, following an ontology you can edit. Every fact carries when it held and where it came from. Correcting a fact closes the old version and links the new one to it rather than overwriting, so the graph keeps two timelines: when something was true in the world, and when the system came to believe it. Edges are reified, so an edge carries attributes of its own. |
| Entity resolution and review | Duplicates are resolved in three stages: exact name or alias, embedding similarity, then a model's call on the doubtful pairs. Every merge can be undone. Uncertain cases go to a review queue: low-confidence extractions, suspected duplicates and cardinality conflicts. |
| Agent adjudication | The agent adjudicates on its own, from common sense and the business documents. Low-confidence calls go to the human review queue, and the decisions people make there are recorded and used to tune the agent, closing the loop. |
| Reasoning and derivation | Ontology axioms compile into rules: transitivity, symmetry, inverses and relation hierarchy derive new facts by forward chaining. Derivation is off by default, since a wrong axiom derives wrong facts. A derived fact is marked as such on the graph, carries validity and confidence like any other, and shows what it was derived from. When it contradicts an asserted fact, the asserted one stands. |
| Conflict detection | Three kinds of conflict, three sets of choices. A new fact that clashes with an older one: close the old, keep both, or reject the new. Data that breaks an axiom (self-loop, asymmetry, transitive cycle, cardinality): retract the fact, relax the axiom, or accept both. The ontology itself is checked first, because violations of a self-contradictory ontology are noise. |
| Ontology-driven querying | Mount a database on a base (Postgres, MySQL and the engines that speak its protocol, ClickHouse, Trino for Iceberg / Delta Lake / Hive, Databricks, Snowflake) and chat can query it alongside the documents. The agent proposes how its tables map onto the ontology, and you confirm. The method behind it, Ontology2SQL, is state of the art on BIRD Mini-Dev for SQLite and PostgreSQL (submission). |
| Multi-user and permissions | Each knowledge base has its own members and roles: owner, admin, editor and viewer. Open bases are readable by everyone in the deployment, restricted ones only by invitation. The first account registered becomes the system administrator. |
| Decision ledger | Confirming or rejecting a fact, merging or reverting an entity, rebuilding the graph: each leaves a record of who, when, and what the object looked like at the time. The ledger is append-only, and a record outlives its object, even the base it belonged to. |
| Decision intelligence (in development) | Record a decision, replay both what was understood and the course it took, and reason over overlaid scenarios. |
Requirements: Docker (local development also needs Rust 1.85+, Node 20+, pnpm).
The prebuilt image is published for linux/amd64 and linux/arm64, so it runs natively on x86-64 hosts as well as Apple Silicon and AWS Graviton. Tags up to 0.1.0-rc7 are amd64 only.
Start from the prebuilt image:
git clone https://github.com/deeplethe/utopia.git
cd utopia
docker compose --profile app up -dOpen http://localhost:1516 and register. The first account automatically becomes the administrator, and a public knowledge base readable by everyone is created at the same time. Before extracting business documents, configure the model endpoints (chat and embedding) under Administration → Models.
The database password (UTOPIA_DB_PASSWORD in .env, default utopia) is applied when the data volume is first initialised. To change it on a running deployment, change it in the database as well — docker compose exec db psql -U utopia -c "ALTER USER utopia PASSWORD '<new password>'" — or start over with docker compose --profile app down -v, which deletes all data.
Or build from source:
docker compose -f docker-compose.yml -f docker-compose.build.yml --profile app up -d --build
# 1. Postgres with pgvector docker compose up -d db # 2. Backend on :1516, runs migrations on startup cargo run -p utopia-server # 3. Frontend on :5173, proxying /api to the backend cd web && pnpm install && pnpm dev
- Decision reasoning: constraint computation, and replaying a decision after the fact
- Business rules: rules written by people over an entity's attribute facts, a threshold or a category set, that classify it as a derived fact with the rule and the premises as its explanation (#277)
- Execution gate: checking an agent's calls against ontology rules and symbolic logic
- MaxCompute: mapping exploration and Ontology2SQL over Alibaba Cloud MaxCompute (Iceberg / Delta Lake via Trino, Databricks and Snowflake are in, awaiting a run against a real cluster)
- More sources: a Feishu connector
- Agent memory over MCP: episode writes, the retrieve endpoint, and the MCP server
- Enterprise: OIDC SSO, backup and restore commands, benchmarks at 100k documents
Utopia is still at v0.1. The database schema evolves between versions and migrations only roll forward, with no rollback. Pin a specific version with UTOPIA_IMAGE in production, and back up the database along with the data directory before upgrading.
Please read SECURITY.md before exposing it to the public internet.
- 💬 Discussions: discuss the project, share your experience, and leave feedback
- 🐛 Issues: report bugs, ask design questions, and submit feature requests
- 🤝 Contributing: development setup, pre-push checks, and DCO sign-off
- 🔌 Ontology2SQL: the ontology-driven text-to-SQL method referenced above
More in Knowledge Management
UVdesk HelpdeskOpen-source service desk for support teams: email-to-ticket mailboxes, workflows, saved replies, knowledgebase. Self-hosted via Composer, Docker or an AWS image.
UwaziUwazi is a self-hosted, open-source document management platform for human rights defenders to collect, organize, analyze, and publish document collections.
WackoWikiWackoWiki is a light and handy Wiki-engine.
WeKnoraTencent's open-source knowledge framework for teams: self-hosted RAG Q&A with citations, agents with sandboxed skills, and auto-generated wikis on swappable LLMs.
WikiDocs📗 Just a databaseless markdown flat-file wiki
Wiki-GoOpen-source, self-hosted flat-file wiki in Go with Markdown editing, full-text search, version history, access rules, comments and kanban boards. No database needed.
Wiki.jsWiki.js is a self-hosted, open-source wiki engine with a live-preview markdown editor, two-way Git sync and OIDC/LDAP/SAML sign-in, running on Node.js plus PostgreSQL.
wiki-serverA self-hosted, open-source Federated Wiki server in Node.js that enables collaborative writing across distributed wiki instances with plugin extensibility.- WiKissWiKiss is a lightweight, self-hosted wiki engine designed for simplicity and ease of deployment, requiring only PHP and no external database.
WorldLoomSelf-hosted offline worldbuilding and storywriting app with rich-text articles, maps, manuscripts, timelines, and HTML export. Node.js, file-based storage, no database.
XWikiSelf-hosted, open-source enterprise wiki written in Java: WYSIWYG editing, semantic annotations, advanced permissions, structured data and in-page server-side macros.
yeswikiYesWiki is a self-hosted, open-source PHP wiki for collaborative sites with drag-and-drop forms, maps, calendars, and directory views.

0 comments