Stagehand

SDK de automatización del navegador que combina código, acciones de IA y extracción.

Ver en acción

Interfaz del producto

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.
Ver imagen completa
Licencia

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.
Ejemplo de uso

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.

Entrada de ejemplo

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();
Licencia

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.
Ejemplo de uso

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.

Entrada de ejemplo

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();
Licencia

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.
Ejemplo de uso

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.

Entrada de ejemplo

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();
Licencia

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.

Descripción del producto

Stagehand permite a los desarrolladores controlar tareas de navegador desde código. Una navegación conocida puede seguir siendo determinista, mientras que la IA interpreta etiquetas, elige elementos o extrae campos. Por ejemplo, un recopilador puede abrir una ficha de producto mediante código y después recuperar los datos con un esquema.

Sus primitivas tienen funciones distintas: act realiza una acción descrita, extract devuelve datos y observe identifica acciones posibles. Se combinan con navegación, localizadores y capturas de estilo Playwright. La lógica de negocio, los criterios de éxito y la validación siguen siendo responsabilidad de la aplicación.

FUNCIONES INDICADAS POR LA FUENTE

Qué ofrece Stagehand

  1. 01Combinar operaciones fijas con interpretación mediante IA.
  2. 02Extraer campos conforme a un esquema definido.
  3. 03Examinar acciones posibles con observe antes de interactuar.
CÓMO USARLO

Un flujo práctico

  1. 01Definir una tarea y los campos o el estado final que indican éxito.
  2. 02Programar la navegación conocida y usar act, extract u observe donde sea necesario.
  3. 03Revisar los campos y la página final y añadir gestión de errores antes de programar ejecuciones.

Resumen basado en la fuente; las afirmaciones del producto no se han probado de forma independiente.

Qué lo diferencia

Qué lo diferencia

Encaja en scripts donde solo algunos pasos necesitan interpretación flexible. Conviene mantener explícitos los pasos previsibles y verificar los de IA según el estado de la página y el resultado.

Para quién es adecuado

Para quién es adecuado

  • Desarrolladores que mantienen automatizaciones con diseños de página variables.
  • Equipos que incorporan datos web estructurados a aplicaciones existentes.
ANTES DE ELEGIR

Qué comprobar

  • Preparar el entorno del SDK y la configuración de modelo y navegador.
  • Calcular por separado el modelo y el navegador alojado; disponer del SDK no hace gratuito todo el proceso.
  • Probar cambios de diseño y de autenticación; la IA puede elegir un elemento incorrecto.

Preguntas frecuentes

¿Es una extensión de navegador?

La documentación oficial describe un SDK de desarrollo que se integra en código propio, no una extensión para usuarios finales.

¿Qué hacen act, extract y observe?

act ejecuta interacciones, extract obtiene información estructurada y observe identifica acciones posibles. La navegación previsible puede seguir usando código convencional.

Verificado con fuentes primarias

La información se contrastó el 26 oct 2026 con el sitio oficial o documentación primaria.

Relacionados por tarea

ProductosPrecioAccesoCASOS DE USO
StagehandCoste según modelo y navegadorSDK de desarrolloAutomatizar flujos de trabajo
nanobotNo verificadoWeb, API, Windows, macOS, LinuxGenerar código listo para producción · Automatizar flujos de trabajo
KushoPlanes gratis y de pagoAPIAutomatizar flujos de trabajo
MaxunNo verificadoWeb, API, Browser extensionAutomatizar flujos de trabajo
n8nCompara edición y plan vigente por ejecuciones de flujos, turnos de agentes, concurrencia, retención de ejecuciones guardadas y créditos de IA incluidos. Comprueba si los modelos usan esos créditos o tus credenciales de proveedor; una suscripción a la plataforma no implica llamadas ilimitadas al modelo.Usa n8n Cloud gestionado o ejecuta Community o una edición comercial. La disponibilidad de Agent Builder independiente, la configuración del sandbox y el modo de ejecución dependen de versión y despliegue; compruébalos antes de adoptar una plantilla.Automatizar flujos de trabajo