Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.
Python ai-agentsai-toolsbrowser-agentbrowser-automationbrowser-usecdpcloud-browsercomputer-useheadless-browserllmmcpplaywrightpythonremote-browserstealth-browserweb-automationweb-scraping
add domains list to RegisteredAction
Nick Sweeting22e544219c45
diff --git a/browser_use/controller/registry/service.py b/browser_use/controller/registry/service.pyindex be52a4b68..81f86aa0f 100644--- a/browser_use/controller/registry/service.py+++ b/browser_use/controller/registry/service.py@@ -49,6 +49,7 @@ class Registry(Generic[Context]):self,description: str,param_model: Optional[Type[BaseModel]] = None,+ domains: Optional[list[str]] = None,):"""Decorator for registering actions"""@@ -79,6 +80,7 @@ class Registry(Generic[Context]):description=description,function=wrapped_func,param_model=actual_param_model,+ domains=domains,)self.registry.actions[func.__name__] = actionreturn funcdiff --git a/browser_use/controller/registry/views.py b/browser_use/controller/registry/views.pyindex 211c767a3..75b8959b3 100644--- a/browser_use/controller/registry/views.py+++ b/browser_use/controller/registry/views.py@@ -10,6 +10,7 @@ class RegisteredAction(BaseModel):description: strfunction: Callableparam_model: Type[BaseModel]+ domains: list[str] | None = None # e.g. ['*.google.com', 'www.bing.com', 'yahoo.*]model_config = ConfigDict(arbitrary_types_allowed=True)