Learn how to configure the agent
Agent
class is the core component of OpenOperator that handles browser automation. Here are the main configuration options you can use when initializing an agent.
controller
: Registry of functions the agent can call. Defaults to base Controller. See Custom Functions for details.use_vision
: Enable/disable vision capabilities. Defaults to True
.
save_conversation_path
: Path to save the complete conversation history. Useful for debugging.Browser
options refer to the Browser Settings documentation.
browser
: A OpenOperator Browser instance. When provided, the agent will reuse this browser instance and automatically create new contexts for each run()
.
Browser
will not be closed automatically.browser_context
: A Playwright browser context. Useful for maintaining persistent sessions. See Persistent Browser for more details.
run()
completion.run()
method:
max_steps
(default: 100
)
Maximum number of steps the agent can take during execution. This prevents infinite loops and helps control execution time.AgentHistoryList
object containing the complete execution history. This history is invaluable for debugging, analysis, and creating reproducible scripts.
AgentHistoryList
provides many helper methods to analyze the execution:
final_result()
: Get the final extracted contentis_done()
: Check if the agent completed successfullyhas_errors()
: Check if any errors occurredmodel_thoughts()
: Get the agent’s reasoning processaction_results()
: Get results of all actions