First Steps
Get started with your TrustGraph deployment and perform your first knowledge extraction and Graph RAG queries.
Prerequisites
This guide assumes you have TrustGraph already deployed using one of the installation methods. If you haven’t deployed TrustGraph yet, start with the Installation Guide.
Install TrustGraph CLI
First, install the TrustGraph command-line interface in a Python virtual environment:
python3 -m venv env
source env/bin/activate # On Windows: env\Scripts\activate
pip install trustgraph-cli
Note: Keep this virtual environment activated for all TrustGraph CLI commands.
Verify TrustGraph Installation
Check Container Status
After deployment, it may take a while to pull all necessary components. Verify that TrustGraph processors have started:
tg-show-processor-state
Processors start quickly, but Pulsar and Cassandra can take up to 60 seconds to initialize.
If you’re using Docker Compose, check that containers are running:
docker ps
Any containers that have exited unexpectedly can be found with:
docker ps -a
Important: Allow the system to stabilize for 120 seconds before proceeding. Services may appear “stuck” if they didn’t have time to initialize correctly.
Verify Complete Startup
Check that all main services are running:
tg-show-flows
You should see a default flow. If you see an error, wait a moment and try again.
Load Sample Documents
Load some sample documents to get started:
tg-load-sample-documents
Access TrustGraph Interfaces
Web Workbench
Access the TrustGraph web interface at http://localhost:8888/
Verify the workbench is working:
- Prompts page: Check that you can see system prompts
- Library page: Verify you can see the sample documents you just loaded
Monitoring with Grafana
Access Grafana monitoring at http://localhost:3000/
- Login: admin / admin
- Dashboard: Select the TrustGraph dashboard
- Skip password change or set a new password
After loading documents, you should see the processing backlog rise to a few hundred document chunks.
Process Your First Document
Load a Document via Workbench
- Go to the Library page in the workbench
- Select a document (“Beyond State Vigilance” is a good starting document)
- Click on the document to select it
- Click Submit in the action bar at the bottom
- Select a processing flow (use the default)
- Click Submit to start processing
Monitor Processing
Watch the processing progress in Grafana. You should see the backlog rise as the document is chunked and processed.
Verify Knowledge Graph Creation
Check that the knowledge graph is successfully parsing data:
tg-show-graph
The output should show semantic triples in N-Triples format:
<http://trustgraph.ai/e/enterprise> <http://trustgraph.ai/e/was-carried> "to altitude and released for a gliding approach" .
<http://trustgraph.ai/e/enterprise> <http://www.w3.org/2000/01/rdf-schema#label> "Enterprise" .
<http://trustgraph.ai/e/enterprise> <http://www.w3.org/2004/02/skos/core#definition> "A prototype space shuttle orbiter used for atmospheric flight testing" .
Explore Your Knowledge
Vector Search
- In the workbench, click the Vector Search tab
- Search for a term (e.g., “state”)
- Review the search results
- Click on results to explore the knowledge graph
- Use Graph View to visualize relationships
Graph RAG Queries
- In the workbench, click the Graph RAG tab
- Enter a question about your document:
What is this document about?
- Review the contextual response generated using your knowledge graph
CLI Graph RAG
You can also run Graph RAG queries from the command line:
tg-invoke-graph-rag "What are the main topics covered in the loaded documents?"
Shut Down TrustGraph
When you’re finished, properly shut down TrustGraph:
For Docker Compose:
docker-compose down -v -t 0
Verify cleanup:
# Check no containers are running
docker ps
# Check volumes are removed
docker volume ls
Next Steps
Now that you’ve successfully:
- ✅ Verified your TrustGraph installation
- ✅ Loaded and processed documents
- ✅ Created knowledge graphs
- ✅ Performed Graph RAG queries
Continue learning:
- Core Concepts: Understand TrustGraph architecture
- Deployment Options: Explore production deployments
- API Reference: Learn about TrustGraph APIs