Skip to content

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

Included more models in the docs

magmuellerb0cc19b4d567
diff --git a/docs/customize/langchain-models.mdx b/docs/customize/langchain-models.mdx
index c45fa9821..f474594be 100644
--- a/docs/customize/langchain-models.mdx
+++ b/docs/customize/langchain-models.mdx
@@ -1,5 +1,5 @@
---
-title: "LangChain Chat Models"
+title: "Supported Models"
description: "Guide to using different LangChain chat models with Browser Use"
icon: "robot"
---
@@ -10,7 +10,9 @@ Browser Use supports various LangChain chat models. Here's how to configure and
## Model Recommendations
-We have yet to test performance across all models. Currently, we recommend using GPT-4o. It achieves 89% accuracy on [WebVoyager Dataset](https://browser-use.com/posts/sota-technical-report).
+We have yet to test performance across all models. Currently, we achieve the best results using GPT-4o with an 89% accuracy on the [WebVoyager Dataset](https://browser-use.com/posts/sota-technical-report). DeepSeek-V3 is 30 times cheaper than GPT-4o. Gemini-2.0-exp is also gaining popularity in the community because it is currently free.
+We also support local models, like Qwen 2.5, but be aware that small models often return the wrong output structure-which lead to parsing errors. We believe that local models will improve significantly this year.
+
<Note>
All models require their respective API keys. Make sure to set them in your
@@ -19,7 +21,7 @@ We have yet to test performance across all models. Currently, we recommend using
## Supported Models
-All LangChain chat models are supported. We will document the most popular ones here.
+All LangChain chat models, which support tool-calling are available. We will document the most popular ones here.
### OpenAI
@@ -50,7 +52,6 @@ OPENAI_API_KEY=
### Anthropic
-Claude models provide excellent performance and can handle complex tasks well.
```python
from langchain_anthropic import ChatAnthropic
@@ -78,8 +79,6 @@ ANTHROPIC_API_KEY=
### Azure OpenAI
-If you're using Azure OpenAI services, you can configure the model like this:
-
```python
from langchain_openai import AzureChatOpenAI
from browser_use import Agent
@@ -108,13 +107,89 @@ AZURE_OPENAI_ENDPOINT=https://your-endpoint.openai.azure.com/
AZURE_OPENAI_KEY=
```
-## Coming soon
-(Sorry, we are working on it)
+### Gemini
+
+```python
+from langchain_google_genai import ChatGoogleGenerativeAI
+from browser_use import Agent
+from pydantic import SecretStr
+import os
+
+# Initialize the model
+llm = ChatGoogleGenerativeAI(model='gemini-2.0-flash-exp', api_key=SecretStr(api_key))
+
+# Create agent with the model
+agent = Agent(
+ task="Your task here",
+ llm=llm
+)
+```
+
+Required environment variables:
+
+```bash .env
+GEMINI_API_KEY=
+```
+
-- Gemini
+### DeepSeek
+The community likes DeepSeek-V3 for its low price, no rate limits, open-source nature, and good performance.
+
+```python
+from langchain_openai import ChatOpenAI
+from browser_use import Agent
+from pydantic import SecretStr
+
+
+# Initialize the model
+llm=ChatOpenAI(base_url='https://api.deepseek.com/v1', model='deepseek-chat', api_key=SecretStr(api_key))
+
+# Create agent with the model
+agent = Agent(
+ task="Your task here",
+ llm=llm,
+ use_vision=False
+)
+```
+
+Required environment variables:
+
+```bash .env
+DEEPSEEK_API_KEY=
+```
+
+### Ollama
+Many users asked for local models. Here they are.
+
+1. Download Ollama from [here](https://ollama.ai/download)
+2. Run `ollama pull model_name`. You can pick a model which supports tool-calling from [here](https://ollama.com/search?c=tools)
+3. Run `ollama start`
+
+```python
+from langchain_ollama import ChatOllama
+from browser_use import Agent
+from pydantic import SecretStr
+
+
+# Initialize the model
+llm=ChatOllama(
+ model="qwen2.5",
+ num_ctx=32000,
+ )
+
+# Create agent with the model
+agent = Agent(
+ task="Your task here",
+ llm=llm
+)
+```
+
+Required environment variables: None!
+
+## Coming soon
+(Sorry, we are working on it)
- Groq
-- DeepSeek
- Github
-- Ollama
-- QWen
+- DeepSeek R1
+- fine-tuned models