Skip to main content
Version: v5.0

Query tools

Agents can query the Item Service using the following tools:

Click on one of the tools for more information.

Related Query Tool#

Schema reliance#

GetSchemaDefinitionsTool#

To generate queries with accuracy, Item Service query tools require the relevant schema data for the RelatedItems to query. Pair the query tool with GetSchemaDefinitionsTool for best results when you create the Agent.

Schemas#

For GetSchemaDefinitionsTool to produce accurate results, create schemas that describe the RelatedItems in a NamedUserCollection and add those schemas to the namespace's SchemaDefinition. For more information, see Schemas.

Equipping an Agent with RelatedQueryTool#

To equip an Agent with RelatedQueryTool and GetSchemaDefinitionsTool do the following:

  1. Create an agent. Refer to the code below.
  2. List you tools you want in the _tools array as shown in the sample code below.
const queryAgent = IafAISvc.createAgents({  _name: "Related Query Agent",  _background: "Uses the GetSchemaDefinitionsTool to get the schema, then pass the prompt and schema to GraphQueryTool tool and return the output",  _userType: "related_query_agent_1",  _type: "user_agent",  _namespaces: [    "workspace_m8NrvPU3"  ],  _config: {    _model: "gpt-4o",    _provider: "openai"  },  _tools: [    "GetSchemaDefinitionsTool",    "RelatedQueryTool"  ]});

Graph Query tool#

Th Graph Query tool is used to generate an Item Service $findWithRelatedGraph query.

Note: Before using the tool, you must configure the necessary schema definitions in the Item Service.

To set up a Graph Query Tool, do the following:

  1. Configure schema definitions in the Item Service.
  2. Create an agent using IafAISvc.createAgents.
  3. Create a team using IafAISvc.createTeam.
  4. Initiate conversation with the team using IafAISvc.createConversation.
  5. Continue the conversation with IafAISvc.createConversation.

Example use case#

The following example demonstrates the usage of the Graph Query Tool based on the data setup below.

Assume the namespace contains the following collections, each with related item types:

  • System Collection – contains system-related items.
  • System Components Collection – contains items such as FireProtectionSystemComponent and HVACSystemComponent.
  • System Sensor Points Collection – contains SensorDataPoint items, which generate PressureReading and TemperatureReading data.

1. Configure schema definitions in the Item Service#

The first step is to set up schema definitions which are mandatory for using the Graph Query tool. Refer the section Configure Schema Definitions for more information.

The example queries on this page are based on this reference schema definition.

2. Create an agent using IafAISvc.createAgents#

To create an agent do the following:

  1. Create an agent using the GetSchemaDefinitionsTool and GraphQueryTool.
  2. Set the agent’s _background value to match the example listed below.

Note: The GetSchemaDefinitionsTool fetches the schema from the Item Service. The GraphQueryTool uses this schema and its context to generate a Graph Query. The "_agentClass": "GraphQueryAgent" statement is a system agent that extracts the query.

[{    "_name": "Graph Query Agent",    "_description": "An agent to generate the graph query",    "_background": "Use the GetSchemaDefinitionsTool to get the schema, then pass the prompt and schema to GraphQueryTool tool and return the output of GraphQueryTool.",    "_type": "user_agent",    "_userType": "GQ_Agent",    "_namespaces": ["Amoghtestworkspace_m8NrvPU3"],    "_config": {        "_model": "gpt-4o",        "_provider": "openai"    },    "_tools": ["GetSchemaDefinitionsTool","GraphQueryTool"]}]

3. Create a team using IafAISvc.createTeam#

To create a team, do the following:

  1. Create a team with the agent you created using IafAISvc.createTeam.
  2. Use the agent’s _userType to reference the specific agent to include. Refer to the code example below for more information.
{    "_name": "The Graph Query Team",    "_namespaces": ["Amoghtestworkspace_m8NrvPU3"],    "_agents": [       {"_userType": "GQ_Agent"}    ],    "_flow": [        {"from": "__start__", "to": "GQ_Agent"},        {"from": "GQ_Agent", "to": "__end__"}    ]}

4. Initiate conversation with the team using IafAISvc.createConversation#

Do the following:

  1. Start the conversation using the team’s _id from the previous request.
  2. Pass your prompt in the _input.message field. Refer to the sample prompt below.

Sample Prompt:

