Stagehand

SDK d’automatisation du navigateur associant code, actions IA et extraction structurée.

Visiter le site

Voir en action

Interface du produit

Stagehand Evals: inspect the plan before starting browsers

Author CLI capture shows evals run with --preview, selected harness/model, task counts and quarantined cases. It is a dry-run plan from the evaluation utility, not a browser action, a successful benchmark or an independent performance result. Full native capture is retained.

Author Stagehand Evals terminal screenshot of a --preview plan, with harness, model, category counts and skipped cases.
Voir l’image entière
Licence

PNG converted to lossless WebP with entire native RGBA equal. No crop, resize or new test. Author shell prompt, model label and dataset notes remain part of the capture.

MIT License

Copyright (c) 2024 Browserbase Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Exemple d’utilisation

Stagehand source example: act on an Example Domain link

Full original TypeScript file asks the agent to click the More information link and checks its returned success field. Run from the matching Stagehand SDK repository: it imports ../src/index.js and dotenv, needs local Chrome and OPENAI_API_KEY; extract also needs zod/v4. Source model label is preserved without an availability or successful-run claim.

Exemple d’entrée

import "dotenv/config";
import { localBrowser, Stagehand } from "../src/index.js";

const { OPENAI_API_KEY } = process.env;
if (!OPENAI_API_KEY) throw new Error();

const browser = await localBrowser.launch({ headless: true });
const stagehand = await Stagehand.create({
  browser,
  model: {
    modelName: "openai/gpt-5.4-mini",
    apiKey: OPENAI_API_KEY,
  },
});

const [page] = await browser.context.pages();
await page.goto("https://example.com");

const result = await stagehand.act(
  "Click the link that provides more information about Example Domain",
);

console.log(JSON.stringify(result.data, null, 2));

if (!result.data.success) {
  throw new Error(`act() failed: ${result.data.message}`);
}

await stagehand.close();
await browser.close();
Licence

Complete original source file unchanged; editorial title, context and prerequisites added. No installation, account operation, model call, form submission or claimed result was executed.

MIT License

Copyright (c) 2024 Browserbase Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Exemple d’utilisation

Stagehand source example: inspect candidate page actions

Full original TypeScript file asks for the Example Domain link and checks that matching actions were returned. Run from the matching Stagehand SDK repository: it imports ../src/index.js and dotenv, needs local Chrome and OPENAI_API_KEY; extract also needs zod/v4. Source model label is preserved without an availability or successful-run claim.

Exemple d’entrée

import "dotenv/config";
import { localBrowser, Stagehand } from "../src/index.js";

const { OPENAI_API_KEY } = process.env;
if (!OPENAI_API_KEY) throw new Error();

const browser = await localBrowser.launch({ headless: true });
const stagehand = await Stagehand.create({
  browser,
  model: {
    modelName: "openai/gpt-5.4-mini",
    apiKey: OPENAI_API_KEY,
  },
});

const [page] = await browser.context.pages();
await page.goto("https://example.com");

const result = await stagehand.observe(
  "Find the link that provides more information about Example Domain",
);

console.log(JSON.stringify(result.data, null, 2));

if (result.data.length === 0) {
  throw new Error("observe() returned no matching actions");
}

await stagehand.close();
await browser.close();
Licence

Complete original source file unchanged; editorial title, context and prerequisites added. No installation, account operation, model call, form submission or claimed result was executed.

MIT License

Copyright (c) 2024 Browserbase Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Exemple d’utilisation

Stagehand source example: extract a typed page heading

Full original TypeScript file extracts the heading and description from the author’s evaluation site using a Zod schema. Run from the matching Stagehand SDK repository: it imports ../src/index.js and dotenv, needs local Chrome and OPENAI_API_KEY; extract also needs zod/v4. Source model label is preserved without an availability or successful-run claim.

Exemple d’entrée

import "dotenv/config";
import { z } from "zod/v4";
import { localBrowser, Stagehand } from "../src/index.js";

const { OPENAI_API_KEY } = process.env;
if (!OPENAI_API_KEY) throw new Error();

const browser = await localBrowser.launch({ headless: true });
const stagehand = await Stagehand.create({
  browser,
  model: {
    modelName: "openai/gpt-5.4-mini",
    apiKey: OPENAI_API_KEY,
  },
});

