Skip to main content

Type

contextual_awareness

Database

Neo4j Context Graph
Purpose: The Contextual Awareness skill enables agents to query your organization’s context graph, discovering entities, relationships, and insights from all connected integrations.

Common Use Cases

Discovering Azure resourcesFind VMs, storage accounts, resource groups, and their relationships

Understanding Slack relationshipsQuery channels, users, messages, and team structure

Querying organizational structureExplore teams, projects, and reporting relationships

Finding integration connectionsDiscover how systems and resources connect across your infrastructure

What is the Context Graph?

The Context Graph is a living knowledge base that automatically captures relationships between all entities across your integrations:
Nodes representing resources:
  • Users, Teams, Projects
  • Cloud Resources (VMs, Databases, Networks)
  • Communication channels (Slack, Email)
  • Code repositories and commits
  • Incidents, tickets, alerts
Edges connecting entities:
  • MANAGES, MEMBER_OF, OWNS
  • DEPENDS_ON, CONNECTED_TO
  • DEPLOYED_IN, RUNS_ON
Metadata on entities:
  • Names, IDs, timestamps
  • Status, health, configuration
  • Costs, tags, labels

Configuration

Example Configuration:
{
  "predefined_nodes": ["VirtualMachine", "Database", "Service"],
  "predefined_relationships": ["DEPENDS_ON", "CONNECTED_TO"],
  "allowed_integrations": ["Azure", "Slack"],
  "max_results": 100,
  "enable_caching": true
}
ParameterTypeDefaultDescription
predefined_nodesarray[]Allowed entity types
predefined_relationshipsarray[]Allowed relationship types
allow_dynamic_searchbooleanfalseAllow freeform queries
allowed_integrationsarray[]Limit to specific integrations
max_resultsnumber100Maximum results per query
query_timeoutnumber30Query timeout in seconds
enable_cachingbooleantrueCache frequently accessed data
cache_ttlnumber300Cache time-to-live (seconds)

Quick Start

# Create skill
kubiya skill create --name "Infrastructure Explorer" --type contextual_awareness --enabled

# Associate with agent
kubiya skill associate agent <agent-id> <skill-id>

View Complete Examples

See full Cypher query examples, team structure queries, and incident analysis patterns

Query Examples

Finding Resources

Natural Language:
"Show me all Azure VMs in the production environment"
Cypher Query:
MATCH (vm:VirtualMachine)-[:DEPLOYED_IN]->(env:Environment {name: 'production'})
WHERE vm.provider = 'Azure'
RETURN vm

Exploring Relationships

Natural Language:
"What services depend on the user-database?"
Cypher Query:
MATCH (db:Database {name: 'user-database'})<-[:DEPENDS_ON]-(service:Service)
RETURN service

Team Queries

Natural Language:
"Who are the members of the DevOps team?"
Cypher Query:
MATCH (user:User)-[:MEMBER_OF]->(team:Team {name: 'DevOps'})
RETURN user

Security Best Practices

Limit predefined_nodes to only necessary entity types.
"predefined_nodes": ["VirtualMachine", "Database"]  # Not all types
Use allowed_integrations to restrict which data sources can be queried.
"allowed_integrations": ["Azure", "AWS"]  # Not Slack, GitHub, etc.
Configure max_results to prevent overly broad queries.
"max_results": 100  # Prevent thousands of results
Performance Tip: Enable caching for frequently accessed data to reduce query latency.

Solutions:
  • Verify integration is connected and syncing data
  • Check entity type is in predefined_nodes
  • Review allowed_integrations includes data source
Solutions:
  • Increase query_timeout value
  • Narrow query scope with filters
  • Enable caching to speed up repeated queries
Solutions:
  • Reduce cache_ttl value
  • Verify integration sync is running
  • Manually trigger sync if needed