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:
| Component | Scope |
|---|---|
| Connections | Multi-zone sensor network |
| Surfaces | Cleanroom, QA, Mixing, Batch |
| Warm queries | Complete compliance library |
| Team | Role-based access for Ops, QA, Engineering |
| AI integration | Full 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:
| Zone | Data Sources | Connection Type |
|---|---|---|
| Cleanroom | Temperature, humidity, pressure | IoT Hub |
| Mixing | Batch sensors, valve states | IoT Hub |
| QA | Test results, approvals | Database |
| Utilities | HVAC, water systems | Simulator |
Step 1.2: Create Connections
For each data source:
Option A: Using the UI
- Drag a Connection node from the Node Bank onto your canvas
- Click to open Inspector and select type (IoT Hub, Database)
- 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:
- Drag a Simulator node from the Node Bank onto your canvas
- Click to open Inspector and configure variables for temperature, pressure, and batch data
- Define a JSON template that mirrors your pharma sensor data structure
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:
| Surface | Nodes | Purpose |
|---|---|---|
Batch-Tracking | BatchStart, BatchEnd, Ingredients | Process monitoring |
QA-Gating | TestResults, Approvals, Holds | Quality control |
Utilities | HVAC, Water, Compressed Air | Support 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 Name | Purpose | Surface |
|---|---|---|
temp-compliance | 24h temperature compliance | Cleanroom |
batch-history | Full batch event log | Batch-Tracking |
pressure-alerts | Differential pressure violations | Cleanroom |
qa-pending | Batches awaiting QA approval | QA-Gating |
trend-analysis | 7-day trends by parameter | All |
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
| Role | Access | Use Case |
|---|---|---|
| Admin | Everything | Engineering, IT |
| Editor | Create and modify queries | Process engineers |
| Viewer | Run queries, view data | Operators, QA |
Step 4.2: Invite Team Members
Option A: Using the UI
- Go to Team tab
- Click Invite Member
- Enter email and select role
Option B: Ask Azi
Step 4.3: Set Surface-Level Permissions
For sensitive surfaces, restrict access beyond workspace roles:
- Open surface settings
- Click Permissions
- Override workspace role for specific users
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
- Open the APIs menu in the top bar
- Select API Keys to generate a JWT token
- Copy your workspace ID from the workspace settings
- 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
| Component | Count |
|---|---|
| Connections | 4 |
| Surfaces | 4 |
| Warm queries | 5+ |
| Team members | Configured |
| MCP integrations | 1+ |
Category Metrics
| Metric | Your Result |
|---|---|
| Time to First Governed Query | ~1 hour |
| Total queries built | 5+ |
| Surfaces structured | 4 |
| Audit coverage | 100% |
| AI connected | MCP-native |
What Governed AI Looks Like
You didn't just build a monitoring system. You built proof:
| Before Control Plane | After Control Plane |
|---|---|
| AI experiments in silos | AI governed enterprise-wide |
| No query audit trail | Every query logged with who/when/what |
| Vendor lock-in | MCP-native portability |
| Scattered compliance evidence | Single source of governed truth |
Next Steps
| If you want to... | Go to... |
|---|---|
| Try the Hybrid track | Hybrid Track → |
| Deep-dive on queries | KQL Basics → |
| Learn more about MCP | MCP Guide → |
| See common patterns | Patterns → |
On this page
- FrontmatterVersion: 1 DocumentType: Guide Title: "Pharma Factory — Full Build" Summary: "Design the whole system from scratch: multi-zone connections, a cleanroom-to-QA surface hierarchy, a query library, team roles, and AI access." Created: 2026-01-19
- Full Track: Author It All