Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

composio-client for Python

composio-client replaces the Stainless-generated package without requiring you to rewrite existing 1.43.x calls.

from composio_client import Composio

client = Composio(api_key="ak_...")

session = client.tool_router.session.create(user_id="user@example.com")
result = client.tool_router.session.execute(
    session.session_id,
    tool_slug="GITHUB_CREATE_ISSUE",
    arguments={"owner": "composiohq", "repo": "composio", "title": "Example"},
)

The owned client preserves the public Python contract from composio-client==1.43.0 and adds the rest of the v3.1 API. You get all 104 released operations, including the 64 operations published by Stainless and 40 additive operations generated from the checked-in OpenAPI document.

Install the client

pip install composio-client

With uv:

uv add composio-client

Set COMPOSIO_API_KEY or pass api_key when you construct the client.

Use from_env when configuration must come from a specific mapping instead of os.environ:

client = Composio.from_env(config, environment="staging")

Explicit keyword arguments replace mapped values. The factory recognizes COMPOSIO_API_KEY, COMPOSIO_USER_API_KEY, COMPOSIO_ORG_API_KEY, COMPOSIO_BASE_URL, and COMPOSIO_CUSTOM_HEADERS. Clients created with with_options() keep using the resolved mapping and do not fall back to ambient values.

Use the async client

import asyncio

from composio_client import AsyncComposio


async def main() -> None:
    async with AsyncComposio(api_key="ak_...") as client:
        session = await client.tool_router.session.create(user_id="user@example.com")
        print(session.session_id)


asyncio.run(main())

Read raw response metadata

Every released resource keeps the Stainless raw and streaming accessors:

from composio_client import Composio

client = Composio(api_key="ak_...")

response = client.tool_router.session.with_raw_response.retrieve("sess_123")
print(response.status_code)
session = response.parse()

with client.tool_router.session.with_streaming_response.retrieve("sess_123") as response:
    print(response.headers)

The async resource exposes the corresponding async response objects and context managers.

Handle API errors

The exception hierarchy matches the Stainless package. Existing except blocks keep working:

from composio_client import Composio, NotFoundError

client = Composio(api_key="ak_...")

try:
    client.tool_router.session.retrieve("missing")
except NotFoundError as error:
    print(error.status_code)

Migrate pre-release owned-client calls

Earlier owned-client builds accepted aggregate body, query, and headers values. Those calls remain valid during the transition:

client.tool_router.session.create({"user_id": "user@example.com"})
client.tool_router.session.config_history("sess_123", query={"limit": 25})

Prefer the flat Stainless form in new code:

client.tool_router.session.create(user_id="user@example.com")
client.tool_router.session.config_history("sess_123", limit=25)

See the Python migration guide for compatibility details and the stricter credential transport rules.

Develop the Python package

Generate from the repository root:

pnpm generate:python
pnpm codegen:check

Run Python checks from python/:

uv run ruff check
uv run ruff format --check
uv run mypy src scripts
uv run pytest
uv run python scripts/check_stainless_compatibility.py
uv build
uv run python scripts/check_stainless_compatibility.py --wheel dist/*.whl

The normal compatibility check is offline. It reads the committed 1.43.0 fixture and does not install or call the Stainless client.

Release files for composio-client 2.0.0rc5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for composio-client 2.0.0rc5
File Size Uploaded
composio_client-2.0.0rc5.tar.gz 481.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for composio-client 2.0.0rc5
File Interpreter ABI Platform
composio_client-2.0.0rc5-py3-none-any.whl Python 3 none any Details

Total release size: 826.5 kB

Release files / composio_client-2.0.0rc5.tar.gz

Download URL composio_client-2.0.0rc5.tar.gz
Size 481.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8cdf2f56d345b36b97e5b346c7de07878e4fa2731b7c39ad35d06f74c5bb3ddd
BLAKE2b-256 checksum
How to use checksums
eb1a880ad791e5f8a7917bb413ceadd84339ba57074a95a26d71cb7935381308
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.

Transparency log

Release files / composio_client-2.0.0rc5-py3-none-any.whl

Download URL composio_client-2.0.0rc5-py3-none-any.whl
Size 345.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bea22d1f482518682a9e8cd728c316714e1067f4f2d679de5f37ee11d3ee2b6c
BLAKE2b-256 checksum
How to use checksums
22ac521a13d3adfebe7e84573336e88f8cd448e71718585b7b9b16c506ee490f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.0rc5 This release

2 release files

1.42.0

2 release files

1.41.0

2 release files

1.40.0

2 release files

1.39.0

2 release files

1.38.0

2 release files

1.35.0

2 release files

1.34.0

2 release files

1.33.0

2 release files

1.32.0

2 release files

1.29.0

2 release files

1.27.0

2 release files

1.26.0

2 release files

1.25.0

2 release files

1.24.0

2 release files

1.22.0

2 release files

1.21.0

2 release files

1.20.0

2 release files

1.19.0

2 release files

1.15.0

2 release files

1.14.0

2 release files

1.13.0

2 release files

1.11.0

2 release files

1.10.0

2 release files

1.9.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page