Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions adk/data/knowledge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const DocsSource = DataSource.Website.fromSitemap(

### Website from base URL

Crawl a website starting from a URL (requires the Browser integration):
Crawl a website starting from a URL:

```typescript
const DocsSource = DataSource.Website.fromWebsite(
Expand All @@ -84,6 +84,14 @@ const DocsSource = DataSource.Website.fromWebsite(
)
```

For JS-rendered sites, add `fetch: "integration:browser"` to the options and add the Browser integration to your agent (see [Integrations](/adk/setup/integrations)).

```typescript
const DocsSource = DataSource.Website.fromWebsite("https://example.com", {
fetch: "integration:browser",
})
```

### Website from llms.txt

Index pages referenced in an `llms.txt` file:
Expand Down Expand Up @@ -114,7 +122,7 @@ All four website factories accept the same options:
|--------|------|-------------|
| `id` | `string` | Optional unique identifier for the source |
| `filter` | `(ctx) => boolean` | Filter function receiving `{ url, lastmod?, changefreq?, priority? }` |
| `fetch` | `string \| function` | Fetch strategy: `"node:fetch"` (default), `"integration:browser"`, or a custom function |
| `fetch` | `string \| function` | Fetch strategy: `"node:fetch"` (default) for static sites, `"integration:browser"` for JS-rendered sites, or a custom function |
| `maxPages` | `number` | Maximum pages to index (1–50000, default: 50000) |
| `maxDepth` | `number` | Maximum sitemap depth (1–20, default: 20) |

Expand Down
Loading