====Agent Walkthrough - Attachment==== In the [[agent_walkthrough_-_settings|previous section]], we set the rules for our [[weak|weak AI]] so that it reports when a value exceeds 100%. We still haven't told it //which// assets to operate on yet though, or which properties to use. This is done in the [[attachment|attachment]] and [[binding|binding]] steps, shown below. ===Attachment=== Attachment is where we choose which assets we'd like to connect our AI to. In our example, we have a single asset in our system named **Main Pump**, so we will use the most simple attachment method, called //single//. "attachment": [ { "style": "type", "asset": "Main Pump" } ] ===Binding=== Finally, we need to describe which //properties// should be connected to which //inputs// in our AI. "binding": { "Load": "Main Pump.Load" } This tells Agency that the input named //Load// should be connected to the ARDI property 'Load' from the Main Pump. ===The Finished Configuration=== We are left with the following file... { "name": "High Load", "style": "PropertyPattern", "normalise": "*", "data": { "pattern": ">100" }, "inputs": [ { "name": "Load" } ], "outputs": [ { "name": "Status", "style": "boolean", "threshold": "=1" } ], "binding": { "Load": "Main Pump.Load" }, "attachment": [ { "style": "type", "asset": "Main Pump" } ] } ===Tuning=== When we run with this AI, we discover that it's triggering quite often. It's actually fairly normal for machines and motors to run at more than 100% for small amounts of time - the issue is when they do this for extended periods. We can add the //ondelay// property to our output - this is a number (in seconds) that the condition has to be met before an actual alert will arise. "outputs": [ { "name": "Status", "style": "boolean", "threshold": "=1", "ondelay": 60 } ] The example above would make sure that the load has to be more than 100% for greater than 60 seconds before an alert is raised. ===Doing More=== This works, but it would be very annoying to re-write it for each and every pump we had. Why don't we [[Extending the Example AI Across Multiple Assets|extend this to cover all of our pumps]]?