Skip to content

About

Connect ontology-grounded context graphs with deterministic AI agent governance to enforce business rules before execution and preserve decision evidence.

Topics

Resources

Security policy

Stars

2.8k stars

Watchers

29 watching

Forks

Latest commit

 

History

1,561 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Pulls PyPI version License E2E Tests Discord

Playground | Self-Host | Docs | YouTube | Discord | Website

Business meaning in the graph. Business authority in the runtime.

trustgraph-ai%2Ftrustgraph | Trendshift

Open Source · Open Standards · Total Transparency


TrustGraph turns enterprise knowledge, systems, and business logic into an ontology-grounded operating graph connected to a policy runtime that governs what AI agents can do.

Agents propose actions. TrustGraph checks them against business meaning, authority, and evidence before execution. Each decision preserves the evidence and policy version behind it as queryable W3C PROV-O provenance.

Understand. Govern. Verify.

  • Understand your business: Build a connected operating graph of entities, relationships, policies, and evidence from documents and systems, using your own or domain-standard ontologies.
  • Govern agent actions: Enforce explicit rules for authority, scope, risk, uncertainty, time, and value at the point of action.
  • Verify decisions: Retain the evidence and policy versions needed to explain and reproduce each outcome.

Built on W3C RDF 1.2, OWL, SHACL, and PROV-O, TrustGraph keeps your business knowledge portable. Deploy with Docker or Kubernetes, in the cloud or on-prem, using hosted LLMs or open-weight models with the native TrustGraph inference stack.

The Problem: "Common Semantic Understanding"

To understand why AI struggles in complex use cases, consider Abbott and Costello’s classic "Who's on First?" routine.

Abbott explains the baseball lineup: Who is on first base, What is on second base, and I Don't Know is on third base. Costello is driven mad because he assumes Abbott is asking questions rather than stating the names of the players: Who, What, and I Don't Know.

Two agents cannot communicate if they do not share the same context understanding.

Why Vector Embeddings and Keyword Search Fail Here

If you feed this scenario into a standard RAG pipeline using vector embeddings or keyword search, it breaks completely.

If a user asks: "Who is playing on first base?"

  1. The vector database converts the query into an embedding.
  2. Cosine similarity searches for vectors close to "playing," "first base," and "who."
  3. Because "Who" is a common pronoun, the embedding space maps it to general inquiries about identity, not the specific name of a baseball player.
  4. The LLM retrieves irrelevant documents and hallucinates, failing to understand that "Who" is an entity (a Person), not a question.

Cosine similarity operates on fuzzy, statistical probability. It cannot distinguish between the linguistic usage of a word as a pronoun and its usage as a proper noun within a specific, localized context.

Put Ontologies in Action

An ontology defines the concepts, unique definitions, and relationships that matter in a domain. In the “Who’s on First?” example, it distinguishes a player’s name from their position, so “Who” can be the name of the player at first base without being mistaken for a question. It gives knowledge extraction and retrieval a shared understanding instead of leaving a LLM to infer entity types, definitions, and relationships from each text chunk.

TrustGraph puts that shared understanding to work. Bring an OWL ontology, build your own, or start with a domain standard. For each chunk of source text, TrustGraph retrieves the relevant part of the ontology to guide extraction, turning raw data into more consistent, ontology-enhanced knowledge. Native natural-language retrieval then makes that knowledge available to agents, with its provenance intact.

The Operating Graph

A semantic intelligence layer built using standards like RDF and OWL, establishes explicit, unambiguous semantics. It doesn't rely on "guessing" based on word proximity; it relies on defined relationships.

Here is the "Who's on First" routine modeled in RDF with an OWL ontology. By structuring data this way, the LLM knows exactly what "Who" means in this context:

@prefix : <http://trustgraph.ai/baseball#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .

# Ontology Classes
:Player a owl:Class ;
    rdfs:subClassOf owl:Thing .

:BaseballPosition a owl:Class .

# Object Properties
:playsPosition a owl:ObjectProperty ;
    rdfs:domain :Player ;
    rdfs:range :BaseballPosition .

# Data (The Context)
:Who a :Player ;
    rdfs:label "Who" .

:What a :Player ;
    rdfs:label "What" .

:IDontKnow a :Player ;
    rdfs:label "I Don't Know" .

:FirstBase a :BaseballPosition ;
    rdfs:label "First Base" .

:SecondBase a :BaseballPosition ;
    rdfs:label "Second Base" .

:ThirdBase a :BaseballPosition ;
    rdfs:label "Third Base" .

# The Explicit Relationships
:Who :playsPosition :FirstBase .
:What :playsPosition :SecondBase .
:IDontKnow :playsPosition :ThirdBase .

When an agent queries the TrustGraph operating graph, it uses SPARQL or GraphRAG to traverse these explicit paths. The agent knows that :Who is a :Player whose :playsPosition is :FirstBase. Hallucination is eliminated because context is structured, not inferred via probability.

Core Components

  • Operating Graph — An RDF 1.2‑compliant named graph system with automated natural language retrieval, semantic filtering, and reranking, so queries return grounded, contextually relevant answers rather than raw search hits.
  • Policy Enforcement — Native support for OWL ontologies, enabling formal class hierarchies, property constraints, and logical inference over your knowledge graph.
  • Agent Runtime — Bring your own agent framework and integrate via the TrustGraph API Gateway, or use the native TrustGraph Agent Runtime, which traces all agent behavior and links every decision back to its source semantic intelligence with full provenance.
  • Knowledge Lifecycle Management — Workspaces, Collections, Flows, and Knowledge Cores give you multiple independent degrees of freedom for isolating, accessing, and versioning semantic knowledge over time.
  • Knowledge Interoperability — Built on open standards (RDF 1.2, OWL, PROV-O), TrustGraph stores intelligence in interoperable serializations like Turtle that can be exported or migrated to any RDF-compliant system.
  • Unstructured Data Ingest — Converts PDF, DOCX, XLSX, PPTX, HTML, Markdown, CSVs, and images into structured semantic intelligence.
  • Full LLM Inference Stack — Connect to all major LLM provider APIs, or self-host open-weight models on Nvidia, AMD, or Intel hardware.

