From d50f70b974f860699e89d79b90a0121209cbd34e Mon Sep 17 00:00:00 2001 From: MQ Date: Fri, 28 Feb 2025 12:22:50 +0100 Subject: [PATCH 01/10] add docs for ApifyActorsTool --- docs/concepts/tools.mdx | 1 + docs/mint.json | 3 +- docs/tools/apifyactorstool.mdx | 79 ++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 1 deletion(-) create mode 100644 docs/tools/apifyactorstool.mdx diff --git a/docs/concepts/tools.mdx b/docs/concepts/tools.mdx index fa823d0b96..a0bd654ef7 100644 --- a/docs/concepts/tools.mdx +++ b/docs/concepts/tools.mdx @@ -106,6 +106,7 @@ Here is a list of the available tools and their descriptions: | Tool | Description | | :------------------------------- | :--------------------------------------------------------------------------------------------- | +| **ApifyActorsTool** | A tool for integrating Apify Actors into workflows, enabling web scraping and automation tasks.| | **BrowserbaseLoadTool** | A tool for interacting with and extracting data from web browsers. | | **CodeDocsSearchTool** | A RAG tool optimized for searching through code documentation and related technical documents. | | **CodeInterpreterTool** | A tool for interpreting python code. | diff --git a/docs/mint.json b/docs/mint.json index fb0dcfdf51..04d25a0bea 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -116,6 +116,7 @@ { "group": "Tools", "pages": [ + "tools/apifyactorstool", "tools/browserbaseloadtool", "tools/codedocssearchtool", "tools/codeinterpretertool", @@ -167,4 +168,4 @@ "linkedin": "https://www.linkedin.com/company/crewai-inc", "youtube": "https://youtube.com/@crewAIInc" } -} \ No newline at end of file +} diff --git a/docs/tools/apifyactorstool.mdx b/docs/tools/apifyactorstool.mdx new file mode 100644 index 0000000000..04f0c89c6c --- /dev/null +++ b/docs/tools/apifyactorstool.mdx @@ -0,0 +1,79 @@ +--- +title: Apify Actors +description: The `ApifyActorsTool` seamlessly integrates Apify Actors into CrewAI workflows for web scraping, data extraction, and automation. +icon: toolbox +--- + +# `ApifyActorsTool` + +## Description + +The `ApifyActorsTool` brings the power of [Apify Actors](https://apify.com/)—cloud-based web scraping and automation programs—into your CrewAI workflows. Whether you’re extracting data, crawling websites, or automating tasks, this tool simplifies the process without requiring infrastructure management. Key features include running Actors like the [RAG Web Browser](https://apify.com/apify/rag-web-browser) directly within CrewAI agents, fetching real-time web data, and exploring a variety of Actors from the [Apify Store](https://apify.com/store). + +For detailed integration guidance, refer to the [Apify CrewAI documentation](https://docs.apify.com/platform/integrations/crewai). + +## Installation + +To use the `ApifyActorsTool`, install the necessary packages and configure your Apify API token. You’ll need an API token from Apify—see the [Apify API documentation](https://docs.apify.com/platform/integrations/api) for instructions. + +```shell +pip install 'crewai[tools]' langchain-apify +``` + +- Set your API token as an environment variable (`APIFY_API_TOKEN`): + - Linux/macOS: `export APIFY_API_TOKEN='your-api-token-here'` + - Windows: `set APIFY_API_TOKEN=your-api-token-here'` + +## Example + +Here’s how to use the `ApifyActorsTool` to run the [RAG Web Browser Actor](https://apify.com/apify/rag-web-browser) for web searching within a CrewAI workflow: + +```python Code +from crewai_tools import ApifyActorsTool + +# Initialize the tool with an Apify Actor +tool = ApifyActorsTool(actor_name="apify/rag-web-browser") + +# Run the tool with input parameters +results = tool.run(run_input={"query": "What is CrewAI?", "maxResults": 5}) + +# Process the results +for result in results: + print(f"URL: {result['metadata']['url']}") + print(f"Content: {result.get('markdown', 'N/A')[:100]}...") +``` + +Try other Actors from the [Apify Store](https://apify.com/store) by adjusting `actor_name` and `run_input` based on the Actor’s input schema. + +## Arguments + +- `actor_name`: Required. A string specifying the ID of the Apify Actor to run (e.g., `"apify/rag-web-browser"`). Find Actors in the [Apify Store](https://apify.com/store). +- `run_input`: Required at runtime. A dictionary of input parameters for the Actor (e.g., `{"query": "search term", "maxResults": 5}`). Refer to each Actor’s [input schema](https://apify.com/apify/rag-web-browser/input-schema) for details. + +## Steps to Get Started + + + + Install `crewai[tools]` and `langchain-apify` using pip: `pip install 'crewai[tools]' langchain-apify`. + + + Sign up at [Apify](https://apify.com/) and retrieve your API token from the [Apify API documentation](https://docs.apify.com/platform/integrations/api). + + + Set your API token as an environment variable (`APIFY_API_TOKEN`) to enable the tool’s functionality. + + + Run `python -c "import langchain_apify; print('Setup complete')"` to confirm the installation. + + + +## Resources + +- [Apify Platform](https://apify.com/): Explore the Apify ecosystem. +- [RAG Web Browser Actor](https://apify.com/apify/rag-web-browser): A popular Actor for web data retrieval. +- [Apify Actors Documentation](https://docs.apify.com/platform/actors): Learn more about using and creating Actors. +- [CrewAI Integration Guide](https://docs.apify.com/platform/integrations/crewai): Official guide for integrating Apify with CrewAI. + +## Conclusion + +The `ApifyActorsTool` streamlines CrewAI workflows by combining Apify’s robust web scraping and automation capabilities with agent-based intelligence. By following the setup and usage instructions, you can easily integrate real-time data extraction and task automation into your projects. From cd91a754a9c1879519b97403e15cf7395d15c408 Mon Sep 17 00:00:00 2001 From: MQ Date: Fri, 28 Feb 2025 12:35:45 +0100 Subject: [PATCH 02/10] improve readme, add link to template --- docs/tools/apifyactorstool.mdx | 83 +++++++++++++++++++++++++--------- 1 file changed, 61 insertions(+), 22 deletions(-) diff --git a/docs/tools/apifyactorstool.mdx b/docs/tools/apifyactorstool.mdx index 04f0c89c6c..91dd04ad2a 100644 --- a/docs/tools/apifyactorstool.mdx +++ b/docs/tools/apifyactorstool.mdx @@ -8,23 +8,43 @@ icon: toolbox ## Description -The `ApifyActorsTool` brings the power of [Apify Actors](https://apify.com/)—cloud-based web scraping and automation programs—into your CrewAI workflows. Whether you’re extracting data, crawling websites, or automating tasks, this tool simplifies the process without requiring infrastructure management. Key features include running Actors like the [RAG Web Browser](https://apify.com/apify/rag-web-browser) directly within CrewAI agents, fetching real-time web data, and exploring a variety of Actors from the [Apify Store](https://apify.com/store). +The `ApifyActorsTool` seamlessly integrates [Apify Actors](https://apify.com/) - cloud-based web scraping and automation programs—into your CrewAI workflows. Whether you need to extract data, crawl websites, or automate tasks, this tool simplifies the process without requiring infrastructure management. -For detailed integration guidance, refer to the [Apify CrewAI documentation](https://docs.apify.com/platform/integrations/crewai). +Key features: +- **Run Actors Directly**: Execute Actors like the [RAG Web Browser](https://apify.com/apify/rag-web-browser) within CrewAI agents. +- **Real-Time Data**: Ideal for tasks requiring up-to-date web data or automation. +- **Explore More**: Discover additional Actors in the [Apify Store](https://apify.com/store). -## Installation - -To use the `ApifyActorsTool`, install the necessary packages and configure your Apify API token. You’ll need an API token from Apify—see the [Apify API documentation](https://docs.apify.com/platform/integrations/api) for instructions. - -```shell -pip install 'crewai[tools]' langchain-apify -``` +For detailed integration guidance, see the [Apify CrewAI documentation](https://docs.apify.com/platform/integrations/crewai). -- Set your API token as an environment variable (`APIFY_API_TOKEN`): - - Linux/macOS: `export APIFY_API_TOKEN='your-api-token-here'` - - Windows: `set APIFY_API_TOKEN=your-api-token-here'` +## Installation -## Example +To use `ApifyActorsTool`, install the required packages and configure your Apify API token. You’ll need an API token from Apify - see the [Apify API documentation](https://docs.apify.com/platform/integrations/api) for instructions. + +### Steps +1. **Install Dependencies** + Use pip to install `crewai[tools]` and `langchain-apify`: + ```bash + pip install 'crewai[tools]' langchain-apify + ``` + Alternatively, with `uv`: + ```bash + uv pip install 'crewai[tools]' langchain-apify + ``` + +2. **Set Your API Token** + Export the token as an environment variable: + - On Linux/macOS: + ```bash + export APIFY_API_TOKEN='your-api-token-here' + ``` + - On Windows (Command Prompt): + ```cmd + set APIFY_API_TOKEN=your-api-token-here + ``` + - Or add it to your `.env` file and load it with a library like `python-dotenv`. + +## Usage example Here’s how to use the `ApifyActorsTool` to run the [RAG Web Browser Actor](https://apify.com/apify/rag-web-browser) for web searching within a CrewAI workflow: @@ -43,12 +63,31 @@ for result in results: print(f"Content: {result.get('markdown', 'N/A')[:100]}...") ``` +### Expected output + +``` +URL: https://www.example.com/crewai-intro +Content: CrewAI is a framework for building AI-powered workflows... +URL: https://docs.crewai.com/ +Content: Official documentation for CrewAI... +``` + +For a more comprehensive example with tool-agent, see [CrewAI Apify Actor template](https://apify.com/templates/python-crewai). + Try other Actors from the [Apify Store](https://apify.com/store) by adjusting `actor_name` and `run_input` based on the Actor’s input schema. -## Arguments +## Configuration -- `actor_name`: Required. A string specifying the ID of the Apify Actor to run (e.g., `"apify/rag-web-browser"`). Find Actors in the [Apify Store](https://apify.com/store). -- `run_input`: Required at runtime. A dictionary of input parameters for the Actor (e.g., `{"query": "search term", "maxResults": 5}`). Refer to each Actor’s [input schema](https://apify.com/apify/rag-web-browser/input-schema) for details. +The `ApifyActorsTool` requires specific inputs to operate: + +- **`actor_name` (str, required)** + The ID of the Apify Actor to run (e.g., `"apify/rag-web-browser"`). Find Actors in the [Apify Store](https://apify.com/store). +- **`run_input` (dict, required at runtime)** + A dictionary of input parameters for the Actor. Examples: + - For `apify/rag-web-browser`: `{"query": "search term", "maxResults": 5}` + - Check each Actor’s [input schema](https://apify.com/apify/rag-web-browser/input-schema) for details. + +The tool adapts dynamically to the chosen Actor. ## Steps to Get Started @@ -69,11 +108,11 @@ Try other Actors from the [Apify Store](https://apify.com/store) by adjusting `a ## Resources -- [Apify Platform](https://apify.com/): Explore the Apify ecosystem. -- [RAG Web Browser Actor](https://apify.com/apify/rag-web-browser): A popular Actor for web data retrieval. -- [Apify Actors Documentation](https://docs.apify.com/platform/actors): Learn more about using and creating Actors. -- [CrewAI Integration Guide](https://docs.apify.com/platform/integrations/crewai): Official guide for integrating Apify with CrewAI. +- **[Apify Platform](https://apify.com/)**: Explore the Apify ecosystem. +- **[RAG Web Browser Actor](https://apify.com/apify/rag-web-browser)**: Try this popular Actor for web data retrieval. +- **[Apify Actors Documentation](https://docs.apify.com/platform/actors)**: Learn how to use and create Actors. +- **[CrewAI Integration Guide](https://docs.apify.com/platform/integrations/crewai)**: Official guide for Apify and CrewAI. -## Conclusion +--- -The `ApifyActorsTool` streamlines CrewAI workflows by combining Apify’s robust web scraping and automation capabilities with agent-based intelligence. By following the setup and usage instructions, you can easily integrate real-time data extraction and task automation into your projects. +Streamline your CrewAI workflows with `ApifyActorsTool` - combine the power of Apify’s web scraping and automation with agent-based intelligence. From 2218c8882965490f8cfa42ddcb2c4b0dc5228a86 Mon Sep 17 00:00:00 2001 From: MQ Date: Fri, 28 Feb 2025 12:44:16 +0100 Subject: [PATCH 03/10] format --- docs/tools/apifyactorstool.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tools/apifyactorstool.mdx b/docs/tools/apifyactorstool.mdx index 91dd04ad2a..5c5c5f51e6 100644 --- a/docs/tools/apifyactorstool.mdx +++ b/docs/tools/apifyactorstool.mdx @@ -48,7 +48,7 @@ To use `ApifyActorsTool`, install the required packages and configure your Apify Here’s how to use the `ApifyActorsTool` to run the [RAG Web Browser Actor](https://apify.com/apify/rag-web-browser) for web searching within a CrewAI workflow: -```python Code +```python from crewai_tools import ApifyActorsTool # Initialize the tool with an Apify Actor @@ -65,7 +65,7 @@ for result in results: ### Expected output -``` +```text URL: https://www.example.com/crewai-intro Content: CrewAI is a framework for building AI-powered workflows... URL: https://docs.crewai.com/ @@ -87,7 +87,7 @@ The `ApifyActorsTool` requires specific inputs to operate: - For `apify/rag-web-browser`: `{"query": "search term", "maxResults": 5}` - Check each Actor’s [input schema](https://apify.com/apify/rag-web-browser/input-schema) for details. -The tool adapts dynamically to the chosen Actor. +The tool adapts dynamically to the chosen [Actor](https://docs.apify.com/platform/actors). ## Steps to Get Started From 29f7f139dbdb5164944e8d3c20bfb2a6d24e8fe7 Mon Sep 17 00:00:00 2001 From: MQ Date: Tue, 4 Mar 2025 12:46:09 +0100 Subject: [PATCH 04/10] improve tool docs --- docs/tools/apifyactorstool.mdx | 108 +++++++++++---------------------- 1 file changed, 37 insertions(+), 71 deletions(-) diff --git a/docs/tools/apifyactorstool.mdx b/docs/tools/apifyactorstool.mdx index 5c5c5f51e6..34c10d3600 100644 --- a/docs/tools/apifyactorstool.mdx +++ b/docs/tools/apifyactorstool.mdx @@ -1,52 +1,40 @@ --- title: Apify Actors -description: The `ApifyActorsTool` seamlessly integrates Apify Actors into CrewAI workflows for web scraping, data extraction, and automation. +description: ApifyActorsTool integrates Apify Actors into CrewAI for web scraping, data extraction, and automation. icon: toolbox --- # `ApifyActorsTool` +Integrate [Apify Actors](https://apify.com/) into your CrewAI workflows. + ## Description -The `ApifyActorsTool` seamlessly integrates [Apify Actors](https://apify.com/) - cloud-based web scraping and automation programs—into your CrewAI workflows. Whether you need to extract data, crawl websites, or automate tasks, this tool simplifies the process without requiring infrastructure management. - -Key features: -- **Run Actors Directly**: Execute Actors like the [RAG Web Browser](https://apify.com/apify/rag-web-browser) within CrewAI agents. -- **Real-Time Data**: Ideal for tasks requiring up-to-date web data or automation. -- **Explore More**: Discover additional Actors in the [Apify Store](https://apify.com/store). - -For detailed integration guidance, see the [Apify CrewAI documentation](https://docs.apify.com/platform/integrations/crewai). - -## Installation - -To use `ApifyActorsTool`, install the required packages and configure your Apify API token. You’ll need an API token from Apify - see the [Apify API documentation](https://docs.apify.com/platform/integrations/api) for instructions. - -### Steps -1. **Install Dependencies** - Use pip to install `crewai[tools]` and `langchain-apify`: - ```bash - pip install 'crewai[tools]' langchain-apify - ``` - Alternatively, with `uv`: - ```bash - uv pip install 'crewai[tools]' langchain-apify - ``` - -2. **Set Your API Token** - Export the token as an environment variable: - - On Linux/macOS: - ```bash - export APIFY_API_TOKEN='your-api-token-here' - ``` - - On Windows (Command Prompt): - ```cmd - set APIFY_API_TOKEN=your-api-token-here - ``` - - Or add it to your `.env` file and load it with a library like `python-dotenv`. +The `ApifyActorsTool` connects [Apify Actors](https://apify.com/), cloud-based programs for web scraping and automation, to your CrewAI workflows. You can extract data, crawl websites, and automate tasks, all without requiring infrastructure management. + +**Key features**: +- **Run Actors** directly, like the [RAG Web Browser](https://apify.com/apify/rag-web-browser), with CrewAI agents. +- **Access real-time data** for tasks that need fresh web content or automation. + +See the [Apify CrewAI documentation](https://docs.apify.com/platform/integrations/crewai) for a detailed integration guide. + +## Steps to get started + + + + Install `crewai[tools]` and `langchain-apify` using pip: `pip install 'crewai[tools]' langchain-apify`. + + + Sign up at [Apify](https://apify.com/) and obtain your API token by following the [Apify API documentation](https://docs.apify.com/platform/integrations/api). + + + Set your API token as an environment variable (`APIFY_API_TOKEN`) to enable the tool's functionality. + + ## Usage example -Here’s how to use the `ApifyActorsTool` to run the [RAG Web Browser Actor](https://apify.com/apify/rag-web-browser) for web searching within a CrewAI workflow: +Use `ApifyActorsTool` to run the [RAG Web Browser Actor](https://apify.com/apify/rag-web-browser) and perform a web search: ```python from crewai_tools import ApifyActorsTool @@ -65,6 +53,8 @@ for result in results: ### Expected output +Here is the output from running the code above: + ```text URL: https://www.example.com/crewai-intro Content: CrewAI is a framework for building AI-powered workflows... @@ -72,47 +62,23 @@ URL: https://docs.crewai.com/ Content: Official documentation for CrewAI... ``` -For a more comprehensive example with tool-agent, see [CrewAI Apify Actor template](https://apify.com/templates/python-crewai). +Experiment with other Actors from the [Apify Store](https://apify.com/store) by updating `actor_name` and `run_input` based on each Actor's input schema. -Try other Actors from the [Apify Store](https://apify.com/store) by adjusting `actor_name` and `run_input` based on the Actor’s input schema. +For an example of usage with agents, see the [CrewAI Apify Actor template](https://apify.com/templates/python-crewai). ## Configuration -The `ApifyActorsTool` requires specific inputs to operate: +The `ApifyActorsTool` requires these inputs to work: -- **`actor_name` (str, required)** - The ID of the Apify Actor to run (e.g., `"apify/rag-web-browser"`). Find Actors in the [Apify Store](https://apify.com/store). -- **`run_input` (dict, required at runtime)** +- **`actor_name`** + The ID of the Apify Actor to run, e.g., `"apify/rag-web-browser"`. Browse options in the [Apify Store](https://apify.com/store). +- **`run_input`** A dictionary of input parameters for the Actor. Examples: - For `apify/rag-web-browser`: `{"query": "search term", "maxResults": 5}` - - Check each Actor’s [input schema](https://apify.com/apify/rag-web-browser/input-schema) for details. - -The tool adapts dynamically to the chosen [Actor](https://docs.apify.com/platform/actors). - -## Steps to Get Started - - - - Install `crewai[tools]` and `langchain-apify` using pip: `pip install 'crewai[tools]' langchain-apify`. - - - Sign up at [Apify](https://apify.com/) and retrieve your API token from the [Apify API documentation](https://docs.apify.com/platform/integrations/api). - - - Set your API token as an environment variable (`APIFY_API_TOKEN`) to enable the tool’s functionality. - - - Run `python -c "import langchain_apify; print('Setup complete')"` to confirm the installation. - - + - See each Actor's [input schema](https://apify.com/apify/rag-web-browser/input-schema) for details. ## Resources -- **[Apify Platform](https://apify.com/)**: Explore the Apify ecosystem. -- **[RAG Web Browser Actor](https://apify.com/apify/rag-web-browser)**: Try this popular Actor for web data retrieval. -- **[Apify Actors Documentation](https://docs.apify.com/platform/actors)**: Learn how to use and create Actors. -- **[CrewAI Integration Guide](https://docs.apify.com/platform/integrations/crewai)**: Official guide for Apify and CrewAI. - ---- - -Streamline your CrewAI workflows with `ApifyActorsTool` - combine the power of Apify’s web scraping and automation with agent-based intelligence. +- **[Apify Platform](https://apify.com/)**: Dive into the Apify ecosystem. +- **[RAG Web Browser Actor](https://apify.com/apify/rag-web-browser)**: Test this popular Actor for web data retrieval. +- **[CrewAI Integration Guide](https://docs.apify.com/platform/integrations/crewai)**: Follow the official guide for Apify and CrewAI. From bcb947c1fd5c19729d33fb0249d146a429998b04 Mon Sep 17 00:00:00 2001 From: MQ Date: Wed, 5 Mar 2025 10:06:22 +0100 Subject: [PATCH 05/10] improve readme --- docs/tools/apifyactorstool.mdx | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/tools/apifyactorstool.mdx b/docs/tools/apifyactorstool.mdx index 34c10d3600..7a406f0299 100644 --- a/docs/tools/apifyactorstool.mdx +++ b/docs/tools/apifyactorstool.mdx @@ -34,7 +34,7 @@ See the [Apify CrewAI documentation](https://docs.apify.com/platform/integration ## Usage example -Use `ApifyActorsTool` to run the [RAG Web Browser Actor](https://apify.com/apify/rag-web-browser) and perform a web search: +Use the `ApifyActorsTool` manually to run the [RAG Web Browser Actor](https://apify.com/apify/rag-web-browser) and perform a web search: ```python from crewai_tools import ApifyActorsTool @@ -62,7 +62,23 @@ URL: https://docs.crewai.com/ Content: Official documentation for CrewAI... ``` -Experiment with other Actors from the [Apify Store](https://apify.com/store) by updating `actor_name` and `run_input` based on each Actor's input schema. +The `ApifyActorsTool` automatically fetches the Actor definition and input schema from Apify using the provided `actor_name` and then constructs the tool description and argument schema. This means you need to specify only a valid `actor_name`, and the tool handles the rest when used with agents—no need to specify the `run_input`. Here's how it works: + +```python +from crewai import Agent +from crewai_tools import ApifyActorsTool + +rag_browser = ApifyActorsTool(actor_name="apify/rag-web-browser") + +agent = Agent( + role="Research Analyst", + goal="Find and summarize information about specific topics", + backstory="You are an experienced researcher with attention to detail", + tools=[rag_browser], +) +``` + +Experiment with other Actors from the [Apify Store](https://apify.com/store) by changing the `actor_name` and, when using it manually, adjusting the `run_input` based on the Actor input schema. For an example of usage with agents, see the [CrewAI Apify Actor template](https://apify.com/templates/python-crewai). @@ -73,9 +89,9 @@ The `ApifyActorsTool` requires these inputs to work: - **`actor_name`** The ID of the Apify Actor to run, e.g., `"apify/rag-web-browser"`. Browse options in the [Apify Store](https://apify.com/store). - **`run_input`** - A dictionary of input parameters for the Actor. Examples: - - For `apify/rag-web-browser`: `{"query": "search term", "maxResults": 5}` - - See each Actor's [input schema](https://apify.com/apify/rag-web-browser/input-schema) for details. + A dictionary of input parameters for the Actor when running the tool manually. + - For example for the `apify/rag-web-browser`: `{"query": "search term", "maxResults": 5}` + - See each Actor [input schema](https://apify.com/apify/rag-web-browser/input-schema) for details. ## Resources From 72a1b1807d5ee94ea282e2d142e5acef8086568e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Curn?= Date: Fri, 7 Mar 2025 09:26:38 +0100 Subject: [PATCH 06/10] Update apifyactorstool.mdx (#1) * Update apifyactorstool.mdx * Update apifyactorstool.mdx --- docs/tools/apifyactorstool.mdx | 37 ++++++++++++++++------------------ 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/docs/tools/apifyactorstool.mdx b/docs/tools/apifyactorstool.mdx index 7a406f0299..b8f49b1ba3 100644 --- a/docs/tools/apifyactorstool.mdx +++ b/docs/tools/apifyactorstool.mdx @@ -1,22 +1,19 @@ --- title: Apify Actors -description: ApifyActorsTool integrates Apify Actors into CrewAI for web scraping, data extraction, and automation. +description: `ApifyActorsTool` lets you call Apify Actors to provide your CrewAI workflows with web scraping, crawling, data extraction, and web automation capabilities. icon: toolbox --- # `ApifyActorsTool` -Integrate [Apify Actors](https://apify.com/) into your CrewAI workflows. +Integrate [Apify Actors](https://apify.com/actors) into your CrewAI workflows. ## Description -The `ApifyActorsTool` connects [Apify Actors](https://apify.com/), cloud-based programs for web scraping and automation, to your CrewAI workflows. You can extract data, crawl websites, and automate tasks, all without requiring infrastructure management. +The `ApifyActorsTool` connects [Apify Actors](https://apify.com/actors), cloud-based programs for web scraping and automation, to your CrewAI workflows. +Use any of 4,000+ Actors from [Apify Store](https://apify.com/store) for use cases such as extracting data from social media, search engines, online maps, e-commerce sites, travel portals, or general websites. -**Key features**: -- **Run Actors** directly, like the [RAG Web Browser](https://apify.com/apify/rag-web-browser), with CrewAI agents. -- **Access real-time data** for tasks that need fresh web content or automation. - -See the [Apify CrewAI documentation](https://docs.apify.com/platform/integrations/crewai) for a detailed integration guide. +For details, see the [Apify CrewAI integration](https://docs.apify.com/platform/integrations/crewai) in Apify documentation. ## Steps to get started @@ -24,17 +21,17 @@ See the [Apify CrewAI documentation](https://docs.apify.com/platform/integration Install `crewai[tools]` and `langchain-apify` using pip: `pip install 'crewai[tools]' langchain-apify`. - - Sign up at [Apify](https://apify.com/) and obtain your API token by following the [Apify API documentation](https://docs.apify.com/platform/integrations/api). + + Sign up to [Apify Console](https://console.apify.com/) and get your [Apify API token](https://console.apify.com/settings/integrations).. - Set your API token as an environment variable (`APIFY_API_TOKEN`) to enable the tool's functionality. + Set your Apify API token as the `APIFY_API_TOKEN` environment variable to enable the tool's functionality. ## Usage example -Use the `ApifyActorsTool` manually to run the [RAG Web Browser Actor](https://apify.com/apify/rag-web-browser) and perform a web search: +Use the `ApifyActorsTool` manually to run the [RAG Web Browser Actor](https://apify.com/apify/rag-web-browser) to perform a web search: ```python from crewai_tools import ApifyActorsTool @@ -78,23 +75,23 @@ agent = Agent( ) ``` -Experiment with other Actors from the [Apify Store](https://apify.com/store) by changing the `actor_name` and, when using it manually, adjusting the `run_input` based on the Actor input schema. +You can run other Actors from [Apify Store](https://apify.com/store) simply by changing the `actor_name` and, when using it manually, adjusting the `run_input` based on the Actor input schema. -For an example of usage with agents, see the [CrewAI Apify Actor template](https://apify.com/templates/python-crewai). +For an example of usage with agents, see the [CrewAI Actor template](https://apify.com/templates/python-crewai). ## Configuration The `ApifyActorsTool` requires these inputs to work: - **`actor_name`** - The ID of the Apify Actor to run, e.g., `"apify/rag-web-browser"`. Browse options in the [Apify Store](https://apify.com/store). + The ID of the Apify Actor to run, e.g., `"apify/rag-web-browser"`. Browse all Actors in [Apify Store](https://apify.com/store). - **`run_input`** A dictionary of input parameters for the Actor when running the tool manually. - - For example for the `apify/rag-web-browser`: `{"query": "search term", "maxResults": 5}` - - See each Actor [input schema](https://apify.com/apify/rag-web-browser/input-schema) for details. + - For example for the `apify/rag-web-browser` Actor: `{"query": "search term", "maxResults": 5}` + - See Actor's [input schema](https://apify.com/apify/rag-web-browser/input-schema) for the list of input parameters. ## Resources -- **[Apify Platform](https://apify.com/)**: Dive into the Apify ecosystem. -- **[RAG Web Browser Actor](https://apify.com/apify/rag-web-browser)**: Test this popular Actor for web data retrieval. -- **[CrewAI Integration Guide](https://docs.apify.com/platform/integrations/crewai)**: Follow the official guide for Apify and CrewAI. +- **[Apify](https://apify.com/)**: Dive into the Apify platform. +- **[RAG Web Browser Actor](https://apify.com/apify/rag-web-browser)**: A popular Actor for web search for LLMs. +- **[CrewAI Integration Guide](https://docs.apify.com/platform/integrations/crewai)**: Follow the official guide for integrating Apify and CrewAI. From 4ce198741fe8128b317c78464943c860d07f26d5 Mon Sep 17 00:00:00 2001 From: MQ Date: Fri, 7 Mar 2025 10:07:45 +0100 Subject: [PATCH 07/10] dans suggestions --- docs/tools/apifyactorstool.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/tools/apifyactorstool.mdx b/docs/tools/apifyactorstool.mdx index b8f49b1ba3..9cd8a87926 100644 --- a/docs/tools/apifyactorstool.mdx +++ b/docs/tools/apifyactorstool.mdx @@ -11,7 +11,7 @@ Integrate [Apify Actors](https://apify.com/actors) into your CrewAI workflows. ## Description The `ApifyActorsTool` connects [Apify Actors](https://apify.com/actors), cloud-based programs for web scraping and automation, to your CrewAI workflows. -Use any of 4,000+ Actors from [Apify Store](https://apify.com/store) for use cases such as extracting data from social media, search engines, online maps, e-commerce sites, travel portals, or general websites. +Use any of the 4,000+ Actors on [Apify Store](https://apify.com/store) for use cases such as extracting data from social media, search engines, online maps, e-commerce sites, travel portals, or general websites. For details, see the [Apify CrewAI integration](https://docs.apify.com/platform/integrations/crewai) in Apify documentation. @@ -84,14 +84,14 @@ For an example of usage with agents, see the [CrewAI Actor template](https://api The `ApifyActorsTool` requires these inputs to work: - **`actor_name`** - The ID of the Apify Actor to run, e.g., `"apify/rag-web-browser"`. Browse all Actors in [Apify Store](https://apify.com/store). + The ID of the Apify Actor to run, e.g., `"apify/rag-web-browser"`. Browse all Actors on [Apify Store](https://apify.com/store). - **`run_input`** A dictionary of input parameters for the Actor when running the tool manually. - - For example for the `apify/rag-web-browser` Actor: `{"query": "search term", "maxResults": 5}` - - See Actor's [input schema](https://apify.com/apify/rag-web-browser/input-schema) for the list of input parameters. + - For example, for the `apify/rag-web-browser` Actor: `{"query": "search term", "maxResults": 5}` + - See the Actor's [input schema](https://apify.com/apify/rag-web-browser/input-schema) for the list of input parameters. ## Resources -- **[Apify](https://apify.com/)**: Dive into the Apify platform. +- **[Apify](https://apify.com/)**: Explore the Apify platform. - **[RAG Web Browser Actor](https://apify.com/apify/rag-web-browser)**: A popular Actor for web search for LLMs. - **[CrewAI Integration Guide](https://docs.apify.com/platform/integrations/crewai)**: Follow the official guide for integrating Apify and CrewAI. From 97c81cd8795726604e805ab2a218f422d129948d Mon Sep 17 00:00:00 2001 From: MQ Date: Fri, 7 Mar 2025 10:52:11 +0100 Subject: [PATCH 08/10] custom apify icon --- docs/tools/apifyactorstool.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/tools/apifyactorstool.mdx b/docs/tools/apifyactorstool.mdx index 9cd8a87926..51e0708cdf 100644 --- a/docs/tools/apifyactorstool.mdx +++ b/docs/tools/apifyactorstool.mdx @@ -1,7 +1,8 @@ --- title: Apify Actors -description: `ApifyActorsTool` lets you call Apify Actors to provide your CrewAI workflows with web scraping, crawling, data extraction, and web automation capabilities. -icon: toolbox +description: "`ApifyActorsTool` lets you call Apify Actors to provide your CrewAI workflows with web scraping, crawling, data extraction, and web automation capabilities." +# hack to use custom Apify icon +icon: "); -webkit-mask-image: url('https://upload.wikimedia.org/wikipedia/commons/a/ae/Apify.svg');/*" --- # `ApifyActorsTool` From e220e4efe474407d78c8eae8ca824d20afb1105d Mon Sep 17 00:00:00 2001 From: MQ Date: Fri, 7 Mar 2025 11:00:30 +0100 Subject: [PATCH 09/10] update descripton --- docs/concepts/tools.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/concepts/tools.mdx b/docs/concepts/tools.mdx index a0bd654ef7..6910735aba 100644 --- a/docs/concepts/tools.mdx +++ b/docs/concepts/tools.mdx @@ -106,7 +106,7 @@ Here is a list of the available tools and their descriptions: | Tool | Description | | :------------------------------- | :--------------------------------------------------------------------------------------------- | -| **ApifyActorsTool** | A tool for integrating Apify Actors into workflows, enabling web scraping and automation tasks.| +| **ApifyActorsTool** | A tool that integrates Apify Actors with your workflows for web scraping and automation tasks. | | **BrowserbaseLoadTool** | A tool for interacting with and extracting data from web browsers. | | **CodeDocsSearchTool** | A RAG tool optimized for searching through code documentation and related technical documents. | | **CodeInterpreterTool** | A tool for interpreting python code. | From adc105a412c5ce33d0d38763c34855d00d70b7e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kopeck=C3=BD?= Date: Tue, 11 Mar 2025 18:02:09 +0100 Subject: [PATCH 10/10] Update apifyactorstool.mdx --- docs/tools/apifyactorstool.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/tools/apifyactorstool.mdx b/docs/tools/apifyactorstool.mdx index 51e0708cdf..0f0835b9f5 100644 --- a/docs/tools/apifyactorstool.mdx +++ b/docs/tools/apifyactorstool.mdx @@ -94,5 +94,6 @@ The `ApifyActorsTool` requires these inputs to work: ## Resources - **[Apify](https://apify.com/)**: Explore the Apify platform. +- **[How to build an AI agent on Apify](https://blog.apify.com/how-to-build-an-ai-agent/)** - A complete step-by-step guide to creating, publishing, and monetizing AI agents on the Apify platform. - **[RAG Web Browser Actor](https://apify.com/apify/rag-web-browser)**: A popular Actor for web search for LLMs. - **[CrewAI Integration Guide](https://docs.apify.com/platform/integrations/crewai)**: Follow the official guide for integrating Apify and CrewAI.