Add TinyFish search and fetch tools#2820
Open
pranavjana wants to merge 3 commits into
Open
Conversation
Author
|
Addressed the Codecov patch coverage feedback with focused tests for both TinyFish implementations:
Validation after the update: git diff --check
uv run ruff check test/tools/experimental/tinyfish/test_tinyfish.py test/beta/tools/search/test_tinyfish.py
uv run --extra tinyfish --extra tavily --extra exa --extra ddgs --extra perplexity pytest test/beta/tools/search test/tools/experimental/tinyfish/test_tinyfish.py -qResult: |
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
This PR expands the TinyFish integration so AG2 agents can use all three TinyFish web APIs that are useful in agent workflows:
TinyFishToolfor goal-directed Agent API automation on a target URLTinyFishSearchToolfor ranked web search results in the existingautogen.tools.experimentalAPITinyFishFetchToolfor browser-rendered content extraction from known URLs in the existingautogen.tools.experimentalAPITinyFishSearchToolkitfor beta agents, exposing bothtinyfish_searchandtinyfish_fetchThe main use case is a research workflow where an agent first discovers candidate pages with Search, then reads selected pages with Fetch, and can still use the existing goal-directed TinyFish Agent API when it needs TinyFish to operate a website from a natural-language goal.
Changes
autogen.beta.tools.search.TinyFishSearchToolkitwith structured search and fetch result dataclasses.autogen.beta.tools.searchandautogen.beta.toolswith the existing optional-dependency fallback pattern.TinyFishSearchToolandTinyFishFetchTooltoautogen.tools.experimental.tinyfish, alongside the existingTinyFishTool.autogen.tools.experimentalandautogen.tools.experimental.tinyfish.tinyfishto the docs/search optional extras groups.Validation
git diff --checkuv run ruff format --check autogen/tools/experimental/tinyfish/tinyfish_tool.py autogen/beta/tools/search/tinyfish.py test/tools/experimental/tinyfish/test_tinyfish.py test/beta/tools/search/test_tinyfish.pyuv run ruff check autogen/tools/experimental/tinyfish/tinyfish_tool.py autogen/beta/tools/search/tinyfish.py test/tools/experimental/tinyfish/test_tinyfish.py test/beta/tools/search/test_tinyfish.pyuv run --extra tinyfish --extra tavily --extra exa --extra ddgs --extra perplexity pytest test/beta/tools/search test/tools/experimental/tinyfish/test_tinyfish.py -qThe pytest run passed with
99 passed.Documentation
Docs were updated in:
website/docs/user-guide/reference-tools/tinyfish.mdxwebsite/docs/user-guide/reference-tools/index.mdxwebsite/docs/beta/tools/common_toolkits.mdxI attempted the local docs build with the docs extra, but this environment is missing Quarto, so notebook metadata generation fails before the docs site can complete building.