Skip to content

Conversation

shubh24
Copy link

@shubh24 shubh24 commented Sep 19, 2025

Why

There was no documentation for the stagehand.history feature, which provides users with a chronological record of all Stagehand operations during an
automation session. This left users unaware of this useful debugging and monitoring capability.

What Changed

  • Added comprehensive documentation for stagehand.history to docs/configuration/observability.mdx
  • Included basic usage examples showing how to access and examine operation history

Copy link

changeset-bot bot commented Sep 19, 2025

⚠️ No Changeset found

Latest commit: a8c5052

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Summary

This PR adds comprehensive documentation for the stagehand.history feature in the observability guide. The documentation explains how to access and examine the chronological record of Stagehand operations during automation sessions.

  • Adds new "Action History Tracking" section with clear usage examples
  • Provides both TypeScript and Python code samples
  • Documentation aligns with the actual HistoryEntry interface implementation
  • Includes practical examples showing how to iterate through and examine history entries

Confidence score: 4/5

  • This PR is safe to merge with minimal risk
  • Well-written documentation addition that accurately reflects the existing API. Only minor style improvement needed for Python naming convention
  • No files require special attention

1 file reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

# Perform various operations
await stagehand.page.goto("https://example.com")
await stagehand.page.act("click the login button")
user_info = await stagehand.page.extract("extract user profile data")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: should be user_info to follow snake_case convention for Python variables

Suggested change
user_info = await stagehand.page.extract("extract user profile data")
user_info = await stagehand.page.extract("extract user profile data")

Context Used: Rule - Use camelCase naming convention for TypeScript code and snake_case naming convention for Python code in documentation examples. (link)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant