Agent Smith configuration overview
Set up Agent Smith
Unpack the Agent Smith setup Crates at the MSP level. Then, set the organization variable default_rmm at the customer level for the child organizations that you want to use with Agent Smith, or use the form unpacked during setup to apply Agent Smith as your RMM for all organizations.
For the Azure integration to work, you’ll need to have an Azure Subscription that includes a Keyvault.
The Rewst integration user setup for the Microsoft Cloud Integration Bundle may require you to adjust permissions for your Azure subscription. Most commonly, it is recommended to grant the Rewst Service Account with Contributor access to your Azure subscription.
Install and authorize our Microsoft Cloud Integration Bundle by navigating to Configuration > Integrations in the Rewst platform. This bundle contains an integration for Microsoft Azure, which is necessary to set up and use Agent Smith.
Navigate to Crates > Crate Marketplace in the Rewst platform. You'll need to install the below Crates in order for Agent Smith setup to complete. Only unpack the Crates in the indicated order, or setup will fail.
Search for and install the
Agent Smith: Device ProvisioningCrate. This will unpack the workflows necessary for registering agents in the Azure IoT Hub. Ensure that the trigger in the Webhook accordion menu of the Crate's configuration page is toggled to Enabled.
Search for and install the
Agent Smith: Service ProvisioningCrate. Unpacking this Crate will configure the Azure IoT Hub as a gateway for sending commands to endpoints. It will also unpack a form named Agent Smith: Service Configuration. You'll use this form to set up and execute all of Agent Smith's capabilities.
Navigate to Automations > Forms and search for the
Agent Smith: Service Configurationform. Click ⋮> View Direct URLs, then click on the URL of the form.Choose Action: Create IoT Hub Instance from the Action drop-down menu.
Use the relevant drop-down selectors to choose the proper:
Azure Subscription
Azure Location.
Type in a unique IoT Hub Name.
Select the desired IoT Hub Service Tier. Check prices in your regions for exact figures. Choosing the correct tier is essential to correctly setting up Agent Smith.
Free Tier:
No Cost
Limited to 8,000 messages per day
Cannot be upgraded to standard without re-provisioning
Standard Tier:
$25 Per Month for one unit in US Locations
400,000 messages per day per unit
Can be upgraded to higher tiers

Submit the form and monitor workflow results for success.
Display agent configuration instructions: Provision agents
This form option gives information about how you should configure your RMM to allow the flow of information between itself and Agent Smith. It will prefill the correct code, which you then copy and paste into your RMM to allow for the management.
Return to the same Agent Smith: Service Configuration form and choose Display Agent Configuration Instructions.
Choose your Registration Organization. Operations may fail unless your account is a Rewst Admin. The form will display instructions for using PowerShell to configure the agent for that organization. It also shows how the organization ID is filled in. Note that changing the registration organization will update the organization ID in the code snippets.
Copy the code relevant to your operating system.
Follow the given instructions produced by the form to complete steps in your RMM to allow Agent Smith's management.

Only up-to-date versions of PowerShell have been tested to work. Make sure your devices are updated! We suggest you provision one or a few agents to test with before doing mass provisioning.
Configure Agent Smith as your RMM
Fill out the form as follows to set Agent Smith-related organization variables in Rewst.
Return to the same Agent Smith: Service Configuration form and choose Display Agent Configuration Instructions.
Choose Configure Agents Smith as RMM from the Action drop-down selector. It may take a moment for the form to register this selection and update the following fields accordingly.
Check the Set Agent Smith as a Possible "RMM Agent" box. This will set Agent Smith as a fallback option for your company when other options are not available.
Optionally:
Check the Set as "Default RMM" box if you wish to set Agent Smith as the default RMM for your MSP.
Check the Set as Default for Sub-Orgs box to set your indicated settings for all child organizations, via inheritance.
Click Submit.

Deploy to Devices
This option is recommended for users who have an existing RMM, but are unsatisfied with its data transfer speed in Rewst. You can continue using your RMM while taking advantage of Agent Smith to deploy to devices for a customer. Follow the first two sections of the Agent Smith setup process. Then, fill out the form as follows to set the organization variables in Rewst for this particular setup.
Select the Choose Devices option to reveal a drop-down selector for all available devices.

Test Agent Smith
Return to the form and choose Run PowerShell Code on Agent
Type your desired PowerShell code into the Type your PowerShell Here field, or use the pre-filled code.
Monitor the workflow status to see the agent return data.

Agent Smith uses the Microsoft Azure integration. You'll need to add that as an integration override to any workflows which will use it. This includes anything that calls the Run PowerShell subworkflows, such as New Employee, etc.
Optional: Unpack the Agent Smith: Track Agent Inventory In Azure Tables Crate
This Crate will add some additional capabilities to your Agent Smith deployments. Using it is optional. See our total Crate setup and user guide here.

Crate features include:
Using Azure tables to store additional information about your agent endpoints
Automatic agent data collection check-ins including installed applications and service, via Task Scheduler
Automatic restart of the agent if the service stops, via Task Scheduler
Uninstall Agent Smith
Windows
Agent Smith installs itself as a service. You can use PowerShell or the SC command to modify or remove the service. Application logs and data are installed in C:\ProgramData\RewstRemoteAgent or whatever root path you've overridden in your environment. Application program files are in %ProgramFiles%\RewstRemoteAgent folders.
Linux
Agent Smith installs itself as a service. You can use systemd and bash to stop and remove the service file. Application logs and data are installed in /etc/rewst_remote_agent folders. Application program files are in /usr/local/bin/rewst_remote_agent folders.
Use custom PowerShell scripts with Agent Smith
Agent Smith allows PowerShell scripts to be passed via API. To report the script back to Rewst, you'lll need to add a manual webhook action. We recommend using the run PowerShell script subworkflow to handle this for you. If using custom scripts, you'll need to add the below code to the bottom of your script to ensure that the call back to Rewst is made.
Troubleshoot Agent Smith
Ensure admin-level account setup, so the service will install as SYSTEM.
Verify the recent MS PowerShell version on your devices.
Ensure that no firewalls are preventing communications with Rewst or your IoT Hub. Check our Rewst Security Configuration Page for details.
Ensure that endpoint security software is not preventing executions or communications.
Check device connectivity to Azure IoT Hub via MQTT:
<your_iothub_name>.azure-devices.net:8883.Get packet captures from the agent while workflows are running. This can help us determine if the agent is properly communicating with the IoT Hub and/or the Rewst engine.
Agent Smith Crate installation bug
We've received rare reports of the setup Crates improperly generating secret keys. If you receive an error during setup, try the following steps.
Navigate to Automations > Workflows.
Search for and open the Agent Smith: Agent Registration workflow.
Click
to open the edit trigger menu.Scroll down to Trigger Parameters.
Choose iothub_registration_secret in the Secret Key drop-down selector.

Click Submit.
Agent Smith FAQs
Am I allowed to customize Agent Smith?
Yes. Agent Smith is open-source. You're free to fork and modify it.
Will new features be added? Can you add Feature X?
Our focus for Agent Smith is on simplicity.
Consider adding additional functionality by writing a PowerShell script and kicking it off with a workflow.
Does Rewst provide Agent Smith support for older operating systems?
No, support for outdated OS is not available.
I want to deploy agents to my endpoints in bulk. How should I prepare?
View the separate guide for how to do this here.
Last updated
Was this helpful?