{    "_input": {        "message": "graph the systems with type HVAC with its system components."    },    "_namespaces": ["Amoghtestworkspace_m8NrvPU3"],    "_teamId": "f24eea61-be27-493e-9a04-f5afc80acef6"}

Sample Response:

{    "_id": "f93c524b-c187-47f7-8a20-fc5abd41b91b",    "_output": {        "$findWithRelatedGraph": {            "start": {                "collectionDesc": {                    "_userItemId": "systemcoll_1U4iBYq52f",                    "_itemClass": "NamedUserCollection",                    "_userType": "system_collection"                },                "collectionProject": {},                "query": {                    "type": {                        "$regex": ".*HVAC.*",                        "$options": "i"                    }                },                "options": {                    "page": {                        "_offSet": 0,                        "_pageSize": 25                    },                    "project": {},                    "sort": {}                }            },            "to": {                "segments": [                    {                        "relatedDesc": {                            "_relatedUserType": "system_component_collection",                            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF",                            "_isInverse": false                        },                        "query": {},                        "as": "system_components",                        "options": {                            "project": {}                        }                    }                ],                "as": "paths",                "response": "path",                "options": {                    "page": {                        "_offSet": 0,                        "_pageSize": 25                    }                }            }        }    }}

5. Continue the conversation with IafAISvc.createConversation#

Do the following:

  1. Continue the conversation by including the conversation’s _id from the previous response.
  2. Include this _id in upcoming requests to maintain context. See example below.
{    "_input": {        "message": "another prompt here..."    },    "_namespaces": ["Amoghtestworkspace_m8NrvPU3"],    "_teamId": "f24eea61-be27-493e-9a04-f5afc80acef6",    "_id": "fc4fb00e-ce9f-44df-8b3d-777a5bd0737b"}

Note: If you omit the _id, a new conversation will be started instead of continuing the existing one.

Configure schema definitions#

Schema definitions are mandatory for using the RelatedQueryTool and GraphQueryTool.

You can create schema definitions along with a NamedUserCollection. Alternatively, you can create the schema definitions and update the types in Named User, File or Telemetry Collections.

This results in two distinctive approves to defining schemas:

See section below for detailed steps.

Option 1: Assume you have the collections already#

For this approach, do the following:

  1. Generate SchemaDefinitions using IafItemSvc.generateSchemaDefinitions
  2. Modify the schema definitions
  3. Update SchemaDefinitions using IafItemSvc.updateSchemaDefinitions
  4. Update NamedUserCollection using IafItemSvc.updateNamedUserItem

Generate SchemaDefinitions using IafItemSvc.generateSchemaDefinitions#

Use IafItemSvc.generateSchemaDefinitions to generate sample schema definitions based on an existing RelatedItem. This utility retrieves all NamedUserCollection entries, selects the first RelatedItem, and its first Reading (for ReadingTypes), to construct an initial schema.

Note: this does not create a schema definition in the system. It simply serves as a helper to reduce the effort of creating a SchemaDefinition from scratch. After creating the schema, you can modify the schema as needed and use updateSchemaDefinitions to apply the changes. Ensure that the corresponding item types in each NamedUserCollection are also updated accordingly.

Modify the schema definitions#

Manually edit the schema retrieved from the previous step to suit your requirements.

Update SchemaDefinitions using IafItemSvc.updateSchemaDefinitions#

Use IafItemSvc.updateSchemaDefinitions to make the required updates on the schema definitions.

Update NamedUserCollection using IafItemSvc.updateNamedUserItem#

Update each NamedUserCollection with its item type. Refer to the example code below.

{    "_uri": "/nameduseritems/686cfd1216754c72cd16a989",    "_name": "Space Collection",    "_userType": "iaf_ext_space_coll",    "_tipId": "686cfd1216754c72cd16a98a",    "_irn": "itemsvc:nameduseritem:686cfd1216754c72cd16a989",    "_itemTypes": [        "PhysicalSpace"    ],    "_description": "Physical Space Collection"}

Option 2: Create collections along with schema definitions#

This approach involves just one step, create named user collection along with schema definitions. See example code listing below.

[    {        "_name": "Building assets Collection",        "_userType": "iaf_ext_asset_coll1",        "_itemClass": "NamedUserCollection",        "_namespaces": [            {{nsfilter}}        ],        "_shortName": "test_Coll",        "_schemaDefinitions": {            "_itemTypes": [                {                    "_typeName": "Asset",                    "_description": "It hold all the Asset objects inthe project",                    "_properties": {                        "Building": {                            "_type": "string",                            "_description": "It holds information about the building"                        },                        "Floor": {                            "_type": "string",                            "_description": "It holds details about the floor"                        },                        "Revision": {                            "_type": "string"                        }                    }                }            ]        }    }]

Reference schema for Graph Query Tool queries#

The example queries on this page are based on the schema definition listed below.

{  "_readingTypes": [    {      "_typeName": "PressureReading",      "_type": "object",      "_properties": {        "_tsMetadata": {          "_type": "object",          "_properties": {            "_telItemId": {              "_type": "string"            },            "_sourceId": {              "_type": "string"            }          }        },        "pressure": {          "_type": "number"        },        "_ts": {          "_type": "isodate"        }      },      "_description": "This reading captures the pressure measurement of the coolant for the chiller post-compression in PSI"    },    {      "_typeName": "TemperatureReading",      "_type": "object",      "_properties": {        "_tsMetadata": {          "_type": "object",          "_properties": {            "_telItemId": {              "_type": "string"            },            "_sourceId": {              "_type": "string"            }          }        },        "temperature": {          "_type": "number"        },        "_ts": {          "_type": "isodate"        }      },      "_description": "This reading captures the temperature measurement of the air supply leaving the AHU in degree celcius"    }  ],  "_collections": [    {      "_updateLogs": [        {          "_updatedBy": "3fd24bb0-c795-47c0-a61e-33986088edc0",          "_updatedAt": 1750823957590        }      ],      "_uri": "/nameduseritems/685b74152ea2a97a54135d3b",      "_name": "System Collection",      "_userType": "system_collection",      "_tipId": "685b74152ea2a97a54135d3c",      "_versions": [        {          "_userItemDbId": "685b74152ea2a97a54135d3b",          "_id": "685b74152ea2a97a54135d3c",          "_isTip": true,          "_metadata": {            "_updatedById": "3fd24bb0-c795-47c0-a61e-33986088edc0",            "_createdAt": 1750823957640,            "_createdById": "3fd24bb0-c795-47c0-a61e-33986088edc0",            "_updatedAt": 1750823957640          },          "_version": 1        }      ],      "_irn": "itemsvc:nameduseritem:685b74152ea2a97a54135d3b",      "_itemTypes": [        "System"      ],      "_namespaces": [        "Amoghtestworkspace_m8NrvPU3"      ],      "_nextVersion": 2,      "_shortName": "systemcoll",      "_tipVersion": 1,      "_versionsCount": 1,      "_itemClass": "NamedUserCollection",      "_userItemId": "systemcoll_1U4iBYq52f",      "_id": "685b74152ea2a97a54135d3b",      "_description": "this collection contains all the systems. The systems in this collection have relationships with the system components in the System Components Collection",      "_metadata": {        "_updatedById": "3fd24bb0-c795-47c0-a61e-33986088edc0",        "_createdAt": 1750823957590,        "_createdById": "3fd24bb0-c795-47c0-a61e-33986088edc0",        "_updatedAt": 1750823957590      },      "_kind": "collection"    },    {      "_updateLogs": [        {          "_updatedBy": "3fd24bb0-c795-47c0-a61e-33986088edc0",          "_updatedAt": 1750823957612        },        {          "_updatedBy": "3fd24bb0-c795-47c0-a61e-33986088edc0",          "_updatedAt": 1751515978544        }      ],      "_uri": "/nameduseritems/685b74152ea2a97a54135d3d",      "_name": "System Components Collection",      "_userType": "system_component_collection",      "_tipId": "685b74152ea2a97a54135d3e",      "_versions": [        {          "_userItemDbId": "685b74152ea2a97a54135d3d",          "_id": "685b74152ea2a97a54135d3e",          "_isTip": true,          "_metadata": {            "_updatedById": "3fd24bb0-c795-47c0-a61e-33986088edc0",            "_createdAt": 1750823957639,            "_createdById": "3fd24bb0-c795-47c0-a61e-33986088edc0",            "_updatedAt": 1750823957639          },          "_version": 1        }      ],      "_irn": "itemsvc:nameduseritem:685b74152ea2a97a54135d3d",      "_itemTypes": [        "FireProtectionSystemComponent",        "HVACSystemComponent"      ],      "_namespaces": [        "Amoghtestworkspace_m8NrvPU3"      ],      "_nextVersion": 2,      "_shortName": "syscompcoll",      "_tipVersion": 1,      "_versionsCount": 1,      "_itemClass": "NamedUserCollection",      "_userItemId": "syscompcoll_v6CLcEWRWF",      "_id": "685b74152ea2a97a54135d3d",      "_description": "this collection contains all the system components. The system components in this collection have inverse relationships with a system in the System Collection. In addition, the components within the same system are connected to each other with relationships",      "_metadata": {        "_updatedById": "3fd24bb0-c795-47c0-a61e-33986088edc0",        "_createdAt": 1750823957612,        "_createdById": "3fd24bb0-c795-47c0-a61e-33986088edc0",        "_updatedAt": 1751515978544      },      "_kind": "collection"    },    {      "_updateLogs": [        {          "_updatedBy": "3fd24bb0-c795-47c0-a61e-33986088edc0",          "_updatedAt": 1750823958111        }      ],      "_uri": "/nameduseritems/685b74152ea2a97a54135d45",      "_name": "System Sensor Points Collection",      "_userType": "systemsensor_points_collection",      "_tipId": "685b74152ea2a97a54135d46",      "_versions": [        {          "_userItemDbId": "685b74152ea2a97a54135d45",          "_id": "685b74152ea2a97a54135d46",          "_isTip": true,          "_metadata": {            "_updatedById": "3fd24bb0-c795-47c0-a61e-33986088edc0",            "_createdAt": 1750823958116,            "_createdById": "3fd24bb0-c795-47c0-a61e-33986088edc0",            "_updatedAt": 1750823958116          },          "_version": 1        }      ],      "_irn": "itemsvc:nameduseritem:685b74152ea2a97a54135d45",      "_itemTypes": [        "SensorDataPoint"      ],      "_namespaces": [        "Amoghtestworkspace_m8NrvPU3"      ],      "_nextVersion": 2,      "_shortName": "systemsensorptscol",      "_tipVersion": 1,      "_versionsCount": 1,      "_itemClass": "NamedTelemetryCollection",      "_userItemId": "systemsensorptscol_BsYCWFBtJG",      "_id": "685b74152ea2a97a54135d45",      "_description": "this collection contains the data points for all sensors in the systems and their readings. The sensors in the System Components Collection have a relationship with the sensor data points in this collection",      "_metadata": {        "_updatedById": "3fd24bb0-c795-47c0-a61e-33986088edc0",        "_createdAt": 1750823958111,        "_createdById": "3fd24bb0-c795-47c0-a61e-33986088edc0",        "_updatedAt": 1750823958111      },           "_kind": "collection"    }  ],  "_itemTypes": [    {      "_typeName": "HVACSystemComponent",      "_type": "object",      "_properties": {        "componentProperties": {          "_type": "object",          "_properties": {            "coolingCapacityTons": {              "_type": "number",              "_description": "Cooling capacity in refrigeration tons."            },            "efficiency": {              "_type": "number",              "_description": "Efficiency as a decimal (e.g., 0.85 = 85%)."            },            "motorPowerKW": {              "_type": "number",              "_description": "Power rating of the fan motor in kilowatts."            },            "capacityKW": {              "_type": "number",              "_description": "Heating capacity in kilowatts."            },            "efficiencyCOP": {              "_type": "number",              "_description": "Coefficient of Performance; higher values indicate greater efficiency."            },            "heatingCapacityKW": {              "_type": "number",              "_description": "Heating capacity in kilowatts."            },            "mountingType": {              "_type": "string",              "_description": "Indicates if the unit is floor-mounted or ceiling-mounted."            },            "coilType": {              "_type": "string",              "_description": "Type of heating coil, e.g., hot water or electric."            },            "chillerType": {              "_type": "string",              "_description": "Type of chiller, e.g., air-cooled or water-cooled."            },            "manufacturer": {              "_type": "string",              "_description": "Name of the AHU manufacturer."            },            "coolingCapacityKW": {              "_type": "number",              "_description": "Cooling capacity in kilowatts."            },            "controlType": {              "_type": "string",              "_description": "Type of airflow control system, e.g., VAV (Variable Air Volume)."            },            "fuelType": {              "_type": "string",              "_description": "Type of fuel used, e.g., natural gas or electricity."            },            "VFDPresent": {              "_type": "boolean",              "_description": "Boolean indicating if a Variable Frequency Drive is present."            },            "rangeCelsius": {              "_type": "string",              "_description": "Temperature measurement range in degrees Celsius."            },            "controlValveType": {              "_type": "string",              "_description": "Type of valve used to control heating medium flow, e.g., 2-way or 3-way."            },            "leakageClass": {              "_type": "string",              "_description": "Leakage classification based on standards (e.g., Class 1A)."            },            "ratedAirflowCFM": {              "_type": "number",              "_description": "Maximum airflow capacity in Cubic Feet per Minute (CFM)."            },            "temperatureSensorType": {              "_type": "string",              "_description": "Type of temperature sensor, e.g., RTD or thermocouple."            },            "model": {              "_type": "string",              "_description": "Model identifier for the AHU."            },            "fanType": {              "_type": "string",              "_description": "Type of fan, e.g., centrifugal or axial."            },            "actuation": {              "_type": "string",              "_description": "Type of damper control, e.g., modulating or two-position."            },            "rangePSI": {              "_type": "string",              "_description": "Pressure measurement range in PSI."            },            "pressureSensorType": {              "_type": "string",              "_description": "Type of pressure sensor, e.g., Strain Gauge or Capacitive."            }          }        },        "componentType": {          "_type": "string",          "_enum": [            "AirHandlingUnit",            "HeatingCoil",            "CoolingCoil",            "Fan",            "Damper",            "TemperatureSensor",            "Chiller",            "Boiler",            "PressureSensor"          ],          "_description": "The componentType property for a HVAC System Component can have the values in the enum with their description provided here. 1) AirHandlingUnit: Central mechanical unit responsible for conditioning and circulating air through the building. 2) HeatingCoil: Heat exchanger used to warm the air, typically using hot water or electric resistance. 3) CoolingCoil: Component that cools and dehumidifies air, typically using chilled water or refrigerant. 4) Fan: Moves conditioned air from the AHU to the building's ductwork or Draws air from building zones back to the AHU. 5) Damper: Regulates the intake of outside (fresh) air into the AHU. 6) TemperatureSensor: Measures the temperature of supply air leaving the AHU. 7) Chiller: Provides chilled water to the cooling coil via a closed loop. 8) Boiler: Provides hot water to the heating coil for air heating. 9) PressureSensor: Measures the pressure in the condensor post-compression"        },        "componentId": {          "_type": "string"        }      },      "_description": "A schema for all HVAC system components. These system components will have an inverse relationship with the HVAC systems in the system collection and will have relationships which show different types of connections with other HVAC system components.",      "_relationshipTypes": [        {          "_isInverse": true,          "_userType": "hasSystemComponent",          "_ref": {            "_relatedTypeName": "System",            "_relatedUserType": "system_collection",            "_relatedUserItemId": "systemcoll_1U4iBYq52f"          },          "_description": "This relationship is an inverse relationship between a System component item in this collection and System  item in the System collection. The semantics of this relationship are defined by the _userType on this relationship"        },        {          "_isInverse": false,          "_userType": "hasHeatingCoil",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from an AirHandlingUnit component type to a HeatingCoil component type and shows that an Air Handling Unit includes a heating coil for warming the air."        },        {          "_isInverse": true,          "_userType": "hasHeatingCoil",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a HeatingCoil component belongs to the AirHandlingUnit that includes it."        },        {          "_isInverse": false,          "_userType": "hasCoolingCoil",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from an AirHandlingUnit component type to a CoolingCoil component type. It represents that the AirHandlingUnit, which is Central mechanical unit responsible for conditioning and circulating air through the building,  includes a cooling coil for conditioning the air. The CoolingCoil component cools and dehumidifies air typically using chilled water or refrigerant."        },        {          "_isInverse": true,          "_userType": "hasCoolingCoil",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a CoolingCoil component is part of the AirHandlingUnit that includes it."        },        {          "_isInverse": false,          "_userType": "includesSupplyFan",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from an AirHandlingUnit component type to a Fan component type. It represents that the AirHandlingUnit, which is Central mechanical unit responsible for conditioning and circulating air through the building contains a fan that supplies air to the zones. The Fan component Moves conditioned air from the AHU to the building's ductwork"        },        {          "_isInverse": true,          "_userType": "includesSupplyFan",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a Fan component serves as the supply fan for an AirHandlingUnit."        },        {          "_isInverse": false,          "_userType": "includesReturnFan",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from an AirHandlingUnit component type to a Fan component type. It represents that the AirHandlingUnit, which is Central mechanical unit responsible for conditioning and circulating air through the building contains a fan that returns air from the zones to the AHU. The Fan component Draws air from building zones back to the AHU"        },        {          "_isInverse": true,          "_userType": "includesReturnFan",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a Fan component acts as the return fan for an AirHandlingUnit."        },        {          "_isInverse": false,          "_userType": "controlsAirMixingWith",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from an AirHandlingUnit component type to a Damper component type. It represents that the AirHandlingUnit, which is Central mechanical unit responsible for conditioning and circulating air through the building. 2, Regulates mix of outside and recirculated air. The Damper component Regulates the intake of outside (fresh."        },        {          "_isInverse": true,          "_userType": "controlsAirMixingWith",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a Damper component is controlled by an AirHandlingUnit for mixing outside and recirculated air."        },        {          "_isInverse": false,          "_userType": "heatedBy",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from a HeatingCoil component type to a Boiler component type. It represents that the HeatingCoil, which is Heat exchanger used to warm the air, typically using hot water or electric resistance. 3, Heating coil receives hot water or heat from the boiler. The Boiler component Provides hot water to the heating coil for air heating."        },        {          "_isInverse": true,          "_userType": "heatedBy",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a Boiler provides heat to a HeatingCoil component."        },        {          "_isInverse": false,          "_userType": "cooledBy",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from a CoolingCoil component type to a Chiller component type. It represents that the CoolingCoil, which is Component that cools and dehumidifies air, typically using chilled water or refrigerant, receives chilled water or refrigerant from the chiller. The Chiller component Provides chilled water to the cooling coil via a closed loop."        },        {          "_isInverse": true,          "_userType": "cooledBy",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a Chiller cools a CoolingCoil component."        },        {          "_isInverse": false,          "_userType": "temperatureMonitoredBy",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from an AirHandlingUnit component type to a TemperatureSensor component type. It represents that the AirHandlingUnit, which is Central mechanical unit responsible for conditioning and circulating air through the building. Air temperature in AHU is monitored by a sensor. The TemperatureSensor component Measures the temperature of supply air leaving the AHU."        },        {          "_isInverse": true,          "_userType": "temperatureMonitoredBy",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a TemperatureSensor monitors the air temperature in an AirHandlingUnit."        },        {          "_isInverse": false,          "_userType": "feedsChilledWaterTo",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from a Chiller component type to a CoolingCoil component type. It represents that the Chiller, which is a component that provides chilled water to the cooling coil via a closed loop, feeds chilled water to the cooling coil. The CoolingCoil component is described as: Component that cools and dehumidifies air, typically using chilled water or refrigerant."        },        {          "_isInverse": true,          "_userType": "feedsChilledWaterTo",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a CoolingCoil component receives chilled water from a Chiller."        },        {          "_isInverse": false,          "_userType": "feedsHotWaterTo",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from a Boiler component type to a HeatingCoil component type. It represents that the Boiler, which is a component that provides hot water to the heating coil for air heating, feeds hot water to the heating coil. The HeatingCoil component is described as: Heat exchanger used to warm the air, typically using hot water or electric resistance."        },        {          "_isInverse": true,          "_userType": "feedsHotWaterTo",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a HeatingCoil component receives hot water from a Boiler."        },        {          "_isInverse": false,          "_userType": "pressureMonitoredBy",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from an Chiller component type to a PressureSensor component type. It represents that the Chiller, which is Central mechanical unit responsible for conditioning and circulating air through the building. The PressureSensor component is part of the refrigeration circuit of the chiller itself and it measures the pressure of the refrigerant after compression, before or at the condenser inlet."        },        {          "_isInverse": true,          "_userType": "pressureMonitoredBy",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a PressureSensor monitors the refrigerant pressure of a Chiller."        },        {          "_isInverse": false,          "_userType": "hasSensorDataPoint",          "_ref": {            "_relatedTypeName": "SensorDataPoint",            "_relatedUserType": "systemsensor_points_collection",            "_relatedUserItemId": "systemsensorptscol_BsYCWFBtJG"          },          "_description": "This relationship is between a sensor System Component item in the System Component collection with a SensorDataPoint item in the System Sensor Points Collection. The semantics of this relationship are defined by the _userType on this relationship"        }      ]    },    {      "_readingTypes": [        "TemperatureReading",        "PressureReading"      ],      "_typeName": "SensorDataPoint",      "_type": "object",      "_properties": {        "unit": {          "_type": "string",          "_description": "Unit of measure, e.g. deg Celcius, PSI, etc"        },        "measurementType": {          "_type": "string",          "_description": "The type of measurement e.g. temperature, pressure, humidity, etc"        },        "_sourceId": {          "_type": "string",          "_description": "Id if the sensor data point"        }      },      "_description": "A sensor can have more than one data points. The data points are represented in this collection as TelemetryItems. The sensors in the System Components Collection can have one to many relationships with the SensorDataPoints",      "_relationshipTypes": [        {          "_isInverse": true,          "_userType": "hasSensorDataPoint",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "systemsensorptscol_BsYCWFBtJG"          },          "_description": "This inverse relationship is between a sensor data point item in this collection with a sensor System Component item in the System Component collection. The semantics of this relationship are defined by the _userType on this relationship"        }      ]    },    {      "_typeName": "System",      "_type": "object",      "_properties": {        "name": {          "_type": "string",          "_description": "Name of the system"        },        "type": {          "_type": "string",          "_enum": [            "HVAC",            "FireProtection"          ],          "_description": "What type of system it is. Can be HVAC or Fire Protection"        }      },      "_description": "this item type represents a System in a building like HVAC, Fire protection etc. The systems have an aggregation type relationships with the system components item type",      "_relationshipTypes": [        {          "_isInverse": false,          "_userType": "hasSystemComponent",          "_ref": {            "_relatedTypeName": "HVACSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is an aggregation relationship between a System item in this collection and System component items is the System Component collection. The semantics of this relationship are defined by the _userType on this relationship"        },        {          "_isInverse": false,          "_userType": "hasFireProtectionSystemComponent",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is an aggregation relationship between a Fire Protection System item in this collection and Fire Protection System component items is the System Component collection. The semantics of this relationship are defined by the _userType on this relationship"        }      ]    },    {      "_typeName": "FireProtectionSystemComponent",      "_type": "object",      "_properties": {        "componentProperties": {          "_type": "object",          "_properties": {            "capacityLiters": {              "_type": "number",              "_description": "WaterStorageTank capacity in liters."            },            "maxFlowLpm": {              "_type": "number",              "_description": "Maximum flow rate of the FirePump in liters per minute."            },            "detectorType": {              "_type": "string",              "_description": "Type of SmokeDetector, e.g., photoelectric."            },            "detectionMethod": {              "_type": "string",              "_description": "Detection method used by the PhotoelectricChamber, e.g., photoelectric."            },            "measurementUnit": {              "_type": "string",              "_description": "Unit of measure used by the LevelSensor, e.g., percent."            },            "manufacturer": {              "_type": "string",              "_description": "Name of the FireAlarmControlPanel manufacturer."            },            "activationTemperatureC": {              "_type": "number",              "_description": "Activation temperature in degrees Celsius for HeatDetector and SprinklerHead components."            },            "zonesSupported": {              "_type": "number",              "_description": "Number of zones supported by the FireAlarmControlPanel."            },            "soundLevelDb": {              "_type": "number",              "_description": "Sound level of the AlarmBell in decibels."            },            "sensorType": {              "_type": "string",              "_description": "Type of LevelSensor, e.g., ultrasonic."            },            "model": {              "_type": "string",              "_description": "Model identifier of the FireAlarmControlPanel."            },            "sensitivity": {              "_type": "string",              "_description": "Sensitivity of the PhotoelectricChamber in %/ft."            },            "sensitivityRange": {              "_type": "string",              "_description": "SmokeDetector sensitivity range in %/ft."            },            "maxPressureBar": {              "_type": "number",              "_description": "Maximum pressure of the FirePump in bar."            }          }        },        "componentType": {          "_type": "string",          "_enum": [            "FireAlarmControlPanel",            "SmokeDetector",            "HeatDetector",            "ManualCallPoint",            "AlarmBell",            "WaterStorageTank",            "FirePump",            "SprinklerHead",            "PhotoelectricChamber",            "LevelSensor"          ],          "_description": "The componentType property for a Fire Protection System Component can have the values in the enum with their description provided here. 1) FireAlarmControlPanel: Central unit that monitors and controls the fire detection and alarm system. 2) SmokeDetector: Sensor that detects smoke particles in the air to identify potential fires. 3) HeatDetector: Fixed-temperature heat detector that triggers when ambient temperature exceeds threshold. 4) ManualCallPoint: Manual activation point for occupants to trigger the fire alarm. 5) AlarmBell: Audible alarm bell that alerts occupants to evacuate. 6) WaterStorageTank: Water reservoir that supplies the fire pump system. 7) FirePump: Pump that delivers pressurized water from the storage tank to the sprinklers. 8) SprinklerHead: Automatic sprinkler head that discharges water when temperature threshold is reached. 9) PhotoelectricChamber: Photoelectric chamber to detect particulates in the air. 10) LevelSensor: Level sensor monitoring water storage tank volume."        },        "componentId": {          "_type": "string"        }      },      "_description": "A schema for all Fire Protection system components. These system components will have an inverse relationship with the Fire Protection systems in the System collection and will have relationships which show different types of connections with other fire protection system components.",      "_relationshipTypes": [        {          "_isInverse": true,          "_userType": "hasFireProtectionSystemComponent",          "_ref": {            "_relatedTypeName": "System",            "_relatedUserType": "system_collection",            "_relatedUserItemId": "systemcoll_1U4iBYq52f"          },          "_description": "This relationship is an inverse relationship between a Fire Protection System component item in this collection and a Fire Protection System  item in the System collection. The semantics of this relationship are defined by the _userType on this relationship"        },        {          "_isInverse": false,          "_userType": "smokeMonitoredBy",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from a FireAlarmControlPanel component type to a SmokeDetector component type and shows that Smoke detectors send signals to the fire alarm control panel."        },        {          "_isInverse": true,          "_userType": "smokeMonitoredBy",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a SmokeDetector component is connected to a FireAlarmControlPanel component."        },        {          "_isInverse": false,          "_userType": "temperatureMonitoredBy",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from a FireAlarmControlPanel component type to a HeatDetector component type and shows that Heat detectors send signals to the fire alarm control panel."        },        {          "_isInverse": true,          "_userType": "temperatureMonitoredBy",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a HeatDetector component is connected to a FireAlarmControlPanel component."        },        {          "_isInverse": false,          "_userType": "manualTriggers",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from a FireAlarmControlPanel component type to a ManualCallPoint component type and shows that Manual Call Point triggers the alarm panel manually."        },        {          "_isInverse": true,          "_userType": "manualTriggers",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a ManualCallPoint component is connected to a FireAlarmControlPanel component."        },        {          "_isInverse": false,          "_userType": "alarmActivates",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from a FireAlarmControlPanel component type to a AlarmBell component type and shows that Alarm panel activates audible alarm bells."        },        {          "_isInverse": true,          "_userType": "alarmActivates",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a AlarmBell component is connected to a FireAlarmControlPanel component."        },        {          "_isInverse": false,          "_userType": "feedsWater",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from a WaterStorageTank component type to a FirePump component type and shows that Water tank supplies water to the fire pump."        },        {          "_isInverse": true,          "_userType": "feedsWater",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a FirePump component is connected to a WaterStorageTank component."        },        {          "_isInverse": false,          "_userType": "pressurizesWater",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from a FirePump component type to a SprinklerHead component type and shows that Fire pump delivers pressurized water to sprinkler heads."        },        {          "_isInverse": true,          "_userType": "pressurizesWater",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a SprinklerHead component is connected to a FirePump component."        },        {          "_isInverse": false,          "_userType": "hasPhotoelectricChamber",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from a SmokeDetector component type to a PhotoelectricChamber component type and shows that Smoke detector contains a photoelectric chamber to detect particulates."        },        {          "_isInverse": true,          "_userType": "hasPhotoelectricChamber",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a PhotoelectricChamber component is connected to a SmokeDetector component."        },        {          "_isInverse": false,          "_userType": "hasLevelSensor",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This relationship is from a WaterStorageTank component type to a LevelSensor component type and shows that Water storage tank is monitored by level sensor for water volume."        },        {          "_isInverse": true,          "_userType": "hasLevelSensor",          "_ref": {            "_relatedTypeName": "FireProtectionSystemComponent",            "_relatedUserType": "system_component_collection",            "_relatedUserItemId": "syscompcoll_v6CLcEWRWF"          },          "_description": "This inverse relationship indicates that a LevelSensor component is connected to a WaterStorageTank component."        }      ]    }  ]}