From a6888ce0719c26850908381b4f2d5f9317e28642 Mon Sep 17 00:00:00 2001 From: ohlava Date: Wed, 26 Mar 2025 19:32:23 +0100 Subject: [PATCH 1/7] Add better Apify integration with examples --- tools/toolkits/others/apify.mdx | 250 +++++++++++++++++++++++++++++--- 1 file changed, 230 insertions(+), 20 deletions(-) diff --git a/tools/toolkits/others/apify.mdx b/tools/toolkits/others/apify.mdx index c7b7f0be..9705c97f 100644 --- a/tools/toolkits/others/apify.mdx +++ b/tools/toolkits/others/apify.mdx @@ -2,48 +2,258 @@ title: Apify --- -**ApifyTools** enable an Agent to access the Apify API and run actors. +This guide demonstrates how to integrate and use [Apify](https://apify.com/actors) Actors within the Agno framework to enhance your AI agents with very powerful data collection capabilities. + +## What is Apify? + +[Apify](https://apify.com/) is a platform that provides: + +- Data collection services for AI Agents +- A marketplace of ready-to-use Actors (specialized tools) for various data tasks +- Infrastructure to run and monetize our own AI Agents ## Prerequisites -The following example requires the `apify-client` library and an API token which can be obtained from [Apify](https://apify.com/). +1. Sign up for an Apify account +2. Obtain your Apify API token (can be obtained from [Apify](https://docs.apify.com/platform/integrations/api)) +3. Install the required packages: + + +```bash +pip install agno apify-client +``` + +## Basic Usage + +The Agno framework makes it easy to integrate Apify Actors into your agents. Here's a simple example: + +```python +from agno.agent import Agent +from agno.tools.apify import ApifyTools + +# Create an agent with ApifyTools +agent = Agent( + tools=[ + ApifyTools( + api_key="your_apify_api_key" # Or set the APIFY_TOKEN environment variable + ) + ], + show_tool_calls=True, + markdown=True +) + +# Use the agent to get website content +agent.print_response("What information can you find on https://docs.agno.com/introduction ?", markdown=True) +``` + +## Available Apify Tools + +You can easily integrate any Apify Actor as a tool, but we prepared some examples for you: + +### 1. RAG Web Browser + +The RAG Web Browser actor is specifically designed for AI and LLM applications. It searches the web for a query or processes a URL, then cleans and formats the content for your agent. This tool is enabled by default. + +```python +from agno.agent import Agent +from agno.tools.apify import ApifyTools + +agent = Agent( + tools=[ + ApifyTools() # RAG web search is enabled by default + ], + show_tool_calls=True, + markdown=True +) + +# Search for information and process the results +agent.print_response("What are the latest developments in large language models?", markdown=True) +``` + +### 2. Website Content Crawler + +This tool uses Apify's Website Content Crawler actor to extract text content from websites, making it perfect for RAG applications. + +```python +from agno.agent import Agent +from agno.tools.apify import ApifyTools + +agent = Agent( + tools=[ + ApifyTools( + use_website_content_crawler=True # Disabled by default + ) + ], + markdown=True +) -```shell -pip install -U apify-client +# Ask the agent to process web content +agent.print_response("Summarize the content from https://docs.agno.com/introduction", markdown=True) ``` -```shell -export MY_APIFY_TOKEN=*** +### 3. Web Scraper + +The Web Scraper tool uses Apify's Web Scraper actor to extract structured data from websites. + +```python +from agno.agent import Agent +from agno.tools.apify import ApifyTools + +agent = Agent( + tools=[ + ApifyTools( + use_web_scraper=True # Disabled by default + ) + ], + show_tool_calls=True +) + +# Extract specific elements from a webpage +agent.print_response("Extract the main heading and first paragraph from https://www.example.com", markdown=True) +``` + +### 4. Instagram Scraper + +The Instagram Scraper tool allows your agent to extract information from Instagram profiles, hashtags, or places. + +```python +from agno.agent import Agent +from agno.tools.apify import ApifyTools + +agent = Agent( + tools=[ + ApifyTools( + use_instagram_scraper=True # Enabled by default + ) + ], + show_tool_calls=True +) + +# Extract information from Instagram +agent.print_response("Find trending posts for the hashtag #AI", markdown=True) +agent.print_response("Get information about the Instagram user 'Instagram'", markdown=True) +``` + +### 5. Google Places Crawler + +This tool extracts data about businesses from Google Maps and Google Places. + +```python +from agno.agent import Agent +from agno.tools.apify import ApifyTools + +agent = Agent( + tools=[ + ApifyTools( + use_google_places_crawler=True # Enabled by default + ) + ], + show_tool_calls=True +) + +# Find business information in a specific location +agent.print_response("What are the top-rated restaurants in San Francisco?", markdown=True) +agent.print_response("Find coffee shops in Prague", markdown=True) ``` -## Example +## Example Scenarios -The following agent will use Apify to crawl the webpage: https://docs.agno.com/introduction and summarize it. +### RAG Web Browser + Google Places Crawler +This example combines web search with local business data to provide comprehensive information about a topic: -```python cookbook/tools/apify_tools.py +```python from agno.agent import Agent from agno.tools.apify import ApifyTools -agent = Agent(tools=[ApifyTools()], show_tool_calls=True) -agent.print_response("Tell me about https://docs.agno.com/introduction", markdown=True) +agent = Agent( + tools=[ + ApifyTools( + use_rag_web_search=True, + use_google_places_crawler=True + ) + ], + show_tool_calls=True +) + +# Get general information and local businesses +agent.print_response( + """ + I'm traveling to Tokyo next month. + 1. Research the best time to visit and major attractions + 2. Find highly-rated sushi restaurants near Shinjuku + Compile a comprehensive travel guide with this information. + """, + markdown=True +) +``` + +## Implementation Details + +Below is a simplified implementation reference for the ApifyTools class. You can find the complete implementation in the source code. + +```python +from agno.tools import Toolkit +from apify_client import ApifyClient + +class ApifyTools(Toolkit): + def __init__( + self, + api_key=None, + max_results=4, + use_rag_web_search=True, + use_website_content_crawler=False, + use_web_scraper=False, + use_instagram_scraper=True, + use_google_places_crawler=True + ): + # Setup code... + + def rag_web_search(self, query, timeout=45): + # Implementation... + + def website_content_crawler(self, urls, timeout=60): + # Implementation... + + def web_scraper(self, urls, timeout=60): + # Implementation... + + def instagram_scraper(self, search, search_type="user", search_limit=10, timeout=180): + # Implementation... + + def google_places_crawler(self, location_query, search_terms=None, max_crawled_places=30, timeout=45): + # Implementation... ``` ## Toolkit Params -| Parameter | Type | Default | Description | -| ------------------------- | ------ | ------- | --------------------------------------------------------------------------------- | -| `api_key` | `str` | - | API key for authentication purposes. | -| `website_content_crawler` | `bool` | `True` | Enables the functionality to crawl a website using website-content-crawler actor. | -| `web_scraper` | `bool` | `False` | Enables the functionality to crawl a website using web_scraper actor. | +| Parameter | Type | Default | Description | +| ---------------------------- | ------- | ------- | ---------------------------------------------------------------- | +| `api_key` | `str` | `None` | Apify API key (or set via APIFY_TOKEN environment variable) | +| `max_results` | `int` | `4` | Maximum number of results for web searches | +| `use_rag_web_search` | `bool` | `True` | Enable RAG web search tool | +| `use_website_content_crawler`| `bool` | `False` | Enable website content crawler tool | +| `use_web_scraper` | `bool` | `False` | Enable general web scraper tool | +| `use_instagram_scraper` | `bool` | `True` | Enable Instagram scraper tool | +| `use_google_places_crawler` | `bool` | `True` | Enable Google Places crawler tool | ## Toolkit Functions -| Function | Description | -| ------------------------- | ------------------------------------------------------------- | -| `website_content_crawler` | Crawls a website using Apify's website-content-crawler actor. | -| `web_scrapper` | Scrapes a website using Apify's web-scraper actor. | +| Function | Description | +| -------------------------- | ---------------------------------------------------------------- | +| `rag_web_search` | Searches the web for information using the RAG Web Browser actor | +| `website_content_crawler` | Crawls websites using Apify's website-content-crawler actor | +| `web_scraper` | Scrapes websites using Apify's web-scraper actor | +| `instagram_scraper` | Scrapes Instagram profiles, hashtags, or places | +| `google_places_crawler` | Crawls Google Places for business information | ## Developer Resources - View [Tools](https://github.com/agno-agi/agno/blob/main/libs/agno/agno/tools/apify.py) - View [Cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/tools/apify_tools.py) + +## Resources + +- [Apify Platform Documentation](https://docs.apify.com) +- [Apify Actor Documentation](https://docs.apify.com/Actors) +- [Apify Store - Browse available Actors](https://apify.com/store) +- [Agno Framework Documentation](https://docs.agno.com) From b4a1693f363ec5cb4c6670acb5d218886e3b0574 Mon Sep 17 00:00:00 2001 From: ohlava Date: Fri, 28 Mar 2025 17:01:09 +0100 Subject: [PATCH 2/7] Use updated class of the tool version --- tools/toolkits/others/apify.mdx | 134 ++++++++------------------------ 1 file changed, 33 insertions(+), 101 deletions(-) diff --git a/tools/toolkits/others/apify.mdx b/tools/toolkits/others/apify.mdx index 9705c97f..48a34851 100644 --- a/tools/toolkits/others/apify.mdx +++ b/tools/toolkits/others/apify.mdx @@ -18,9 +18,8 @@ This guide demonstrates how to integrate and use [Apify](https://apify.com/actor 2. Obtain your Apify API token (can be obtained from [Apify](https://docs.apify.com/platform/integrations/api)) 3. Install the required packages: - ```bash -pip install agno apify-client +pip install agno apify-client langchain-apify ``` ## Basic Usage @@ -35,7 +34,8 @@ from agno.tools.apify import ApifyTools agent = Agent( tools=[ ApifyTools( - api_key="your_apify_api_key" # Or set the APIFY_TOKEN environment variable + actors=["apify/rag-web-browser"], # Specify which Apify actors to use, use multiple ones if needed + apify_api_token="your_apify_api_key" # Or set the APIFY_API_TOKEN environment variable ) ], show_tool_calls=True, @@ -60,7 +60,7 @@ from agno.tools.apify import ApifyTools agent = Agent( tools=[ - ApifyTools() # RAG web search is enabled by default + ApifyTools(["apify/rag-web-browser"]) ], show_tool_calls=True, markdown=True @@ -80,9 +80,7 @@ from agno.tools.apify import ApifyTools agent = Agent( tools=[ - ApifyTools( - use_website_content_crawler=True # Disabled by default - ) + ApifyTools(["apify/website-content-crawler"]) ], markdown=True ) @@ -91,50 +89,7 @@ agent = Agent( agent.print_response("Summarize the content from https://docs.agno.com/introduction", markdown=True) ``` -### 3. Web Scraper - -The Web Scraper tool uses Apify's Web Scraper actor to extract structured data from websites. - -```python -from agno.agent import Agent -from agno.tools.apify import ApifyTools - -agent = Agent( - tools=[ - ApifyTools( - use_web_scraper=True # Disabled by default - ) - ], - show_tool_calls=True -) - -# Extract specific elements from a webpage -agent.print_response("Extract the main heading and first paragraph from https://www.example.com", markdown=True) -``` - -### 4. Instagram Scraper - -The Instagram Scraper tool allows your agent to extract information from Instagram profiles, hashtags, or places. - -```python -from agno.agent import Agent -from agno.tools.apify import ApifyTools - -agent = Agent( - tools=[ - ApifyTools( - use_instagram_scraper=True # Enabled by default - ) - ], - show_tool_calls=True -) - -# Extract information from Instagram -agent.print_response("Find trending posts for the hashtag #AI", markdown=True) -agent.print_response("Get information about the Instagram user 'Instagram'", markdown=True) -``` - -### 5. Google Places Crawler +### 3. Google Places Crawler This tool extracts data about businesses from Google Maps and Google Places. @@ -144,9 +99,7 @@ from agno.tools.apify import ApifyTools agent = Agent( tools=[ - ApifyTools( - use_google_places_crawler=True # Enabled by default - ) + ApifyTools(["compass/crawler-google-places"]) ], show_tool_calls=True ) @@ -167,10 +120,10 @@ from agno.tools.apify import ApifyTools agent = Agent( tools=[ - ApifyTools( - use_rag_web_search=True, - use_google_places_crawler=True - ) + ApifyTools([ + "apify/rag-web-browser", + "compass/crawler-google-places" + ]) ], show_tool_calls=True ) @@ -180,7 +133,7 @@ agent.print_response( """ I'm traveling to Tokyo next month. 1. Research the best time to visit and major attractions - 2. Find highly-rated sushi restaurants near Shinjuku + 2. Find one good rated sushi restaurants near Shinjuku Compile a comprehensive travel guide with this information. """, markdown=True @@ -194,57 +147,36 @@ Below is a simplified implementation reference for the ApifyTools class. You can ```python from agno.tools import Toolkit from apify_client import ApifyClient +from langchain_apify import ApifyActorsTool class ApifyTools(Toolkit): def __init__( self, - api_key=None, - max_results=4, - use_rag_web_search=True, - use_website_content_crawler=False, - use_web_scraper=False, - use_instagram_scraper=True, - use_google_places_crawler=True + actors: Union[str, List[str]] = None, + apify_api_token: Optional[str] = None ): - # Setup code... - - def rag_web_search(self, query, timeout=45): - # Implementation... - - def website_content_crawler(self, urls, timeout=60): - # Implementation... - - def web_scraper(self, urls, timeout=60): - # Implementation... - - def instagram_scraper(self, search, search_type="user", search_limit=10, timeout=180): - # Implementation... + # Initialize toolkit with Apify API token + super().__init__(name="ApifyTools") + self.apify_api_token = apify_api_token or os.getenv('APIFY_API_TOKEN') + self.client = ApifyClient(self.apify_api_token) - def google_places_crawler(self, location_query, search_terms=None, max_crawled_places=30, timeout=45): - # Implementation... + # Register specific actors if provided + if actors: + actor_list = [actors] if isinstance(actors, str) else actors + for actor_id in actor_list: + self.register_actor(actor_id) + + def register_actor(self, actor_id: str) -> None: + # Register an Apify actor as a function in the toolkit + # Implementation details... ``` ## Toolkit Params -| Parameter | Type | Default | Description | -| ---------------------------- | ------- | ------- | ---------------------------------------------------------------- | -| `api_key` | `str` | `None` | Apify API key (or set via APIFY_TOKEN environment variable) | -| `max_results` | `int` | `4` | Maximum number of results for web searches | -| `use_rag_web_search` | `bool` | `True` | Enable RAG web search tool | -| `use_website_content_crawler`| `bool` | `False` | Enable website content crawler tool | -| `use_web_scraper` | `bool` | `False` | Enable general web scraper tool | -| `use_instagram_scraper` | `bool` | `True` | Enable Instagram scraper tool | -| `use_google_places_crawler` | `bool` | `True` | Enable Google Places crawler tool | - -## Toolkit Functions - -| Function | Description | -| -------------------------- | ---------------------------------------------------------------- | -| `rag_web_search` | Searches the web for information using the RAG Web Browser actor | -| `website_content_crawler` | Crawls websites using Apify's website-content-crawler actor | -| `web_scraper` | Scrapes websites using Apify's web-scraper actor | -| `instagram_scraper` | Scrapes Instagram profiles, hashtags, or places | -| `google_places_crawler` | Crawls Google Places for business information | +| Parameter | Type | Default | Description | +| ---------------------------- | ------------------- | ------- | ------------------------------------------------------------------ | +| `apify_api_token` | `str` | `None` | Apify API token (or set via APIFY_API_TOKEN environment variable) | +| `actors` | `str` or `List[str]`| `None` | Single actor ID or list of actor IDs to register | ## Developer Resources @@ -256,4 +188,4 @@ class ApifyTools(Toolkit): - [Apify Platform Documentation](https://docs.apify.com) - [Apify Actor Documentation](https://docs.apify.com/Actors) - [Apify Store - Browse available Actors](https://apify.com/store) -- [Agno Framework Documentation](https://docs.agno.com) +- [Agno Framework Documentation](https://docs.agno.com) \ No newline at end of file From e5f2bb313b7f89166b222790169f5ca27e216177 Mon Sep 17 00:00:00 2001 From: ohlava <73562907+ohlava@users.noreply.github.com> Date: Thu, 3 Apr 2025 12:47:41 +0200 Subject: [PATCH 3/7] Actor with big A MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jakub Kopecký --- tools/toolkits/others/apify.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/toolkits/others/apify.mdx b/tools/toolkits/others/apify.mdx index 48a34851..bd02102d 100644 --- a/tools/toolkits/others/apify.mdx +++ b/tools/toolkits/others/apify.mdx @@ -34,7 +34,7 @@ from agno.tools.apify import ApifyTools agent = Agent( tools=[ ApifyTools( - actors=["apify/rag-web-browser"], # Specify which Apify actors to use, use multiple ones if needed + actors=["apify/rag-web-browser"], # Specify which Apify Actors to use, use multiple ones if needed apify_api_token="your_apify_api_key" # Or set the APIFY_API_TOKEN environment variable ) ], @@ -52,7 +52,7 @@ You can easily integrate any Apify Actor as a tool, but we prepared some example ### 1. RAG Web Browser -The RAG Web Browser actor is specifically designed for AI and LLM applications. It searches the web for a query or processes a URL, then cleans and formats the content for your agent. This tool is enabled by default. +The RAG Web Browser Actor is specifically designed for AI and LLM applications. It searches the web for a query or processes a URL, then cleans and formats the content for your agent. This tool is enabled by default. ```python from agno.agent import Agent @@ -72,7 +72,7 @@ agent.print_response("What are the latest developments in large language models? ### 2. Website Content Crawler -This tool uses Apify's Website Content Crawler actor to extract text content from websites, making it perfect for RAG applications. +This tool uses Apify's Website Content Crawler Actor to extract text content from websites, making it perfect for RAG applications. ```python from agno.agent import Agent @@ -160,14 +160,14 @@ class ApifyTools(Toolkit): self.apify_api_token = apify_api_token or os.getenv('APIFY_API_TOKEN') self.client = ApifyClient(self.apify_api_token) - # Register specific actors if provided + # Register specific Actors if provided if actors: actor_list = [actors] if isinstance(actors, str) else actors for actor_id in actor_list: self.register_actor(actor_id) def register_actor(self, actor_id: str) -> None: - # Register an Apify actor as a function in the toolkit + # Register an Apify Actor as a function in the toolkit # Implementation details... ``` @@ -176,7 +176,7 @@ class ApifyTools(Toolkit): | Parameter | Type | Default | Description | | ---------------------------- | ------------------- | ------- | ------------------------------------------------------------------ | | `apify_api_token` | `str` | `None` | Apify API token (or set via APIFY_API_TOKEN environment variable) | -| `actors` | `str` or `List[str]`| `None` | Single actor ID or list of actor IDs to register | +| `actors` | `str` or `List[str]`| `None` | Single Actor ID or list of Actor IDs to register | ## Developer Resources From 562885d743d0ce20faeb3e9c4451f9ca111e2c00 Mon Sep 17 00:00:00 2001 From: ohlava Date: Thu, 3 Apr 2025 13:10:28 +0200 Subject: [PATCH 4/7] Add suggestions --- tools/toolkits/others/apify.mdx | 41 ++++----------------------------- 1 file changed, 5 insertions(+), 36 deletions(-) diff --git a/tools/toolkits/others/apify.mdx b/tools/toolkits/others/apify.mdx index bd02102d..18429115 100644 --- a/tools/toolkits/others/apify.mdx +++ b/tools/toolkits/others/apify.mdx @@ -2,19 +2,18 @@ title: Apify --- -This guide demonstrates how to integrate and use [Apify](https://apify.com/actors) Actors within the Agno framework to enhance your AI agents with very powerful data collection capabilities. +This guide demonstrates how to integrate and use [Apify](https://apify.com/actors) Actors within the Agno framework to enhance your AI agents with web scraping, crawling, data extraction, and web automation capabilities. ## What is Apify? [Apify](https://apify.com/) is a platform that provides: - -- Data collection services for AI Agents +- Data collection services for AI Agents, specializing in extracting data from social media, search engines, online maps, e-commerce sites, travel portals, or general websites - A marketplace of ready-to-use Actors (specialized tools) for various data tasks - Infrastructure to run and monetize our own AI Agents ## Prerequisites -1. Sign up for an Apify account +1. Sign up for an [Apify account](https://console.apify.com/sign-up) 2. Obtain your Apify API token (can be obtained from [Apify](https://docs.apify.com/platform/integrations/api)) 3. Install the required packages: @@ -48,7 +47,7 @@ agent.print_response("What information can you find on https://docs.agno.com/int ## Available Apify Tools -You can easily integrate any Apify Actor as a tool, but we prepared some examples for you: +You can easily integrate any Apify Actor as a tool. Here are some examples: ### 1. RAG Web Browser @@ -140,37 +139,6 @@ agent.print_response( ) ``` -## Implementation Details - -Below is a simplified implementation reference for the ApifyTools class. You can find the complete implementation in the source code. - -```python -from agno.tools import Toolkit -from apify_client import ApifyClient -from langchain_apify import ApifyActorsTool - -class ApifyTools(Toolkit): - def __init__( - self, - actors: Union[str, List[str]] = None, - apify_api_token: Optional[str] = None - ): - # Initialize toolkit with Apify API token - super().__init__(name="ApifyTools") - self.apify_api_token = apify_api_token or os.getenv('APIFY_API_TOKEN') - self.client = ApifyClient(self.apify_api_token) - - # Register specific Actors if provided - if actors: - actor_list = [actors] if isinstance(actors, str) else actors - for actor_id in actor_list: - self.register_actor(actor_id) - - def register_actor(self, actor_id: str) -> None: - # Register an Apify Actor as a function in the toolkit - # Implementation details... -``` - ## Toolkit Params | Parameter | Type | Default | Description | @@ -188,4 +156,5 @@ class ApifyTools(Toolkit): - [Apify Platform Documentation](https://docs.apify.com) - [Apify Actor Documentation](https://docs.apify.com/Actors) - [Apify Store - Browse available Actors](https://apify.com/store) +- [How to build an AI Agent](https://blog.apify.com/how-to-build-an-ai-agent/) - [Agno Framework Documentation](https://docs.agno.com) \ No newline at end of file From 7edcb1df6e3c1d9c648fdb555f6fb2eaca2d80f8 Mon Sep 17 00:00:00 2001 From: ohlava <73562907+ohlava@users.noreply.github.com> Date: Thu, 3 Apr 2025 17:28:00 +0200 Subject: [PATCH 5/7] Add links and small tweaks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jiří Spilka --- tools/toolkits/others/apify.mdx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/toolkits/others/apify.mdx b/tools/toolkits/others/apify.mdx index 18429115..e3d71457 100644 --- a/tools/toolkits/others/apify.mdx +++ b/tools/toolkits/others/apify.mdx @@ -51,7 +51,7 @@ You can easily integrate any Apify Actor as a tool. Here are some examples: ### 1. RAG Web Browser -The RAG Web Browser Actor is specifically designed for AI and LLM applications. It searches the web for a query or processes a URL, then cleans and formats the content for your agent. This tool is enabled by default. +The [RAG Web Browser](https://apify.com/apify/rag-web-browser) Actor is specifically designed for AI and LLM applications. It searches the web for a query or processes a URL, then cleans and formats the content for your agent. This tool is enabled by default. ```python from agno.agent import Agent @@ -71,7 +71,7 @@ agent.print_response("What are the latest developments in large language models? ### 2. Website Content Crawler -This tool uses Apify's Website Content Crawler Actor to extract text content from websites, making it perfect for RAG applications. +This tool uses Apify's [Website Content Crawler](https://apify.com/apify/website-content-crawler) Actor to extract text content from websites, making it perfect for RAG applications. ```python from agno.agent import Agent @@ -90,7 +90,7 @@ agent.print_response("Summarize the content from https://docs.agno.com/introduct ### 3. Google Places Crawler -This tool extracts data about businesses from Google Maps and Google Places. +The [Google Places Crawler](https://apify.com/compass/crawler-google-places) extracts data about businesses from Google Maps and Google Places. ```python from agno.agent import Agent @@ -153,8 +153,7 @@ agent.print_response( ## Resources -- [Apify Platform Documentation](https://docs.apify.com) - [Apify Actor Documentation](https://docs.apify.com/Actors) - [Apify Store - Browse available Actors](https://apify.com/store) -- [How to build an AI Agent](https://blog.apify.com/how-to-build-an-ai-agent/) +- [How to build and monetize an AI agent on Apify](https://blog.apify.com/how-to-build-an-ai-agent/) - [Agno Framework Documentation](https://docs.agno.com) \ No newline at end of file From c4c03d48173badaefa779ba98b96a23a20d18a5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hlava?= Date: Tue, 6 May 2025 12:56:42 +0200 Subject: [PATCH 6/7] Remove langchain package requirement --- tools/toolkits/others/apify.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/toolkits/others/apify.mdx b/tools/toolkits/others/apify.mdx index e3d71457..f6924d83 100644 --- a/tools/toolkits/others/apify.mdx +++ b/tools/toolkits/others/apify.mdx @@ -18,7 +18,7 @@ This guide demonstrates how to integrate and use [Apify](https://apify.com/actor 3. Install the required packages: ```bash -pip install agno apify-client langchain-apify +pip install agno apify-client ``` ## Basic Usage @@ -59,7 +59,7 @@ from agno.tools.apify import ApifyTools agent = Agent( tools=[ - ApifyTools(["apify/rag-web-browser"]) + ApifyTools(actors=["apify/rag-web-browser"]) ], show_tool_calls=True, markdown=True @@ -79,7 +79,7 @@ from agno.tools.apify import ApifyTools agent = Agent( tools=[ - ApifyTools(["apify/website-content-crawler"]) + ApifyTools(actors=["apify/website-content-crawler"]) ], markdown=True ) @@ -98,7 +98,7 @@ from agno.tools.apify import ApifyTools agent = Agent( tools=[ - ApifyTools(["compass/crawler-google-places"]) + ApifyTools(actors=["compass/crawler-google-places"]) ], show_tool_calls=True ) @@ -119,7 +119,7 @@ from agno.tools.apify import ApifyTools agent = Agent( tools=[ - ApifyTools([ + ApifyTools(actors=[ "apify/rag-web-browser", "compass/crawler-google-places" ]) From 94a6f794a22c69aa926b8de3ff73f74e7fe21f56 Mon Sep 17 00:00:00 2001 From: Dirk Brand <51947788+dirkbrnd@users.noreply.github.com> Date: Tue, 6 May 2025 14:18:07 +0200 Subject: [PATCH 7/7] Update tools/toolkits/others/apify.mdx --- tools/toolkits/others/apify.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/toolkits/others/apify.mdx b/tools/toolkits/others/apify.mdx index f6924d83..97a0add6 100644 --- a/tools/toolkits/others/apify.mdx +++ b/tools/toolkits/others/apify.mdx @@ -155,5 +155,4 @@ agent.print_response( - [Apify Actor Documentation](https://docs.apify.com/Actors) - [Apify Store - Browse available Actors](https://apify.com/store) -- [How to build and monetize an AI agent on Apify](https://blog.apify.com/how-to-build-an-ai-agent/) -- [Agno Framework Documentation](https://docs.agno.com) \ No newline at end of file +- [How to build and monetize an AI agent on Apify](https://blog.apify.com/how-to-build-an-ai-agent/) \ No newline at end of file