Build an Agent
This guide walks you through creating an agent to capture data from a local instrument PC and upload it to a Ganymede flow for processing.
To do this we'll proceed through the following steps:
- Sign into Ganymede
- Create a new Agent to watch a folder and pushed files to Ganymede
- Install the Agent on a local PC
- Test the Agent by saving a file to the watched folder
Step 1: Sign into Ganymede
The
button should be available once authentication is configured for your tenant, which is generally going to be a web address accessible via any web browser with the URL https://<your_tenant>.ganymede.bio.You may need to enable pop-ups for Ganymede or disable any ad-blocking software for the ganymede.bio domain.
Step 2: Create a new Agent
In the left sidebar, navigate to the Agents tab within the Connections pane and click on the
button. This opens up a configuration panel for the agent as shown below:
Fill in the agent with the configuration shown below. This will create an agent that watches a folder on the local PC for files with a ".xlsx" file extension, and then uploads detected files to the selected Ganymede flow for execution.
The agent name can be anything you would like, and the agent configuration can remain as "Watch for files locally then run flow". The Flow Name specifies the flow that is initiated upon file capture; for this Quickstart, we will use the Example_Quickstart_Absorbance_Change flow which is pre-configured in every environment.
When the Flow Name is specified, the "File pattern to parameter mapping" section will display 1 row for each node that receives an input file. Populate this field with a glob pattern matching the file path within the directory to be watched.
Click on the
button to create the agent. This will initiate the build of an Agent, which will take roughly 20 minutes to complete, and can be monitored by clicking on the in the header bar to view the Notifications page.Subsequent iterations to the user-defined code within the agent will not require agent rebuild, and so will be much faster. A typical update will take less than 10 seconds to complete, and will not require agent re-installation.
A completed agent build will look like this on the Notifications page:
Step 3: Download and install the agent
If you're not already on the local PC where the agent will be installed, navigate to that PC and sign into your tenant (as described in step 1).
Step 3a: Sync Windows time (if necessary)
Right click on the time in the lower right hand corner of the Windows taskbar and select "Adjust date/time". In the window that opens, click on the "Sync now" button to ensure that the time is synchronized with the internet time server.
Step 3b: Create a folder to watch
Create a new folder on your Desktop by right-clicking on the Desktop and selecting "New" -> "Folder". Name the folder "watch_folder".
If you choose a pre-existing folder, be aware that the agent will, by default, not process any files that exist in the folder prior to launch.
Step 3c: Download the agent
When the agent build is complete, the agent will be available for download from the Connections pane.
On the local PC where the agent will be installed, sign into your tenant (as described in step 1) and download the installer for the Windows agent by hovering over the
button and selecting Windows.Once downloaded, run the executable to start the installation process. Name the connection "Quickstart Agent", and type in the path to the folder created in step 3b in the "Watched folder" field.
Take care when configuring the watch folder path, since a configuration error here may be challenging to debug. Specifically, ensure that the input path is specified correctly. In the example shown, the Desktop is found within the OneDrive directory because OneDrive is being used to back up files stored on Desktop.
If OneDrive is not being used, the path would typically be "C:\Users\<username>\Desktop\watch_folder". Note that folder paths can be specified using either forward or backward slashes.
Specify the desired installation location and click through the installer to complete the installation.
The agent will launch automatically after installation is complete.
Step 4: Test the agent
Drop the sample plate reader file into the watch folder created in step 3b. The agent will detect the file and upload it to the Ganymede flow for processing.
Any window with the environment open will show that the flow has been initiated. Congrats on creating your first agent!
If you run into any challenges with the Quickstart, please visit the Troubleshooting Agents page or contact Ganymede Support.
Next steps
Now that you have successfully created an agent, you can learn more about
- the different agent configurations available. Some examples are:
- an agent that runs on a recurring schedule
- an agent that executes performs local processing when a file stored in cloud storage
- how to modify the agent code to add custom functionality. Some examples of this are
- adding tags to files so they are easy to find in Ganymede
- parsing metadata from file contents, determining how the file is processed
- delivering multiple files into a single node
- incorporating agent file utilities from the Ganymede SDK