Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
4 changes: 2 additions & 2 deletions .secrets.baseline

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion deploy/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ AIQ_DEV_ENV=cli
NVIDIA_API_KEY=


# Web search (Required)
# Web search (Required — set at least one provider key)
YDC_API_KEY=
TAVILY_API_KEY=
# EXA_API_KEY=
# NIMBLE_API_KEY=

# Paper search (Optional — choose one provider)
# The provider is selected in your workflow config via the `provider` field
Expand Down
1 change: 1 addition & 0 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ RUN uv pip install --no-sources --no-deps -e . \
&& uv pip install --no-deps -e ./sources/google_scholar_paper_search \
&& uv pip install --no-deps -e ./sources/tavily_web_search \
&& uv pip install --no-deps -e ./sources/exa_web_search \
&& uv pip install --no-deps -e ./sources/nimble_web_search \
Comment thread
wildcard marked this conversation as resolved.
&& uv pip install --no-deps -e "./sources/knowledge_layer[all]" \
&& uv pip install --no-deps -e ./frontends/aiq_api \
&& uv pip install "psycopg[binary]>=3.0.0"
Expand Down
42 changes: 42 additions & 0 deletions docs/source/customization/configuration-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,48 @@ functions:
- **`fast`** -- Optimized for low latency. Returns results quickly at the cost of recall and semantic depth. Use for interactive UIs, high-volume calls, or when the query is narrow and keyword-like.
- **`deep`** -- Optimized for thoroughness. Runs a more expensive semantic search with broader retrieval. Use for research-quality queries where completeness matters more than speed.

### `nimble_web_search`

