# Browse authenticated pages with a sandbox

import { Steps, Aside } from '@astrojs/starlight/components';

A sandbox gives Docs Agent a site URL and the sign-in variables it needs to reach pages behind a login. With a sandbox configured, the agent can open your product, sign in, and capture screenshots of authenticated pages to include in your documentation. Without one, the agent can browse only pages that don't require signing in.

Use this guide to create a sandbox, edit or remove it, and ask the agent to use it in a session. You can watch each page the agent visits in the [Live browser panel](/agent/getting-started/#watch-the-agent-browse).

<Aside type="note">
Variables belong to a sandbox's host. When the agent browses a page whose host matches a sandbox URL, it uses that sandbox's variables to sign in before it captures the page.
</Aside>

## Prerequisites

- An EkLine account with Docs Agent enabled.
- Access to your organization's Docs Agent settings. You can request Docs Agent access — see [The Sandbox section isn't available](#the-sandbox-section-isnt-available).
- The URL of the site you want the agent to browse, and a set of sign-in credentials for it.

<Aside type="tip">
Use a dedicated test or staging account with the least access the agent needs, rather than a personal administrator login. This keeps the agent's reach easy to review and limits what a stored credential can do.
</Aside>

## Create a sandbox

<Steps>

1. **Open your Docs Agent settings.**

   Go to your [EkLine dashboard](https://ekline.io/dashboard) and navigate to **Settings > Organization > Docs Agent**. Find the **Sandbox** section.

2. **Name the sandbox.**

   In **Sandbox name**, enter a unique name such as `admin-staging`. The name identifies the sandbox and can't be changed later — to rename it, delete and recreate it. Two sandboxes can share a URL with different variables.

3. **Enter the site URL.**

   In **Sandbox URL**, enter the full URL, such as `https://staging.example.com`. The agent applies this sandbox's variables when it browses a page on this host.

4. **Add sign-in variables.**

   Each variable is a name and value pair. EkLine starts you with `email` and `password` rows — enter the values the site needs to sign in. Values for variables named with `password`, `secret`, `token`, or `key` are masked as you type. Click **Add variable** to add more, such as an organization slug. Add at least one variable with a value.

5. **Save the sandbox.**

   Click **Save sandbox**. The sandbox appears under **Configured sandboxes** with its URL and a badge for each variable name.

</Steps>

<Aside type="caution">
EkLine stores variable values encrypted. Only variable names appear in the **Configured sandboxes** list — values are never shown there.
</Aside>

## Edit a sandbox

<Steps>

1. **Open the sandbox.**

   In **Configured sandboxes**, click the edit icon next to the sandbox. The **Edit** dialog opens with the current URL and variables filled in. The name is fixed.

2. **Change the URL or variables.**

   Update the URL, edit values, or add and remove variables as needed.

3. **Update the sandbox.**

   Click **Update sandbox**.

</Steps>

To keep a saved value without retyping it — a password, for example — leave that variable's value blank. EkLine keeps the value already stored. Enter a new value only when you want to replace it.

## Delete a sandbox

In **Configured sandboxes**, click the delete icon next to the sandbox.

<Aside type="caution">
Deleting a sandbox removes its stored variables and can't be undone. The agent can no longer sign in to that site until you recreate the sandbox.
</Aside>

## Use a sandbox in a session

Ask the agent to browse or screenshot a page on the sandbox's host. The agent signs in with the sandbox variables, then captures the page. Watch it work in the [Live browser panel](/agent/getting-started/#watch-the-agent-browse).

```text
Sign in to https://staging.example.com and add a screenshot of the
billing settings page to the "Manage billing" guide.
```

## Verify the sandbox

Confirm the sandbox is ready:

- The sandbox appears under **Configured sandboxes** with the correct URL and a badge for each variable.
- In a session, ask the agent to screenshot a page that requires signing in. In the **Live browser** panel, confirm the agent reaches the page as a signed-in user.

## Troubleshooting

### The Sandbox section isn't available

You can request Docs Agent access. If you don't see **Settings > Organization > Docs Agent**, email **support@ekline.io** with your organization name to request access. If the settings page opens but the **Sandbox** section isn't there, contact **support@ekline.io**.

### The agent can't sign in

The credentials are wrong, or the sign-in form needs a value you didn't add. Edit the sandbox, confirm each value is correct, and add any extra variable the login requires, such as an organization slug.

### The agent browses but doesn't sign in

The page host doesn't match the sandbox URL. Confirm the host in **Sandbox URL** matches the page you asked the agent to open. A sandbox for `staging.example.com` doesn't apply to `app.example.com`.

### A saved value seems wrong after editing

You left the value blank while editing, which keeps the previous value. Enter the new value explicitly to replace it.

## Next steps

- [Watch the agent browse](/agent/getting-started/#watch-the-agent-browse) — See each page the agent visits in real time.
- [Create documentation](/agent/create/#from-screenshots-and-images) — Insert screenshots the agent captures into your docs.
- [Keep documentation screenshots up to date](/agent/refresh-doc-screenshots/) — Recapture stale images from your live product on a schedule.
- [Customize Docs Agent for your organization](/agent/custom-instructions/) — Set conventions the agent applies to every session.

---

## Stuck?

Reply to your welcome email or contact support@ekline.io. We read every message.