Introduction
Fieldwork is one TypeScript API for searching the web, reading pages, extracting values, crawling sites, answering and researching questions, watching for changes, driving a browser and parsing documents, across eleven providers.
Pick a provider by passing its adapter. The instance you get back has exactly the methods that provider offers.
import { fieldwork } from "@howells/fieldwork-sdk";
import { firecrawl } from "@howells/fieldwork-sdk/firecrawl";
// Reads FIRECRAWL_API_KEY
const web = fieldwork({ adapter: firecrawl() });
const { results } = await web.search("Framework Laptop 13 specs");
const page = await web.read(results[0].url);
const product = await web.product(page.url); // variants, without a model
Swap the adapter to switch providers; the calls stay the same.
How it behaves
A call goes to the provider you chose, or it doesn't go
Nothing falls back to another provider and nothing is emulated. A provider without an answer endpoint has no answer, even though search plus a model could imitate one.
The types refuse what the provider can't serve
fieldwork({ adapter: tavily() }).act(...) is a type error, because Tavily has no browser. Untyped JavaScript gets a FieldworkError with code Unsupported, and no request is sent.
Every result keeps the provider's response
Results are normalized into shared shapes, and the provider’s own response stays on each one as raw.
Every failure is one error type
A FieldworkError carries a code, whether repeating can succeed, and the id of any job that had already started.
Long jobs can be collected later
A research run or crawl that outlasts your timeout keeps running on the provider. Pass its id back as resume instead of paying for a second job.
Packages
| Package | What it is |
|---|---|
@howells/fieldwork-sdk |
The client, one adapter per provider on its own subpath, bestImages at /image, and agent tool definitions at /tools. |
@howells/fieldwork-mcp |
Those tools as an MCP server over stdio, and as an HTTP gateway with a JSON API, remote MCP and an OpenAPI description. |
Where to go next
Installation
Install the SDK and make a first call.
Capabilities
Which of the 19 capabilities each provider offers.
Agent tools
Tool definitions for the AI SDK and other frameworks.
MCP server
The same tools for any MCP client.
HTTP gateway
Serve tools over HTTP and remote MCP behind bearer keys.
Provider guide
Which provider to start with for each task.