<!-- SPDX-License-Identifier: Apache-2.0 -->
**Status:** stable · **Owner:** Developer Relations · **License:** Apache-2.0

# `firecrawl` — KYE adapter for Firecrawl

A thin wrapper around the Firecrawl client that seals each scrape / crawl as a
KYE tool-call inside the §0.3 evidence chain, with the source URL pinned so the
ingested data is replay-traceable. Your Firecrawl calls are unchanged — you call
them through the wrapper instead of directly.

```ts
import FirecrawlApp from "@mendable/firecrawl-js";
import { withKyeFirecrawl } from "./src/adapter.js";

const app = new FirecrawlApp({ apiKey: process.env.FIRECRAWL_API_KEY });
const kyeApp = withKyeFirecrawl(app);
const doc = await kyeApp.scrapeUrl("https://example.org/policy");
```

- first call → `kye.agent.governance.v1` (the §52 task-start binding).
- each scrape / crawl → `kye.evidence.tool_call.v1` (source URL pinned).
- `finish()` → `kye.agent.completion.v1` (the task-end ledger).

## Non-competition lock (§0 / §0.30 / §32 — permanent)

KYE **governs** the Firecrawl ingestion as a first-class principal; it does
**NOT** run, replace, or vendor Firecrawl, and it is **not** a crawler. The
ingested document is tenant data — host the crawler yourself; never leak tenant
data across the boundary (§0.11). `@mendable/firecrawl-js` is a peer dependency,
referenced as an integration point only. The non-competition lock is permanent.

## Reuses the canonical envelope

Same three envelopes as
[`governed-agent`](../../agent-dev-kit-templates/governed-agent/README.md) (§32)
— no new envelope is invented. Reference shapes:
[`public/examples/agent-governance/`](../../../examples/agent-governance/).

## Files

- `src/adapter.ts` — the `withKyeFirecrawl` wrapper.
