To use Spider, you need an API key from the Spider dashboard.
Copy
Ask AI
from agno.agent import Agentfrom 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 onlyagent_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 examplesagent = agent_all# ---------------------------------------------------------------------------# Run Agent# ---------------------------------------------------------------------------if __name__ == "__main__": agent.print_response( 'Can you scrape the first search result from a search on "news in USA"?' )