Skip to main content

Overview

Kortix provides deep integration with Composio, enabling agents to connect to 150+ third-party services through managed OAuth, MCP servers, and credential profiles. The integration handles authentication, MCP server provisioning, and credential management automatically.

Architecture

The Composio integration consists of several service layers:

Core Services

1. ToolkitService

Module: core/composio_integration/toolkit_service.py Manages toolkit discovery and information:
  • List available toolkits (Gmail, Slack, GitHub, etc.)
  • Search toolkits by name or category
  • Get toolkit details and required scopes

2. AuthConfigService

Module: core/composio_integration/auth_config_service.py Handles authentication configuration:
  • Create OAuth configs for toolkits
  • Manage custom OAuth apps
  • Configure scopes and permissions

3. ConnectedAccountService

Module: core/composio_integration/connected_account_service.py Manages user connections:
  • Create connected accounts
  • Handle OAuth flow
  • Check connection status
  • Refresh tokens

4. MCPServerService

Module: core/composio_integration/mcp_server_service.py Provisions MCP servers:
  • Create MCP servers for toolkits
  • Generate user-specific MCP URLs
  • Configure server permissions

5. ComposioProfileService

Module: core/composio_integration/composio_profile_service.py Stores credential profiles:
  • Save integration configurations
  • Retrieve MCP URLs for runtime
  • Manage multiple profiles per toolkit

Complete Integration Flow

The ComposioIntegrationService orchestrates the entire integration process:

What Happens Behind the Scenes

The integration performs these steps automatically:

Using Composio Tools in Agents

Method 1: Via MCP Configuration

Once integrated, use the MCP URL in your agent configuration:

Method 2: Direct MCP URL Usage

Executing Composio Tools

Composio Upload Tool

For Gmail attachments and file operations, use the ComposioUploadTool:
Important: When attaching presentations to emails, ALWAYS export and attach .pptx format (not PDF) unless explicitly requested otherwise.

Custom OAuth Apps

For white-label deployments, use custom OAuth credentials:

Credential Profiles

Profiles allow users to have multiple integrations for the same toolkit:

Checking Integration Status

Available Toolkits

List All Toolkits

Search Toolkits

Communication:
  • Gmail - Email operations
  • Slack - Team messaging
  • Discord - Community chat
  • Microsoft Teams - Enterprise messaging
Productivity:
  • Google Drive - File storage
  • Notion - Knowledge management
  • Asana - Project management
  • Trello - Task boards
Development:
  • GitHub - Code repositories
  • GitLab - DevOps platform
  • Jira - Issue tracking
  • Linear - Project management
CRM & Sales:
  • Salesforce - CRM platform
  • HubSpot - Marketing & sales
  • Zendesk - Customer support
  • Intercom - Customer messaging
Calendar & Scheduling:
  • Google Calendar - Event management
  • Outlook Calendar - Microsoft calendar
  • Calendly - Scheduling tool

Environment Variables

Required environment variables:

Error Handling

Special Toolkit Considerations

Gmail Attachments

Gmail tools have special attachment handling:

Zendesk Configuration

Zendesk requires subdomain in initiation_fields:

Best Practices

  1. Use Profile Management: Store credentials in profiles for reusability
  2. Enable Caching: Use use_cache=True for faster MCP tool loading
  3. Filter Tools: Use enabledTools to load only needed tools
  4. Handle OAuth Expiry: Check integration status periodically
  5. Custom OAuth: Use custom OAuth apps for white-label deployments
  6. Error Recovery: Implement retry logic for transient API failures
  7. Account-Specific URLs: Prefer connected_account URLs over user_id URLs

Advanced Usage

Multiple Profiles for Same Toolkit

Trigger-Based Automations

Composio supports triggers for event-driven workflows:

Next Steps