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

# Persistent Sessions

> Persist authentication across browser sessions

Browser profiles allow you to persist cookies and authentication across sessions. Log in once, then reuse that authentication for future tasks.

## How It Works

1. **Create a Profile** - Call `client.create_profile(profile_id="my-profile")` to create a new profile.

2. **Authenticate** - Open a session with the profile and navigate to `live_url()` to log in manually. Your cookies are saved to the profile.

3. **Reuse** - In future sessions, pass the same `profile_id`. The agent uses the stored cookies automatically.

## Example

```python Python theme={null}
from smooth import SmoothClient

client = SmoothClient()

# First run: create profile and authenticate
client.create_profile(profile_id="my-account")

with client.session(profile_id="my-account", url="https://example.com") as session:
    print(f"Log in here: {session.live_url()}")
    input("Press Enter after logging in...")

# Future runs: authentication is already saved
with client.session(profile_id="my-account", url="https://example.com") as session:
    session.run_task("Do something that requires login")
```

## Learn More

<CardGroup cols={2}>
  <Card title="Profile API Reference" icon="code" href="/methods/profiles">
    Create, list, and delete profiles
  </Card>

  <Card title="Scrape Behind Login Walls" icon="book" href="/guides/scrape-behind-login-walls">
    Step-by-step guide for authenticated scraping
  </Card>
</CardGroup>
