1

Get your API Key

You need to generate an API key in the Developers page. This key is used to authenticate with the AgentGo service:

Copy your API Key and update your .env by adding the AGENTGO_API_KEY entry.

Alternatively, you can temporarily set the environment variable for a single bash command by prefixing it with AGENTGO_API_KEY=<your_api_key> in your terminal.

2

Install Playwright

3

Update your code or clone a template

Running your existing code with AgentGo only requires a few line changes:

4

What happens next

After running your code, the browser will navigate to Hacker News as specified in the example. The browser instance is running on AgentGo’s distributed network.

With this distributed architecture, you’ll experience better performance and reliability compared to traditional browser automation solutions, especially for tasks that require geographic distribution or high scalability.

That’s it! You’ve successfully created your first browser automation with AgentGo and Playwright.