Prometheus
Get started

Introduction

Turn a plain-English data request into verified, reproducible Firecrawl code — and keep it fresh.

Prometheus takes a request like "the top 5 Hacker News stories with title, url, and points" and returns a TypeScript collector (script.ts) that uses the Firecrawl SDK and prints JSON, plus a sample of the data it produced. It runs the collector before returning, so the code is known to work. Another agent — or you — embeds that code directly.

Optionally, save the collector as a Script — versioned, self-healing when the target site changes — and give it Deployments: a deployment re-collects on a cron schedule, serves fresh data on demand as an API endpoint, or both.

Three operations

  • Build — one-shot: prompt → verified code + a data sample. You embed the code.
  • Script — the versioned collector: it self-heals, and a successful heal appends a new version.
  • Deployment — one way a script runs: scheduled, on-demand (POST /deployments/:id/run returns fresh data inline), or both.

Four ways to reach it

All four speak the same contract (/api/v1):

  • HTTP API — the universal contract; call it from any language. → API reference
  • CLIprometheus build / prometheus scripts … / prometheus deployments …; pipeable, great for shells and code-writing agents. → CLI reference
  • MCPprometheus_build / prometheus_script_* / prometheus_deployment_* as native tools for MCP clients. → MCP reference
  • Skill — an installable Agent Skill so a coding agent reaches for Prometheus automatically.

Quick start

Ask for a collector over HTTP:

bash
curl -s http://localhost:3000/api/v1/build \  -H 'content-type: application/json' \  -d '{"prompt":"top 5 Hacker News stories with title, url, points"}' \| jq '{rowCount, script}'

You get back { sessionId, script, sample, rowCount, howItWorks, integration, … }. Write script to a file, npm i @mendable/firecrawl-js, set FIRECRAWL_API_KEY, and run it with tsx script.ts — it prints the same shape as sample.

Prefer the command line? The CLI wraps the same call:

bash
prometheus build "top 5 Hacker News stories with title, url, points"

How it works

POST /api/v1/build drives the Prometheus agent headlessly — it experiments against the live site with Firecrawl (search, scrape, map, crawl, interact), authors a deterministic script.ts, runs it to verify the output, and only then returns. There is no human in the loop, so instead of asking clarifying questions the agent makes reasonable assumptions and reports them in howItWorks.

Scripts wrap that collector in versioning plus Firecrawl's monitoring and self-heal machinery; deployments add the schedule or on-demand trigger. When a run fails because a site changed, Prometheus re-invokes the agent to repair (or rebuild) the collector and appends the corrected version — every track-latest deployment picks it up, no intervention needed.

Builds and prompt-based script creation run the agent and take ~30–180 seconds. An on-demand deployment run executes the script (up to ~2 minutes). Every other endpoint is a fast read.