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 X AI (Grok) integration example to supported models
dha-aab68b0cc1e78c
diff --git a/docs/customize/supported-models.mdx b/docs/customize/supported-models.mdxindex 73c561f2d..cb06692a0 100644--- a/docs/customize/supported-models.mdx+++ b/docs/customize/supported-models.mdx@@ -249,6 +249,39 @@ Required environment variables:```bash .envNOVITA_API_KEY=```+### X AI+[X AI](https://x.ai) is an LLM API provider that offers a wide range of models. Note: choose a model that supports function calling.++```python+from langchain_openai import ChatOpenAI+from browser_use import Agent+from pydantic import SecretStr+from dotenv import load_dotenv+import os++load_dotenv()+api_key = os.getenv("GROK_API_KEY")++# Initialize the model+llm = ChatOpenAI(+ base_url='https://api.x.ai/v1',+ model='grok-3-beta',+ 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+GROK_API_KEY=+```## Coming soon(We are working on it)