How to Build an AI Agent for Website Change Monitoring

Use the Track Website Changes block to build a MindStudio AI agent that automatically tracks changes to a webpage. Only when changes occur to that site does the AI agent email you a summary of the changes to that site.

How to Build an AI Agent for Website Change Monitoring

MindStudio makes it quick and easy to build an AI agent that monitors for changes to a website that you specify. Only when changes occur to that site does the AI agent email you a summary of those changes. Otherwise, the AI agent ends quietly. This AI agent runs on a scheduled interval of your choosing.

This AI agent uses the Track Website Changes block. This block makes it easy to configure what changes to monitor for on the specified website and route the workflow when changes are detected.

Follow these steps to build an AI agent that monitors for website changes:

1. Create a new agent from My Drafts.

Drafts in MindStudio

2. Click the “Start” block and change the Run Mode to “Scheduled”.

Set the MindStudio AI agent to run in Scheduled mode

3. Click “Add” to add a new schedule.

Create Schedule screen to set a schedule in MindStudio

4. In “Frequency”, describe using everyday language when and how often to run this AI agent. For example, “every week day at 10 AM.”

5. Click “Generate Schedule”. MindStudio builds a schedule at your specified interval.

Generate a schedule to trigger the MindStudio AI agent

6. Click “Save”. The generated schedule is displayed.

Schedule is ready in the MindStudio AI agent

7. Click the + button to add a new block and choose “View All Blocks”.

View all blocks in the MindStudio Automation Canvas

8. Search for “Track Website Changes”, then select that block.

Select the Track Website Changes block in MindStudio

9. In “URL”, add the webpage to monitor for changes. For example: https://www.mindstudio.ai/legal/terms-of-use.

Add a webpage in the URL setting in which to track for changes

10. In “Detection Prompt”, add the criteria to monitor for changes on the specified webpage. For example:

Detect meaningful changes to the Terms of Use page:
- any new terms of service
- any major language changes
- any updates to existing terms

Specify in the Detection Prompt setting what changes to monitor for on the webpage

11. In “Changes”, add a variable to output changes to the webpage when detected. For example, “changes”.

Note: When changes are detected, these changes are saved to the global variable “global.scrapeResults”. The next time this AI agent runs, it compares the current webpage's scraped content with the global variable to determine whether there are significant differences.

Specify the output variable to save the webpage content when there are changes

12. Right-click anywhere on the Automation Canvas, hover over “New Block”, then add a “Generate Text” block.

Add a Generate Text block to the MindStudio Automation Canvas

13. Select the “Track Website Changes” block again. Click “Select Destination” for the “Has Changes” setting to choose which block the workflow transitions to when changes are detected on the webpage.

Click the Select Destination button for the Has Changes seetting

14. Select the “Generate Text” block. A connection is displayed between the “Track Website Changes” block and the “Generate Text” block. The “Has Changes” setting indicates to transition to that block.

Select the Generate Text block to transition to if there are webpage changess

15. Click “Select Destination” for the “No Changes” setting to select which block to transition the workflow when no changes are detected on the webpage.

Click the Select Destination button for the No Changes setting

16. Select the “End” block. A connection is displayed between the “Track Website Changes” block and the “End” block. The “No Changes” setting indicates to transition to that block.

Select the End block to transition to when there are no webpage changes

17. Select the “Generate Text” block, then add the following prompt. The XML-style brackets surrounding the variable name “changes”, in double sets of curly braces, separates “the instruction” from “the variable values” that we specified. Doing this is a best practice for prompting an AI model in general. The variable “changes” is the one we specified to output the webpage-scraped content when significant changes to the webpage are detected.

<changes>
{{changes}}
</changes>

Enumerate all changes listed and how they affect me as a service user.

Add the prompt in the Generate Text block to summarize changes to the webpage

18. In “Output Behavior” select “Save to Variable”.

Specify an output variable for the webpage summary changes

19. In “Variable Name”, add “changeSummary”. This is the variable that the “Generate Text” block outputs the summary of webpage changes detected.

Specify the output Variable Name setting to changeSummary to store the summary of webpage changes

20. Right-click anywhere on the Automation Canvas, hover over “New Block”, then select “View All Blocks”.

View all blocks in the MindStudio Automation Canvas

All MindStudio blocks are displayed.

All MindStudio block display for selection

21. Search for “Send Email” block, then select the “Send Email” block.

Search for the Send Email block in MindStudio

22. In the “Account” setting, select your email address that is connected to the Send Email block, then skip to step 24. If this is the first time you are connecting the “Send Email” block to your email account, select “Connect a new account”.

Connect your email account to the Send Email block in MindStudio

23. Enter your email address to connect to the “Send Email” block, then click “Continue”. Complete the connection. When the connection procedure is complete, your email address displays in the “Account” setting.

24. In the “Subject” setting, add an email subject for when the AI agent has detected changes to the webpage. For example, “Website Changes Report”.

Add a subject in the Subject setting in the Send Email block for when webpage changes occur

25. In the “Message” setting, add “{{changeSummary}}”. This is the variable we specified to output the summary of detected changes from the “Generate Text” block.

Add {{changeSummary}} to the Message setting in the Send Email block

26. In the “Generate HTML” setting, select “Disabled”.

Disable the Generate HTML setting in the Send Email block

27. Connect the “Generate Text” block to the “Send Email” block.

Connect the Generate Text block to the Send Email block in the MindStudio Automation Canvas

28. Connect the “Send Email” block to the “End” block.

Connect the Send Email block to the End block in the MindStudio Automation Canvas

29. It’s time to test the AI agent. Click “Preview”, then click “Run in Debugger” (or Cmd/Ctrl+R).

Run the MindStudio AI agent in Debugger

30. Press “Run”.

Run Agent modal screen is displayed

31. MindStudio runs the AI agent in Debugger. Running the agent for the first time saves the initial webpage content to the global variable “global.scrapeResults”.

MindStudio AI agent running in Debugger

32. Click “Preview”, then click “Run in Debugger” (or Cmd/Ctrl+R) immediately after the first workflow run completes. The AI agent checks the webpage scrape against the global variable “global.scrapeResults”, then transitions to “End” because there are no differences between the two.

33. Click “Untitled AI Agent” above the Automation Canvas.

Viewing the metadata for the MindStudio AI agent

34. In “Agent Name” add a name for the AI agent.

35. Press “Publish” to publish your AI agent. The AI agent will run on the set schedule, then send you an email only when significant changes have been made to the specified webpage.

Click the Publish button to publish your MindStudio AI agent

Launch Your First Agent Today