> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs and frameworks

> Composio works with any AI framework. Pick your preferred SDK to get started.

Composio works with any AI framework. A provider is the adapter that turns Composio tools into the native tool format your framework expects, so you don't write glue code.

Pick the provider that matches the SDK or agent framework you already use. Each one fetches tools, handles execution, and hands your agent objects it understands. If your framework isn't listed, you can [build your own provider](https://composio-preview.mintlify.site/docs/providers/custom-providers).

> [!NOTE]
>
> **Using TypeScript?**
>
> The TypeScript SDK is ESM-only and requires Node.js 22.22.3 or newer. Use `import` instead of CommonJS `require()`.

## TypeScript client configuration

Use `composio.getConfig()` to read SDK credentials. The client returned by `composio.getClient()` doesn't expose `apiKey`, `userApiKey`, `orgApiKey`, or `logger`. Its `baseURL`, `maxRetries`, `timeout`, and `logLevel` are read-only. To change client options for specific calls, derive a client with `const client = composio.getClient().withOptions({ maxRetries: 0 })` and use that client for those calls.

Pass custom headers through the SDK's `defaultHeaders` option.

> [!WARNING]
>
> `COMPOSIO_CUSTOM_HEADERS` is no longer supported. Replace it with `defaultHeaders` when constructing the SDK.

Credential and scope headers supplied through `defaultHeaders` or `createSession({ headers })` become SDK configuration and don't appear in `getConfig().defaultHeaders`. Supply at most one credential header: `x-api-key`, `x-user-api-key`, or `x-org-api-key`. Supplying multiple credential headers throws an error. Per-call client headers cannot override credentials or scope.

With `apiKey: null` and only an organization API key, API calls, trigger authorization, and `session.mcp.headers` use `x-org-api-key`.

## AI SDKs

Use these when you call a model SDK directly.

> [card] [Anthropic](https://composio-preview.mintlify.site/docs/providers/anthropic.md)
>
> Python, TypeScript

> [card] [OpenAI](https://composio-preview.mintlify.site/docs/providers/openai.md)
>
> Python, TypeScript

> [card] [Vercel AI SDK](https://composio-preview.mintlify.site/docs/providers/vercel.md)
>
> TypeScript

> [card] [Google](https://composio-preview.mintlify.site/docs/providers/google.md)
>
> Python, TypeScript

> [card] [TypeSafe](https://composio-preview.mintlify.site/docs/providers/typesafe.md)
>
> Python, TypeScript

> [card] [Cloudflare Workers AI](https://github.com/ComposioHQ/composio/blob/next/ts/packages/providers/cloudflare/README.md)
>
> TypeScript

## TypeSafe

Use TypeSafe's Jev model to select a Composio tool with a confidence score. The provider compiles tools into typed questions and returns a complete `call`, a `partial` call with missing arguments, or an `abstain` decision.

Set `COMPOSIO_API_KEY` and `TYPESAFE_API_KEY` in your environment before running decisions.

> [tab] Python
>
> ```bash theme={null}
> pip install composio composio-typesafe typesafe-sdk==0.6.0
> ```
>
> ```python theme={null}
> from composio import Composio
> from composio_typesafe import TypesafeProvider
>
> provider = TypesafeProvider()
> composio = Composio(provider=provider)
> tool_set = composio.tools.get(
>     user_id="user_123",
>     tools=["GITHUB_LIST_REPOSITORY_ISSUES"],
> )
> decision = provider.decide(tool_set, "List the closed issues of ComposioHQ/composio")
>
> if decision["kind"] != "abstain":
>     result = provider.execute(
>         "user_123",
>         decision,
>         arguments={"owner": "ComposioHQ", "repo": "composio"},
>     )
>     print(result["data"])
> ```
>
> Use `provider.shortlist_tools()` to narrow the tools before deciding, or `provider.confidence_gate()` to apply a minimum judgement score before execution. Destructive tools require explicit confirmation through `provider.execute(..., confirm=True)`.

> [tab] TypeScript
>
> ```bash theme={null}
> npm install @composio/core @composio/typesafe @typesafe-ai/sdk@0.6.0 zod
> ```
>
> ```typescript theme={null}
> import { Composio } from '@composio/core';
> import { TypesafeProvider } from '@composio/typesafe';
>
> const provider = new TypesafeProvider();
> const composio = new Composio({ provider });
> const toolSet = await composio.tools.get('user_123', {
>   tools: ['GITHUB_LIST_REPOSITORY_ISSUES'],
> });
> const decision = await provider.decide(toolSet, 'List the closed issues of ComposioHQ/composio');
>
> if (decision.kind !== 'abstain') {
>   const result = await provider.execute('user_123', decision, {
>     arguments: { owner: 'ComposioHQ', repo: 'composio' },
>   });
>   console.log(result.data);
> }
> ```
>
> Use `provider.shortlistTools()` to narrow the tools before deciding, or `provider.confidenceGate()` to apply a minimum judgement score before execution. Destructive tools require explicit confirmation through `provider.execute(userId, decision, { confirm: true })`.
>
> This provider requires Node.js 24.17 or newer. Root schema composition that can hide required arguments is rejected. Supply prototype-named arguments explicitly; `__proto__` is preserved as caller data during execution.

Jev binds closed-set arguments such as enums and booleans. You supply open-ended values such as text, IDs, and numbers through `arguments` when executing. Handle `abstain` without executing a tool, and supply the missing arguments for a `partial` call.

The confidence score is the least certain judgement the call depends on, not the probability that the whole call is correct. Only pass confirmation after you've approved a destructive action.

## Agent frameworks

Use these when an agent framework orchestrates the tool calls for you.

> [card] [OpenAI Agents SDK](https://composio-preview.mintlify.site/docs/providers/openai.md)
>
> Python, TypeScript

> [card] [Claude Agent SDK](https://composio-preview.mintlify.site/docs/providers/anthropic.md)
>
> Python, TypeScript

> [card] [Google ADK](https://composio-preview.mintlify.site/docs/providers/google.md)
>
> Python

> [card] [LangChain](https://composio-preview.mintlify.site/docs/providers/langchain.md)
>
> Python, TypeScript

> [card] [LangGraph](https://composio-preview.mintlify.site/docs/providers/langchain.md)
>
> Python

> [card] [CrewAI](https://composio-preview.mintlify.site/docs/providers/crewai.md)
>
> Python

> [card] [LlamaIndex](https://composio-preview.mintlify.site/docs/providers/llamaindex.md)
>
> Python, TypeScript

> [card] [Mastra](https://composio-preview.mintlify.site/docs/providers/mastra.md)
>
> TypeScript

> [card] [Pi](https://composio-preview.mintlify.site/docs/providers/pi.md)
>
> TypeScript; Experimental

> [card] [Eve](https://composio-preview.mintlify.site/docs/providers/eve.md)
>
> TypeScript; Experimental

> [card] [AutoGen](https://composio-preview.mintlify.site/docs/providers/autogen.md)
>
> Python

## Custom
