Agno Integration

Agno is a framework for creating multi-modal agents with memory, tools, and reasoning capabilities, designed to collaborate in teams to solve problems. It features a user-friendly Agent UI for seamless interaction.

Install Agno, Spider and OpenAI Python Libraries

Make sure to install Agno first, see install instructions here. Then install the Spider Python client and OpenAI SDK.

Install the Python Spider client

pip install agno spider-client openai

Simple Scrape Example

The following agent will simply scrape a single URL passed on to the agent or whatever URL the agent comes across in its session. The agent will return the scraped data in markdown format.

Simple Scrape Example in Markdown

from agno.agent import Agent from agno.tools.spider import SpiderTools agent = Agent(tools=[SpiderTools(optional_params={"proxy_enabled": True})]) # Optionally pass in extra parameters agent.print_response('Scrape https://www.cnn.com for the latest news"', markdown=True)
Agno Agent Result scraping CNN.com

Example Usage for Search and Scrape

The following agent will run a search query to get the latest news in the USA and scrape the first search result. The agent will return the scraped data in markdown format.

Search and Scrape Results Example

from agno.agent import Agent from agno.tools.spider import SpiderTools agent = Agent(tools=[SpiderTools()]) agent.print_response('Scrape the first result from a search on "current news in the USA"', markdown=True)
Agno search and scrape results for 'current news in the USA'. The response shows a breakdown from CNN's news section.

Toolkit Parameters

Use the toolkit parameters to adjust the output

  • max_results (int): The maximum number of search results to return
  • url (str): The URL to be scraped or crawled

Toolkit Functions

Use the toolkit functions to invoke custom methods for results.

  • search: Searches the web for the given query
  • scrape: Scrapes the given URL
  • crawl: Crawls the given URL