Commit 4b778e7
authored
Add Exa Search API support as internet search tool (#1846)
## Summary
- Add `exa_internet_search` tool using `langchain_exa.ExaSearchResults`, mirroring the existing `tavily_internet_search` tool
- Includes `ExaInternetSearchToolConfig` with configurable `max_results`, `search_type` (`Literal["auto", "neural", "keyword"]`), `livecrawl` (`Literal["always", "fallback", "never"]`), `max_query_length`, and `api_key` (via config or `EXA_API_KEY` env var)
- Client instantiated lazily inside the invocation path, only when a valid API key is present
- Adds `langchain-exa>=1.1.0,<2.0.0` dependency to `nvidia-nat-langchain`
- Updates tutorial documentation with an "Using Exa Search" section alongside the existing Tavily section
Closes #1848
## Test plan
- [x] Unit tests pass (12 tests in `test_exa_internet_search.py` — config validation, retries, truncation, empty results, empty key)
- [x] Existing Tavily tests still pass (no regressions)
- [x] Tool registers correctly in `GlobalTypeRegistry` and appears in `nat info components -t function`
- [x] `ruff check` passes on all new/modified files
- [x] Integration test with a valid `EXA_API_KEY` against live Exa API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Authors:
- Max Buckley (https://github.com/maxwbuckley)
- Bryan Bednarski (https://github.com/bbednarski9)
Approvers:
- Bryan Bednarski (https://github.com/bbednarski9)
- https://github.com/Salonijain27
URL: #18461 parent a328e8a commit 4b778e7
49 files changed
Lines changed: 1977 additions & 130 deletions
File tree
- ci/vale/styles/config/vocabularies/nat
- docs/source/get-started/tutorials
- examples
- A2A
- math_assistant_a2a_protected
- math_assistant_a2a
- HITL
- por_to_jiratickets
- simple_calculator_hitl
- MCP
- simple_calculator_fastmcp_protected
- simple_calculator_fastmcp
- simple_calculator_mcp_protected
- simple_calculator_mcp
- RAG/simple_rag
- advanced_agents/alert_triage_agent
- agents
- control_flow
- hybrid_control_flow
- parallel_executor
- router_agent
- sequential_executor
- custom_functions
- automated_description_generation
- plot_charts
- documentation_guides
- workflows/text_file_ingest
- dynamo_integration
- latency_sensitivity_demo
- react_benchmark_agent
- evaluation_and_profiling
- email_phishing_analyzer
- simple_calculator_eval
- simple_web_query_eval
- finetuning
- dpo_tic_tac_toe
- rl_with_openpipe_art
- frameworks
- multi_frameworks
- semantic_kernel_demo
- strands_demo
- front_ends
- per_user_workflow
- simple_auth
- simple_calculator_custom_routes
- getting_started
- simple_calculator
- simple_web_query
- memory/redis
- notebooks
- object_store/user_report
- observability/simple_calculator_observability
- prompt_from_file
- safety_and_security/retail_agent
- packages
- nvidia_nat_langchain
- src/nat/plugins/langchain/tools
- tests
- nvidia_nat_vanna
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
Lines changed: 46 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| |||
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments