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:- TToolCollection: Your framework’s tool collection type
- TTool: Your framework’s single tool type
- TMcpServerResponse: MCP server response format (optional)
Best Practices
- Type Safety: Use TypeScript for type-safe implementations
- Error Handling: Wrap tool execution in try-catch
- Schema Conversion: Properly convert JSON schemas
- Documentation: Document your provider’s usage
- 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