@devries-cameron20 / composio Mirror · read-only / commits / 6918a7692
Fork 0

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

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 22:15 UTC

docs: workbench sandbox compute tier and link allow_multiple

User-facing docs split off from the SDK PRs so the docs land alongside the SDK release (the code samples reference fields that only exist once `@composio/core` and `composio` ship the patched versions; the docs build will fail until then). - Configuring Sessions: new "Sandbox compute tier" section with the tier table (standard/medium/large/xlarge), TS + Python examples, and a Callout flagging that sandboxes are not billed today but usage-based pricing is planned. - Workbench: new "Compute tier" subsection cross-linking to Configuring Sessions, with the same billing note. - Changelog: 04-28-26-sdk-sandbox-size — patch release covering the workbench sandbox tier addition. - Changelog: 04-28-26-sdk-link-allow-multiple — patch release covering the allow_multiple parity guard on connectedAccounts.link(), flagged as a behavior change with a migration block. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Zen Agent committed Apr 28, 2026 at 11:48 UTC 6918a7692b94f4d44128456361cf41e38f2eec7c
4 files changed +181
docs/content/changelog/04-28-26-sdk-link-allow-multiple.mdx new
+62
@@ -0,0 +1,62 @@
1 +---
2 +title: 'SDKs: `link()` matches `initiate()` for the multi-connection guard'
3 +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.'
4 +date: '2026-04-28'
5 +---
6 +
7 +`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.
8 +
9 +<Callout type="warn">
10 +**Behavior change**
11 +
12 +Before: `link()` would happily create a second `ACTIVE` connection for the same `(user_id, auth_config_id)` pair without a follow-up patch.
13 +
14 +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).
15 +</Callout>
16 +
17 +### SDK versions (patch releases)
18 +
19 +| Package | Previous | This release |
20 +| ------- | -------- | ------------ |
21 +| TypeScript `@composio/core` | v0.8.0 | **v0.8.1** |
22 +| Python `composio` | v0.12.0 | **v0.12.1** |
23 +
24 +### Migration
25 +
26 +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:
27 +
28 +**1. You intentionally create multiple connections per `(user, auth_config)`** — for example, two Gmail accounts for the same user. Opt in:
29 +
30 +<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
31 +<Tab value="Python">
32 +```python
33 +connection_request = composio.connected_accounts.link(
34 + user_id="user_123",
35 + auth_config_id="ac_xxx",
36 + alias="work-gmail",
37 + allow_multiple=True,
38 +)
39 +```
40 +</Tab>
41 +<Tab value="TypeScript">
42 +```typescript
43 +// @noErrors
44 +import { Composio } from '@composio/core';
45 +const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY! });
46 +// ---cut---
47 +const connectionRequest = await composio.connectedAccounts.link(
48 + 'user_123',
49 + 'ac_xxx',
50 + { alias: 'work-gmail', allowMultiple: true },
51 +);
52 +```
53 +</Tab>
54 +</Tabs>
55 +
56 +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.
57 +
58 +**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`).
59 +
60 +### Why
61 +
62 +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.
docs/content/changelog/04-28-26-sdk-sandbox-size.mdx new
+66
@@ -0,0 +1,66 @@
1 +---
2 +title: 'SDKs add sandbox compute tier for Tool Router workbench'
3 +description: 'TypeScript and Python SDKs gain `workbench.sandboxSize` / `workbench.sandbox_size` to pick the workbench sandbox tier (standard, medium, large, xlarge). Patch releases.'
4 +date: '2026-04-28'
5 +---
6 +
7 +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.
8 +
9 +| Tier | vCPU | RAM |
10 +| ---------- | ---- | ----- |
11 +| `standard` | 1 | 1 GB |
12 +| `medium` | 2 | 2 GB |
13 +| `large` | 4 | 4 GB |
14 +| `xlarge` | 8 | 8 GB |
15 +
16 +The field is optional and defaults to `standard` server-side when omitted, so existing code keeps working unchanged.
17 +
18 +<Callout type="info">
19 +**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.
20 +</Callout>
21 +
22 +### SDK versions (patch releases)
23 +
24 +| Package | Previous | This release |
25 +| ------- | -------- | ------------ |
26 +| TypeScript `@composio/core` | v0.8.0 | **v0.8.1** |
27 +| Python `composio` | v0.12.0 | **v0.12.1** |
28 +
29 +Stainless clients are bumped in the same release: `@composio/client` to `0.1.0-alpha.67` and `composio-client` to `1.34.0`.
30 +
31 +### Usage
32 +
33 +**TypeScript** (camelCase on the SDK surface):
34 +
35 +```typescript
36 +// @noErrors
37 +import { Composio } from '@composio/core';
38 +const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY! });
39 +
40 +const session = await composio.create('user_123', {
41 + workbench: {
42 + sandboxSize: 'large',
43 + },
44 +});
45 +```
46 +
47 +The `SandboxSize` literal type and `SandboxSizeSchema` zod enum are exported from `@composio/core`.
48 +
49 +**Python** (snake_case throughout):
50 +
51 +```python
52 +session = composio.create(
53 + user_id="user_123",
54 + workbench={
55 + "sandbox_size": "large",
56 + },
57 +)
58 +```
59 +
60 +The `SandboxSize` literal alias is available at `composio.core.models.tool_router.SandboxSize`.
61 +
62 +### Behavior on patch
63 +
64 +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.
65 +
66 +See [Configuring Sessions → Sandbox compute tier](/docs/configuring-sessions#sandbox-compute-tier) for the full reference.
docs/content/docs/configuring-sessions.mdx
+45
@@ -205,6 +205,51 @@ When disabled:
205 - Workbench-related system prompt lines are stripped
206 - Direct workbench calls are rejected with a 400 error
207
208 +## Sandbox compute tier
209 +
210 +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).
211 +
212 +| Tier | vCPU | RAM |
213 +| ---------- | ---- | ----- |
214 +| `standard` | 1 | 1 GB |
215 +| `medium` | 2 | 2 GB |
216 +| `large` | 4 | 4 GB |
217 +| `xlarge` | 8 | 8 GB |
218 +
219 +Defaults to `standard` when omitted.
220 +
221 +<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
222 +<Tab value="Python">
223 +```python
224 +session = composio.create(
225 + user_id="user_123",
226 + workbench={
227 + "sandbox_size": "large",
228 + },
229 +)
230 +```
231 +</Tab>
232 +<Tab value="TypeScript">
233 +```typescript
234 +// @noErrors
235 +import { Composio } from '@composio/core';
236 +const composio = new Composio({ apiKey: 'your_api_key' });
237 +// ---cut---
238 +const session = await composio.create("user_123", {
239 + workbench: {
240 + sandboxSize: "large",
241 + },
242 +});
243 +```
244 +</Tab>
245 +</Tabs>
246 +
247 +<Callout type="info">
248 +**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.
249 +</Callout>
250 +
251 +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.
252 +
253 ## Session methods
254
255 ### mcp
docs/content/docs/workbench.mdx
+8
@@ -55,6 +55,14 @@ The workbench corrects common mistakes in the code your agent generates. For exa
55
56 The sandbox runs as a persistent Jupyter notebook. Variables, imports, files, and in-memory state from one call are available in the next.
57
58 +### Compute tier
59 +
60 +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.
61 +
62 +<Callout type="info">
63 +**Pricing:** Sandboxes are not billed today. Composio plans to begin billing for sandbox usage soon (metered by tier and runtime).
64 +</Callout>
65 +
66 ## Common patterns
67
68 ### Bulk operations across apps