This guide demonstrates how to use Smooth to fill in complex, multi-step forms. You’ll learn how to structure the task prompt for these tasks.
1
Write the task instruction
Write detailed instructions that tell the agent exactly what to do. The best practice for form filling is to structure the prompt in 3 parts:
The goal
All information needed to fill-in the form
The expected output
Python
Copy
Ask AI
task_instructions = """Go to octopus.energy and get a quote for gas + electricity. Use the following information:- 1, Garlic Row, Cambridge CB5 8HW- Medium consumptionReturn the final monthly estimate for all available tariffs."""
2
Run the task
Run the task with a higher number of steps.
Python
Copy
Ask AI
task = smooth_client.run( task=task_instructions, max_steps=64, # Multi-step forms may require many steps)print(f"Live URL: {task.live_url()}")# Get the resultresult = task.result()print(f"Insurance quote result: {result}")
3
Done!
The agent will adapt to the form’s structure, whether it’s a single long page or multiple sequential steps, and handle dynamic fields that appear based on previous selections.