Here’s how you create an agent, and run a task:

from notte_sdk import NotteClient

notte = NotteClient()
agent = notte.Agent()
agent.run(task="go to google, and find cat pictures")

Usage

See more information on the available operations:

Running with a session

Providing a session to your agent allows you to choose specific options, like changing your browser or using proxies.

firefox.py
from notte_sdk import NotteClient

notte = NotteClient()

with notte.Session(browser_type="firefox") as session:  
    _ = notte.Agent(session=session).run(
        task="What's the weather like in SF tonight?",
    )

Providing credentials

Agents can be provided a vault with credentials in order to securely log in to websites without sharing your information to the LLM.

agent_with_vault.py
from notte_sdk import NotteClient

notte = NotteClient()
# Create a new secure vault
vault = notte.vaults.create()
# Add your credentials securely
_ = vault.add_credentials(
	url="https://github.com/",
	email="my_cool_email@gmail.com",
	password="my_cool_password",
	# Check https://github.com/scito/extract_otp_secrets to extract your MFA secret 
	# from your authenticator app
	mfa_secret="PYNT7I67RFS2EPR5",
)
# Run an agent with secure credential access
agent = notte.Agent(vault=vault, max_steps=10)
response = agent.run(task="Go to the nottelabs/notte repo and star it. If it's already starred don't unstar it.")

Parameters

You can use the default parameters to create your session, or customize them:

headless
bool

Whether to display a live viewer (opened in your browser) (default: False)

vault
UnionType[NotteVault, None]

A notte vault instance, if the agent requires authentication (default: None)

notifier
UnionType[BaseNotifier, None]

A notifier (for example, email), which will get called upon task completion. (default: None)

session
UnionType[RemoteSession, None]

The session to connect to, if not provided, will start a new one. (default: None)

session_id
str | None

The ID of the session. A new session is created when not provided.

reasoning_model
LlmModel

The language model to use for agent reasoning.

use_vision
bool

Whether to enable vision capabilities for the agent.

max_steps
int

Maximum number of steps the agent can take.

vault_id
str | None

Optional ID of the vault to use.

notifier_config
dict[str, typing.Any] | None

Config used for the notifier.