Skip to content

konnektr-io/pg-age-digitaltwins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1,057 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Konnektr Graph

Digital Twins for Apache AGE

Deploy Graph License Documentation GitHub

Konnektr Graph is a high-performance, Azure Digital Twins-compatible digital twin platform built on PostgreSQL with Apache AGE. Deploy as a fully managed service or self-host in your own infrastructure.

β†’ Deploy in 60 seconds | Free tier + $99/mo production


πŸš€ Quick Links


✨ Key Features

πŸ”„ Azure Digital Twins Compatible

  • Drop-in replacement for Azure Digital Twins API
  • Use standard Azure SDKs (.NET, Python, JavaScript)
  • Easy migration from Azure with minimal code changes
  • Full DTDL (Digital Twins Definition Language) support

🎯 Built for Performance

  • PostgreSQL + Apache AGE - Enterprise-grade graph database
  • Powerful Cypher queries - Complex graph traversals
  • Horizontal scaling - Handles millions of twins
  • Real-time eventing - Stream state changes instantly

πŸ”Œ Event Streaming

  • Multiple sinks - Kafka, Azure Data Explorer, MQTT, and more
  • CloudEvents standard - Industry-standard event format
  • Flexible routing - Route events based on type and filters
  • Durable & real-time - Both lifecycle and telemetry events

πŸ€– AI-Ready

  • Model Context Protocol (MCP) - Native LLM integration
  • Semantic queries - AI-powered twin discovery
  • Rich metadata - DTDL models provide structured context

🎯 Quick Start

Option 1: Hosted (Recommended)

Get started in minutes with our fully managed platform:

# Install the Azure Digital Twins SDK
# pip install azure-digitaltwins-core requests

import requests

# 1. Get access token from Auth0 (not Azure AD)
token_url = "https://auth.konnektr.io/oauth/token"
token_data = {
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
    "audience": "https://graph.konnektr.io",
    "grant_type": "client_credentials"
}
token_response = requests.post(token_url, json=token_data)
access_token = token_response.json().get("access_token")

# 2. Use the Azure Digital Twins SDK with your Konnektr Graph endpoint
from azure.digitaltwins.core import DigitalTwinsClient
from azure.core.credentials import AccessToken
from datetime import datetime

class StaticTokenCredential:
    def __init__(self, token):
        self.token = token
    
    def get_token(self, *scopes, **kwargs):
        # Return token valid for 1 hour (adjust based on your token expiry)
        expires_on = int(datetime.now().timestamp()) + 3600
        return AccessToken(self.token, expires_on)

# Connect to your Konnektr Graph instance
client = DigitalTwinsClient(
    "https://your-resource-id.api.graph.konnektr.io",
    StaticTokenCredential(access_token)
)

# Use the standard Azure Digital Twins API
twin = client.get_digital_twin("my-twin-id")

β†’ View full hosted quickstart

Option 2: Self-Hosted

Deploy in your own infrastructure with Helm:

# Add Konnektr Helm repository
helm repo add konnektr https://konnektr-io.github.io/charts

# Install with your custom values
helm install my-graph konnektr/agedigitaltwins -f values.yaml

β†’ View full self-host guide


πŸ—οΈ Use Cases

  • Smart Buildings - Model and manage building systems, sensors, and spaces
  • Industrial IoT - Digital twins for manufacturing, supply chain, and logistics
  • Smart Cities - Infrastructure monitoring and urban planning
  • Healthcare - Patient monitoring and facility management
  • Energy & Utilities - Grid management and renewable energy systems
  • Automotive - Fleet management and connected vehicle platforms

πŸ“Š Deployment Options

Hosted Self-Hosted
Setup Time 5 minutes 1-2 hours
Maintenance Zero - fully managed You manage updates
Scaling Automatic Manual configuration
Azure SDK Compatible βœ… Yes βœ… Yes
Direct DB Access ❌ No βœ… Yes
Custom Auth Auth0 (managed) BYO identity provider
Best For Most users Advanced users, compliance needs

β†’ See detailed comparison


πŸ“š Documentation


🀝 Contributing

We welcome contributions! Whether you're fixing bugs, improving documentation, or proposing new features:

  1. Open an issue to discuss your idea
  2. Fork the repository and create a feature branch
  3. Make your changes with clear commit messages
  4. Submit a pull request

Please read our Contributing Guidelines for more details.


πŸ’¬ Community & Support


πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


🌟 Why Konnektr Graph?

Open Source Foundation - Built on PostgreSQL and Apache AGE, trusted by enterprises worldwide

Azure Compatible - Use your existing Azure Digital Twins knowledge and code

Production Ready - Battle-tested event streaming, validation, and monitoring

Flexible Deployment - Choose hosted simplicity or self-hosted control

Active Development - Regular updates, responsive maintainers, growing community


Ready to build your digital twin solution?

β†’ Read the Docs | Deploy Self-Hosted

About

Konnektr Graph (Digital Twins for Apache AGE) allows to use Postgres with the Apache AGE extension as a backend for Digital Twins solutions using DTDL.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors