Manage Agents
Agents create the foundation for Data Streams, and they can be connected to other Agents to create the flow of data. Each Agent performs a specific function. They are useful as they can be used to either retrieve data in real-time, display data, filter or sort the data, or save them to another database, depending on the function of that individual Agent.
It is recommended that you read the article listed below to improve your understanding of Agents.

Creating Agents

Creating an Agent can be divided into two parts:
Agents are generally written in C# as library projects that make use of the XMPro.IoT.Framework NuGet package.
XMPro.IoT.Framework requires your project to be written using a predefined structure. This structure requires you to implement certain interfaces, depending on the type of Agent you are creating. To learn more about how to use this framework, see the Packaging Agents article.
Code for some existing Agents has been made available on GitHub. It might be useful to use these resources as an example when writing your own Agents.
After writing your code, you need to use the XMPro Package Manager Windows 10 desktop application to package your Agent. This application allows you to specify all the properties your Agent requires, add the user settings in the form of controls, and allows you to upload the DLL of the Agent you’ve written. Finally, it will create a file with a “.xmp” extension, which you can upload to Data Stream Designer and start to use to build Streams. To package the Agent, refer to these instructions.

Uploading an Agent to Data Stream Designer

After writing a new Agent and packaging it, you can upload it to Data Stream Designer by following the steps below:
  1. 1.
    Open the Agents page from the left-hand menu.
  2. 2.
    Click on Add.
  3. 3.
    Click on the Select File button and browse to the .xmp file you’ve packaged.
  4. 4.
    If the .xmp file is valid, some of the details contained in the file, such as the name of the Agent, will automatically be listed on the form.
  5. 5.
    Select the correct category in which the Agent can be classified.
  6. 6.
    Click Save.
The Metadata field allows you to add tags for the Agent. You can either select a value from the drop-down that appears when you click in the field or type a new value and press Enter.
Additional information that forms part of the Agent’s details will be displayed on the form, such as the version and Metadata.
The newly uploaded Agent will now be available in the toolbox on the Use Case canvas page. To add an Agent to the canvas, follow the steps below:
  1. 1.
    Open the Data Streams page from the left-hand menu.
  2. 2.
    Select your Data Stream.
3. Expand the category in the toolbox where your Agent is located. 4. Click on your Agent and drag the Agent to the canvas. 5. Click Save.

Upgrading Agents

To upgrade Agents in the Data Stream, visit How To Upgrade a Stream Object Version.

Deleting Agent Versions

To remove one or more versions of a specific Agent, first, make sure that the versions of the Agent that you’re planning to remove are not being used anymore. Then, open the Agents page from the left-hand menu and follow the steps below:
  1. 1.
    On the Agents page, select the Agent.
  2. 2.
    Click on “Delete Versions“.
  3. 3.
    Select the versions you would like to delete.
  4. 4.
    Click Delete.

Deleting Agents

When planning to remove multiple Agents completely at the same time, make sure they are not being used anymore. Open the Agents page from the left-hand menu and follow the steps below:
  1. 1.
    Click on “Select“.
  2. 2.
    Select all the Agents you would like to remove.
  3. 3.
    Click on “Delete“.
To cancel the selection, click on “Select” again.
4. Confirm that you would like to delete all versions of the selected Agents.

Finding Help for Agents

Help documentation is written for each Agent that is created. These pages provide steps or pointers to help if you are unsure of anything related to the Agent you are configuring.
If you are unsure about how a specific Agent works, click on the “Help” button. The Agent documentation will be open in a new tab, find the specific agent and open the documentation for that agent. This page will contain information such as release notes, instructions on how to configure the Agent and a working example.