For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Knowledge Graph

Use the Harness CLI to explore the Knowledge Graph schema and run HQL (Harness Query Language) queries against your Harness entity graph at runtime.

The Knowledge Graph exposes the Harness entity graph schema and provides HQL (Harness Query Language), a graph query language for querying entities and their relationships at runtime.


Before you begin


Explore the schema

List all entity types in the knowledge graph:

harness list kg:type
harness get kg:type platform:project

Discover which types support queries and how they relate to each other:

harness list kg:queryable_type
harness list kg:related_type platform:project
harness list kg:connection platform:project

Here is the platform:project serves as the <type_id>.


Run HQL queries

HQL lets you traverse the entity graph and retrieve structured results from your Harness account.

Run a query:

Validate a query without executing it:

Get a step-by-step explanation of how the query engine will process a query:

Print the full HQL grammar reference:

Run harness execute hql:grammar to see the complete HQL syntax, supported entity types, field names, and filter operators.


Next steps

Last updated

Was this helpful?