Full Track: Author It All

You chose the sovereign path. Build everything from first principles.


What You'll Build

By the end of this track:

ComponentScope
ConnectionsMulti-zone sensor network
SurfacesCleanroom, QA, Mixing, Batch
Warm queriesComplete compliance library
TeamRole-based access for Ops, QA, Engineering
AI integrationFull MCP connection

This is the comprehensive path—everything you need for a production-ready pharma monitoring system.


Phase 1: Design Connection Architecture

Step 1.1: Map Your Data Sources

Before creating connections, map what you'll monitor:

ZoneData SourcesConnection Type
CleanroomTemperature, humidity, pressureIoT Hub
MixingBatch sensors, valve statesIoT Hub
QATest results, approvalsDatabase
UtilitiesHVAC, water systemsSimulator

Step 1.2: Create Connections

For each data source:

Option A: Using the UI

  1. Drag a Connection node from the Node Bank onto your canvas
  2. Click to open Inspector and select type (IoT Hub, Database)
  3. Configure settings and commit your changes

Option B: Ask Azi

Azi will propose all three connections. Review and approve each.

Step 1.3: Start with Simulator

If you don't have hardware connected yet:

  1. Drag a Simulator node from the Node Bank onto your canvas
  2. Click to open Inspector and configure variables for temperature, pressure, and batch data
  3. Define a JSON template that mirrors your pharma sensor data structure
Thinking Tip:

Configure your simulator to mirror real pharma sensors. You can swap to real connections later without changing your queries. See the Simulator Guide for configuration details.


Phase 2: Create Surface Hierarchy

Surfaces organize your data by function. For pharma, a typical hierarchy:

Pharma-Factory (workspace)
├── Cleanroom-Monitoring
│   └── Environmental sensors
├── Batch-Tracking
│   └── Process data
├── QA-Gating
│   └── Test results
└── Utilities
    └── HVAC, water

Step 2.1: Create Cleanroom Surface

Ask Azi:

"Create a surface for cleanroom monitoring that includes temperature, humidity, and differential pressure."

Azi proposes:

  • Surface name: Cleanroom-Monitoring
  • Connected nodes: Temperature, Humidity, DifferentialPressure
  • Description: Environmental monitoring for ISO 7 cleanroom

Review and approve.

Step 2.2: Create Remaining Surfaces

Repeat for each zone:

SurfaceNodesPurpose
Batch-TrackingBatchStart, BatchEnd, IngredientsProcess monitoring
QA-GatingTestResults, Approvals, HoldsQuality control
UtilitiesHVAC, Water, Compressed AirSupport systems

Each surface is a governed container. Queries within a surface inherit its permissions and audit context.


Phase 3: Build Warm Query Library

A pharma compliance system needs standard queries. Build them with Azi.

Query Library Overview

Query NamePurposeSurface
temp-compliance24h temperature complianceCleanroom
batch-historyFull batch event logBatch-Tracking
pressure-alertsDifferential pressure violationsCleanroom
qa-pendingBatches awaiting QA approvalQA-Gating
trend-analysis7-day trends by parameterAll

Step 3.1: Build Temperature Compliance Query

Ask Azi:

"Create a warm query that calculates daily temperature compliance for the cleanroom, flagging any readings outside 18-22°C."

Azi proposes:

TelemetryData
| where Zone == "Cleanroom"
| where Timestamp > ago(24h)
| extend Hour = bin(Timestamp, 1h)
| summarize
    MinTemp = min(Temperature),
    MaxTemp = max(Temperature),
    AvgTemp = avg(Temperature),
    Readings = count()
    by Hour
| extend Compliant = MinTemp >= 18 and MaxTemp <= 22
| order by Hour asc

Review, approve, save.

Step 3.2: Build Batch History Query

Ask Azi:

"Create a query that shows complete history for any batch ID, including all zones and operators."

Step 3.3: Build Alert Queries

Ask Azi:

"Create a query that identifies any pressure readings outside the 0.5-1.5 bar range in the last hour."


Phase 4: Establish Team Permissions

Role-based access ensures the right people see the right data.

Step 4.1: Define Roles

RoleAccessUse Case
AdminEverythingEngineering, IT
EditorCreate and modify queriesProcess engineers
ViewerRun queries, view dataOperators, QA

Step 4.2: Invite Team Members

Option A: Using the UI

  1. Go to Team tab
  2. Click Invite Member
  3. Enter email and select role

Option B: Ask Azi

Step 4.3: Set Surface-Level Permissions

For sensitive surfaces, restrict access beyond workspace roles:

  1. Open surface settings
  2. Click Permissions
  3. Override workspace role for specific users
Thinking Tip:

QA surfaces often need restricted write access. Viewers can run compliance queries but can't modify them.


Phase 5: Connect External AI Tools

Complete the system by connecting MCP-native AI.

Step 5.1: Generate MCP Configuration

  1. Open the APIs menu in the top bar
  2. Select API Keys to generate a JWT token
  3. Copy your workspace ID from the workspace settings
  4. Use the configuration below with your credentials

Step 5.2: Configure Your AI Client

For Claude Desktop:

{
  "mcpServers": {
    "pharma-factory": {
      "command": "npx",
      "args": [
        "-y",
        "@openindustrial/mcp-server",
        "--workspace", "YOUR_WORKSPACE_ID",
        "--token", "YOUR_TOKEN"
      ]
    }
  }
}

Step 5.3: Test AI Integration

Ask Claude:

"What's the compliance status for the cleanroom over the last 24 hours?"

Claude calls your temp-compliance warm query and returns governed results.

You built every part of this system. Every connection, every surface, every query. And now any MCP-native AI can query it—through the same governed layer.


What You Built

ComponentCount
Connections4
Surfaces4
Warm queries5+
Team membersConfigured
MCP integrations1+

Category Metrics

MetricYour Result
Time to First Governed Query~1 hour
Total queries built5+
Surfaces structured4
Audit coverage100%
AI connectedMCP-native

What Governed AI Looks Like

You didn't just build a monitoring system. You built proof:

Before Control PlaneAfter Control Plane
AI experiments in silosAI governed enterprise-wide
No query audit trailEvery query logged with who/when/what
Vendor lock-inMCP-native portability
Scattered compliance evidenceSingle source of governed truth

Next Steps

If you want to...Go to...
Try the Hybrid trackHybrid Track →
Deep-dive on queriesKQL Basics →
Learn more about MCPMCP Guide →
See common patternsPatterns →
On this page