Agent steps on screens
Describe the task and what is on the screen, and have Gemini 3.6 Flash decide the next action and what has to be true first. Log each step so you can replay a failed run.
Example: What should the agent click next?
Material
- Task
- Export last month’s invoices as a CSV file.
- Current screen
- Invoices page. Date filter shows This month. Buttons: Filter, Export PDF, Export CSV (disabled until a date range is selected).
PromptUsing the task and the current screen, give the agent’s next actions in order, and say what has to be true before each one.
Sample answer · written by hand to show the reasoning
First change the date filter from This month to Last month, because the filter decides which invoices are exported. Once a range is selected, Export CSV becomes available; click it. Then open the file and check that its row count matches the number of invoices the page shows for last month.