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

# SDK Reference

> Install and configure the anchorbrowser TypeScript and Python SDKs

The [`anchorbrowser`](https://www.npmjs.com/package/anchorbrowser) npm package and the
[`anchorbrowser`](https://pypi.org/project/anchorbrowser/) PyPI package are generated
directly from this API's OpenAPI specification — every documented endpoint is available
as a typed method in both SDKs, and every method page here shows both languages.

<CodeGroup>
  ```bash npm theme={null}
  npm install anchorbrowser
  ```

  ```bash pip theme={null}
  pip install anchorbrowser
  ```
</CodeGroup>

## Configuration

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { client, Sessions } from 'anchorbrowser';

  // ANCHORBROWSER_API_KEY is read from the environment by default;
  // set it explicitly like this:
  client.setConfig({ auth: () => 'your-api-key' });

  const session = await Sessions.createSession({ body: {} });
  console.log(session.data?.id);
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  # ANCHORBROWSER_API_KEY is read from the environment by default;
  # set it explicitly with Anchorbrowser(api_key="your-api-key")
  client = Anchorbrowser()

  session = client.sessions.create_session()
  print(session.data.id)
  ```
</CodeGroup>

In TypeScript, methods are static — one options object with `path`, `query` and `body`
keys matching the operation. In Python, resources hang off a client instance — path
params are positional and query/body params are keyword arguments, with the same names
in snake\_case (`Sessions.createSession` ↔ `client.sessions.create_session`). Both
return the parsed response body and raise/throw on failures (non-2xx or network).
Python also ships `AsyncAnchorbrowser` with the identical surface for `await`.

## Resources

* [Agent](/sdk-reference/agent) — 7 methods
* [Applications](/sdk-reference/applications) — 10 methods
* [BatchSessions](/sdk-reference/batchsessions) — 6 methods
* [Billing](/sdk-reference/billing) — 1 methods
* [Certificates](/sdk-reference/certificates) — 3 methods
* [Events](/sdk-reference/events) — 2 methods
* [Extensions](/sdk-reference/extensions) — 4 methods
* [Identities](/sdk-reference/identities) — 5 methods
* [Integrations](/sdk-reference/integrations) — 3 methods
* [Profiles](/sdk-reference/profiles) — 4 methods
* [Recordings](/sdk-reference/recordings) — 5 methods
* [Sessions](/sdk-reference/sessions) — 27 methods
* [Tasks](/sdk-reference/tasks) — 21 methods
* [Tools](/sdk-reference/tools) — 6 methods
* [Webhooks](/sdk-reference/webhooks) — 8 methods

## Playwright & agent helpers

Both SDKs also ship hand-written helpers for driving the browser and running agent tasks:

<CodeGroup>
  ```typescript TypeScript theme={null}
  import { agentTask, createBrowser } from 'anchorbrowser';

  const result = await agentTask('go to example.com and return the page title');

  const { browser, session } = await createBrowser(); // Playwright over CDP
  ```

  ```python Python theme={null}
  from anchorbrowser import Anchorbrowser

  client = Anchorbrowser()
  result = client.agent.task("go to example.com and return the page title")

  with client.browser.create() as browser:  # Playwright over CDP
      page = browser.contexts[0].pages[0]
  ```
</CodeGroup>

See the [TypeScript README](https://github.com/anchorbrowser/AnchorBrowser-SDK-Typescript#readme)
and the [Python README](https://github.com/anchorbrowser/AnchorBrowser-SDK-Python#readme).
