$npx -y skills add K-Dense-AI/scientific-agent-skills --skill exa-searchWeb toolkit powered by Exa, tuned for scientific and technical content. Use this skill when the user needs to search the web or fetch/extract URL content. Covers: web search (semantic lookups, research, current info — with optional research-paper category and academic domain filt
| 1 | # Exa Web Toolkit |
| 2 | |
| 3 | A skill for web-powered research tasks backed by [Exa](https://exa.ai): web search and URL extraction. Exa's index combines high-quality keyword and semantic retrieval, which makes it well-suited to scientific, technical, and conceptual queries. |
| 4 | |
| 5 | ## Routing — pick the right capability |
| 6 | |
| 7 | Read the user's request and match it to one of the capabilities below. Read the corresponding reference file for detailed instructions before running commands. |
| 8 | |
| 9 | | User wants to... | Capability | Where | |
| 10 | |---|---|---| |
| 11 | | Look something up, research a topic, find current info | **Web Search** | `references/web-search.md` | |
| 12 | | Fetch content from a specific URL (webpage, article, PDF) | **Web Extract** | `references/web-extract.md` | |
| 13 | | Install or authenticate | **Setup** | Below | |
| 14 | |
| 15 | ### Decision guide |
| 16 | |
| 17 | - **Default to Web Search** for topic lookups, research questions, or "what is X?" queries. When the topic is scientific or technical, pass `--category "research paper"` to bias toward scholarly sources, and/or an academic `--include-domains` allowlist. See `references/web-search.md` for the two-pass academic strategy. |
| 18 | - **Use Web Extract** when the user provides a URL or asks you to read/fetch a specific page. Prefer this over the built-in WebFetch for batch extraction (multiple URLs in one call) and for academic PDFs. |
| 19 | |
| 20 | ### Academic source priority |
| 21 | |
| 22 | For technical or scientific queries, prefer academic and scientific sources: |
| 23 | - Peer-reviewed journal articles and conference proceedings over blog posts or news |
| 24 | - Preprints (arXiv, bioRxiv, medRxiv) when peer-reviewed versions aren't available |
| 25 | - Institutional and government sources (NIH, WHO, NASA, NIST) over commercial sites |
| 26 | - Primary research over secondary summaries |
| 27 | |
| 28 | Two levers to steer Exa toward scholarly content: |
| 29 | 1. `--category "research paper"` biases retrieval toward scholarly sources. |
| 30 | 2. `--include-domains` with a scholarly allowlist (arxiv.org, nature.com, pubmed.ncbi.nlm.nih.gov, etc.) restricts the domain pool. |
| 31 | |
| 32 | Combine both for strictly academic results. See `references/web-search.md` for the full pattern. |
| 33 | |
| 34 | When citing academic sources, include author names and publication year where available (e.g., [Smith et al., 2025](url)) in addition to the standard citation format. If a DOI is present, prefer the DOI link. |
| 35 | |
| 36 | --- |
| 37 | |
| 38 | ## Setup |
| 39 | |
| 40 | This skill uses the [`exa-py`](https://github.com/exa-labs/exa-py) Python SDK. The scripts in `scripts/` declare their dependencies via PEP 723 inline metadata, so you can run them directly with `uv run` without a separate install step: |
| 41 | |
| 42 | ```bash |
| 43 | uv run --with exa-py python "$SKILL_PATH/scripts/exa_search.py" --help |
| 44 | ``` |
| 45 | |
| 46 | If you prefer a persistent install: |
| 47 | |
| 48 | ```bash |
| 49 | uv pip install "exa-py>=1.14.0" |
| 50 | ``` |
| 51 | |
| 52 | ### Authentication |
| 53 | |
| 54 | All commands read the API key from the `EXA_API_KEY` environment variable. Get your Exa API key at [dashboard.exa.ai/api-keys](https://dashboard.exa.ai/api-keys). |
| 55 | |
| 56 | First, check if a `.env` file exists in the project root and contains `EXA_API_KEY`. If so, load it: |
| 57 | |
| 58 | ```bash |
| 59 | dotenv -f .env run -- uv run --with exa-py python "$SKILL_PATH/scripts/exa_search.py" "your query" |
| 60 | ``` |
| 61 | |
| 62 | If `dotenv` isn't available, install it: `pip install python-dotenv[cli]` or `uv pip install python-dotenv[cli]`. |
| 63 | |
| 64 | If there's no `.env`, export the key for the session: |
| 65 | |
| 66 | ```bash |
| 67 | export EXA_API_KEY="your-key" |
| 68 | ``` |
| 69 | |
| 70 | Verify by running any script with `--help` — it will exit cleanly if the key is set and auth-check runs only when a real query is made. |
| 71 | |
| 72 | ### Tracking header |
| 73 | |
| 74 | Every script in this skill sets the `x-exa-integration` request header to `k-dense-ai--scientific-agent-skills` so Exa can attribute usage from the K-Dense AI scientific-agent-skills repo to this integration. Do not remove or rename this header when adapting the scripts. |
| 75 | |
| 76 | --- |
| 77 | |
| 78 | ## Files in this skill |
| 79 | |
| 80 | - `SKILL.md` — this file (routing and setup) |
| 81 | - `references/web-search.md` — detailed web search reference with academic strategy |