Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions examples/browser-use-cua/main.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import asyncio
import base64
import os
from io import BytesIO
from typing import TYPE_CHECKING
from dotenv import load_dotenv
from browser_use import Agent, Tools
from browser_use.browser import BrowserProfile, BrowserSession
from browser_use.llm import ChatOpenAI
from browser_use.agent.views import ActionResult

import asyncio
import base64
import os
from io import BytesIO

from agent_sandbox import Sandbox
from agent_sandbox.browser.types.action import (
Action_Click,
Expand Down Expand Up @@ -277,9 +274,6 @@ async def handle_cua_action(action: "ComputerAction") -> ActionResult:
return ActionResult(error=f"{ERROR_MSG}: {e}")


tools = Tools()


@tools.registry.action(
"Use Sandbox GUI as a fallback when standard browser actions cannot achieve the desired goal. "
"This action takes a screenshot and uses OpenAI CUA to determine the next GUI action, "
Expand Down Expand Up @@ -437,6 +431,3 @@ async def main():
print()

asyncio.run(main())

if __name__ == "__main__":
asyncio.run(main())