Docs > Ontology and knowledge graph
Ontology and knowledge graph
# Ontology and knowledge graph Dex's context layer transforms fragmented messages, emails, meetings, issues, and CRM records across your tools into a structured, permissioned **knowledge graph** governed by your workspace's **ontology**. Instead of relying only on keyword search over raw documents, agents and teammates work over typed **Object records** (people, companies, deals, commitments), explicit **relationships**, and provenance-tracked **observations**—while preserving row-level permissions from the underlying tools. ```mermaid flowchart TD Sources["Connected Sources<br/>(Slack, Gmail, Calendar, GitHub, Drive,<br/>Dropbox, Notion, Chat, Lark, Attio)"] --> Datasets["Read-only Datasets<br/>(versioned source rows)"] Datasets --> Mappings["Ontology Mappings<br/>(cluster keys, field merge, activities)"] Manual["Manual Objects & Notes<br/>(UI, agents, dex zeta)"] --> Graph Mappings --> Graph["Knowledge Graph<br/>(Object records, typed links, observations)"] Graph --> Nexus["Nexus UI<br/>(Graph, Records, Views, Timeline)"] Graph --> AgentSQL["Agents & CLI<br/>(dex zeta, read-only SQL)"] ``` ## The four building blocks - **[Ontology](/context/ontology/)** — Your workspace's data model. Defines Object types, typed scalar and link fields, and declarative mappings that resolve synced Dataset rows into unified records. Stored in Factory under `workspace/ontology/objects/*.yaml` and editable in `/nexus/settings/data-model` or via `dex zeta`. - **[Knowledge graph](/context/knowledge-graph/)** — The live graph of materialized Object records (nodes), typed reference fields and shared-activity co-occurrence links (edges), and timestamped observations. Backed by per-workspace typed Postgres tables with row-level security, cell-level manual edit preservation, and safe read-only Agent SQL. - **[Nexus](/context/nexus/)** — The web workspace (`/nexus`) for exploring **Objects**, **Sources**, the interactive **Graph** (Force, Constellation, and Spatial views), **Timeline**, **Records**, and saved **Views**. - **[Sources and data scopes](/context/sources-and-scopes/)** — Controls which connected accounts sync into Datasets, where mapped records live (`personal`, `space`, or `workspace`), and how Slack/Notion channel and page permissions follow synced records. ## How this differs from knowledge files and memory - Put **living entities and activity history** (contacts, accounts, projects, deals, commitments, emails, Slack threads) in the **knowledge graph**. - Put **human-authored prose documents** (company positioning, runbooks, policies) in Factory [knowledge files](/agents/knowledge/). - Put **step-by-step agent procedures** in [skills](/agents/skills/). ## Related pages - [Ontology](/context/ontology/) - Object types, typed fields, relationships, and Dataset-to-Object mappings - [Knowledge graph](/context/knowledge-graph/) - Identity resolution, merges, manual edit preservation, and Agent SQL - [Nexus](/context/nexus/) - Graph visualizations, Records tables, and saved Views - [Records, observations, and timeline](/context/records-and-timeline/) - Provenance, manual notes, and observation sharing - [Sources and data scopes](/context/sources-and-scopes/) - Synced connectors, Data Scopes, and inherited permissionsTurn connected company sources into a structured, permissioned knowledge graph governed by a declarative ontology and explored through Nexus and SQL.
Dex’s context layer transforms fragmented messages, emails, meetings, issues, and CRM records across your tools into a structured, permissioned knowledge graph governed by your workspace’s ontology.
Instead of relying only on keyword search over raw documents, agents and teammates work over typed Object records (people, companies, deals, commitments), explicit relationships, and provenance-tracked observations—while preserving row-level permissions from the underlying tools.
flowchart TD Sources["Connected Sources<br/>(Slack, Gmail, Calendar, GitHub, Drive,<br/>Dropbox, Notion, Chat, Lark, Attio)"] --> Datasets["Read-only Datasets<br/>(versioned source rows)"] Datasets --> Mappings["Ontology Mappings<br/>(cluster keys, field merge, activities)"] Manual["Manual Objects & Notes<br/>(UI, agents, dex zeta)"] --> Graph Mappings --> Graph["Knowledge Graph<br/>(Object records, typed links, observations)"] Graph --> Nexus["Nexus UI<br/>(Graph, Records, Views, Timeline)"] Graph --> AgentSQL["Agents & CLI<br/>(dex zeta, read-only SQL)"]
The four building blocks
Section titled “The four building blocks”- Ontology — Your workspace’s data model. Defines Object types, typed scalar and link fields, and declarative mappings that resolve synced Dataset rows into unified records. Stored in Factory under
workspace/ontology/objects/*.yamland editable in/nexus/settings/data-modelor viadex zeta. - Knowledge graph — The live graph of materialized Object records (nodes), typed reference fields and shared-activity co-occurrence links (edges), and timestamped observations. Backed by per-workspace typed Postgres tables with row-level security, cell-level manual edit preservation, and safe read-only Agent SQL.
- Nexus — The web workspace (
/nexus) for exploring Objects, Sources, the interactive Graph (Force, Constellation, and Spatial views), Timeline, Records, and saved Views. - Sources and data scopes — Controls which connected accounts sync into Datasets, where mapped records live (
personal,space, orworkspace), and how Slack/Notion channel and page permissions follow synced records.
How this differs from knowledge files and memory
Section titled “How this differs from knowledge files and memory”- Put living entities and activity history (contacts, accounts, projects, deals, commitments, emails, Slack threads) in the knowledge graph.
- Put human-authored prose documents (company positioning, runbooks, policies) in Factory knowledge files.
- Put step-by-step agent procedures in skills.
Related pages
Section titled “Related pages”- Ontology - Object types, typed fields, relationships, and Dataset-to-Object mappings
- Knowledge graph - Identity resolution, merges, manual edit preservation, and Agent SQL
- Nexus - Graph visualizations, Records tables, and saved Views
- Records, observations, and timeline - Provenance, manual notes, and observation sharing
- Sources and data scopes - Synced connectors, Data Scopes, and inherited permissions