Sequentum Cloud Agent Templates
The Templates in Sequentum Cloud allows you to specify preformatted designs which can be used to develop and maintain multiple similar types of agents.
In Sequentum Cloud the Templates are assigned a specific identifier which can be distinguished by its icon.
Let’s dive into creating an Agent Template using the Sequentum Cloud platform.
Use Case
A template can be useful in following scenarios:
When you have websites with similar structure and you need to use the same structure for extracting the data from similar multiple sites.
Captcha solving templates can be used for solving the similar kind of captcha on different websites.
If the delivery/ export destination is similar to any prior agent, one can use an export template for delivery.
Creating Template
To begin with an agent template, navigate to the Home dashboard, on the top right, there exists a drop down arrow next to the New Agent button. On the drop down we have the option of New Agent Template. Opting it would open the editor window and we are good to go, developing a template.
Kindly note, a template agent is similar to an agent but the difference lies in the structure in the ‘Text’ tab.
We can set up Agent Templates to be used in other agents with similar structure. Developing an Agent Template is exactly the same as developing an agent. Add in commands common to the agents where the template would be used.
NOTE: In order for an agent template to be used/applied to other agents, one must save it in a common space and not in ‘Personal’ space.
Applying Template
I have an agent template Temp_generalStruct available in the Sequentum space.
We’ll now develop an agent NewDeveloment_Website1 and use the aforementioned template in this new agent development.
We can apply an agent template from following two pages:
Goto a space, click on agent check-box and select the Apply templates option to view a list of templates to apply on the selected agent.
Open an agent’s detail page, navigate to the Apply templates option under the agent name.
This will open a dropdown to select the template you want to apply, in this case Temp_generalStruct, and select Apply.
Edit the Agent and one can see the settings of the agent template applied:
NOTE: Keep in mind the following points while working with templates:
Commands added from Template are not editable as well as, in the Text tab they are preceded with a $ symbol to symbolize Template command.
Also, any changes made in the template are reflected in the agents using the template.
Template agent properties are prioritized over the agent properties.
Efficient Agent Design using templates
Design is an integral part of any product which determines the work and flow of each component when functioning together. Similarly an agent design should be preferred such that it is not much complex yet extracts all the required information. Keeping this in mind one can develop agents and make use of Templates to efficiently and effectively develop agents.
CODE
|
The above Text snippet demonstrates a small sample agent Template containing, RunDate command which will determine the date of agent run and the file delivery as JSON file format. On applying this template to an agent, it will automatically add RunDate and JSON file format.