Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /agno-agi_agno /cookbook /91_tools /spider_tools.py
| """ | |
| Spider Tools | |
| ============================= | |
| Demonstrates spider tools. | |
| """ | |
| from agno.agent import Agent | |
| from agno.tools.spider import SpiderTools | |
| # --------------------------------------------------------------------------- | |
| # Create Agent | |
| # --------------------------------------------------------------------------- | |
| # Example 1: All functions available (default behavior) | |
| agent_all = Agent( | |
| name="Spider Agent - All Functions", | |
| tools=[SpiderTools(optional_params={"proxy_enabled": True})], | |
| instructions=["You have access to all Spider web scraping capabilities."], | |
| markdown=True, | |
| ) | |
| # Example 2: Include specific functions only | |
| agent_specific = Agent( | |
| name="Spider Agent - Search Only", | |
| tools=[SpiderTools(enable_crawl=False, optional_params={"proxy_enabled": True})], | |
| instructions=["You can only search the web, no scraping or crawling."], | |
| markdown=True, | |
| ) | |
| # Use the default agent for examples | |
| agent = agent_all | |
| # --------------------------------------------------------------------------- | |
| # Run Agent | |
| # --------------------------------------------------------------------------- | |
| if __name__ == "__main__": | |
| agent.print_response( | |
| 'Can you scrape the first search result from a search on "news in USA"?' | |
| ) | |
Xet Storage Details
- Size:
- 1.27 kB
- Xet hash:
- 999b5d148100e036d558638ee2262e126a907f192330a691796e5296d3788ea2
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.