Kubiya’s Context Graph is what transforms generic AI agents into intelligent automation that understands your specific environment. It automatically maps relationships between your resources, services, and infrastructure components to provide situational awareness for safe, smart automation. Knowledge Graph Visualization

Why Context Matters for AI Automation

Traditional AI agents operate in a vacuum—they know about general concepts but nothing about your specific setup. This leads to:
  • Generic suggestions that don’t match your environment
  • Dangerous operations without understanding dependencies
  • Missed opportunities for optimization based on actual usage patterns
  • Poor troubleshooting without knowledge of system relationships
Kubiya’s Context Graph solves this by giving AI agents deep knowledge of your actual infrastructure.

How the Context Graph Works

Automatic Discovery

Once your integrations are connected, Kubiya automatically discovers and maps:
  • Kubernetes clusters, namespaces, and pods
  • Cloud compute instances and networking
  • Databases and storage systems
  • Load balancers and ingress controllers
Resource Connection Mapping

Multi-Dimensional Visualization

The context graph provides multiple views of your infrastructure: 3D Infrastructure Context Network Topology View

Real-Time Context Updates

The context graph continuously updates as your infrastructure changes:

Live State Monitoring

  • Pod creation and termination in Kubernetes
  • Auto-scaling events and capacity changes
  • Configuration updates and deployments
  • Alert state changes and incident resolution

Historical Context

  • Deployment patterns and frequency
  • Performance trends over time
  • Incident correlation and patterns
  • Change success rates and rollback frequency
Context-Aware Logging Integration

How AI Agents Use Context

With rich context, Kubiya’s AI agents can make intelligent decisions:

Smart Suggestions

Instead of generic advice, get recommendations specific to your setup:
User: "My app is slow"
AI: "Try checking CPU and memory usage"

Dependency Awareness

AI agents understand blast radius and can prevent dangerous operations:
# AI knows this database powers 3 critical services
operation: restart_database
safety_check:
  dependencies: ["payment-service", "user-service", "order-service"]
  impact: "HIGH - affects checkout flow"  
  recommendation: "Schedule during maintenance window"
  alternatives: ["restart_replica", "rolling_restart"]

Environment-Specific Workflows

Generated workflows adapt to your actual infrastructure: Infrastructure-Aware Workflow Generation

Context Categories

Resource Context

Understanding what you have and how it’s configured: Database Configuration Context
  • Resource specifications and limits
  • Configuration drift detection
  • Compliance and security posture
  • Cost optimization opportunities

Relationship Context

Mapping how everything connects:
  • Service dependencies and communication paths
  • Data flow between systems
  • Network topology and security boundaries
  • Ownership and team responsibilities

Operational Context

Current state and recent activity: Operational Monitoring Context
  • Performance metrics and trends
  • Alert states and incident history
  • Change frequency and success rates
  • Capacity utilization and growth patterns

Business Context

Higher-level understanding of purpose and impact:
  • Service criticality and SLA requirements
  • User impact and business value
  • Compliance and regulatory requirements
  • Cost centers and budget allocation

Using the Context Graph

Interactive Exploration

Browse your infrastructure context through the web interface:
  1. Search: Find resources by name, type, or properties
  2. Filter: Focus on specific environments, teams, or services
  3. Navigate: Follow relationships between connected resources
  4. Query: Ask questions about dependencies and impacts
Context Resource Explorer

API Access

Query context programmatically for custom integrations:
from kubiya_sdk import Kubiya

client = Kubiya()

# Find all services that depend on a database
dependents = client.context.find_dependents(
    resource="postgres-primary",
    relationship_type="database_connection"
)

# Get recent changes that might impact performance
recent_changes = client.context.get_timeline(
    resource="payment-service",
    timeframe="1h",
    include_dependencies=True
)

# Check blast radius of a planned change
impact_analysis = client.context.analyze_impact(
    operation="restart_service",
    target="auth-service"
)

Privacy and Security

On-Premises Processing

  • Context analysis runs on your infrastructure
  • Sensitive data never leaves your environment
  • Self-hosted runners maintain complete data sovereignty

Encrypted Context Store

  • All context data encrypted at rest and in transit
  • Role-based access controls for context queries
  • Audit trails for all context access

Configurable Scope

  • Control what data is included in context analysis
  • Exclude sensitive resources or environments
  • Set retention policies for historical context
The context graph only includes metadata and relationships—not actual data contents. For example, it knows you have a PostgreSQL database with specific connection patterns, but never accesses the actual data within those tables.

Advanced Features

Custom Resource Types

Define custom resources specific to your organization:
# custom-resources.yaml
resource_types:
  - name: microservice
    properties:
      - team_owner
      - sla_tier  
      - deployment_strategy
    relationships:
      - depends_on: database
      - exposes: api_endpoint
      - monitored_by: dashboard

Context Policies

Define rules for how context should influence automation:
# context-policies.yaml  
policies:
  - name: production_safety
    condition: environment == "production"
    requirements:
      - dependency_analysis: required
      - approval_needed: true
      - rollback_plan: required

  - name: cost_optimization
    condition: cloud_cost > budget_threshold
    actions:
      - suggest: rightsizing
      - alert: budget_owner
      - recommend: reserved_instances

What’s Next?

The context graph enables Kubiya to execute operations safely through serverless tools that understand your environment. These containerized tools leverage context to make intelligent decisions during execution.