Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ComposioHQ/composio/llms.txt

Use this file to discover all available pages before exploring further.

Composio providers are adapter packages that transform Composio tools into the exact format your AI framework expects — no manual schema conversion needed. Pick your framework from the lists below and follow its dedicated page to get started in minutes.

AI SDKs

OpenAI

Format tools as ChatCompletionTool objects for OpenAI’s Chat Completions and Responses API. Available for Python and TypeScript.

Anthropic

Format tools as ToolParam objects for Claude’s tool_use API. Available for Python and TypeScript.

Vercel AI SDK

Format tools as Vercel CoreTool objects for generateText, streamText, and generateObject. TypeScript only.

Google

Format tools as FunctionDeclaration objects for Gemini function calling and Google ADK. Available for Python and TypeScript.

Agent Frameworks

LangChain

Return tools as DynamicStructuredTool objects for LCEL chains and LangGraph agents. Available for Python and TypeScript.

CrewAI

Wrap tools as BaseTool instances for any CrewAI crew or agent. Python only.

Mastra

Format tools in Mastra’s native tool format for Mastra agents. TypeScript only.

LlamaIndex

Composio tools as LlamaIndex-compatible function tools. Available for Python and TypeScript.

How providers work

Every Composio provider follows the same pattern: pass a provider instance to the Composio constructor, then call composio.tools.get() to retrieve tools already formatted for your framework.
import { Composio } from '@composio/core';
import { OpenAIProvider } from '@composio/openai'; // swap for any provider

const composio = new Composio({
  apiKey: process.env.COMPOSIO_API_KEY,
  provider: new OpenAIProvider(),
});

// Tools are returned in your framework's native format automatically
const tools = await composio.tools.get('user_123', {
  tools: ['GITHUB_STAR_REPO', 'GMAIL_SEND_EMAIL'],
});
When you call composio.tools.get(), the SDK fetches tool definitions from the Composio API, runs them through the provider’s wrapTools() method, and returns objects your framework can consume directly — no glue code required.

Build your own provider

If your framework isn’t listed above, you can build a custom provider by extending one of two base classes from @composio/core:
  • BaseNonAgenticProvider — for frameworks where Composio handles tool execution (OpenAI, Anthropic, Google). Override wrapTool() and wrapTools() to transform tool definitions into your format, and implement executeToolCall() to process results.
  • BaseAgenticProvider — for frameworks that handle tool execution themselves (LangChain, Vercel, Mastra, CrewAI). Override wrapTool() and wrapTools(), and embed the executeTool callback inside each wrapped tool so the framework calls it automatically.
import { BaseNonAgenticProvider, Tool } from '@composio/core';

class MyProvider extends BaseNonAgenticProvider<MyToolCollection, MyTool, MyMcpResponse> {
  readonly name = 'my-provider';

  wrapTool(tool: Tool): MyTool {
    return {
      name: tool.slug,
      description: tool.description,
      parameters: tool.inputParameters,
    };
  }

  wrapTools(tools: Tool[]): MyToolCollection {
    return tools.map(tool => this.wrapTool(tool));
  }
}
Both base classes are exported from @composio/core, so you don’t need any additional dependencies to write a custom provider.

Build docs developers (and LLMs) love