Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
docs: workbench sandbox compute tier and link allow_multiple
Zen Agent6918a7692b94
diff --git a/docs/content/changelog/04-28-26-sdk-link-allow-multiple.mdx b/docs/content/changelog/04-28-26-sdk-link-allow-multiple.mdxnew file mode 100644index 000000000..bb30925ef--- /dev/null+++ b/docs/content/changelog/04-28-26-sdk-link-allow-multiple.mdx@@ -0,0 +1,62 @@+---+title: 'SDKs: `link()` matches `initiate()` for the multi-connection guard'+description: 'TypeScript and Python `connectedAccounts.link()` now refuse to create a second active connection on the same auth config unless `allowMultiple` / `allow_multiple` is set, mirroring `initiate()`. Patch releases.'+date: '2026-04-28'+---++`composio.connectedAccounts.link()` (TypeScript) and `composio.connected_accounts.link()` (Python) now match the multi-connection guard that `initiate()` already had. With Composio-managed redirectable-OAuth callers being [migrated off `POST /api/v3/connected_accounts` onto `POST /api/v3/connected_accounts/link`](/docs/changelog/2026/04/24/link-auth-migration), the guard moves with them — so the migration doesn't quietly drop the duplicate-connection check.++<Callout type="warn">+**Behavior change**++Before: `link()` would happily create a second `ACTIVE` connection for the same `(user_id, auth_config_id)` pair without a follow-up patch.++After: `link()` first calls `connectedAccounts.list({ userIds, authConfigIds, statuses: ['ACTIVE'] })`. If any active connection exists, `link()` throws `ComposioMultipleConnectedAccountsError` unless the caller passes `allowMultiple: true` (TypeScript) / `allow_multiple=True` (Python).+</Callout>++### SDK versions (patch releases)++| Package | Previous | This release |+| ------- | -------- | ------------ |+| TypeScript `@composio/core` | v0.8.0 | **v0.8.1** |+| Python `composio` | v0.12.0 | **v0.12.1** |++### Migration++Most callers don't need to do anything — `link()` raised an unrelated error or succeeded by accident in the duplicate-connection case before, and now raises a typed error you can handle. Two scenarios that need attention:++**1. You intentionally create multiple connections per `(user, auth_config)`** — for example, two Gmail accounts for the same user. Opt in:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+<Tab value="Python">+```python+connection_request = composio.connected_accounts.link(+ user_id="user_123",+ auth_config_id="ac_xxx",+ alias="work-gmail",+ allow_multiple=True,+)+```+</Tab>+<Tab value="TypeScript">+```typescript+// @noErrors+import { Composio } from '@composio/core';+const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY! });+// ---cut---+const connectionRequest = await composio.connectedAccounts.link(+ 'user_123',+ 'ac_xxx',+ { alias: 'work-gmail', allowMultiple: true },+);+```+</Tab>+</Tabs>++Pair with a session-level `multiAccount` / `multi_account` config so the agent can disambiguate at execution time. See [Configuring Sessions](/docs/configuring-sessions) for the session shape.++**2. You're migrating from `initiate()` to `link()`** as part of the [Composio-managed OAuth migration](/docs/changelog/2026/04/24/link-auth-migration). Pass `allow_multiple` / `allowMultiple` through unchanged — same flag name, same default (`False`), same exception (`ComposioMultipleConnectedAccountsError`).++### Why++The migration changelog moves callers off `connected_accounts/create` onto `/link`. `initiate()` had `allow_multiple` and the duplicate-connection check; `link()` didn't. Without this fix, every customer who migrates would silently lose the guard and start creating duplicate `ACTIVE` connections on auth configs that were never meant to hold more than one. This release closes that gap.diff --git a/docs/content/changelog/04-28-26-sdk-sandbox-size.mdx b/docs/content/changelog/04-28-26-sdk-sandbox-size.mdxnew file mode 100644index 000000000..cbd9aecd9--- /dev/null+++ b/docs/content/changelog/04-28-26-sdk-sandbox-size.mdx@@ -0,0 +1,66 @@+---+title: 'SDKs add sandbox compute tier for Tool Router workbench'+description: 'TypeScript and Python SDKs gain `workbench.sandboxSize` / `workbench.sandbox_size` to pick the workbench sandbox tier (standard, medium, large, xlarge). Patch releases.'+date: '2026-04-28'+---++The Composio SDKs now let you pick the compute tier of the [workbench](/docs/workbench) sandbox when creating a Tool Router session. Heavier code execution and larger in-memory data benefit from a bigger sandbox.++| Tier | vCPU | RAM |+| ---------- | ---- | ----- |+| `standard` | 1 | 1 GB |+| `medium` | 2 | 2 GB |+| `large` | 4 | 4 GB |+| `xlarge` | 8 | 8 GB |++The field is optional and defaults to `standard` server-side when omitted, so existing code keeps working unchanged.++<Callout type="info">+**Pricing:** Sandboxes are not billed today. Composio plans to begin billing for sandbox usage soon (metered by tier and runtime). Pick a tier that matches your workload — but expect future pricing to track actual usage.+</Callout>++### SDK versions (patch releases)++| Package | Previous | This release |+| ------- | -------- | ------------ |+| TypeScript `@composio/core` | v0.8.0 | **v0.8.1** |+| Python `composio` | v0.12.0 | **v0.12.1** |++Stainless clients are bumped in the same release: `@composio/client` to `0.1.0-alpha.67` and `composio-client` to `1.34.0`.++### Usage++**TypeScript** (camelCase on the SDK surface):++```typescript+// @noErrors+import { Composio } from '@composio/core';+const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY! });++const session = await composio.create('user_123', {+ workbench: {+ sandboxSize: 'large',+ },+});+```++The `SandboxSize` literal type and `SandboxSizeSchema` zod enum are exported from `@composio/core`.++**Python** (snake_case throughout):++```python+session = composio.create(+ user_id="user_123",+ workbench={+ "sandbox_size": "large",+ },+)+```++The `SandboxSize` literal alias is available at `composio.core.models.tool_router.SandboxSize`.++### Behavior on patch++Changing `sandbox_size` on an existing session recreates the sandbox on next access. The sandbox's in-memory filesystem state is lost, but the persistent `/mnt/files/` mount survives the restart.++See [Configuring Sessions → Sandbox compute tier](/docs/configuring-sessions#sandbox-compute-tier) for the full reference.diff --git a/docs/content/docs/configuring-sessions.mdx b/docs/content/docs/configuring-sessions.mdxindex feddf4e6d..b59cd038e 100644--- a/docs/content/docs/configuring-sessions.mdx+++ b/docs/content/docs/configuring-sessions.mdx@@ -205,6 +205,51 @@ When disabled:- Workbench-related system prompt lines are stripped- Direct workbench calls are rejected with a 400 error+## Sandbox compute tier++The workbench runs in a per-session sandbox. You can pick a compute tier to match the workload — heavier code execution or larger in-memory data benefits from a bigger sandbox. The tier is passed via `workbench.sandbox_size` (snake_case on the wire; `sandboxSize` in the TypeScript SDK).++| Tier | vCPU | RAM |+| ---------- | ---- | ----- |+| `standard` | 1 | 1 GB |+| `medium` | 2 | 2 GB |+| `large` | 4 | 4 GB |+| `xlarge` | 8 | 8 GB |++Defaults to `standard` when omitted.++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+<Tab value="Python">+```python+session = composio.create(+ user_id="user_123",+ workbench={+ "sandbox_size": "large",+ },+)+```+</Tab>+<Tab value="TypeScript">+```typescript+// @noErrors+import { Composio } from '@composio/core';+const composio = new Composio({ apiKey: 'your_api_key' });+// ---cut---+const session = await composio.create("user_123", {+ workbench: {+ sandboxSize: "large",+ },+});+```+</Tab>+</Tabs>++<Callout type="info">+**Pricing:** Sandboxes are not billed today. Composio plans to begin billing for sandbox usage soon (metered by tier and runtime). Pick a tier that matches your workload — but expect future pricing to track actual usage.+</Callout>++Changing `sandbox_size` on an existing session recreates the sandbox on next access. The sandbox's in-memory filesystem state is lost, but the persistent `/mnt/files/` mount survives the restart.+## Session methods### mcpdiff --git a/docs/content/docs/workbench.mdx b/docs/content/docs/workbench.mdxindex b5432d72b..2e2fc7d49 100644--- a/docs/content/docs/workbench.mdx+++ b/docs/content/docs/workbench.mdx@@ -55,6 +55,14 @@ The workbench corrects common mistakes in the code your agent generates. For exaThe sandbox runs as a persistent Jupyter notebook. Variables, imports, files, and in-memory state from one call are available in the next.+### Compute tier++Sandboxes default to `standard` (1 vCPU / 1 GB RAM). For heavier workloads — large dataframes, ML preprocessing, big bulk operations — pick a larger tier when creating the session via `workbench.sandbox_size`. Available tiers: `standard`, `medium` (2 vCPU / 2 GB), `large` (4 vCPU / 4 GB), `xlarge` (8 vCPU / 8 GB). See [Configuring Sessions → Sandbox compute tier](/docs/configuring-sessions#sandbox-compute-tier) for examples.++<Callout type="info">+**Pricing:** Sandboxes are not billed today. Composio plans to begin billing for sandbox usage soon (metered by tier and runtime).+</Callout>+## Common patterns### Bulk operations across apps