Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Ucbepic Docetl ScraperPage

From Leeroopedia
Revision as of 17:02, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Ucbepic_Docetl_ScraperPage.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Knowledge Sources
Domains Frontend, React_UI
Last Updated 2026-02-08 00:00 GMT

Overview

Concrete tool for the AI-powered web scraper page in the DocETL frontend.

Description

This page component provides a full-featured scraper interface with a resizable three-panel layout: a chat panel for conversing with the AI scraper agent, a code execution panel showing Python scripts being run in sandboxed environments, and a dataset panel displaying collected results. It uses the Vercel AI SDK's useChat hook to communicate with the /api/scraper route and manages state for code executions, found links, sessions, and dataset refinement.

Usage

Rendered at the /scraper URL path. Users describe what data they want to collect, and the AI agent iteratively writes and executes scraping code, displaying results in real time.

Code Reference

Source Location

Signature

export default function ScraperPage(): JSX.Element

// Key interfaces:
interface CodeExecution {
  id: string;
  code: string;
  status: "running" | "completed" | "error";
  output?: string;
  error?: string;
  timestamp: Date;
}

interface FoundLink {
  title: string;
  url: string;
  snippet: string;
  score?: number;
  timestamp: Date;
}

Import

// This is a Next.js page component, auto-routed at /scraper

I/O Contract

Inputs (Props)

Name Type Required Description
No props -- this is a page component

Outputs

Name Type Description
rendered JSX.Element Three-panel scraper UI with chat, code, and dataset views

Usage Examples

// Accessed via browser at /scraper
// The page manages its own state via useChat and useState hooks

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment