New:Socket for Asana Is Now Available.Learn more
Get Started

@mastra/stagehand

Package Overview
Dependencies
Maintainers
7
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
This package has malicious versions linked to the ongoing "Mastra AI framework compromise" supply chain attack.

Affected versions:

0.2.5
View campaign page

@mastra/stagehand

AI-powered browser automation for Mastra agents using Stagehand

latest
Source
npmnpm
Version
0.3.4
Version published
Weekly downloads
29K
37.46%
Maintainers
7
Weekly downloads
 
Created
Source

@mastra/stagehand

AI-powered browser automation for Mastra agents using Stagehand.

Installation

npm install @mastra/stagehand

Usage

import { Agent } from '@mastra/core/agent';
import { StagehandBrowser } from '@mastra/stagehand';

// Create a Stagehand browser
const browser = new StagehandBrowser({
  model: 'openai/gpt-5.4',
  headless: true,
});

// Create an agent with the browser
const agent = new Agent({
  name: 'web-agent',
  instructions: 'You are a helpful web assistant.',
  model: 'openai/gpt-5.4',
  browser,
});

// Use the agent to browse the web with natural language
const result = await agent.generate('Go to google.com and search for "Mastra AI"');

Documentation

Changelog

See the package changelog for version history and release notes.

Support

We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.

FAQs

Package last updated on 03 Sep 2026

Related posts