Skip to main content
Chapter 10 Research, Automation & The Future

Web Fetch & Browser Automation: Brave + Perplexity + Playwright

8 min read Lesson 59 / 65 Preview

The agent learns to use the internet

Most "AI assistants" know what was on the web up to a point in time. A real agent goes and looks when it needs to.

Three layers, in order of preference

  1. Web Fetch — direct GETs of known URLs. Cheap, fast, no JS.
  2. Search APIs — Brave Search and Perplexity. Cheap and structured.
  3. Browser automation — Playwright. Slowest, most expensive, but handles JS-heavy pages and login walls.

Web Fetch Skill

name: web_fetch
description: GET a URL and return cleaned text content (no JS).
input_schema:
  url:    { type: string, required: true }
  format: { type: string, default: "markdown" }
exec: ./bin/fetch.py

Internally, fetch + readability extraction + markdown conversion. Returns under 30k characters.

Brave Search Skill

name: web_search
exec: ./bin/brave.py
input_schema:
  q:     { type: string, required: true }
  count: { type: integer, default: 5 }

Perplexity for synthesis

Where Brave returns links, Perplexity returns synthesized answers with citations. Use it for "what is the current state of X" questions.

Playwright as the heavy hammer

Reach for Playwright only when:

  • The page is rendered by JavaScript and Web Fetch returns empty
  • A login is needed (with credentials in your secrets file)
  • You need to click, scroll, or fill forms

Most students never need Playwright. Layers 1–2 cover 90% of the work.

Try it

Build a deep-research Skill that, given a topic, runs Brave for 5 results, web-fetches each, summarizes, and writes a single markdown report. That single Skill replaces an hour of manual research per use.

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support