-
Notifications
You must be signed in to change notification settings - Fork 1.1k
google cua docs #1111
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
google cua docs #1111
Conversation
|
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.
Greptile Overview
Summary
This PR updates the documentation to promote Google as the primary provider for Stagehand's computer use agents. The changes add Google to the supported AI providers list and comprehensively update all code examples throughout the agent documentation to use Google's `gemini-2.5-computer-use-preview` model instead of OpenAI or Anthropic models. This represents a strategic documentation shift to position Google as the recommended default provider while maintaining support for existing providers.The changes integrate with Stagehand's existing multi-provider architecture that already supports OpenAI and Anthropic models. Based on the CHANGELOG context, Google Generative models support was added in version 2.1.0, and this PR appears to be updating the documentation to reflect improved capabilities or performance of Google's computer use models. The documentation now consistently shows Google provider examples with GOOGLE_API_KEY
environment variable usage and the specialized computer use model.
PR Description Notes:
- The PR description is empty with only template headers ("why", "what changed", "test plan") and no content
- This makes it difficult to understand the motivation and testing approach for these changes
Important Files Changed
Changed Files
Filename | Score | Overview |
---|---|---|
docs/references/agent.mdx | 5/5 | Added Google as a supported provider option with documentation for gemini-2.5-computer-use-preview model |
docs/basics/agent.mdx | 5/5 | Updated all code examples to use Google provider as the primary/default option instead of OpenAI/Anthropic |
Confidence score: 5/5
- This PR is safe to merge with minimal risk as it only contains documentation updates
- Score reflects that these are purely additive documentation changes with no code modifications that could break functionality
- No files require special attention as both changes are straightforward documentation updates
Sequence Diagram
sequenceDiagram
participant User
participant Stagehand
participant Agent
participant Browser
participant AIProvider as "AI Provider (OpenAI/Anthropic/Google)"
participant MCP as "MCP Services"
User->>Stagehand: "new Stagehand(config)"
Stagehand->>Stagehand: "init()"
Stagehand->>Browser: "Launch browser instance"
Browser-->>Stagehand: "Browser ready"
User->>Stagehand: "agent(agentConfig)"
Stagehand->>Agent: "Create agent instance"
Agent->>AIProvider: "Initialize with model & instructions"
AIProvider-->>Agent: "Provider ready"
opt MCP Integrations
Agent->>MCP: "Connect to MCP servers"
MCP-->>Agent: "External tools available"
end
User->>Agent: "execute(instruction)"
Agent->>Agent: "Parse instruction & context"
Agent->>AIProvider: "Plan task execution"
AIProvider-->>Agent: "Action plan"
loop Until task complete or maxSteps reached
Agent->>Browser: "Take screenshot (if autoScreenshot)"
Browser-->>Agent: "Current page state"
Agent->>AIProvider: "Analyze page & determine next action"
AIProvider-->>Agent: "Next action decision"
alt Browser Action
Agent->>Browser: "Execute action (click/type/navigate)"
Browser-->>Agent: "Action result"
else External Tool Action
Agent->>MCP: "Call external service"
MCP-->>Agent: "Service response"
end
Agent->>Agent: "Check task completion"
opt Wait between actions
Agent->>Agent: "Wait (waitBetweenActions ms)"
end
end
Agent->>Agent: "Compile execution results"
Agent-->>User: "AgentResult with success, actions, metadata"
2 files reviewed, no comments
why
what changed
test plan