Scripts2026年4月2日·1 分钟阅读
Stagehand — AI Browser Automation Framework
Three AI primitives — act(), extract(), observe() — to automate any website with natural language. By Browserbase. 21K+ stars.
TO
TokRepo精选 · Community
快速使用
先拿来用,再决定要不要深挖
这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。
```bash
npm install @browserbasehq/stagehand
```
```typescript
import { Stagehand } from "@browserbasehq/stagehand";
const stagehand = new Stagehand({ env: "LOCAL", modelName: "gpt-4o" });
await stagehand.init();
await stagehand.page.goto("https://example.com");
// 用自然语言提取数据
const data = await stagehand.page.extract({
instruction: "提取页面标题和所有链接",
schema: z.object({ title: z.string(), links: z.array(z.string()) }),
});
// 用自然语言执行操作
await stagehand.page.act({ action: "点击搜索按钮" });
```
---
🙏
来源与感谢
> Created by [Browserbase](https://github.com/browserbase). Licensed under MIT.
>
> [stagehand](https://github.com/browserbase/stagehand) — ⭐ 21,800+
讨论
登录后参与讨论。
还没有评论,来写第一条吧。
相关资产
Trae Agent — AI Coding Agent by ByteDance
Open-source autonomous coding agent for software engineering tasks. Multi-provider LLM support. By ByteDance. 11K+ stars.
TokRepo精选
bolt.diy — AI Full-Stack App Builder, Any LLM
Community fork of Bolt.new. Prompt, edit, and deploy full-stack web apps with any LLM provider. 19K+ GitHub stars.
TokRepo精选
Daytona — Secure Sandboxes for AI Code Execution
Elastic infrastructure for running AI-generated code safely. SDKs for Python, TypeScript, Go. By Daytona. 71K+ GitHub stars.
TokRepo精选