Skip to main content

1. Install AgentKit

Install AgentKit, Browserbase, and Playwright core:
Don’t have an existing project? Create a new one with your preferred package manager before continuing.

2. Set up an AgentKit network with an agent

Create an agent and its associated network, for example a Reddit search agent:

3. Create a Browserbase tool

Configure the Browserbase SDK and create a tool that can search Reddit:
Configure your BROWSERBASE_API_KEY in the .env file. You can find your API key in the Browserbase dashboard.
Build tools using Browserbase with Inngest’s step.run() function. This ensures the tool only runs once across multiple runs. See the multi-step tools page for more on step.run().

4. Put it all together

Here’s the full example:
For a complete working example, check out the Reddit search agent using Browserbase example.

Next steps

AgentKit docs

Full AgentKit SDK reference and examples

Stagehand

Autonomous browser automation SDK

Browserbase docs

Sessions, proxies, and browser configuration