CrewAI Integration

Build multi-agent systems with ContextGate data access

CrewAI enables building collaborative AI agent systems where specialized agents work together. Integrate ContextGate to give your crew access to Salesforce, QuickBooks, HubSpot, and other business data.

This guide shows you how to create CrewAI agents with custom tools that query CloudSlurp, enabling coordinated data analysis and business intelligence workflows.

📋 Prerequisites

  • Python 3.10 or later
  • CrewAI installed (pip install crewai crewai-tools)
  • ContextGate account with connected apps
  • OpenAI API key or other LLM provider
1

Get Your ContextGate Bearer Token

Navigate to the Install page in your ContextGate workspace. Click "View API Token" and copy your bearer token for authentication.

💡 Your token can be found on the Install page .

Keep your bearer token secure! Never commit it to version control.

2

Configure Your Toolbox (Optional)

On the Install page, you can customize which tools, connections, and datasets are available through CloudSlurp. This allows you to:

  • Limit access to specific connections (e.g., only Salesforce, not QuickBooks)
  • Enable only certain tools or operations
  • Control which datasets are accessible

Toolbox Manager Interface:

Toolbox Manager Configuration
3

Install Dependencies

Install CrewAI and required packages:

5

Create ContextGate-Enabled Agent

Define a custom CrewAI tool for querying ContextGate:

3

Define Specialized Agents

Create agents with specific roles and CloudSlurp tools:

6

Build Multi-Agent Crew

Define tasks that utilize CloudSlurp data:

7

Execute Crew Workflow

Create the crew and execute tasks:

8

Advanced: Multi-Source Analysis Crew

Build a crew that analyzes data across multiple business systems:

💡 CrewAI + CloudSlurp Use Cases

📊 Business Intelligence

Analyst agent queries data, Researcher agent finds trends, Writer agent creates reports

🔄 Data Synchronization

Fetcher agent gets data, Validator agent checks quality, Syncer agent updates systems

🎯 Sales Pipeline

Scout agent finds opportunities, Scorer agent prioritizes, Outreach agent drafts emails

💰 Financial Analysis

Collector agent gets invoices, Analyzer agent checks cash flow, Advisor agent suggests actions

🔧 Troubleshooting

Tool Not Being Used

  • Make tool description specific to what it does
  • Ensure agent role aligns with tool capabilities
  • Add tool usage examples in task descriptions

Crew Execution Fails

  • Check all environment variables are set correctly
  • Verify ContextGate bearer token is valid
  • Ensure task dependencies are properly sequenced

Poor Results Quality

  • Refine agent roles and backstories for clarity
  • Make task descriptions more specific and detailed
  • Add expected output formats to task definitions

🚀 Next Steps

  • Add Memory: Enable long-term and short-term memory for your crew
  • Hierarchical Teams: Create manager agents that coordinate worker agents
  • Custom Tools: Build specialized tools for your business processes