Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

chore(py): prepare 2.0.0b0 core-only beta (#4278)

Alberto Schiabel711e609a71b2
diff --git a/.github/workflows/py.release.yml b/.github/workflows/py.release.yml
index c248e608a..d89f3ed6c 100644
--- a/.github/workflows/py.release.yml
+++ b/.github/workflows/py.release.yml
@@ -39,10 +39,28 @@ jobs:
- name: Setup Python with UV
uses: ./.github/actions/setup-python-uv
+ - name: Resolve release package set
+ id: release_mode
+ run: |
+ python - <<'PY' >> "$GITHUB_OUTPUT"
+ import re
+ import tomllib
+
+ with open("pyproject.toml", "rb") as pyproject:
+ version = tomllib.load(pyproject)["project"]["version"]
+
+ is_prerelease = re.search(r"(?:a|b|rc|dev)\d", version, re.IGNORECASE) is not None
+ print(f"core_only={'true' if is_prerelease else 'false'}")
+ PY
+
- name: Build Artifacts
run: |
make env
- make build
+ if [[ "${{ steps.release_mode.outputs.core_only }}" == "true" ]]; then
+ make build-core
+ else
+ make build
+ fi
- name: Publish Artifacts
if: github.event_name == 'push'
diff --git a/docs/content/changelog/08-31-26-python-sdk-beta.mdx b/docs/content/changelog/08-31-26-python-sdk-beta.mdx
new file mode 100644
index 000000000..559737471
--- /dev/null
+++ b/docs/content/changelog/08-31-26-python-sdk-beta.mdx
@@ -0,0 +1,33 @@
+---
+title: 'Python SDK 2.0.0 beta uses the Composio-owned client'
+description: 'Python SDK 2.0.0b0 replaces the frozen client with the Composio-owned 2.0.0rc6 client while keeping provider packages on their stable release train.'
+date: '2026-08-31'
+---
+
+Python SDK `composio` `2.0.0b0` replaces the frozen `composio-client` dependency with the Composio-owned `2.0.0rc6` client.
+
+Install the beta with:
+
+```bash
+pip install composio==2.0.0b0
+```
+
+To use the beta with a provider, install both explicitly:
+
+```bash
+pip install composio==2.0.0b0 composio-openai
+```
+
+### SDK versions
+
+| SDK | Version |
+| ----------------- | --------- |
+| Python `composio` | `2.0.0b0` |
+
+The Python provider packages remain on their stable `0.x` release train. Their existing `composio` dependency lets an explicitly installed `composio==2.0.0b0` supply the shared SDK runtime.
+
+### Owned client
+
+The owned client covers the released v3.1 operations while preserving the SDK's existing imports, types, retries, timeouts, and error classes.
+
+This beta contains no additional SDK behavior changes beyond the client migration. No call-site migration is required when upgrading from `0.20.0`.
diff --git a/python/Makefile b/python/Makefile
index 6734fba07..f5fc40b1d 100644
--- a/python/Makefile
+++ b/python/Makefile
@@ -1,4 +1,4 @@
-.PHONY: clean-build sync provider create-provider env fmt chk snt tst type_inference dead-code bump build format check sanity test
+.PHONY: clean-build sync provider create-provider env fmt chk snt tst type_inference dead-code bump build build-core format check sanity test
PROVIDER_DIRS := $(patsubst %/,%,$(sort $(dir $(wildcard providers/*/pyproject.toml))))
@@ -76,8 +76,10 @@ test: tst
bump: clean-build
@uv run python scripts/bump.py
-build: clean-build
+build-core: clean-build
@./.venv/bin/python -m build
+
+build: build-core
@set -e; for provider in $(PROVIDER_DIRS); do\
./.venv/bin/python -m build $$provider;\
cp $$provider/dist/* dist/;\
diff --git a/python/composio/__version__.py b/python/composio/__version__.py
index 5f4bb0b34..ef2ec23a7 100644
--- a/python/composio/__version__.py
+++ b/python/composio/__version__.py
@@ -1 +1 @@
-__version__ = "0.20.0"
+__version__ = "2.0.0b0"
diff --git a/python/pyproject.toml b/python/pyproject.toml
index ba40ed3dc..c23c4ea65 100644
--- a/python/pyproject.toml
+++ b/python/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "composio"
-version = "0.20.0"
+version = "2.0.0b0"
description = "SDK for integrating Composio with your applications."
readme = "README.md"
requires-python = ">=3.10,<4"
diff --git a/test/release-workflow.test.ts b/test/release-workflow.test.ts
index ab43c977d..72bc8fc6a 100644
--- a/test/release-workflow.test.ts
+++ b/test/release-workflow.test.ts
@@ -162,7 +162,12 @@ function readTypeScriptWorkspacePackages() {
return workspacePackages;
}
-function runPythonBuildFixture({ providers, providerFiles = [], failingProvider = '' }) {
+function runPythonBuildFixture({
+ providers,
+ providerFiles = [],
+ failingProvider = '',
+ target = 'build',
+}) {
const fixtureDir = mkdtempSync(join(tmpdir(), 'composio-python-build-'));
const buildLogPath = join(fixtureDir, 'build.log');
@@ -205,7 +210,7 @@ touch "$target/dist/provider.whl"
writeFileSync(join(fixtureDir, 'providers', providerFile), 'not a provider package\n');
}
- const result = spawnSync('make', ['-f', pythonMakefilePath, 'build'], {
+ const result = spawnSync('make', ['-f', pythonMakefilePath, target], {
cwd: fixtureDir,
encoding: 'utf8',
env: {
@@ -224,6 +229,25 @@ touch "$target/dist/provider.whl"
}
}
+{
+ const result = runPythonBuildFixture({
+ providers: ['provider-must-not-build'],
+ target: 'build-core',
+ });
+
+ if (result.status !== 0) {
+ throw new Error(
+ `Python core-only build fixture failed unexpectedly\nstdout:\n${result.stdout}\nstderr:\n${result.stderr}`
+ );
+ }
+ if (!result.invocations.includes('<root>')) {
+ throw new Error('Python core-only build must build the root SDK package');
+ }
+ if (result.invocations.includes('providers/provider-must-not-build')) {
+ throw new Error('Python core-only build must not build provider packages');
+ }
+}
+
{
const result = runPythonBuildFixture({
providers: ['valid'],
@@ -455,6 +479,20 @@ if (
if (!pythonReleaseWorkflow.includes('run: pnpm test:release-workflow')) {
throw new Error('py.release.yml must validate release metadata before publishing');
}
+for (const input of ['id: release_mode', 'core_only=']) {
+ if (!pythonReleaseWorkflow.includes(input)) {
+ throw new Error(`py.release.yml must select the core-only build for prereleases: ${input}`);
+ }
+}
+if (
+ !/if \[\[ "\$\{\{ steps\.release_mode\.outputs\.core_only \}\}" == "true" \]\]; then\s+make build-core\s+else\s+make build\s+fi/.test(
+ pythonReleaseWorkflow
+ )
+) {
+ throw new Error(
+ 'py.release.yml must build only the core package for prereleases and all Python packages for stable releases'
+ );
+}
{
const pythonVersion = readPyprojectVersion(pythonPyproject, 'python/pyproject.toml version');
@@ -478,6 +516,8 @@ if (!pythonReleaseWorkflow.includes('run: pnpm test:release-workflow')) {
}
const providerDir = new URL('../python/providers/', import.meta.url);
+ const pythonIsPrerelease = /(?:a|b|rc|dev)\d/i.test(pythonVersion);
+ const providerVersions = new Map<string, string>();
for (const entry of readdirSync(providerDir, { withFileTypes: true })) {
if (!entry.isDirectory()) continue;
@@ -492,7 +532,14 @@ if (!pythonReleaseWorkflow.includes('run: pnpm test:release-workflow')) {
readFileSync(pyprojectPath, 'utf8'),
`python/providers/${entry.name}/pyproject.toml version`
);
- if (providerPyprojectVersion !== pythonVersion) {
+ providerVersions.set(entry.name, providerPyprojectVersion);
+ const providerIsPrerelease = /(?:a|b|rc|dev)\d/i.test(providerPyprojectVersion);
+ if (pythonIsPrerelease && providerIsPrerelease) {
+ throw new Error(
+ `python/providers/${entry.name}/pyproject.toml must remain stable during a composio prerelease (${providerPyprojectVersion})`
+ );
+ }
+ if (!pythonIsPrerelease && providerPyprojectVersion !== pythonVersion) {
throw new Error(
`python/providers/${entry.name}/pyproject.toml must match python/pyproject.toml (${providerPyprojectVersion} !== ${pythonVersion})`
);
@@ -505,12 +552,31 @@ if (!pythonReleaseWorkflow.includes('run: pnpm test:release-workflow')) {
/version\s*=\s*"([^"]+)"/,
`python/providers/${entry.name}/setup.py version`
);
- if (providerSetupVersion !== pythonVersion) {
+ if (providerSetupVersion !== providerPyprojectVersion) {
+ throw new Error(
+ `python/providers/${entry.name}/setup.py must match its pyproject.toml (${providerSetupVersion} !== ${providerPyprojectVersion})`
+ );
+ }
+ const providerSetupIsPrerelease = /(?:a|b|rc|dev)\d/i.test(providerSetupVersion);
+ if (pythonIsPrerelease && providerSetupIsPrerelease) {
+ throw new Error(
+ `python/providers/${entry.name}/setup.py must remain stable during a composio prerelease (${providerSetupVersion})`
+ );
+ }
+ if (!pythonIsPrerelease && providerSetupVersion !== pythonVersion) {
throw new Error(
`python/providers/${entry.name}/setup.py must match python/pyproject.toml (${providerSetupVersion} !== ${pythonVersion})`
);
}
}
+
+ const distinctProviderVersions = new Set(providerVersions.values());
+ if (distinctProviderVersions.size > 1) {
+ const details = [...providerVersions]
+ .map(([provider, version]) => `- ${provider}: ${version}`)
+ .join('\n');
+ throw new Error(`Python providers must share one stable version:\n${details}`);
+ }
}
{
diff --git a/uv.lock b/uv.lock
index cad5e67fd..f103e9c71 100644
--- a/uv.lock
+++ b/uv.lock
@@ -714,7 +714,7 @@ wheels = [
[[package]]
name = "composio"
-version = "0.20.0"
+version = "2.0.0b0"
source = { editable = "python" }
dependencies = [
{ name = "composio-client" },