Tired of editing a Swarmbot script for every new search? Ask AI for run parameters

When AI helps you write a reusable Swarmbot script, separate the steps that stay the same from values that change. Make a search term a run parameter instead of editing code each time.

Run parameters let a Swarmbot script accept new input without rewriting its steps every time. This is useful when the app workflow stays the same but the search term, target file, or condition changes. To begin, open a saved project in Swarmbot's script development view. Tell the script assistant which steps are fixed and which values a person should supply before each run, then review its draft.

Describe the workflow separately from today's value

Suppose you want to search for different products on an authorized test device. You could tell Swarmbot AI:

Draft one small step for this script project. Starting from the app page I specify, open search, enter the keyword supplied at run time, and only check whether the results page appears. Keep navigation steps fixed. Declare the keyword as a required script parameter with a clear label and description; do not hard-code my example word. Draft only—do not run it or proceed to ordering or payment. Ask me if the page or current function documentation is unclear.

That request identifies the starting page, the repeatable actions, the changing input, the success condition, and the stopping point. The actual page and script functions must be checked against your project and Swarmbot's current documentation. AI should not invent a button or an unverified API call.

Check that AI created a real input field

A Swarmbot script project declares parameters in script.json. Ask AI to give each input a stable name, suitable type, human-readable title and description, and the right required setting. The run panel uses that declaration to show a form, and the script entry point reads the value entered for this run. Replacing one hard-coded sample word with another is not parameterization: you would still edit the script next time.

Before saving, inspect the form: does it ask only for information that really changes? Could an example be mistaken for the live target? Does an empty required value stop the step instead of sending it to the wrong page? Check one small run on a test device with non-sensitive input before sharing the script with a colleague. On another device, confirm the app version, sign-in state, and starting page again; parameters cannot fix a different interface.

Keep sensitive and high-impact values out of shortcuts

Do not paste real passwords, customer data, or one-time codes into an AI prompt or script constant. Swarmbot's project documentation says ordinary run parameters may be remembered per account and script, while password-type values are not. For a step that deletes, submits, or pays, a confirmation input should default to off and should not remember the previous choice. Yesterday's checkbox is not today's authorization. OWASP's secrets guidance also advises against hard-coding secrets in source code.

New to scripting with AI? Start with the small-step guide. This article focuses on leaving changing values for the run form. For image resources, see the previous guide to preparing a small target image. Check the public Swarmbot release information and your current project view for available features.

参考来源