Skip to content

Commit 5c99dab

Browse files
authored
Restructure examples documentation (#3040)
Changed example location to include `templates` and `apps` as discussed. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Restructures the Examples docs into a top-level section with Templates and Apps. Adds two app examples (Ad Generator and QA-Testing) and moves the Prompting Guide under Customize > Agent. - **Refactors** - Moved examples from customize/examples/* to examples/templates/* (no content changes). - Added new top-level Examples group in docs.json with Templates and Apps; removed old Examples under Customize. - Relocated Prompting Guide to customize/agent/prompting-guide and added it to navigation. - **Migration** - Update links from customize/examples/* to examples/templates/*. - Update links to prompting-guide to customize/agent/prompting-guide. <!-- End of auto-generated description by cubic. -->
2 parents 7b3cbc6 + be49fea commit 5c99dab

File tree

11 files changed

+224
-14
lines changed

11 files changed

+224
-14
lines changed
File renamed without changes.

docs/docs.json

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,42 @@
7474
{
7575
"source": "/customize/examples/chain-agents",
7676
"destination": "/customize/examples/follow-up-tasks"
77+
},
78+
{
79+
"source": "/customize/examples/fast-agent",
80+
"destination": "/examples/templates/fast-agent"
81+
},
82+
{
83+
"source": "/customize/examples/follow-up-tasks",
84+
"destination": "/examples/templates/follow-up-tasks"
85+
},
86+
{
87+
"source": "/customize/examples/parallel-browser",
88+
"destination": "/examples/templates/parallel-browser"
89+
},
90+
{
91+
"source": "/customize/examples/playwright-integration",
92+
"destination": "/examples/templates/playwright-integration"
93+
},
94+
{
95+
"source": "/customize/examples/sensitive-data",
96+
"destination": "/examples/templates/sensitive-data"
97+
},
98+
{
99+
"source": "/customize/examples/secure",
100+
"destination": "/examples/templates/secure"
101+
},
102+
{
103+
"source": "/customize/examples/more-examples",
104+
"destination": "/examples/templates/more-examples"
105+
},
106+
{
107+
"source": "/customize/examples/ad-use",
108+
"destination": "/examples/apps/ad-use"
109+
},
110+
{
111+
"source": "/customize/examples/vibetest-use",
112+
"destination": "/examples/apps/vibetest-use"
77113
}
78114
],
79115
"navigation": {
@@ -99,6 +135,7 @@
99135
"pages": [
100136
"customize/agent/basics",
101137
"customize/agent/supported-models",
138+
"customize/agent/prompting-guide",
102139
"customize/agent/output-format",
103140
"customize/agent/all-parameters"
104141
]
@@ -126,20 +163,6 @@
126163
"customize/tools/response"
127164
]
128165
},
129-
{
130-
"group": "Examples",
131-
"icon": "folder-open",
132-
"pages": [
133-
"customize/examples/fast-agent",
134-
"customize/examples/follow-up-tasks",
135-
"customize/examples/parallel-browser",
136-
"customize/examples/playwright-integration",
137-
"customize/examples/sensitive-data",
138-
"customize/examples/secure",
139-
"customize/examples/more-examples",
140-
"customize/examples/prompting-guide"
141-
]
142-
},
143166
{
144167
"group": "Integration",
145168
"icon": "plug",
@@ -150,6 +173,32 @@
150173
}
151174
]
152175
},
176+
{
177+
"group": "Examples",
178+
"pages": [
179+
{
180+
"group": "Templates",
181+
"icon": "folder",
182+
"pages": [
183+
"examples/templates/fast-agent",
184+
"examples/templates/follow-up-tasks",
185+
"examples/templates/parallel-browser",
186+
"examples/templates/playwright-integration",
187+
"examples/templates/sensitive-data",
188+
"examples/templates/secure",
189+
"examples/templates/more-examples"
190+
]
191+
},
192+
{
193+
"group": "Apps",
194+
"icon": "box-open",
195+
"pages": [
196+
"examples/apps/ad-use",
197+
"examples/apps/vibetest-use"
198+
]
199+
}
200+
]
201+
},
153202
{
154203
"group": "Development",
155204
"pages": [

docs/examples/apps/ad-use.mdx

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: "Ad-Use (Ad Generator)"
3+
description: "Generate Instagram ads from landing pages using browser agents and Google's Nano Banana 🍌."
4+
icon: "image"
5+
mode: "wide"
6+
---
7+
8+
<Note>
9+
This demo requires browser-use v0.7.6+.
10+
</Note>
11+
12+
<video
13+
controls
14+
className="w-full aspect-video rounded-xl"
15+
src="https://github.com/user-attachments/assets/7fab54a9-b36b-4fba-ab98-a438f2b86b7e">
16+
</video>
17+
18+
## Features
19+
20+
1. Agent visits your target website
21+
2. Captures brand name, tagline, and key selling points
22+
3. Takes a clean screenshot for design reference
23+
4. Creates a scroll-stopping Instagram ad with 🍌
24+
25+
## Setup
26+
27+
Make sure the newest version of browser-use is installed (with screenshot functionality):
28+
```bash
29+
pip install -U browser-use
30+
```
31+
32+
Export your Gemini API key, get it from: [Google AI Studio](https://makersuite.google.com/app/apikey)
33+
```
34+
export GOOGLE_API_KEY='your-google-api-key-here'
35+
```
36+
37+
## Normal Usage
38+
39+
```bash
40+
# Basic - Generate ad from any website
41+
python ad_generator.py https://www.apple.com/iphone-16-pro/
42+
43+
# Debug Mode - See the browser in action
44+
python ad_generator.py https://www.apple.com/iphone-16-pro/ --debug
45+
```
46+
47+
## Programmatic Usage
48+
```python
49+
import asyncio
50+
from ad_generator import create_ad_from_landing_page
51+
52+
async def main():
53+
results = await create_ad_from_landing_page(
54+
url="https://your-landing-page.com",
55+
debug=False
56+
)
57+
print(f"Generated ads: {results}")
58+
59+
asyncio.run(main())
60+
```
61+
62+
## Output
63+
64+
Generated ads are saved in the `output/` directory with:
65+
- **PNG image files** (ad_style_timestamp.png) - Actual generated ads from Gemini 2.5 Flash Image
66+
- **Prompt files** (ad_style_timestamp_prompt.txt) - The prompts used for generation
67+
- **Landing page screenshots** for reference
68+
69+
## Source Code
70+
71+
Full implementation: [https://github.com/browser-use/browser-use/tree/main/examples/apps/ad-use](https://github.com/browser-use/browser-use/tree/main/examples/apps/ad-use)
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: "Vibetest-Use (Automated QA)"
3+
description: "Run multi-agent Browser-Use tests to catch UI bugs, broken links, and accessibility issues before they ship."
4+
icon: "bug"
5+
mode: "wide"
6+
---
7+
8+
<Note>
9+
Requires **browser-use&nbsp; < v0.5.0** and Playwright Chromium. Currently getting an update to v0.7.6+.
10+
</Note>
11+
12+
<video
13+
controls
14+
className="w-full aspect-video rounded-xl"
15+
src="https://github.com/user-attachments/assets/6450b5b7-10e5-4019-82a4-6d726dbfbe1f">
16+
</video>
17+
18+
## Features
19+
20+
1. Launches multiple headless (or visible) Browser-Use agents in parallel
21+
2. Crawls your site and records screenshots, broken links & a11y issues
22+
3. Works on production URLs *and* `localhost` dev servers
23+
4. Simple natural-language prompts via MCP in Cursor / Claude Code
24+
25+
## Quick Start
26+
27+
```bash
28+
# 1. Create & activate env
29+
uv venv --python 3.11
30+
source .venv/bin/activate
31+
32+
# 2. Install project
33+
uv pip install -e .
34+
35+
# 3. Install browser runtime once
36+
playwright install chromium --with-deps --no-shell
37+
```
38+
39+
### 1) Claude Code
40+
41+
```bash
42+
# Register the MCP server
43+
claude mcp add vibetest /full/path/to/vibetest-use/.venv/bin/vibetest-mcp \
44+
-e GOOGLE_API_KEY="your_api_key"
45+
46+
# Inside a Claude chat
47+
> /mcp
48+
# ⎿ MCP Server Status
49+
# • vibetest: connected
50+
```
51+
52+
### 2) Cursor (manual MCP entry)
53+
54+
1. Open **Settings → MCP**
55+
2. Click **Add Server** and paste:
56+
57+
```json
58+
{
59+
"mcpServers": {
60+
"vibetest": {
61+
"command": "/full/path/to/vibetest-use/.venv/bin/vibetest-mcp",
62+
"env": {
63+
"GOOGLE_API_KEY": "your_api_key"
64+
}
65+
}
66+
}
67+
}
68+
```
69+
70+
## Basic Prompts
71+
```
72+
> Vibetest my website with 5 agents: browser-use.com
73+
> Run vibetest on localhost:3000
74+
> Run a headless vibetest on localhost:8080 with 10 agents
75+
```
76+
77+
### Parameters
78+
* **URL** – any `https` or `http` host or `localhost:port`
79+
* **Agents**`3` by default; more agents = deeper coverage
80+
* **Headless** – say *headless* to hide the browser, omit to watch it live
81+
82+
## Requirements
83+
84+
* Python 3.11+
85+
* Google API key (Gemini flash used for analysis)
86+
* Cursor / Claude with MCP support
87+
88+
## Source Code
89+
90+
Full implementation: [https://github.com/browser-use/vibetest-use](https://github.com/browser-use/vibetest-use)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)