You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
1
+
## Browser Use Agent
2
2
3
-
## Getting Started
3
+
> Create an agent that can Browse the Web using Browser Use.
4
4
5
-
First, run the development server:
5
+
A Next.js application that provides an AI-powered web browsing assistant using the Browser Use SDK. This agent can execute tasks in a web browser, monitor their progress, and provide real-time updates through a streaming interface.
6
+
7
+
## Features
8
+
9
+
-**Web Task Execution**: Run automated tasks in web browsers
10
+
-**Real-time Monitoring**: Stream task progress and status updates
11
+
-**Session Management**: Continue tasks across browser sessions
12
+
-**AI Integration**: Powered by AI models for intelligent task handling
13
+
-**Streaming Responses**: Real-time updates using Vercel AI SDK
14
+
15
+
## Core Components
16
+
17
+
### API Route (`/api/chat`)
18
+
The main API endpoint that handles chat interactions and web task execution:
19
+
20
+
-**`runTask`**: Creates and executes new browser tasks
21
+
-**`continueTask`**: Continues existing tasks using session IDs
22
+
-**Task Status Tracking**: Monitors running, paused, stopped, and finished states
Create a `.env.local` file with the following variables:
6
33
7
34
```bash
8
-
npm run dev
9
-
# or
10
-
yarn dev
11
-
# or
12
-
pnpm dev
13
-
# or
14
-
bun dev
35
+
# Browser Use API Key (required)
36
+
BROWSER_USE_API_KEY=your_browser_use_api_key_here
15
37
```
16
38
17
-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
18
-
19
-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
39
+
### Installation & Development
20
40
21
-
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
41
+
```bash
42
+
# Install dependencies
43
+
pnpm i
22
44
23
-
## Learn More
45
+
# Start Dev Server
46
+
pnpm dev
47
+
```
24
48
25
-
To learn more about Next.js, take a look at the following resources:
49
+
Open [http://localhost:3000](http://localhost:3000) to view the application.
26
50
27
-
-[Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28
-
-[Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
51
+
## Usage
29
52
30
-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
53
+
1.**Start a Task**: Use the chat interface to describe what you want to accomplish in the browser
54
+
2.**Monitor Progress**: Watch real-time updates as the task executes
55
+
3.**Access Live Session**: Click on the live URL to see the browser in action
56
+
4.**Continue Tasks**: Use session IDs to resume interrupted tasks
31
57
32
-
## Deploy on Vercel
58
+
## Architecture
33
59
34
-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
60
+
The application uses:
61
+
-**Next.js 14** with App Router
62
+
-**Vercel AI SDK** for streaming responses
63
+
-**Browser Use SDK** for web automation
64
+
-**TypeScript** for type safety
65
+
-**Tailwind CSS** for styling
35
66
36
-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
"You are a helpful assistant that can answer questions and help with tasks. You can use the tools provided to you to help you answer questions and help with tasks.",
0 commit comments