Web search powered by the [Nimble API](https://nimbleway.com/) via `langchain-nimble`.

```yaml
functions:
web_search_tool:
_type: nimble_web_search
max_results: 5
max_content_length: 10000

advanced_web_search_tool:
_type: nimble_web_search
max_results: 5
search_depth: deep
```

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `max_results` | `int` | `5` | Maximum number of search results to return. |
| `api_key` | `str` | `None` | Nimble API key. Falls back to `NIMBLE_API_KEY` environment variable. |
| `max_retries` | `int` | `3` | Number of retry attempts on search failure. |
| `search_depth` | `str` | `"lite"` | Nimble search depth. See options below. |
| `focus` | `str` | `"general"` | Nimble focus mode. See options below. |
| `country` | `str` | `"US"` | ISO 3166 country code passed to Nimble (e.g. `US`, `GB`, `FR`). |
| `locale` | `str` | `"en"` | Language/locale passed to Nimble (e.g. `en`, `fr`, `es`). |
| `max_content_length` | `int \| None` | `10000` | Max characters per result's page content. Set to `None` to disable truncation. |

**`search_depth` options:**

- **`lite`** (default) -- Returns metadata only (title, URL, description). Fastest, lowest token cost, safe default for general lookups.
- **`fast`** -- Returns rich content at low latency. **Enterprise-tier only**; non-enterprise accounts receive a 403 with a clear entitlement message.
- **`deep`** -- Returns full page content for each result. Use for research workflows that need the body text, not just URLs.

**`focus` options:**

- **`general`** (default) -- Broad web/research queries. The right choice for almost all agent use.
- **`news`** -- Restricts results to news-publisher sources, ordered by recency. There is no recency threshold -- older articles still appear; it changes the source mix, not the time window. (Recency windowing is a separate Nimble `time_range` capability that also works with `focus=general`; not exposed in this initial integration.)
- **`location`**, **`shopping`**, **`geo`**, **`social`** -- Domain-specific routing; set only when the tool targets that domain.

`focus` is a workflow-config setting, not an agent-chosen parameter -- the model only passes a query, so general research queries cannot silently switch to `news`. Answer generation (`include_answer`) is **not exposed** in this initial integration.

### `paper_search`

Academic paper search through Google Scholar using [Serper](https://serper.dev/),
Expand Down
1 change: 1 addition & 0 deletions docs/source/deployment/docker-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ The builder stage handles all compilation and package installation:
- `sources/google_scholar_paper_search` -- Google Scholar search
- `sources/tavily_web_search` -- Tavily web search
- `sources/exa_web_search` -- Exa web search
- `sources/nimble_web_search` -- Nimble web search
- `sources/knowledge_layer[all]` -- Knowledge layer with all extras
- `frontends/aiq_api` -- [FastAPI](https://fastapi.tiangolo.com/) frontend
- `psycopg[binary]>=3.0.0` -- PostgreSQL driver (psycopg v3, installed non-editable)
Expand Down
1 change: 1 addition & 0 deletions docs/source/deployment/docker-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ The sections below explain each group of variables.
| `NVIDIA_API_KEY` | Yes | NVIDIA API key for NIM model access. |
| `TAVILY_API_KEY` | Conditional | Web search provider key (required if using `tavily_web_search`). |
| `EXA_API_KEY` | Conditional | Web search provider key (required if using `exa_web_search`). |
| `NIMBLE_API_KEY` | Conditional | Web search provider key (required if using `nimble_web_search`). |
| `SERPER_API_KEY` | No | Google Scholar paper search key (optional). |

### API keys (optional)
Expand Down
1 change: 1 addition & 0 deletions docs/source/deployment/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ For complete examples with NGC-specific flags, refer to `deploy/helm/README.md`
| Key | Description |
|-----|-------------|
| `EXA_API_KEY` | Exa API key for web search |
| `NIMBLE_API_KEY` | Nimble API key for web search |
| `SERPER_API_KEY` | Serper API key for Google search |
| `JINA_API_KEY` | Jina API key |
| `WANDB_API_KEY` | Weights & Biases API key |
Expand Down
1 change: 1 addition & 0 deletions docs/source/extending/adding-a-data-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ async def search(self, query: str) -> str:
|---|---|---|---|
| Tavily Web Search | `tavily_web_search` | `sources/tavily_web_search` | General web search through Tavily API |
| Exa Web Search | `exa_web_search` | `sources/exa_web_search` | General web search through Exa API |
| Nimble Web Search | `nimble_web_search` | `sources/nimble_web_search` | General web search through Nimble API (`langchain-nimble`) |
| Google Scholar | `paper_search` | `sources/google_scholar_paper_search` | Academic papers through Serper/Google Scholar |
| Knowledge Layer | `knowledge_retrieval` | `sources/knowledge_layer` | Document retrieval through pluggable backends |

Expand Down
1 change: 1 addition & 0 deletions docs/source/extending/adding-a-tool.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ f'<Document href="{url}">\n<title>\n{title}\n</title>\n{content}\n</Document>'
|---|---|---|---|
| Tavily Web Search | `tavily_web_search` | `sources/tavily_web_search` | `TAVILY_API_KEY` |
| Exa Web Search | `exa_web_search` | `sources/exa_web_search` | `EXA_API_KEY` |
| Nimble Web Search | `nimble_web_search` | `sources/nimble_web_search` | `NIMBLE_API_KEY` |
| Google Scholar | `paper_search` | `sources/google_scholar_paper_search` | `SERPER_API_KEY` |
| Knowledge Layer | `knowledge_retrieval` | `sources/knowledge_layer` | (varies by backend) |

Expand Down
4 changes: 3 additions & 1 deletion docs/source/get-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The script performs the following steps:
3. Installs the core package with dev dependencies
4. Installs all frontends (CLI, debug console, API server)
5. Installs benchmark packages (freshqa, deepsearch_qa)
6. Installs Tavily, Exa, Google Scholar, and the LlamaIndex and Foundational RAG knowledge extras
6. Installs the data source plugins (Tavily, Exa, Nimble, Google Scholar) and the LlamaIndex and Foundational RAG knowledge extras
7. Sets up pre-commit hooks
8. Copies `deploy/.env.example` to `deploy/.env` if no `.env` file exists
9. Installs UI npm dependencies (if Node.js is available)
Expand Down Expand Up @@ -96,6 +96,7 @@ uv pip install -e ./frontends/aiq_api # Unified API server (includes debug)
# Data sources (pick what you need)
uv pip install -e ./sources/tavily_web_search
uv pip install -e ./sources/exa_web_search
uv pip install -e ./sources/nimble_web_search
uv pip install -e ./sources/duckduckgo_news_search
uv pip install -e ./sources/polymarket_prediction_market
uv pip install -e ./sources/google_scholar_paper_search
Expand Down Expand Up @@ -136,6 +137,7 @@ Then edit `deploy/.env` and fill in your keys.
|----------|----------|---------|
| `TAVILY_API_KEY` | [Tavily](https://tavily.com/) | Web search (Tavily provider) |
| `EXA_API_KEY` | [Exa](https://exa.ai/) | Web search (Exa provider) |
| `NIMBLE_API_KEY` | [Nimble](https://nimbleway.com/) | Web search (Nimble provider) |
| `SERPER_API_KEY` | [Serper](https://serper.dev/) | Google Scholar paper search with `provider: serper` (the default) |
| `SERPAPI_API_KEY` | [SerpAPI](https://serpapi.com/) | Google Scholar paper search with `provider: serpapi` |
| `SEARCHAPI_API_KEY` | [SearchAPI](https://www.searchapi.io/) | Google Scholar paper search with `provider: searchapi` |
Expand Down
2 changes: 2 additions & 0 deletions docs/source/get-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ NVIDIA_API_KEY=nvapi-...
TAVILY_API_KEY=tvly-...
# Or, to use Exa instead of Tavily for web search:
# EXA_API_KEY=...
# Or, to use Nimble instead of Tavily for web search:
# NIMBLE_API_KEY=...
```

## Step 2: Choose a Mode
Expand Down
1 change: 1 addition & 0 deletions docs/source/resources/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ prompted to follow the recorded order.

- **Tavily Web Search** — General web search (requires `TAVILY_API_KEY`)
- **Exa Web Search** — General web search via Exa (requires `EXA_API_KEY`)
- **Nimble Web Search** — General web search via Nimble (requires `NIMBLE_API_KEY`)
- **DuckDuckGo News Search** — Recent news search (no API key)
- **Polymarket Prediction Markets** — Events and market-implied probabilities (no API key)
- **Google Scholar Paper Search** — Academic search through Serper, SerpAPI, or SearchAPI (requires the selected provider's key)
Expand Down
2 changes: 2 additions & 0 deletions docs/source/resources/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Common issues and solutions for the AI-Q blueprint.
| `Gateway timeout (504)` | Model endpoint overloaded or unavailable | Retry, or switch to a different model in config |
| Tavily search returns empty | Invalid `TAVILY_API_KEY` | Verify key at [tavily.com](https://tavily.com) |
| Exa search returns empty or 401 | Invalid or missing `EXA_API_KEY` | Verify key at [exa.ai](https://exa.ai) |
| Nimble search returns empty or 401 | Invalid or missing `NIMBLE_API_KEY` | Verify key at [nimbleway.com](https://nimbleway.com) |
| Nimble search returns 403 with "enterprise" | `search_depth: fast` requires an Enterprise plan | Switch to `search_depth: lite` (default) or `deep`, or upgrade your Nimble plan |
| Serper search fails | Missing `SERPER_API_KEY` | Set key or remove `paper_search_tool` from config |

## Runtime Issues
Expand Down
2 changes: 2 additions & 0 deletions mcp/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ dev = [
"google-scholar-paper-search",
"tavily-web-search",
"exa-web-search",
"nimble-web-search",
"you-com",
"duckduckgo-news-search",
"polymarket-prediction-market",
Expand Down Expand Up @@ -252,6 +253,7 @@ aiq-agent = { workspace = true }
google-scholar-paper-search = { workspace = true }
tavily-web-search = { workspace = true }
exa-web-search = { workspace = true }
nimble-web-search = { workspace = true }
you-com = { workspace = true }
duckduckgo-news-search = { workspace = true }
polymarket-prediction-market = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ echo ""
echo "Installing data sources..."
"${UV_BIN}" pip install -e ./sources/tavily_web_search
"${UV_BIN}" pip install -e ./sources/exa_web_search
"${UV_BIN}" pip install -e ./sources/nimble_web_search
"${UV_BIN}" pip install -e ./sources/you_com
"${UV_BIN}" pip install -e ./sources/google_scholar_paper_search
"${UV_BIN}" pip install -e "./sources/knowledge_layer[llamaindex,foundational_rag]"
Expand Down
Loading
Loading