feat: add Tavily as optional Phase 1 backend in literature-review-agent - #13
Open
manisrinivasan2k1 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Tavily as a configurable, opt-in Phase 1 candidate discovery backend alongside the existing Exa backend in the literature-review-agent. This is an additive change — no existing Exa code is modified or removed.
What changed
New
scripts/tavily_search.py— mirrorsexa_search.pyconventions (stdliburllibonly, same CLI flags pattern, same normalized candidate JSON output format). Supports--query,--num-results,--topic(general/news),--academic(restricts to arxiv.org, scholar.google.com, etc.),--discovered-for, and--rawflags. ReadsTAVILY_API_KEYfrom env, usessearch_depth: "advanced"for best relevance.New
references/tavily-search-cookbook.md— mirrorsexa-search-cookbook.mdstructure. Documents key provisioning, CLI usage, curl recipes, response mapping, query patterns, cost/rate-limit notes (1,000 free credits/month), security guidance, troubleshooting, and when to prefer Tavily vs Exa vs host-native search.Updated
SKILL.md— added "Optional: Tavily as a Phase 1 backend" subsection under Step 1 (alongside existing Exa subsection), addedtavily_search.pyandtavily-search-cookbook.mdto the Resources list.Updated
setup.sh— addedset_env_varcall forTAVILY_API_KEYso the interactive setup flow prompts for it alongsideEXA_API_KEY; writes it to~/.paperorchestra/config; listed in the summary output.Files changed
skills/literature-review-agent/scripts/tavily_search.py(new)skills/literature-review-agent/references/tavily-search-cookbook.md(new)skills/literature-review-agent/SKILL.md(modified)setup.sh(modified)Dependency changes
tavily-pythonis documented as an optional install in the cookbook (consistent with howexadependencies are handled — not added torequirements.txt)Environment variable changes
TAVILY_API_KEY— read bytavily_search.pyat runtime; prompted insetup.sh; written to.envand~/.paperorchestra/configEXA_API_KEYis unchangedNotes for reviewers
urllibonly (no mandatory new dependencies), matching theexa_search.pypatterntavily_search.pyandsetup.shparse correctly (verified withpy_compileandbash -n)Automated Review
tavily_search.pyclosely mirrors the existingexa_search.pypattern (stdlib urllib, env-var key, normalized output, same exit-code contract). The cookbook doc is thorough and accurate. SKILL.md and setup.sh are updated consistently. All four files reported in scope are present and there are no regressions or unintended changes. One minor style inconsistency worth noting but not blocking.