TrustGraph vs. Conventional Graph Systems

Dimension TrustGraph Conventional Graph Databases (e.g., Neo4j)
Primary purpose Operating graph purpose-built for AI: make knowledge unambiguous, traceable, and retrieval-ready for LLMs and agents General-purpose property graph database for transactional workloads and graph analytics
Data model RDF 1.2 named graphs (quads) with reification — statements are first-class, addressable resources enabling n-ary relationships Labeled property graph — nodes and edges with key-value properties; no native statement reification
Semantic rigor OWL ontology enforcement: typed entities and properties with formally defined meaning Schema-optional; semantics live in application code or conventions, not the data model
Provenance Built-in, standards-based (W3C PROV-O); extraction lineage, query traces, and agent behavior stored as queryable graph triples Not native; provenance must be hand-modeled as ordinary nodes/edges with no standard vocabulary
Natural language retrieval Automated NL-to-graph retrieval with semantic filtering and reranking Requires manual Cypher queries or add-on vector search with no semantic grounding
Agent integration Native Agent Runtime with full behavioral tracing linked to source intelligence, plus API Gateway for bring-your-own-framework None; agents access the graph as an external data source with no behavioral traceability
Knowledge lifecycle management Workspaces, Collections, Flows, and Knowledge Cores for isolation, access control, and versioning of semantic intelligence Database-level separation only; versioning and lifecycle management are application concerns
Unstructured data ingest Integrated pipeline converts PDF, DOCX, XLSX, PPTX, HTML, Markdown, CSV, and images into ontology-typed knowledge Not included; requires external ETL and custom extraction pipelines
LLM stack Full inference stack: all major provider APIs or self-hosted open-weight models on Nvidia, AMD, or Intel None; LLM integration is entirely external
Interoperability Open standards throughout (RDF 1.2, OWL, PROV-O); exports to Turtle portable to any RDF-compliant system Proprietary property graph model; Cypher is not a W3C standard; migration requires data transformation
Query paradigm SPARQL + semantic graph patterns with automated natural language access Cypher / GQL pattern matching requiring graph expertise

No API Keys Required

How many times have you cloned a repo and opened the .env.example to see the dozens of API keys for 3rd party dependencies needed to make the services work? There are only 3 things in TrustGraph that might need an API key:

  • 3rd party LLM services like Anthropic, Cohere, Gemini, Mistral, OpenAI, etc.
  • 3rd party OCR like Mistral OCR
  • The API key you set for the TrustGraph API gateway

Everything else is included.

Quickstart

No need to clone the repo unless you are building from source. TrustGraph deploys as a set of Docker containers. Configure it on the command line in one step:

npx @trustgraph/config

The config process will generate an app config that can be run locally with Docker, Podman, or Minikube. The process will output:

  • deploy.zip with either a docker-compose.yaml file for a Docker/Podman or resources.yaml for Kubernetes
  • Deployment instructions as INSTALLATION.md

For a browser based configuration, try the Configuration Terminal.

Watch What is an Operating Graph?

What is a Context Graph?

Watch Building Agents with Semantic Intelligence

Real Agents from context graphs with TrustGraph

Getting Started with TrustGraph

TrustGraph UI

Image

The UI provides tools for all major features of TrustGraph. The UI deploys on port 8888 by default.

  • Agent Console — Query your agents directly with streaming responses and live explainability event tracking, so you can watch reasoning unfold in real time
  • GraphRAG View — Interactive graph RAG queries with a visual explainability DAG and inline provenance display, making it easy to see exactly where answers came from
  • Context Explorer — An interactive 3D context graph explorer with dynamic graph loading, BFS neighborhood extraction, edge pulse animation, and multiple navigation views
  • Document Ingestion — A complete upload and submission workflow with page and chunk inspection and document structure browsing
  • Ontology Workbench — A full ontology editor with class and property trees, OWL/XML and Turtle import/export with round-trip fidelity, circular dependency detection, and safe-delete confirmation dialogs
  • Schema Workbench — Interactive schema management with list, create, edit, and delete operations including field and index management
  • Prompt Editor — A dedicated prompt editing workflow

TypeScript Library for UIs

There are TS libraries for quick UI integration of TrustGraph services.

Package Description
@trustgraph/trustkit Shared component library and design system
@trustgraph/client TypeScript client for TrustGraph APIs
@trustgraph/react-provider React provider for TrustGraph WebSocket connections
@trustgraph/react-state React state management hooks
@trustgraph/portal Portal application showcasing all workflows

Contributing

Developer's Guide

License

TrustGraph is licensed under Apache 2.0.

Copyright 2024-2026 TrustGraph

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Support & Community

  • Bug Reports & Feature Requests: Discord
  • Discussions & Questions: Discord
  • Documentation: Docs

About

Connect ontology-grounded context graphs with deterministic AI agent governance to enforce business rules before execution and preserve decision evidence.

Topics

Resources

Security policy

Stars

2.8k stars

Watchers

29 watching

Forks

Used by

Contributors

Languages