Skip to content

feat: Add Crawlee + Stagehand actor templates (JS + TS)#670

Open
B4nan wants to merge 1 commit intomasterfrom
feat/crawlee-stagehand-templates
Open

feat: Add Crawlee + Stagehand actor templates (JS + TS)#670
B4nan wants to merge 1 commit intomasterfrom
feat/crawlee-stagehand-templates

Conversation

@B4nan
Copy link
Member

@B4nan B4nan commented Feb 6, 2026

Summary

  • Add js-crawlee-stagehand-chrome and ts-crawlee-stagehand-chrome templates using StagehandCrawler from @crawlee/stagehand (Crawlee 3.16+)
  • Templates demonstrate AI-powered browser automation: page.act() for natural language actions and page.extract() with Zod schemas for structured data extraction
  • Default LLM provider is OpenAI (gpt-4o-mini); templates are classified under useCases: ["AI", "WEB_SCRAPING"] so tests run in the node-js-llm-ai-templates group

Test plan

  • Verify cd templates/js-crawlee-stagehand-chrome && npm install && npm run lint && npm run format:check passes
  • Verify cd templates/ts-crawlee-stagehand-chrome && npm install && npm run lint && npm run format:check passes
  • Verify .actor/actor.json has correct templateId and environmentVariables.OPENAI_API_KEY
  • Verify README.md contains <!-- This is an Apify template readme -->
  • Run npm run build from root to generate zip archives
  • Run npm run test-llm-ai-node-templates (requires OPENAI_API_KEY env var)

🤖 Generated with Claude Code

Add two new actor templates using StagehandCrawler from @crawlee/stagehand,
which combines Crawlee's crawling infrastructure with Stagehand's AI-powered
browser automation (act(), extract(), observe()).

Templates:
- js-crawlee-stagehand-chrome: JavaScript version
- ts-crawlee-stagehand-chrome: TypeScript version

Both demonstrate page.act() for natural language actions and page.extract()
for structured data extraction with Zod schemas. Default LLM provider is
OpenAI (gpt-4o-mini).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added this to the 133rd sprint - Tooling team milestone Feb 6, 2026
@github-actions github-actions bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Feb 6, 2026
@B4nan B4nan added the adhoc Ad-hoc unplanned task added during the sprint. label Feb 6, 2026
@danpoletaev danpoletaev force-pushed the feat/crawlee-stagehand-templates branch from 2dd49c8 to 4ef3316 Compare March 6, 2026 21:52
@B4nan B4nan force-pushed the feat/crawlee-stagehand-templates branch from 4ef3316 to 2dd49c8 Compare March 6, 2026 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant