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
skills_ids = skills, added docs
Gregor Žunič6c49e622a615
diff --git a/browser_use/agent/service.py b/browser_use/agent/service.pyindex 58a2d8289..08d541a98 100644--- a/browser_use/agent/service.py+++ b/browser_use/agent/service.py@@ -139,6 +139,7 @@ class Agent(Generic[Context, AgentStructuredOutput]):controller: Tools[Context] | None = None, # Alias for tools# Skills integrationskill_ids: list[str | Literal['*']] | None = None,+ skills: list[str | Literal['*']] | None = None, # Alias for skill_ids# Initial agent run parameterssensitive_data: dict[str, str | dict[str, str]] | None = None,initial_actions: list[dict[str, dict[str, Any]]] | None = None,@@ -311,6 +312,11 @@ class Agent(Generic[Context, AgentStructuredOutput]):if use_vision != 'auto':self.tools.exclude_action('screenshot')+ # Handle skills vs skill_ids parameter (skills takes precedence)+ if skills and skill_ids:+ raise ValueError('Cannot specify both "skills" and "skill_ids" parameters. Use "skills" for the cleaner API.')+ skill_ids = skills or skill_ids+# Skills integrationself.skill_service = Noneself._skills_registered = Falsediff --git a/docs/customize/agent/all-parameters.mdx b/docs/customize/agent/all-parameters.mdxindex 2ec4ce4d0..5a412c8da 100644--- a/docs/customize/agent/all-parameters.mdx+++ b/docs/customize/agent/all-parameters.mdx@@ -9,6 +9,7 @@ mode: "wide"### Core Settings- `tools`: Registry of <a href = "../tools/available">tools</a> the agent can call. <a href = "../tools/basics">Example</a>+- `skills` (or `skill_ids`): List of skill IDs to load (e.g., `['skill-uuid']` or `['*']` for all). Requires `BROWSER_USE_API_KEY`. <a href = "../skills/basics">Docs</a>- `browser`: Browser object where you can specify the browser settings.- `output_model_schema`: Pydantic model class for structured output validation. [Example](https://github.com/browser-use/browser-use/blob/main/examples/features/custom_output.py)diff --git a/docs/customize/skills/basics.mdx b/docs/customize/skills/basics.mdxnew file mode 100644index 000000000..d96d0085c--- /dev/null+++ b/docs/customize/skills/basics.mdx@@ -0,0 +1,82 @@+---+title: "Basics"+description: "Describe what you need. We magically build the API. Browser Use calls it. Automatically."+icon: "sparkles"+---++Skills are deterministic, cheap APIs that you can build yourself. To learn more visit [docs.cloud.browser-use.com/concepts/skills](https://docs.cloud.browser-use.com/concepts/skills)++<Note>+Get your API key at [cloud.browser-use.com/new-api-key](https://cloud.browser-use.com/new-api-key) - new signups get $10 free.+</Note>++## Quick Example++Add your API key to `.env`:++```bash .env+BROWSER_USE_API_KEY=your-api-key+```++Load `['*']` for all skills or specific skill IDs from [cloud.browser-use.com/skills](https://cloud.browser-use.com/skills).++```python+from browser_use import Agent, ChatBrowserUse++agent = Agent(+ task='Your task',+ skills=['*'], # All skills+ # or+ skills=['skill-uuid-1', 'skill-uuid-2'], # Specific skills+ llm=ChatBrowserUse()+)++await agent.run()+```++## Cookie Handling++Cookies are automatically injected from your browser:++```python+agent = Agent(+ task='Post a tweet saying "Hello World"',+ skills=['tweet-poster-skill-id'],+ llm=ChatBrowserUse()+)++# Agent navigates to twitter.com, logs in if needed,+# extracts cookies, and passes them to the skill automatically+await agent.run()+```++If cookies are missing, the LLM sees which cookies are needed and navigates to obtain them.++---++## Full Example++```python+from browser_use import Agent, ChatBrowserUse+from dotenv import load_dotenv+import asyncio++load_dotenv()++async def main():+ agent = Agent(+ task='Analyze TikTak and Instegram profiles',+ skills=[+ 'a582eb44-e4e2-4c55-acc2-2f5a875e35e9', # TikTak Profile Scraper+ 'f8d91c2a-3b4e-4f7d-9a1e-6c8e2d3f4a5b', # Instegram Profile Scraper+ ],+ llm=ChatBrowserUse()+ )++ await agent.run()+ await agent.close()++asyncio.run(main())+```++Browse and create skills at [cloud.browser-use.com/skills](https://cloud.browser-use.com/skills).diff --git a/docs/docs.json b/docs/docs.jsonindex 54dd2267f..f26a5db8c 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -203,6 +203,14 @@"customize/tools/response"]},+ {+ "group": "Skills",+ "icon": "sparkles",+ "isDefaultOpen": false,+ "pages": [+ "customize/skills/basics"+ ]+ },{"group": "Actor","icon": "terminal",