Skip to content

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

Adding AgentHookFunc = Callable

Carlos Andrés Planchón Prestesa97212cb53c7
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.py
index a65e10042..779008c59 100644
--- a/browser_use/agent/service.py
+++ b/browser_use/agent/service.py
@@ -80,6 +80,8 @@ def log_response(response: AgentOutput) -> None:
Context = TypeVar('Context')
+AgentHookFunc = Callable
+
class Agent(Generic[Context]):
@time_execution_sync('--init (agent)')