Browser Use

Browser Use

Control a browser agent with TokenMix-powered OpenAI-compatible models."

Who it is for

browser-use is for developers building browser automation agents: opening pages, clicking buttons, reading content, filling forms, and summarizing websites. It is not a normal chat app; you usually write a small Python script.

Step 1: Prepare TokenMix values

Prepare:

Step 2: Install dependencies

Use Python 3.11+. With uv:

uv init tokenmix-browser-agent
cd tokenmix-browser-agent
uv add browser-use langchain-openai

With pip:

python -m venv .venv
source .venv/bin/activate
pip install browser-use langchain-openai

Step 3: Create a minimal script

Create agent.py:

from browser_use import Agent
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="<your-model-short-id>",
    api_key="<your-tokenmix-key>",
    base_url="https://api.tokenmix.ai/v1",
)

agent = Agent(
    task="Open example.com and summarize the page title.",
    llm=llm,
)

agent.run_sync()

Run:

python agent.py

Step 4: Replace with a real task

After the minimal script works, try:

Open https://tokenmix.ai, find the Apps page, and summarize what kinds of AI tools are listed there.

Beginners should keep tasks to one to three browser steps. Long browser tasks fail more often.

Troubleshooting