An autonomous AI agent that browses the web in real-time to find you the best available tickets β live.
Ticket Hunter is a fully autonomous AI agent that takes a natural-language query like "Taylor Swift Eras Tour NYC" and β without any human intervention β searches Google, opens Ticketmaster, StubHub, SeatGeek, and other ticket platforms, navigates the pages, and returns ranked, structured ticket listings in real-time.
The agent streams its work live to the browser: you watch it browse, click, and extract data as it happens.
Built with Bright Data + Yutori N1
The agent runs as a 5-stage LangGraph pipeline, streamed live to your browser via Server-Sent Events:
User Query
β
βΌ
ββββββββββββοΏ½οΏ½οΏ½ββββββββββββββββββββββββββββββββββββββββββββββ
β Stage 1 Β· SERP Search β
β Bright Data SERP API searches Google for ticket sites β
β Scores and selects the top 3 most relevant URLs β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Stage 2 Β· Browser Pipeline β
β Connects to Bright Data Browser API via CDP β
β Opens each URL with a real Chromium instance β
β Takes initial screenshot β streamed to UI live β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Stage 3 Β· Yutori N1 Agentic Loop (up to 15 steps) β
β N1 vision model views screenshots and decides actions β
β Tools: navigate Β· click Β· scroll Β· type Β· screenshot β
β Iterates until tickets are found or step limit reached β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Stage 4 Β· Structured Extraction β
β OpenRouter (Gemini Flash) extracts JSON from findings β
β Fields: event, date, venue, section, row, price, url β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Stage 5 Β· Merge & Rank β
β Deduplicates results across platforms β
β Sorts by price (lowest first) β returned to UI β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Layer | Technology |
|---|---|
| Framework | Next.js 16 Β· React 19 Β· TypeScript 5 |
| Styling | Tailwind CSS 4 |
| Agent Orchestration | LangGraph |
| Browser Automation | Playwright Core + Chrome DevTools Protocol (CDP) |
| Web Infrastructure | Bright Data Browser API + SERP API |
| Vision LLM | Yutori N1 (multimodal, tool-use) |
| Extraction LLM | OpenRouter β Google Gemini Flash |
| Rate Limiting | Upstash Redis (per-IP, 1 search / 24h for the demo) |
| Deployment | Vercel via GitHub Actions |
The agent autonomously detects and browses any of these platforms based on Google results:
- Ticketmaster
- StubHub
- SeatGeek
- Vivid Seats
- AXS
- TickPick
- Gametime
- Eventbrite
- Viagogo
- TicketNetwork
- Tickets.com
- Node.js 18+
- A Bright Data account with Browser API + SERP API enabled
- A Yutori N1 API key
- An OpenRouter API key
- An Upstash Redis database (for rate limiting)
git clone https://github.com/brightdata/ticket-hunter-agent.git
cd ticket-hunter-agentnpm installCreate a .env.local file in the project root:
# Yutori N1 β vision LLM for autonomous browsing
YUTORI_API_KEY=your_yutori_api_key
# Bright Data β Browser API CDP WebSocket endpoint
# Found in your Bright Data dashboard under Browser API > Access Parameters
BRD_CDP_URL=wss://brd-customer-<id>-zone-<zone>:<password>@brd.superproxy.io:9222
# Bright Data β API key for SERP and Web Unlocker
BRIGHTDATA_API_KEY=your_brightdata_api_key
BRIGHTDATA_SERP_ZONE=serp # optional, defaults to "serp"
BRIGHTDATA_WEB_UNLOCKER_ZONE=unblocker # optional, defaults to "unblocker"
# OpenRouter β structured JSON extraction via Gemini Flash
OPENROUTER_API_KEY=your_openrouter_api_key
OPENROUTER_MODEL=google/gemini-flash-1.5 # optional
# Upstash Redis β rate limiting (remove or leave blank to disable)
KV_REST_API_URL=https://your-instance.upstash.io
KV_REST_API_TOKEN=your_upstash_tokennpm run devOpen http://localhost:3000 and search for any event.
src/
βββ app/
β βββ api/search/route.ts # POST endpoint β SSE stream orchestrator
β βββ page.tsx # Main UI page
β βββ layout.tsx # Root layout + global metadata
βββ components/
β βββ SearchForm.tsx # Query input with example prompts
β βββ BrowserView.tsx # Live browser screenshot panels (1β3 platforms)
β βββ StatusLog.tsx # Real-time agent activity log
β βββ ResultCard.tsx # Ticket card with price, venue, seats
βββ hooks/
β βββ useTicketSearch.ts # SSE consumer + client state management
βββ lib/
βββ agent/
β βββ graph.ts # LangGraph workflow definition
β βββ state.ts # Agent state schema
β βββ stream-events.ts # SSE event emitters
β βββ runtime-session.ts # Browser session lifecycle
β βββ browser-utils.ts # Playwright helpers
β βββ tools.ts # N1 tool schemas (click, scroll, etc.)
β βββ nodes/
β βββ serp-search.ts # Stage 1: Google SERP via Bright Data
β βββ browser-open.ts # Stage 2: CDP browser connection
β βββ browser-pipeline.ts # Stage 2: per-URL browsing orchestration
β βββ n1-browse-core.ts # Stage 3: N1 agentic loop (15-step max)
β βββ n1-browse.ts # Stage 3: N1 LangGraph node wrapper
β βββ extract.ts # Stage 4: structured JSON extraction
β βββ merge-and-rank.ts # Stage 5: dedup + price sort
βββ bright-data.ts # Bright Data SDK wrapper
βββ n1-client.ts # Yutori N1 OpenAI-compatible client
βββ openrouter-client.ts # OpenRouter extraction client
βββ rate-limit.ts # Upstash Redis rate limiter
βββ types.ts # Shared TypeScript interfaces
The repo includes a GitHub Actions workflow for automatic Vercel deployment.
Then add all environment variables in your Vercel project settings.
- Fork the repo
- Connect it to a Vercel project
- Add these secrets to your GitHub repo:
VERCEL_TOKENVERCEL_ORG_IDVERCEL_PROJECT_ID
- Add all
.env.localvariables to Vercel's environment settings - Push to
mainβ the workflow deploys automatically
npm run build
npx vercel deploy --prodEach result returned by the agent follows this structure:
interface TicketResult {
eventName: string; // "Taylor Swift | The Eras Tour"
eventDate: string; // "Friday, June 7, 2025"
venue: string; // "MetLife Stadium"
city: string; // "East Rutherford, NJ"
ticketType: string; // "Floor A Β· General Admission"
section: string; // "GA Floor"
row: string; // "N/A"
seats: string; // "2 available"
quantity: number; // 2
price: string; // "$380"
currency: string; // "USD"
platform: string; // "StubHub"
url: string; // Deep link to the listing
notes: string; // Any additional context
}The agent communicates with the frontend via Server-Sent Events (SSE). Events emitted during a search:
| Event | Payload | Description |
|---|---|---|
status |
{ message, level } |
Agent log entry (INFO, ACTION, WARN, DONE, etc.) |
screenshot |
{ data, source } |
Base64 browser screenshot streamed live |
inspect_url |
{ url, source } |
Current URL the browser has navigated to |
result |
{ tickets, finalAnswer } |
Final structured ticket results |
error |
{ message } |
Agent error |
done |
β | Stream complete |
The live demo enforces 1 search per IP per 24 hours via Upstash Redis.
When running locally with your own keys, this limit is not enforced unless you configure Upstash in your .env.local.
|
Bright Data provides the web infrastructure that makes the agent possible:
|
Yutori N1 is the multimodal vision LLM at the core of the agent loop:
|
MIT Β© Bright Data & Yutori