Skip to main content
Configure agents with parameters that control their reasoning model, step limits, vision capabilities, and more.

Creating an Agent

Create an agent with configuration parameters:
creating_agent.py

Agent Creation Parameters

Parameters set when creating the agent instance.

session

session
RemoteSession
required
The browser session the agent will use to execute actions. Must be a Notte session instance.
param_session.py

reasoning_model

reasoning_model
str
default:"gemini/gemini-2.0-flash"
The large language model used for agent reasoning and decision-making. Supported models include gemini/gemini-2.0-flash, anthropic/claude-3.5-sonnet, anthropic/claude-3.5-haiku, openai/gpt-4o, and openai/gpt-4o-mini.
param_reasoning_model.py

use_vision

use_vision
boolean
default:true
Whether to enable vision capabilities for the agent. Vision allows the agent to analyze images, screenshots, and visual page elements. Not all models support vision.
param_use_vision.py

max_steps

max_steps
int
default:"varies"
Maximum number of actions the agent can take before stopping. Must be between 1 and 50. Higher values allow more complex tasks but increase cost and execution time.
param_max_steps.py

vault

vault
NotteVault
Optional vault instance containing credentials the agent can use for authentication. See Vaults for details.
param_vault.py

persona

persona
NottePersona
Optional persona providing the agent with phone numbers, email addresses, and other identity information. See Personas for details.
param_persona.py

notifier

notifier
BaseNotifier
Optional notifier that sends notifications when the agent completes or fails. Useful for long-running tasks.
param_notifier.py

Agent Runtime Parameters

Parameters provided when running the agent.

task

task
str
required
Natural language description of what the agent should accomplish. Be specific and clear for best results.
param_task.py

url

url
str
Optional starting URL for the agent. If not provided, the agent starts from the current page in the session.
param_url.py

response_format

response_format
type[BaseModel]
Optional Pydantic model defining the structure of the agent’s response. Use this to get type-safe, structured output. See Structured Output for details.
param_response_format.py

session_offset

session_offset
int
Experimental - The step number from which the agent should gather information from the session history. If not provided, the agent has fresh memory. Use this to make the agent aware of previous actions.
param_session_offset.py

Configuration Examples

Simple Agent

Minimal configuration for basic tasks:
simple_agent.py

Production Agent

Full configuration for production use:
production_agent.py

Structured Data Extraction

Agent configured for data extraction:
structured_extraction.py

Best Practices

1. Choose Appropriate Step Limits

Match max_steps to task complexity:
bp_step_limits.py

2. Balance Cost and Capability

Use cheaper models for simple tasks:
bp_model_selection.py

3. Use Vision Selectively

Disable vision when not needed to reduce costs:
bp_vision.py

4. Provide Context via URL

Start agents at the right page:
bp_url_context.py

Next Steps

Lifecycle

Learn about agent execution modes

Replay & Debugging

Debug agents with visual replays

Structured Output

Get typed responses from agents

Vaults

Store credentials for agent use