Agno is a development framework for building production-ready AI Assistants. This integration allows you to easily add ScrapeGraphβs web scraping capabilities to your Agno-powered AI agents.
from agno.agent import Agentfrom agno.tools.scrapegraph_tools import ScrapeGraphTools# Initialize with smartscraper enabledscrapegraph = ScrapeGraphTools(smartscraper=True)# Create an agent with the toolsagent = Agent( tools=[scrapegraph], show_tool_calls=True, markdown=True, stream=True)# Use smartscraper to extract structured dataagent.print_response("""Use smartscraper to extract the following from https://www.wired.com/category/science/:- News articles- Headlines- Images- Links- Author""")
You can also use ScrapeGraph to convert web pages to markdown:
from agno.agent import Agentfrom agno.tools.scrapegraph_tools import ScrapeGraphTools# Initialize with only markdownify enabledscrapegraph_md = ScrapeGraphTools(smartscraper=False)# Create an agent for markdown conversionagent_md = Agent( tools=[scrapegraph_md], show_tool_calls=True, markdown=True)# Convert webpage to markdownagent_md.print_response( "Fetch and convert https://www.wired.com/category/science/ to markdown format")