Custom Knowledge Graphs
Build and query runtime knowledge graphs using the Graph Query Tool and Cypher — for agent-driven graph population and retrieval.
Airia supports two approaches to knowledge graphs. This page covers Custom Knowledge Graphs — runtime graphs that agents populate and query dynamically using Cypher.
💡 Which approach should I use?
Knowledge Graph Extraction — Automatic, ingestion-time entity extraction from your documents. Entities and relationships are built during data processing. Best for RAG use cases where you want structured knowledge extracted from your data sources automatically.
Custom Knowledge Graphs (this page) — Runtime graphs that agents populate and query via the Graph Query Tool and Cypher. Best for use cases where agents capture information from conversations, external APIs, or structured workflows and store it in a graph for later retrieval.
You can use both approaches in the same project.
Create a Knowledge Graph
- Navigate to the Knowledge Graphs tab in your project
- Click the New Graph button
- Configure the graph settings:
- Scope — "Current Project" or "All Projects"
- Access — Optionally restrict to your user account
Populate the Graph
To write data into your graph, create a Graph Query Tool:
- Go to the Tools section
- Select the "Query Graph DB" tool template
- Link the tool to your Knowledge Graph
The Graphs dropdown also lists knowledge graphs generated automatically from your data sources, not just the ones you created here.
The same Graph Query DB tool serves for both writing and reading operations — it uses a shared Cypher endpoint for both capturing and querying information.
Writing Data via an Agent
Instruct your agent to capture structured information into the graph. For example, in your agent's system prompt:
When the user mentions a new customer, create a node in the knowledge graph
with the customer name, industry, and contact information.
When they mention a relationship between entities, create an edge connecting them.The agent uses the Graph Query Tool to execute Cypher CREATE and MERGE statements that populate the graph.
Query the Graph
Attach the same Graph Query Tool to any agent that needs to read from the graph. The agent can formulate Cypher queries to:
- Find specific entities:
MATCH (n:Customer {name: 'Acme'}) RETURN n - Traverse relationships:
MATCH (c:Customer)-[:PURCHASED]->(p:Product) RETURN c, p - Aggregate data:
MATCH (n) RETURN labels(n), count(n)
Inspect the Graph
To view the data in your graph:
- Navigate to Knowledge Graphs in your project
- Click See Graph Info on your graph
- Examine nodes and relationships
Best Practices
- Use descriptive node labels —
Customer,Product,Regulationare better thanNode1,Entity - Include properties on nodes — Store relevant attributes so agents can query by specific fields
- Use consistent naming — If multiple agents write to the same graph, agree on a schema
- Test Cypher queries manually before deploying in production agents
Knowledge Graph Extraction
Extract entities and relationships from your documents to build a knowledge graph that powers Graph RAG retrieval.
Vocabulary Grounding
Teach Airia your internal terminology — acronyms, codenames, product codes, role titles — so retrieval interprets queries the way your team does.