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

# Browser Profiles

> Create, list, and delete persistent browser profiles that retain cookies and session state across tasks

<Note>
  All paid endpoints on this page accept optional `memo` (≤ 1000 chars) and
  `decisionContext` (object) body fields. Stored on the receipt for debugging
  and audit — see [Audit Trail](/sdk/audit-context).
</Note>

## Overview

Browser profiles persist cookies, local storage, and session state between browser tasks. Create a profile once, then pass its `profile_id` to any browser task to reuse the logged-in state.

## Authentication

All profile endpoints require `X-Agent-ID` header (wallet address). Profiles are scoped to your agent.

## Create Profile

<ParamField body="name" type="string" required>
  Human-readable profile name (1-100 characters).
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://win.oneshotagent.com/v1/tools/browser/profiles \
    -H "Content-Type: application/json" \
    -H "X-Agent-ID: 0xYourWalletAddress" \
    -d '{"name": "my-github-bot"}'
  ```

  ```typescript SDK theme={null}
  const profile = await agent.createBrowserProfile("my-github-bot");
  console.log(profile.id); // "prof_abc123..."
  ```

  ```python Python theme={null}
  profile = client.create_browser_profile("my-github-bot")
  print(profile["id"])
  ```
</RequestExample>

<ResponseExample>
  ```json Response (200) theme={null}
  {
    "id": "prof_abc123",
    "name": "my-github-bot"
  }
  ```
</ResponseExample>

## List Profiles

Returns all profiles for your agent.

<RequestExample>
  ```bash cURL theme={null}
  curl https://win.oneshotagent.com/v1/tools/browser/profiles \
    -H "X-Agent-ID: 0xYourWalletAddress"
  ```

  ```typescript SDK theme={null}
  const profiles = await agent.listBrowserProfiles();
  ```

  ```python Python theme={null}
  profiles = client.list_browser_profiles()
  ```
</RequestExample>

<ResponseExample>
  ```json Response (200) theme={null}
  [
    { "id": "prof_abc123", "name": "my-github-bot" },
    { "id": "prof_def456", "name": "linkedin-scraper" }
  ]
  ```
</ResponseExample>

## Delete Profile

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://win.oneshotagent.com/v1/tools/browser/profiles/prof_abc123 \
    -H "X-Agent-ID: 0xYourWalletAddress"
  ```

  ```typescript SDK theme={null}
  await agent.deleteBrowserProfile("prof_abc123");
  ```

  ```python Python theme={null}
  client.delete_browser_profile("prof_abc123")
  ```
</RequestExample>

## Using Profiles with Tasks

Pass `profile_id` to any browser task to reuse the profile's session state:

```typescript theme={null}
// First task: log in (state saved to profile)
await agent.browser({
  task: "Log in to github.com with the provided credentials",
  profile_id: profile.id,
  secrets: { "github.com": "user:token" },
});

// Second task: reuse the logged-in session
const result = await agent.browser({
  task: "Go to github.com/notifications and list unread items",
  profile_id: profile.id,
});
```

<Tip>Combine `profile_id` with `secrets` for the first task to log in, then use just `profile_id` for subsequent tasks that reuse the session.</Tip>
