Skip to main content

Prerequisites

Before you can configure and use CrewAI with Connect AI, you must do the following:

Configure the Connect AI MCP Server

1
Create a folder named cdata-mcp-crew-agent.
2
Create a file with the extension .env in the cdata-mcp-crew-agent folder.
3
Copy and paste the content below. Instead of MCP_USERNAME and MCP_PASSWORD, use the OAuth JWT token from the prerequisites to authenticate. Your OpenAI API key can be found at https://platform.openai.com/.

Install the CrewAI Libraries

Run the following command in your terminal:

Create and Run the CrewAI Agent

1
Create a file called crew-agent.py. This is the CrewAI agent.
2
Copy and paste the following, defining the agent’s tasks as desired:
Note: For Connect AI Embed, you do not need the MCP_USERNAME or MCP_PASSWORD. Enter your OAuth JWT credentials in auth_header.
3
Run the following command in the terminal. The output displays the results of the task:
CrewAI Client Output