Skip to main content
Create a custom provider to integrate Composio with any AI framework.

Provider Types

Composio supports two types of providers:

1. Non-Agentic Providers

For frameworks where you manually handle tool execution (OpenAI, Anthropic, etc.):

2. Agentic Providers

For frameworks that handle execution automatically (LangChain, LlamaIndex, etc.):

Complete Example

Here’s a complete custom provider for a hypothetical framework:

Usage

Key Methods

wrapTool()

Transforms a single Composio tool to your framework’s format:

wrapTools()

Transforms multiple tools:

executeToolCall() (Non-Agentic)

Handles tool execution for non-agentic providers:

Type Parameters

Providers are generic over three types:
  1. TToolCollection: Your framework’s tool collection type
  2. TTool: Your framework’s single tool type
  3. TMcpServerResponse: MCP server response format (optional)

Best Practices

  1. Type Safety: Use TypeScript for type-safe implementations
  2. Error Handling: Wrap tool execution in try-catch
  3. Schema Conversion: Properly convert JSON schemas
  4. Documentation: Document your provider’s usage
  5. Testing: Write tests for your provider

Publishing

Publish your provider as an npm package:

Next Steps

Base Provider Source

View base provider code

OpenAI Provider

Example provider implementation

Tools API

Learn about tools

GitHub

Contribute your provider