SDKs and frameworks

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.

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.

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.

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.

pip install composio composio-typesafe typesafe-sdk==0.6.0
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).

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.

Custom