Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fresh-stones-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-browser-app": patch
---

Ship Stagehand agent instructions in generated projects.
20 changes: 20 additions & 0 deletions template/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Stagehand Project

<!-- BEGIN:stagehand-agent-rules -->

Before any Stagehand work, find and read the relevant doc in `node_modules/@browserbasehq/stagehand/dist/docs/`. The installed package docs are the source of truth for this project's Stagehand version.

Useful starting points:

- `node_modules/@browserbasehq/stagehand/dist/docs/index.md`
- `node_modules/@browserbasehq/stagehand/dist/docs/v3/first-steps/quickstart.md`
- `node_modules/@browserbasehq/stagehand/dist/docs/v3/references/stagehand.md`

Useful searches:

```bash
rg "stagehand\\.act|stagehand\\.extract|stagehand\\.observe|stagehand\\.agent" node_modules/@browserbasehq/stagehand/dist/docs
rg "env:|model:|browserbaseSession" node_modules/@browserbasehq/stagehand/dist/docs
```

<!-- END:stagehand-agent-rules -->
4 changes: 3 additions & 1 deletion template/claude.md → template/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@AGENTS.md

# Stagehand Project

This is a project that uses Stagehand V3, a browser automation framework with AI-powered `act`, `extract`, `observe`, and `agent` methods.
Expand Down Expand Up @@ -260,4 +262,4 @@ await page2.goto("https://example2.com");
// Pass { page } option to target a specific page
await stagehand.act("click button", { page: page1 });
await stagehand.extract("get title", { page: page2 });
```
```