Available Parameters
Core Settings
task: Task description string that defines what the agent should accomplishllm: Chat model instance. When omitted,CONFIG.DEFAULT_LLMis used, thenChatBrowserUse.max_steps(default:100): Maximum number of steps in onerun()calltools: Registry of tools the agent can call. Examplebrowser: Browser object where you can specify the browser settings.output_model_schema: Pydantic model class for structured output validation. Example
Vision & Processing
use_vision(default:"auto"): Vision mode -"auto"includes screenshot tool but only uses vision when requested,Truealways includes screenshots,Falsenever includes screenshots and excludes screenshot toolvision_detail_level(default:'auto'): Screenshot detail level -'low','high', or'auto'page_extraction_llm: Separate LLM model for page content extraction. You can choose a small & fast model because it only needs to extract text from the page (default: same asllm)
Actions & Behavior
initial_actions: List of actions to run before the main task without LLM. Examplemax_actions_per_step(default:10): Maximum actions per step, e.g. for form filling the agent can output 10 fields at once. We execute the actions until the page changes.max_failures(default:3): Maximum retries for steps with errorsfinal_response_after_failure(default:True): If True, attempt to force one final model call with intermediate output after max_failures is reacheduse_thinking(default:True): Controls whether the agent uses its internal “thinking” field for explicit reasoning steps.flash_mode(default:False): Fast mode that skips evaluation, next goal and thinking and only uses memory. Ifflash_modeis enabled, it overridesuse_thinkingand disables the thinking process entirely.ChatBrowserUseforces flash mode on. Example
System Messages
override_system_message: Completely replace the default system prompt.extend_system_message: Add additional instructions to the default system prompt. Example
File & Data Management
file_system_path: Base directory for the agent file system. When omitted, each agent usesopenbrowser_agent_<id>_<timestamp>under the system temp directory. The file system constructor clears itsopenbrowser_agent_datasubdirectory.save_conversation_path: Path to save complete conversation historysave_conversation_path_encoding(default:'utf-8'): Encoding for saved conversationsavailable_file_paths: List of file paths the agent can accesssensitive_data: Dictionary of sensitive data to handle carefully. Example
Visual Output
generate_gif(default:False): Generate GIF of agent actions. Set toTrueor string pathinclude_attributes: List of HTML attributes to include in page analysis
Performance & Limits
max_history_items: Maximum number of last steps to keep in the LLM memory. IfNone, we keep all steps.llm_timeout(default: auto): Timeout in seconds for LLM calls. When omitted, the model name selects 60 seconds generally, 45 for Gemini, 30 for Groq, and 90 for o3, Claude, Sonnet, or DeepSeek.step_timeout(default:120): Timeout in seconds for each stepdirectly_open_url(default:True): If we detect a url in the task, we directly open it.
Advanced Options
calculate_cost(default:False): Calculate and track API costsdisplay_files_in_done_text(default:True): Show file information in completion messages
Callbacks
register_new_step_callback: Called after the model proposes an action and before the actions execute. It receives the pre-action browser state, agent output, and step number. Sync or async. Do not treat it as post-step confirmation.register_done_callback: Called with the finalAgentHistoryList. Sync or async.register_should_stop_callback: Async callback that can request a cooperative stop.register_external_agent_status_raise_error_callback: Async callback for an external status error.
Backwards Compatibility
controller: Alias fortoolsfor backwards compatibility.browser_session: Alias forbrowserfor backwards compatibility.
Run Lifecycle
agent.status returns an AgentRunStatus with phase, terminal, success, terminal_reason, result, error, step, max_steps, consecutive_failures, pause_requested, stop_requested, started_at, and finished_at.
Terminal phases are succeeded, failed, max_steps, stopped, and cancelled. A successful phase requires an accepted successful done. A stop, pause, or caller cancellation is reported as its own phase and is not rewritten as success. A caller cancellation does not prove that the worker stopped; inspect status and run required cleanup before another run.