import asyncio, time, sys from browser_use import Agent, ChatOllama, Browser async def main(): llm = ChatOllama(model=sys.argv[1], host="http://localhost:11434") browser = Browser(executable_path="/usr/bin/google-chrome", headless=True) agent = Agent(task="Go to https://www.gov.uk/vat-rates and report the UK standard VAT rate and the reduced rate, exactly as stated on the page. Then finish.", llm=llm, browser=browser, use_vision=False) s=time.time(); h = await agent.run(max_steps=8) print("\n=====FINAL=====\n", h.final_result(), "\nSUCCESS:", h.is_successful(), "STEPS:", len(h.history), f"ELAPSED {time.time()-s:.1f}s") asyncio.run(main())