Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

fix docs typo

Nick Sweeting72903e4f2a6e
diff --git a/docs/customize/custom-functions.mdx b/docs/customize/custom-functions.mdx
index fde11ca4f..60a0c954c 100644
--- a/docs/customize/custom-functions.mdx
+++ b/docs/customize/custom-functions.mdx
@@ -232,14 +232,14 @@ from browser_use import Controller, ActionResult
controller = Controller()
-async def is_login_page(page: Page):
+async def is_ai_allowed(page: Page):
if api.some_service.check_url(page.url):
- await fillout_form(page)
- return 'filled out form with secret details'
- return ActionResult(success=False, error='not allowed to fill out forms according to external service')
+ logger.warning('Allowing AI agent to visit url:', page.url)
+ return True
+ return False
[email protected]('Fill out secret_form', allowed_domains=['https://*.example.com'], page_filter=is_login_page)
[email protected]('Fill out secret_form', allowed_domains=['https://*.example.com'], page_filter=is_ai_allowed)
def fill_out_form(...) -> ActionResult:
- ... will only be available to LLM on pages that match https://*.example.com *AND* where is_login_page(page) returns True
+ ... will only be runnable by LLM on pages that match https://*.example.com *AND* where is_ai_allowed(page) returns True
```