mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-14 16:35:01 -05:00
fix(browserbase): consoldiated stagehand agent and extract, updated wand UI to resize based on panel size (#2340)
This commit is contained in:
@@ -88,7 +88,6 @@
|
||||
"sqs",
|
||||
"ssh",
|
||||
"stagehand",
|
||||
"stagehand_agent",
|
||||
"stripe",
|
||||
"stt",
|
||||
"supabase",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Stagehand Extract
|
||||
description: Extract data from websites
|
||||
title: Stagehand
|
||||
description: Web automation and data extraction
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -11,21 +11,28 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Stagehand](https://stagehand.com) is a tool that allows you to extract structured data from webpages using Browserbase and OpenAI.
|
||||
[Stagehand](https://stagehand.com) is a tool that enables both extraction of structured data from webpages and autonomous web automation using Browserbase and modern LLMs (OpenAI or Anthropic).
|
||||
|
||||
With Stagehand, you can:
|
||||
Stagehand offers two main capabilities in Sim:
|
||||
|
||||
- **Extract structured data**: Extract structured data from webpages using Browserbase and OpenAI
|
||||
- **Save data to a database**: Save the extracted data to a database
|
||||
- **Automate workflows**: Automate workflows to extract data from webpages
|
||||
- **stagehand_extract**: Extract structured data from a single webpage. You specify what you want (a schema), and the AI retrieves and parses the data in that shape from the page. This is best for extracting lists, fields, or objects when you know exactly what information you need and where to get it.
|
||||
|
||||
In Sim, the Stagehand integration enables your agents to extract structured data from webpages using Browserbase and OpenAI. This allows for powerful automation scenarios such as data extraction, data analysis, and data integration. Your agents can extract structured data from webpages, save the extracted data to a database, and automate workflows to extract data from webpages. This integration bridges the gap between your AI workflows and your data management system, enabling seamless data extraction and integration. By connecting Sim with Stagehand, you can automate data extraction processes, maintain up-to-date information repositories, generate reports, and organize information intelligently - all through your intelligent agents.
|
||||
- **stagehand_agent**: Run an autonomous web agent capable of completing multi-step tasks, interacting with elements, navigating between pages, and returning structured results. This is much more flexible: the agent can do things like log in, search, fill forms, gather data from multiple places, and output a final result according to a requested schema.
|
||||
|
||||
**Key Differences:**
|
||||
|
||||
- *stagehand_extract* is a rapid “extract this data from this page” operation. It works best for direct, one-step extraction tasks.
|
||||
- *stagehand_agent* performs complex, multi-step autonomous tasks on the web — such as navigation, searching, or even transactions — and can dynamically extract data according to your instructions and an optional schema.
|
||||
|
||||
In practice, use **stagehand_extract** when you know what you want and where, and use **stagehand_agent** when you need a bot to think through and execute interactive workflows.
|
||||
|
||||
By integrating Stagehand, Sim agents can automate data gathering, analysis, and workflow execution on the web: updating databases, organizing information, and generating custom reports—seamlessly and autonomously.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Stagehand into the workflow. Can extract structured data from webpages.
|
||||
Integrate Stagehand into the workflow. Can extract structured data from webpages or run an autonomous agent to perform tasks.
|
||||
|
||||
|
||||
|
||||
@@ -41,7 +48,8 @@ Extract structured data from a webpage using Stagehand
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `url` | string | Yes | URL of the webpage to extract data from |
|
||||
| `instruction` | string | Yes | Instructions for extraction |
|
||||
| `apiKey` | string | Yes | OpenAI API key for extraction \(required by Stagehand\) |
|
||||
| `provider` | string | No | AI provider to use: openai or anthropic |
|
||||
| `apiKey` | string | Yes | API key for the selected provider |
|
||||
| `schema` | json | Yes | JSON schema defining the structure of the data to extract |
|
||||
|
||||
#### Output
|
||||
@@ -50,6 +58,28 @@ Extract structured data from a webpage using Stagehand
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | object | Extracted structured data matching the provided schema |
|
||||
|
||||
### `stagehand_agent`
|
||||
|
||||
Run an autonomous web agent to complete tasks and extract structured data
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `startUrl` | string | Yes | URL of the webpage to start the agent on |
|
||||
| `task` | string | Yes | The task to complete or goal to achieve on the website |
|
||||
| `variables` | json | No | Optional variables to substitute in the task \(format: \{key: value\}\). Reference in task using %key% |
|
||||
| `format` | string | No | No description |
|
||||
| `provider` | string | No | AI provider to use: openai or anthropic |
|
||||
| `apiKey` | string | Yes | API key for the selected provider |
|
||||
| `outputSchema` | json | No | Optional JSON schema defining the structure of data the agent should return |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `agentResult` | object | Result from the Stagehand agent execution |
|
||||
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
---
|
||||
title: Stagehand Agent
|
||||
description: Autonomous web browsing agent
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="stagehand_agent"
|
||||
color="#FFC83C"
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Stagehand](https://www.stagehand.dev/) is an autonomous web agent platform that enables AI systems to navigate and interact with websites just like a human would. It provides a powerful solution for automating complex web tasks without requiring custom code or browser automation scripts.
|
||||
|
||||
With Stagehand, you can:
|
||||
|
||||
- **Automate web navigation**: Enable AI to browse websites, click links, fill forms, and interact with web elements
|
||||
- **Extract structured data**: Collect specific information from websites in a structured, usable format
|
||||
- **Complete complex workflows**: Perform multi-step tasks across different websites and web applications
|
||||
- **Handle authentication**: Navigate login processes and maintain sessions across websites
|
||||
- **Process dynamic content**: Interact with JavaScript-heavy sites and single-page applications
|
||||
- **Maintain context awareness**: Keep track of the current state and history while navigating
|
||||
- **Generate detailed reports**: Receive comprehensive logs of actions taken and data collected
|
||||
|
||||
In Sim, the Stagehand integration enables your agents to seamlessly interact with web-based systems as part of their workflows. This allows for sophisticated automation scenarios that bridge the gap between your AI agents and the vast information and functionality available on the web. Your agents can search for information, interact with web applications, extract data from websites, and incorporate these capabilities into their decision-making processes. By connecting Sim with Stagehand, you can create agents that extend beyond API-based integrations to navigate the web just as a human would - filling forms, clicking buttons, reading content, and extracting valuable information to complete their tasks more effectively.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Stagehand Agent into the workflow. Can navigate the web and perform tasks.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `stagehand_agent`
|
||||
|
||||
Run an autonomous web agent to complete tasks and extract structured data
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `startUrl` | string | Yes | URL of the webpage to start the agent on |
|
||||
| `task` | string | Yes | The task to complete or goal to achieve on the website |
|
||||
| `variables` | json | No | Optional variables to substitute in the task \(format: \{key: value\}\). Reference in task using %key% |
|
||||
| `format` | string | No | No description |
|
||||
| `apiKey` | string | Yes | OpenAI API key for agent execution \(required by Stagehand\) |
|
||||
| `outputSchema` | json | No | Optional JSON schema defining the structure of data the agent should return |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `agentResult` | object | Result from the Stagehand agent execution |
|
||||
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `stagehand_agent`
|
||||
Reference in New Issue
Block a user