Skip to Content
HomeCrewAIUsing Arcade tools

Use CrewAI with Arcade

In this guide, we will explore how to integrate Arcade tools into your CrewAI application. Follow the step-by-step instructions below. If a requires authorization, an authorization URL will appear in the console, waiting for your approval. This process ensures that only the tools you choose to authorize are executed.

To tailor the authorization flow to meet your application’s specific needs, check out the Custom Auth Flow with CrewAI guide.

Prerequisites

Set up your environment

Install the required package, and ensure your environment variables are set with your Arcade and OpenAI :

Terminal
pip install crewai-arcade

Configure API keys

Provide your Arcade and OpenAI . You can store them in environment variables like so:

Terminal
export ARCADE_API_KEY="your_arcade_api_key" export OPENAI_API_KEY="your_openai_api_key"

Get Arcade tools

Use the ArcadeToolManager to initialize, add, and get Arcade :

Python
from crewai_arcade import ArcadeToolManager manager = ArcadeToolManager(default_user_id="{arcade_user_id}") """ Retrieves the provided tools and/or MCP Servers as CrewAI StructuredTools. """ tools = manager.get_tools(tools=["Gmail.ListEmails"], toolkits=["Slack"])

Use tools in your CrewAI agent team

Create a Crew that uses your tools. When the is called, you will be prompted to go visit an authorization page to authorize the tool before it executes.

Python
from crewai import Agent, Crew, Task from crewai.llm import LLM crew_agent = Agent( role="Main Agent", backstory="You are a helpful assistant", goal="Help the user with their requests", tools=tools, allow_delegation=False, verbose=True, llm=LLM(model="gpt-4o"), ) task = Task( description="Get the 5 most recent emails from the user's inbox and summarize them and recommend a response for each.", expected_output="A bulleted list with a one sentence summary of each email and a recommended response to the email.", agent=crew_agent, tools=crew_agent.tools, ) crew = Crew( agents=[crew_agent], tasks=[task], verbose=True, memory=True, ) result = crew.kickoff() print("\n\n\n ------------ Result ------------ \n\n\n") print(result)

Tips for selecting tools

  • Relevance: Pick only the you need. Avoid using all tools at once.
  • Avoid conflicts: Be mindful of duplicate or overlapping functionality.

Next steps

Now that you have integrated Arcade tools into your CrewAI team, you can:

  • Experiment with different toolkits, such as “Math” or “Search.”
  • Customize the ’s prompts for specific tasks.
  • Customize the authorization and execution flow to meet your application’s requirements.
Last updated on