> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nexalayer.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Proxy Sessions for Puppeteer AI Agents

> Create a NexaLayer Session, pass its proxy to Puppeteer, monitor health, and clean up safely.

# Proxy Sessions for Puppeteer AI Agents

Create a Session only after reading the current product price and obtaining approval. When the Session is active, launch Chrome with the returned proxy endpoint:

```js theme={null}
const browser = await puppeteer.launch({
  args: [`--proxy-server=${proxy.protocol}://${proxy.host}:${proxy.port}`],
});
const page = await browser.newPage();
await page.authenticate({ username: proxy.username, password: proxy.password });
```

Report execution Telemetry, use Session Health to decide whether to rotate, and terminate the Session in a `finally` block. See the [Quickstart](/en/quickstart) for the API lifecycle and [MCP setup](/en/mcp) for agent-native tool calls.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.