-
Notifications
You must be signed in to change notification settings - Fork 1.3k
docs: add BROWSERBASE_CONFIG_DIR file-based session logging #1508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Document the new file-based logging feature that writes detailed logs to ~/.config/browserbase/sessions/ for debugging agent workflows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
Greptile SummaryThis PR adds comprehensive documentation for file-based session logging in Stagehand via the Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Stagehand
participant FileSystem
participant Logs
User->>Stagehand: Set BROWSERBASE_CONFIG_DIR env var
User->>Stagehand: Run script with imports stagehand
Stagehand->>FileSystem: Create ~/.config/browserbase/sessions/session-id/
Stagehand->>FileSystem: Create 'latest' symlink
Note over Stagehand: Execute automation operations
Stagehand->>Stagehand: agent.execute()
Stagehand->>Logs: Write to llm_events.log
Stagehand->>Logs: Write to cdp_events.log
Stagehand->>Logs: Write to stagehand.log
Stagehand->>Stagehand: act()
Stagehand->>Logs: Write operation to stagehand.log
Stagehand->>Logs: Write LLM request/response to llm_events.log
Stagehand->>Stagehand: extract()
Stagehand->>Logs: Write operation to stagehand.log
Stagehand->>Logs: Write LLM request/response to llm_events.log
User->>FileSystem: tail -f ~/.config/browserbase/sessions/latest/*.log
FileSystem-->>User: Stream logs in real-time
User->>FileSystem: cat ~/.config/browserbase/sessions/latest/*.log | sort
FileSystem-->>User: Display chronological logs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (1)
-
packages/docs/v3/configuration/logging.mdx, line 623-641 (link)logic: Several anchor links in the "Next Steps" section don't exist in the observability documentation:
#history-tracking- observability doc only has main sections, no History API subsection#detailed-inference-logging- should be in logging.mdx itself, not observability
The observability.mdx has these sections: Browserbase Session Monitoring, Local Environment Monitoring, Resource Usage Monitoring, Real-Time Metrics & Monitoring, Best Practices, Next Steps
1 file reviewed, 1 comment
Remove cards linking to non-existent anchors (#history-tracking, #detailed-inference-logging) in the observability docs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Rename "Complete Observability Guide" to "Debugging Tips" - Replace "Complete Logging Guide" with "LLM Inference Debugging" linking to correct anchor 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
…ct links 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Keep only the leading slash fix, revert title/icon changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Rename cards to match their destinations - Update descriptions to be accurate and distinct 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/docs/v3/configuration/observability.mdx">
<violation number="1" location="packages/docs/v3/configuration/observability.mdx:364">
P2: Both cards have identical descriptions which appears to be a copy-paste error. The "Complete Logging Guide" card should have a description specific to logging functionality, not the same text as the observability card.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Summary
BROWSERBASE_CONFIG_DIRenvironment variable for file-based session loggingllm_events.log,cdp_events.log,stagehand.log)tail -fand chronological reviewSummary by cubic
Document file-based Stagehand session logging via BROWSERBASE_CONFIG_DIR with setup, log paths, tail/review tips, and log file types. Also fix broken links in Next Steps and add missing leading slashes in observability.
Written for commit bb71828. Summary will update on new commits.