AI agent instructions
AI agent instructions
Creating an Agent
Create an agent with configuration parameters:Agent Creation Parameters
Parameters set when creating the agent instance.session
RemoteSession
required
The browser session the agent will use to execute actions. Must be a Notte session instance.
reasoning_model
str
default:"gemini/gemini-3.5-flash"
The large language model used for agent reasoning and decision-making. Supported models:
gemini/gemini-3.5-flash, vertex_ai/gemini-3.5-flash, openai/gpt-4o, anthropic/claude-sonnet-4-5-20250929, openrouter/google/gemma-3-27b-it, cerebras/gpt-oss-120b, groq/gpt-oss-120b, perplexity/sonar-pro, deepseek/deepseek-r1, together_ai/meta-llama/llama-3.3-70b-instruct, moonshot/kimi-k2.5, xai/grok-4.3, and minimax/minimax-m2.5.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.
max_steps
int
default:"20"
Maximum number of steps the agent can take before stopping. Must be between 1 and 150. Higher values allow more complex tasks but increase cost and execution time.
vault
NotteVault
Optional vault instance containing credentials the agent can use for authentication. See Vaults for details.
param_vault.py
persona
NottePersona
Optional persona providing the agent with phone numbers, email addresses, and other identity information. See Personas for details.
param_persona.py
notifier
BaseNotifier
Optional notifier that sends a message with the agent’s result when it completes or fails. Useful for long-running tasks. Email, Slack, and Discord notifiers are available in the
notte-integrations package (EmailNotifier, SlackNotifier, DiscordNotifier in notte_integrations.notifiers). The notifier configuration, including any credentials it contains, is sent to Notte so the notification can be delivered when the agent finishes. You can also pass the configuration as a plain dict with notifier_config, as in the example below.Agent Runtime Parameters
Parameters provided when running the agent.task
str
required
Natural language description of what the agent should accomplish. Be specific and clear for best results.
param_task.py
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
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
Advanced Configuration
Advanced Configuration
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
Matchmax_steps to task complexity:
2. Balance Cost and Capability
Use cheaper models for simple tasks:3. Use Vision Selectively
Disable vision when not needed to reduce costs: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