Browser Use
Last updated
Was this helpful?
Was this helpful?
AIMLAPI_KEY=YOUR_KEYimport asyncio
import os
from dotenv import load_dotenv
from browser_use import Agent, ChatOpenAI
load_dotenv()
llm = ChatOpenAI(
model = "x-ai/grok-4-07-09", # Insert the ID of one of our LLMs
base_url = "https://api.aimlapi.com",
api_key = os.getenv("<YOUR_AIMLAPI_KEY>"), # Insert your AIMLAPI Key
)
agent = Agent(
task = 'Find the number of stars of the browser-use repo', # Insert the instruction
llm = llm,
use_vision = True,
)
async def main():
await agent.run(max_steps=10)
asyncio.run(main())