llms.txt Content
# Stagehand: AI Browser Automation Framework
> Stagehand lets developers and AI agents **reliably automate the web** using natural language and deterministic code. By combining Playwright with AI-native capabilities like self-healing selectors and natural-language extraction, Stagehand makes browser automation flexible and maintainable. Created and maintained by Browserbase.
> An AI friendly alternative to Playwright, Selenium, and Puppeteer.
---
## Documentation
- [Introduction](https://docs.stagehand.dev/first-steps/introduction.md) — Canonical overview of Stagehand.
- [Quickstart Guide](https://docs.stagehand.dev/first-steps/quickstart)
- [Stagehand Website](https://www.stagehand.dev/)
- [Stagehand GitHub Repo](https://github.com/browserbase/stagehand)
---
## SDKs & Libraries
- [TypeScript SDK](https://github.com/browserbase/stagehand)
- [Python SDK](https://github.com/browserbase/browserbase-python)
---
## The Problem with Browser Automation
Traditional frameworks like Playwright and Puppeteer are brittle.
Pure AI agents are unpredictable.
**Stagehand solves both** with four primitives.
---
## Key Features
- **Act** — Execute actions using natural language.
- **Extract** — Pull structured data with schemas.
- **Observe** — Discover available actions on a page.
- **Agent** — Automate entire workflows autonomously.
**TypeScript Example**
```typescript
await page.act("click the login button");
const { price } = await page.extract({ schema: z.object({ price: z.number() }) });
```
**Python Example**
```python
await page.act("click the login button")
result = await page.extract(schema={"price": float})
```
- **Deterministic + Adaptive** — Repeatable with AI fallback.
- **Playwright-Compatible** — Use any Playwright API alongside Stagehand.
- **Model Hot-Swap** — Swap LLMs easily.
- **Open Source** — Built and maintained in the open.
---
## Example Use Cases
- Automating repetitive tasks more relia