const [page] = await browser.context.pages();
await page.goto("https://stagehand-eval-sites.vercel.app/sites/example/");

const result = await stagehand.extract(
  "Extract the page heading and description",
  z.object({
    heading: z.string(),
    description: z.string(),
  }),
);

console.log(JSON.stringify(result.data, null, 2));

await stagehand.close();
await browser.close();
Licence

Complete original source file unchanged; editorial title, context and prerequisites added. No installation, account operation, model call, form submission or claimed result was executed.

MIT License

Copyright (c) 2024 Browserbase Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Présentation du produit

Stagehand s’adresse aux développeurs qui pilotent leurs tâches de navigation dans du code. Une URL connue peut être ouverte par une commande déterministe, tandis que l’IA intervient pour interpréter un libellé, choisir un élément ou extraire des champs. Un collecteur peut ainsi ouvrir une fiche produit en code, puis récupérer ses informations selon un schéma.

Les trois primitives ont des rôles distincts : act effectue une action décrite, extract renvoie des données et observe repère des actions possibles. Elles se combinent avec navigation, sélecteurs et captures de type Playwright. La logique métier, les critères de réussite et la validation restent à définir dans votre application.

FONCTIONS INDIQUÉES PAR LA SOURCE

Ce que propose Stagehand

  1. 01Associer des opérations fixes à une interprétation par l’IA.
  2. 02Extraire des champs selon un schéma défini.
  3. 03Examiner les actions possibles avec observe avant une interaction.
MODE D’EMPLOI

Un parcours concret

  1. 01Définir une tâche précise et les champs ou l’état final attendus.
  2. 02Coder la navigation connue et réserver act, extract et observe aux étapes pertinentes.
  3. 03Contrôler les champs et la page finale, puis prévoir les erreurs avant une exécution régulière.

Résumé fondé sur la source ; les affirmations sur le produit n’ont pas été testées indépendamment.

Ce qui le distingue

Ce qui le distingue

Il convient aux scripts dont certaines étapes nécessitent de la souplesse. Gardez les étapes prévisibles explicites et vérifiez celles qui dépendent de l’IA à partir de l’état de la page et du résultat.

À qui il convient

À qui il convient

  • Développeurs maintenant des automatisations sur des pages variables.
  • Équipes intégrant des champs web structurés à une application existante.
AVANT DE CHOISIR

Points à vérifier

  • Préparer l’environnement du SDK et les paramètres du modèle et du navigateur.
  • Distinguer le coût du modèle de celui d’un navigateur hébergé ; le SDK ne rend pas tout le traitement gratuit.
  • Tester les changements de mise en page et d’authentification : l’IA peut sélectionner un mauvais élément.

Questions fréquentes

Stagehand est-il une extension de navigateur ?

La documentation le présente comme un SDK de développement intégré à votre code, et non comme une extension destinée aux utilisateurs finaux.

À quoi servent act, extract et observe ?

act effectue une interaction, extract récupère des informations structurées et observe identifie des actions possibles. La navigation prévisible peut rester du code classique.

Vérifié auprès de sources primaires

Les informations ont été vérifiées le 26 oct. 2026 sur le site officiel ou la documentation primaire.

Tâches connexes

ProduitsPrixAccèsCAS D’USAGE
StagehandCoûts selon le modèle et le navigateurSDK de développementAutomatiser un flux de travail
nanobotNon vérifiéWeb, API, Windows, macOS, LinuxGénérer du code prêt pour la production · Automatiser un flux de travail
KushoOffres gratuites et payantesAPIAutomatiser un flux de travail
MaxunNon vérifiéWeb, API, Browser extensionAutomatiser un flux de travail
n8nComparer édition et forfait actuel selon les exécutions de workflows, tours d’agents, concurrence, conservation des exécutions et crédits d’IA inclus. Vérifier si les modèles utilisent ces crédits ou vos propres identifiants fournisseur ; l’abonnement à la plateforme ne signifie pas des appels de modèle illimités.Utiliser n8n Cloud géré ou exploiter Community ou une édition commerciale. La disponibilité de l’Agent Builder indépendant, la configuration du sandbox et le mode d’exécution dépendent de la version et du déploiement ; les vérifier avant d’adopter un modèle.Automatiser un flux de travail