Skip to content

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

Add Groq support in logging configuration and introduce llama4-groq example script

Magnus Müllerde163e4a7586
diff --git a/browser_use/logging_config.py b/browser_use/logging_config.py
index 5138e8d28..bfbb093ff 100644
--- a/browser_use/logging_config.py
+++ b/browser_use/logging_config.py
@@ -132,6 +132,7 @@ def setup_logging():
'mem0.vector_stores.faiss',
'mem0.vector_stores',
'mem0.memory',
+ 'groq',
]
for logger_name in third_party_loggers:
third_party = logging.getLogger(logger_name)
diff --git a/examples/models/llama4-groq.py b/examples/models/llama4-groq.py
new file mode 100644
index 000000000..338d51539
--- /dev/null
+++ b/examples/models/llama4-groq.py
@@ -0,0 +1,40 @@
+import asyncio
+import os
+import sys
+
+sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
+
+from dotenv import load_dotenv
+
+load_dotenv()
+
+from langchain_openai import ChatOpenAI
+
+from browser_use import Agent
+
+llm = ChatOpenAI(
+ model='meta-llama/llama-4-maverick-17b-128e-instruct',
+ base_url='https://api.groq.com/openai/v1',
+ api_key=os.environ.get('GROQ_API_KEY'),
+ temperature=0.0,
+)
+from langchain_groq import ChatGroq
+
+llm = ChatGroq(
+ model='meta-llama/llama-4-maverick-17b-128e-instruct',
+ api_key=os.environ.get('GROQ_API_KEY'),
+ temperature=0.0,
+)
+
+task = 'Open the page with an overview of the submission of releases on Discogs. Website: https://www.discogs.com/ '
+
+
+async def main():
+ agent = Agent(task=task, llm=llm, tool_calling_method='function_calling')
+ await agent.run()
+
+
+if __name__ == '__main__':
+ for i in range(10):
+ print(f'Running {i + 1} of 10')
+ asyncio.run(main())