Search Tool
Applies to: 4.0.8.1+
Search is powered by ddgs and provides web/news/wikipedia/arXiv retrieval.
1) Initialization
python
from agently.builtins.tools import Search
search = Search(
proxy=None,
timeout=20,
backend="auto",
search_backend=None,
news_backend=None,
region="us-en",
options=None,
)2) Available methods
search(query, timelimit=None, max_results=10)search_news(query, timelimit=None, max_results=10)search_wikipedia(query, timelimit=None, max_results=10)search_arxiv(query, max_results=10)
3) Use with Agent
python
from agently import Agently
from agently.builtins.tools import Search
agent = Agently.create_agent()
search = Search(region="us-en")
agent.use_tools([
search.search,
search.search_news,
search.search_wikipedia,
search.search_arxiv,
])
result = agent.input("Search usage of Agently TriggerFlow").start()
print(result)4) Output shape
search/search_news/search_wikipedia usually return lists with fields like:
titlehreforurlbody/snippet
search_arxiv returns:
feed_titleupdatedentries[](title/summary/published/authors/links)
5) Practical tips
- combine with
BrowseorPlaywrightfor search-then-read flows - for factual answers, read at least one source page after search snippets