@devries-cameron20 / composio Mirror · read-only / commits / 63630d91f
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 22, 02:00 UTC

docs: add workbench.enable documentation

- Add "Disabling workbench" section to configuring-sessions.mdx - Update workbench reference table in TS and Python SDK docs

Abir Taheer committed Mar 24, 2026 at 15:18 UTC 63630d91fe5e2a99f8ceda04333b3dcce2da9934
3 files changed +69
docs/content/docs/configuring-sessions.mdx
+34
@@ -165,6 +165,40 @@ When executing a tool, the connected account is selected in this order:
165
166 If a user has multiple connected accounts for a toolkit, the most recently connected one is used.
167
168 +## Disabling workbench
169 +
170 +By default, sessions include the [workbench](/docs/workbench) — a persistent sandbox that provides `COMPOSIO_REMOTE_WORKBENCH` and `COMPOSIO_REMOTE_BASH_TOOL`. If your use case doesn't need code execution, you can disable it:
171 +
172 +<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
173 +<Tab value="Python">
174 +```python
175 +session = composio.create(
176 + user_id="user_123",
177 + workbench={
178 + "enable": False
179 + }
180 +)
181 +```
182 +</Tab>
183 +<Tab value="TypeScript">
184 +```typescript
185 +import { Composio } from '@composio/core';
186 +const composio = new Composio({ apiKey: 'your_api_key' });
187 +// ---cut---
188 +const session = await composio.create("user_123", {
189 + workbench: {
190 + enable: false,
191 + },
192 +});
193 +```
194 +</Tab>
195 +</Tabs>
196 +
197 +When disabled:
198 +- `COMPOSIO_REMOTE_WORKBENCH` and `COMPOSIO_REMOTE_BASH_TOOL` are excluded from the session
199 +- Workbench-related system prompt lines are stripped
200 +- Direct workbench calls are rejected with a 400 error
201 +
202 ## Session methods
203
204 ### mcp
python/docs/tool-router.md
+18
@@ -238,16 +238,33 @@ session = composio.tool_router.create(
238 Configure workbench behavior:
239
240 ```python
241 +# Disable workbench entirely — no code execution tools in the session
242 session = composio.tool_router.create(
243 user_id='user_123',
244 toolkits=['gmail'],
245 workbench={
246 + 'enable': False
247 + }
248 +)
249 +
250 +# Fine-tune workbench settings
251 +session = composio.tool_router.create(
252 + user_id='user_123',
253 + toolkits=['gmail'],
254 + workbench={
255 + 'enable': True, # default
256 'enable_proxy_execution': False, # Whether to allow proxy execute calls in workbench
257 'auto_offload_threshold': 300 # Maximum execution payload size to offload to workbench
258 }
259 )
260 ```
261
262 +| Field | Type | Default | Description |
263 +|-------|------|---------|-------------|
264 +| `enable` | `bool` | `True` | Enables/disables the workbench entirely. When `False`, `COMPOSIO_REMOTE_WORKBENCH` and `COMPOSIO_REMOTE_BASH_TOOL` are excluded from the session. |
265 +| `enable_proxy_execution` | `bool` | `True` | Controls proxy API execution in the workbench. |
266 +| `auto_offload_threshold` | `int` | auto | Character threshold for auto-offloading large responses to the workbench. |
267 +
268 ## Session Properties and Methods
269
270 A Tool Router session provides the following properties and methods:
@@ -754,6 +771,7 @@ manage_connections: Union[
771
772 # Workbench configuration
773 ToolRouterWorkbenchConfig = TypedDict('ToolRouterWorkbenchConfig', {
774 + 'enable': bool, # Enable/disable workbench entirely (default: True)
775 'enable_proxy_execution': bool, # Whether to allow proxy execute calls
776 'auto_offload_threshold': int # Maximum execution payload size to offload to workbench
777 })
ts/docs/api/tool-router.md
+17
@@ -233,15 +233,31 @@ const session = await composio.create('user_123', {
233 Configure workbench behavior for tool execution:
234
235 ```typescript
236 +// Disable workbench entirely — no code execution tools in the session
237 const session = await composio.create('user_123', {
238 toolkits: ['gmail'],
239 workbench: {
240 + enable: false
241 + }
242 +});
243 +
244 +// Fine-tune workbench settings
245 +const session2 = await composio.create('user_123', {
246 + toolkits: ['gmail'],
247 + workbench: {
248 + enable: true, // default
249 enableProxyExecution: true,
250 autoOffloadThreshold: 400000, // Automatically offload to workbench if response > 400k characters
251 },
252 });
253 ```
254
255 +| Field | Type | Default | Description |
256 +|-------|------|---------|-------------|
257 +| `enable` | `boolean` | `true` | Enables/disables the workbench entirely. When `false`, `COMPOSIO_REMOTE_WORKBENCH` and `COMPOSIO_REMOTE_BASH_TOOL` are excluded from the session. |
258 +| `enableProxyExecution` | `boolean` | `true` | Controls proxy API execution in the workbench. |
259 +| `autoOffloadThreshold` | `number` | auto | Character threshold for auto-offloading large responses to the workbench. |
260 +
261 ### `experimental`
262
263 Configure experimental features for the session. These features are not stable and may be modified or removed in future versions.
@@ -929,6 +945,7 @@ interface ToolRouterCreateSessionConfig {
945 waitForConnections?: boolean; // NEW in v0.4.0: Wait for connections to complete
946 };
947 workbench?: {
948 + enable?: boolean; // Enable/disable workbench entirely (default: true)
949 enableProxyExecution?: boolean;
950 autoOffloadThreshold?: number;
951 };