[![PyPI version](https://img.shields.io/pypi/v/trustgraph.svg)](https://pypi.org/project/trustgraph/) ![E2E Tests](https://github.com/trustgraph-ai/trustgraph/actions/workflows/release.yaml/badge.svg) [![Discord](https://img.shields.io/discord/1251652173201149994 )](https://discord.gg/sQMwkRz5GX) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/trustgraph-ai/trustgraph) [**Website**](https://trustgraph.ai) | [**Docs**](https://docs.trustgraph.ai) | [**YouTube**](https://www.youtube.com/@TrustGraphAI?sub_confirmation=1) | [**Configuration Builder**](https://config-ui.demo.trustgraph.ai/) | [**Discord**](https://discord.gg/sQMwkRz5GX) | [**Blog**](https://blog.trustgraph.ai/subscribe) trustgraph-ai%2Ftrustgraph | Trendshift # The context backend for AI agents
Durable agent memory you can trust. Build, version, and retrieve grounded context from a context graph. - Give agents **memory** that persists across sessions and deployments. - Reduce hallucinations with **grounded context retrieval** - Ship reusable, portable [Context Cores](#context-cores) (packaged context you can move between projects/environments). The context backend: - [x] Multi-model and multimodal database system - [x] Tabular/relational, key-value - [x] Document, graph, and vectors - [x] Images, video, and audio - [x] Automated data ingest and loading - [x] Quick ingest with semantic similarity retrieval - [x] Ontology structuring for precision retrieval - [x] Out-of-the-box RAG pipelines - [x] DocumentRAG - [x] GraphRAG - [x] OntologyRAG - [x] 3D GraphViz for exploring context - [x] Fully Agentic System - [x] Single Agent - [x] Multi Agent - [x] MCP integration - [x] Run anywhere - [x] Deploy locally with Docker - [x] Deploy in cloud with Kubernetes - [x] Support for all major LLMs - [x] API support for Anthropic, Cohere, Gemini, Mistral, OpenAI, and others - [x] Model inferencing with vLLM, Ollama, TGI, LM Studio, and Llamafiles - [x] Developer friendly - [x] REST API [Docs](https://docs.trustgraph.ai/reference/apis/rest.html) - [x] Websocket API [Docs](https://docs.trustgraph.ai/reference/apis/websocket.html) - [x] Python API [Docs](https://docs.trustgraph.ai/reference/apis/python) - [x] CLI [Docs](https://docs.trustgraph.ai/reference/cli/) ## Quickstart ``` npx @trustgraph/config ``` TrustGraph downloads as Docker containers and can be run locally with Docker, Podman, or Minikube. The config tool will generate: - `deploy.zip` with either a `docker-compose.yaml` file for a Docker/Podman deploy or `resources.yaml` for Kubernetes - Deployment instructions as `INSTALLATION.md`

Table of Contents
- [**What is a Context Graph?**](#what-is-a-context-graph)
- [**Why TrustGraph?**](#why-trustgraph)
- [**Getting Started**](#getting-started-with-trustgraph)
- [**Context Cores**](#context-cores)
- [**Tech Stack**](#tech-stack)
- [**Observability & Telemetry**](#observability--telemetry)
- [**Contributing**](#contributing)
- [**License**](#license)
- [**Support & Community**](#support--community)
## What is a Context Graph? [![What is a Context Graph?](https://img.youtube.com/vi/gZjlt5WcWB4/maxresdefault.jpg)](https://www.youtube.com/watch?v=gZjlt5WcWB4) ## Why TrustGraph? [![Why TrustGraph?](https://img.youtube.com/vi/Norboj8YP2M/maxresdefault.jpg)](https://www.youtube.com/watch?v=Norboj8YP2M) ## Getting Started with TrustGraph - [**Getting Started Guides**](https://docs.trustgraph.ai/getting-started) - [**Using the Workbench**](#workbench) - [**Developer APIs and CLI**](https://docs.trustgraph.ai/reference) - [**Deployment Guides**](https://docs.trustgraph.ai/deployment) ### Watch TrustGraph 101 [![TrustGraph 101](https://img.youtube.com/vi/rWYl_yhKCng/maxresdefault.jpg)](https://www.youtube.com/watch?v=rWYl_yhKCng) ## Workbench The **Workbench** provides tools for all major features of TrustGraph. The **Workbench** is on port `8888` by default. - **Vector Search**: Search the installed knowledge bases - **Agentic, GraphRAG and LLM Chat**: Chat interface for agents, GraphRAG queries, or direct to LLMs - **Relationships**: Analyze deep relationships in the installed knowledge bases - **Graph Visualizer**: 3D GraphViz of the installed knowledge bases - **Library**: Staging area for installing knowledge bases - **Flow Classes**: Workflow preset configurations - **Flows**: Create custom workflows and adjust LLM parameters during runtime - **Knowledge Cores**: Manage resuable knowledge bases - **Prompts**: Manage and adjust prompts during runtime - **Schemas**: Define custom schemas for structured data knowledge bases - **Ontologies**: Define custom ontologies for unstructured data knowledge bases - **Agent Tools**: Define tools with collections, knowledge cores, MCP connections, and tool groups - **MCP Tools**: Connect to MCP servers ## TypeScript Library for UIs There are 3 libraries for quick UI integration of TrustGraph services. - [@trustgraph/client](https://www.npmjs.com/package/@trustgraph/client) - [@trustgraph/react-state](https://www.npmjs.com/package/@trustgraph/react-state) - [@trustgraph/react-provider](https://www.npmjs.com/package/@trustgraph/react-provider) ## Context Cores A Context Core is a **portable, versioned bundle of context** that you can ship between projects and environments, pin in production, and reuse across agents. It packages the “stuff agents need to know” (structured knowledge + embeddings + evidence + policies) into a single artifact, so you can treat context like code: build it, test it, version it, promote it, and roll it back. TrustGraph is built to support this kind of end-to-end context engineering and orchestration workflow. ### What’s inside a Context Core A Context Core typically includes: - Ontology (your domain schema) and mappings - Context Graph (entities, relationships, supporting evidence) - Embeddings / vector indexes for fast semantic entry-point lookup - Source manifests + provenance (where facts came from, when, and how they were derived) - Retrieval policies (traversal rules, freshness, authority ranking) ## Tech Stack TrustGraph provides component flexibility to optimize agent workflows.
LLM APIs
- Anthropic
- AWS Bedrock
- AzureAI
- AzureOpenAI
- Cohere
- Google AI Studio
- Google VertexAI
- Mistral
- OpenAI
LLM Orchestration
- LM Studio
- Llamafiles
- Ollama
- TGI
- vLLM
Graph Storage
- Apache Cassandra (default)
- Neo4j
- Memgraph
- FalkorDB
VectorDBs
- Qdrant (default)
- Pinecone
- Milvus
File and Object Storage
- Garage (default)
- MinIO
Observability
- Prometheus
- Grafana
Data Streaming
- Apache Pulsar
Clouds
- AWS
- Azure
- Google Cloud
- OVHcloud
- Scaleway
## Observability & Telemetry Once the platform is running, access the Grafana dashboard at: ``` http://localhost:3000 ``` Default credentials are: ``` user: admin password: admin ``` The default Grafana dashboard tracks the following:
Telemetry
- LLM Latency
- Error Rate
- Service Request Rates
- Queue Backlogs
- Chunking Histogram
- Error Source by Service
- Rate Limit Events
- CPU usage by Service
- Memory usage by Service
- Models Deployed
- Token Throughput (Tokens/second)
- Cost Throughput (Cost/second)
## Contributing [Developer's Guide](https://docs.trustgraph.ai/community/developer.html) ## License **TrustGraph** is licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0). Copyright 2024-2025 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](https://discord.gg/sQMwkRz5GX) - Discussions & Questions: [Discord](https://discord.gg/sQMwkRz5GX) - Documentation: [Docs](https://docs.trustgraph.ai/)