Skip to main content
Stagehand comes with 4 primary APIs that can be directly used as tools:
  • goto(): navigate to a specific URL
  • observe(): observe the current page
  • extract(): extract data from the current page
  • act(): take action on the current page
These methods can be used as tools in AgentKit, enabling agents to browse the web autonomously. Below is an example of a simple search agent that uses Stagehand to search the web:
These 4 AgentKit tools using Stagehand enable the Web Search Agent to browse the web autonomously. The getStagehand() helper function retrieves the persisted instance created for the network execution. For a complete example of a simple search agent using Stagehand, check out the Simple Search Agent using Stagehand example.