Skip to main content
Hyperbrowser lets you run powerful, AI-driven browser agents in managed cloud sessions. Whether you prefer open-source frameworks or cutting‑edge model-native agents, you can start tasks with a single API call and watch them execute live.
All agents share the same operational model: start a task, optionally poll for status, and fetch the final result. Use our SDK helpers like startAndWait() for a simple blocking workflow, or the async pattern for full control.

Which agent should I use?

Quickstart

The simplest way to run any agent is to call its startAndWait() method from our SDKs. Here’s a representative example using Browser‑Use:
import { Hyperbrowser } from "@hyperbrowser/sdk";
import { config } from "dotenv";

config();

const client = new Hyperbrowser({
  apiKey: process.env.HYPERBROWSER_API_KEY,
});

async function main() {
  const result = await client.agents.browserUse.startAndWait({
    task: "Go to Hacker News and tell me the title of the top post",
    llm: "gemini-2.0-flash",
    maxSteps: 20,
  });

  console.log(`Output:\n${result.data?.finalResult}`);
}

main().catch((err) => {
  console.error(`Error: ${err.message}`);
});
Switch the agent family by swapping the SDK path, e.g. client.agents.claudeComputerUse.startAndWait(...), client.agents.cua.startAndWait(...), client.agents.geminiComputerUse.startAndWait(...), or client.agents.hyperAgent.startAndWait(...).

Best practices

Be explicit about the goal and constraints. Prefer “go to example.com, open pricing, extract Enterprise monthly price” to vague prompts.
Simple tasks typically succeed within 10–20 steps; complex multi‑page flows may need 50+. Monitor failures and adjust maxSteps and maxFailures.
Create a session once, pass sessionId to successive tasks, and set keepBrowserOpen: true where you need continuity.
Set useCustomApiKeys: true and provider your own API Keys to pass calls to your own organization.

Explore agents