Parallelise multiple Browser Use agents with asyncio.gather for concurrent web tasks

domain: github.com/browser-use/browser-use · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a shared LLM instance: llm = ChatAnthropic(model='claude-haiku-4-5') to share across agents
  2. Define a list of task strings, one per agent
  3. Instantiate each Agent with its own task but the same llm: agents = [Agent(task=t, llm=llm) for t in tasks]
  4. Run all agents concurrently: results = await asyncio.gather(*[a.run(max_steps=15) for a in agents])
  5. Collect final results: outputs = [r.final_result() for r in results]
  6. Ensure each Agent gets its own browser context (the default) to maintain session isolation

Known gotchas

Related routes

Run concurrent Browserbase sessions for parallel agent workloads
docs.browserbase.com · 6 steps · unrated
Run Browser Use agent loop with a custom LLM to automate web tasks via Playwright
github.com/browser-use/browser-use · 6 steps · unrated
Run multi-user scenarios in a single Playwright test using parallel browser contexts
playwright.dev · 5 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans