> ## Documentation Index
> Fetch the complete documentation index at: https://docs-preview.webcompute.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Grants.gov opportunities

> Run a browser agent that searches Grants.gov and returns active opportunity fields.

Search active public grant opportunities and summarize which results fit a topic.

## Opportunity triage shape

* Long-running public-portal research with a bounded result count.
* A safety boundary that stops before applications, login, or submission.
* Fit summaries that can feed a grants, research, or sales workflow.

## Setup

Use the CLI with a configured model profile. The example only reads public `grants.gov` pages.

## Run it from the CLI

```bash theme={null}
web agent \
  --url https://www.grants.gov/search-grants \
  --allow-domain grants.gov \
  "Search active Grants.gov opportunities for cybersecurity workforce. Return the first 5 opportunities with title, agency, opportunity number, close date, detail URL, and a one-sentence fit summary. Do not apply, log in, or submit forms."
```

## Expected output

```text theme={null}
Cybersecurity workforce opportunities

1. Title: ...
   Agency: ...
   Opportunity number: ...
   Close date: ...
   URL: https://www.grants.gov/search-results-detail/...
   Fit: ...
```

## Build it into an app

```ts theme={null}
const result = await agent.run({
  startUrl: "https://www.grants.gov/search-grants",
  goal:
    "Search active Grants.gov opportunities for cybersecurity workforce. Return the first 5 opportunities with title, agency, opportunity number, close date, detail URL, and fit summary.",
});

if (result.status === "completed" && result.output) {
  await saveOpportunities(result.output);
}
```

## Production notes

* Domain policy: `grants.gov`.
* Output fields: title, agency, opportunity number, close date, detail URL, fit summary.
* Add a schema before routing matches to sales, grants, or research workflows.
* Stop before applications, login, or submissions.

## Inspect

* Debug UI for filters and result pages.
* Recording for search path review.
* Artifacts if the workflow downloads public attachments.
* Status if the site blocks or redirects.

## Cleanup

The CLI run cleans up its browser. Close any standalone browser you opened for debugging with `web browser close <browser-id>`.

## Common failures

* If Grants.gov changes filter labels, inspect the recording and update the prompt with the current visible terms.
* If a result requires login or an application step, stop there and return the public detail URL only.
