Skip to main content
Profiles let you save and reuse browser state—including cookies, local storage, session storage, and cache—across multiple sessions. This is useful for maintaining login states, preserving user preferences, or building realistic multi-session workflows.

How Profiles Work

A profile is a saved snapshot of a browser’s user data directory. By default, each Notte session uses a fresh browser state to ensure isolation. When you create a profile and use it in a session with persist=True, Notte saves that session’s browser state. You can then attach the profile to future sessions to restore the saved state.

Create a Profile

Create a profile to store browser state. Optionally, give it a name to keep track of different profiles:
create_profile.py

Use a Profile in a Session

Attach a profile to a session to load saved browser state:
use_profile.py

Persist Changes

The persist parameter controls whether session changes are saved back to the profile:
  • True - Save browser state to the profile when the session ends
  • False (default) - Use the profile as read-only; don’t save changes
Set persist=True the first time you use a new profile to save the initial browser state. After that, you can use persist=False to reuse the profile without modifying it.

Profile Login Example

Step 1: Login and Save to Profile

First, create a profile and perform a login. When the session ends with persist=True, all cookies and browser state are saved to the profile:
persist_profile.py

Step 2: Reuse the Saved Profile

Use the saved profile in a new session. The browser automatically loads the saved state, so you’re already authenticated:
reuse_profile.py
What happens:
  1. A new session is created using the same profile ID
  2. The browser loads saved cookies and state from the profile
  3. You navigate directly without needing to log in again
  4. The session picks up right where the previous one left off
This pattern is useful for:
  • Avoiding repeated logins across automation runs
  • Testing authenticated user flows
  • Managing multiple accounts with separate profiles
  • Maintaining session state over time

Using Profiles with Agents

Profiles work seamlessly with Notte Agents. An agent running with a pre-authenticated profile can access authenticated resources immediately:
profile_with_agent.py

Managing Profiles

List Profiles

Retrieve all your profiles with optional filtering:
list_profiles.py

Get Profile Details

Retrieve information about a specific profile:
get_profile.py

Delete a Profile

Delete a profile when you no longer need it:
delete_profile.py

Read-Only Profile Usage

Load a profile without saving changes by setting persist=False:
use_profile.py
Use cases for read-only profiles:
  • Test workflows without affecting saved state
  • Run parallel sessions with the same profile safely
  • Maintain a clean baseline profile for repeated use
By default, persist is False, so you don’t have to explicitly specify it for read-only access.

Best Practices

Profile Management

  • Use descriptive names to identify profiles by their purpose (e.g., github-login, twitter-bot-1)
  • Create separate profiles for different accounts or services
  • Periodically verify that saved sessions are still valid

Security

  • Profiles contain sensitive session data; treat profile IDs as secrets
  • Delete profiles for accounts that are no longer needed
  • Use separate profiles for production and development environments

Performance

  • Profiles with large caches may take longer to load
  • Consider creating fresh profiles periodically if performance degrades

Comparison: Profiles vs Cookies

Use profiles when you need complete browser state preservation. Use cookies when you only need to inject specific authentication tokens.

Next Steps

Session Lifecycle

Manage session lifecycle

Cookies

Manual cookie management

Vaults

Secure credential storage

Session Configuration

All session options