# browser-use **Repository Path**: spotmaverick/browser-use ## Basic Information - **Project Name**: browser-use - **Description**: https://github.com/browser-use/browser-use 的镜像 - **Primary Language**: Python - **License**: MIT - **Default Branch**: Enhancement/Improve-input-state-information-about-the-content-we-cut-out - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2025-03-28 - **Last Updated**: 2025-07-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 浅色模式下显示黑色浏览器使用标志,深色模式下显示白色标志。
[![GitHub stars](https://img.shields.io/github/stars/gregpr07/browser-use?style=social)](https://github.com/gregpr07/browser-use/stargazers) [![Discord](https://img.shields.io/discord/1303749220842340412?color=7289DA&label=Discord&logo=discord&logoColor=white)](https://link.browser-use.com/discord) [![Documentation](https://img.shields.io/badge/Documentation-📕-blue)](https://docs.browser-use.com) [![Twitter Follow](https://img.shields.io/twitter/follow/Gregor?style=social)](https://x.com/gregpr07) [![Twitter Follow](https://img.shields.io/twitter/follow/Magnus?style=social)](https://x.com/mamagnus00) 让AI掌控你的浏览器 🤖 Browser Use 是连接AI代理与浏览器的最简单方式。如果您在项目中使用过Browser Use,欢迎在我们的[Discord](https://link.browser-use.com/discord)中展示。 了解更多库信息,请查看[文档 📕](https://docs.browser-use.com)。 # 快速开始 使用pip安装: ```bash pip install browser-use ``` (可选)安装playwright: ```bash playwright install ``` 启动您的代理: ```python from langchain_openai import ChatOpenAI from browser_use import Agent import asyncio async def main(): agent = Agent( task="访问Reddit,在搜索栏中查找'browser-use',点击第一篇帖子并返回第一条评论。", llm=ChatOpenAI(model="gpt-4o"), ) result = await agent.run() print(result) asyncio.run(main()) ``` 别忘了在`.env`文件中添加您的API密钥。 ```bash OPENAI_API_KEY= ``` 关于其他设置、模型等更多信息,请查看[文档 📕](https://docs.browser-use.com)。 ### 使用UI测试 您可以测试[带UI界面的browser-use仓库](https://github.com/browser-use/web-ui) 或直接运行gradio示例: ``` uv pip install gradio ``` ```bash python examples/gradio.py ``` # 演示案例 [提示词](https://github.com/browser-use/browser-use/blob/main/examples/real_browser.py):在Google Docs中给我的爸爸写一封感谢信,感谢他的一切,并将文档保存为PDF。 ![给爸爸的信](https://github.com/user-attachments/assets/242ade3e-15bc-41c2-988f-cbc5415a66aa)

[提示词](https://github.com/browser-use/browser-use/blob/main/examples/find_and_apply_to_jobs.py):阅读我的简历,寻找机器学习相关职位,保存到文件,然后在新标签页中开始申请,如果需要帮助请询问我。 https://github.com/user-attachments/assets/171fb4d6-0355-46f2-863e-edb04a828d04

提示词:在kayak.com上查找2024年12月25日至2025年2月2日从苏黎世到北京的航班。 ![航班搜索 8x 10fps](https://github.com/user-attachments/assets/ea605d4a-90e6-481e-a569-f0e0db7e6390)

[提示词](https://github.com/browser-use/browser-use/blob/main/examples/save_to_file_hugging_face.py):在Hugging Face上查找使用cc-by-sa-4.0许可的模型并按点赞数排序,将前5名保存到文件。 https://github.com/user-attachments/assets/de73ee39-432c-4b97-b4e8-939fd7f323b3 ## 更多示例 更多示例请查看[示例文件夹](examples)或加入[Discord](https://link.browser-use.com/discord)展示您的项目。 # 愿景 告诉您的计算机做什么,它就能完成。 # 贡献指南 欢迎贡献!欢迎提交错误报告或功能需求的issue。 ## 本地设置 了解更多信息,请查看[本地设置指南 📕](https://docs.browser-use.com/development/local-setup)。 ---
苏黎世与旧金山 ❤️ 出品