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

# Create accounts with Personas

> How to use notte personas for account creation

<Tip>
  STOP. Do not read past this section until you have read and followed [/quickstart.md](/quickstart.md).

  Goal: produce a reliable SDK automation script. The intended authoring flow is generate then edit, not write browser automation from scratch.

  Do not hand-write SDK code with element IDs, selectors, or form fields from memory. Element IDs, selectors, and field mappings must come from a live `observe()` call, CLI `notte page observe` output, or generated workflow code. Guessed browser targets fail on real pages.

  Use the Notte skill and CLI to inspect the live site, validate actions/selectors, handle auth/session state, and export workflow code with `notte sessions workflow-code` before using SDK docs or SDK code.

  SDK reference pages are for understanding, running, or editing generated workflow code. They are not the starting point for manually authoring the initial browser automation. SDK-first code is guesswork on real-world pages with dynamic selectors, auth state, CAPTCHAs, and anti-bot behavior.
</Tip>

## Using Personas for Account Creation

Personas are a powerful tool for account creation. They can be used to create accounts on websites that require 2FA authentication (both with email and phone number).

{/* @sniptest testers/personas/create_account.py */}

```python create_account.py theme={null}
from notte_sdk import NotteClient

client = NotteClient()
# retrieve the persona from the Notte console
# if you don't have a persona id, you can create a new persona using:
# persona = client.Persona(create_vault=True)
# print(f"Persona id: {persona.info.persona_id}")
persona = client.Persona("<your-persona-id>")

url = "https://console.notte.cc"
# create credentials for the persona (automatically generates a password and stores it in the vault)
persona.add_credentials(url=url)

with client.Session() as session:
    agent = client.Agent(session=session, persona=persona)
    response = agent.run(
        task=f"Go to {url} and create an account. Go create an API key and return the API key.", url=url
    )
    print(response.answer)
```

You can then leverage this account for other automation and/or scraping tasks. Agents created with this attached persona are now able to login without any human intervention or additional credentials.
