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: add workbench.enable documentation
Abir Taheer63630d91fe5e
diff --git a/docs/content/docs/configuring-sessions.mdx b/docs/content/docs/configuring-sessions.mdxindex 13ac95d9a..04b7c29ad 100644--- a/docs/content/docs/configuring-sessions.mdx+++ b/docs/content/docs/configuring-sessions.mdx@@ -165,6 +165,40 @@ When executing a tool, the connected account is selected in this order:If a user has multiple connected accounts for a toolkit, the most recently connected one is used.+## Disabling workbench++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:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+<Tab value="Python">+```python+session = composio.create(+ user_id="user_123",+ workbench={+ "enable": False+ }+)+```+</Tab>+<Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';+const composio = new Composio({ apiKey: 'your_api_key' });+// ---cut---+const session = await composio.create("user_123", {+ workbench: {+ enable: false,+ },+});+```+</Tab>+</Tabs>++When disabled:+- `COMPOSIO_REMOTE_WORKBENCH` and `COMPOSIO_REMOTE_BASH_TOOL` are excluded from the session+- Workbench-related system prompt lines are stripped+- Direct workbench calls are rejected with a 400 error+## Session methods### mcpdiff --git a/python/docs/tool-router.md b/python/docs/tool-router.mdindex f1ef8abc0..ec339f037 100644--- a/python/docs/tool-router.md+++ b/python/docs/tool-router.md@@ -238,16 +238,33 @@ session = composio.tool_router.create(Configure workbench behavior:```python+# Disable workbench entirely — no code execution tools in the sessionsession = composio.tool_router.create(user_id='user_123',toolkits=['gmail'],workbench={+ 'enable': False+ }+)++# Fine-tune workbench settings+session = composio.tool_router.create(+ user_id='user_123',+ toolkits=['gmail'],+ workbench={+ 'enable': True, # default'enable_proxy_execution': False, # Whether to allow proxy execute calls in workbench'auto_offload_threshold': 300 # Maximum execution payload size to offload to workbench})```+| Field | Type | Default | Description |+|-------|------|---------|-------------|+| `enable` | `bool` | `True` | Enables/disables the workbench entirely. When `False`, `COMPOSIO_REMOTE_WORKBENCH` and `COMPOSIO_REMOTE_BASH_TOOL` are excluded from the session. |+| `enable_proxy_execution` | `bool` | `True` | Controls proxy API execution in the workbench. |+| `auto_offload_threshold` | `int` | auto | Character threshold for auto-offloading large responses to the workbench. |+## Session Properties and MethodsA Tool Router session provides the following properties and methods:@@ -754,6 +771,7 @@ manage_connections: Union[# Workbench configurationToolRouterWorkbenchConfig = TypedDict('ToolRouterWorkbenchConfig', {+ 'enable': bool, # Enable/disable workbench entirely (default: True)'enable_proxy_execution': bool, # Whether to allow proxy execute calls'auto_offload_threshold': int # Maximum execution payload size to offload to workbench})diff --git a/ts/docs/api/tool-router.md b/ts/docs/api/tool-router.mdindex ca15f96ca..cb04aaf21 100644--- a/ts/docs/api/tool-router.md+++ b/ts/docs/api/tool-router.md@@ -233,15 +233,31 @@ const session = await composio.create('user_123', {Configure workbench behavior for tool execution:```typescript+// Disable workbench entirely — no code execution tools in the sessionconst session = await composio.create('user_123', {toolkits: ['gmail'],workbench: {+ enable: false+ }+});++// Fine-tune workbench settings+const session2 = await composio.create('user_123', {+ toolkits: ['gmail'],+ workbench: {+ enable: true, // defaultenableProxyExecution: true,autoOffloadThreshold: 400000, // Automatically offload to workbench if response > 400k characters},});```+| Field | Type | Default | Description |+|-------|------|---------|-------------|+| `enable` | `boolean` | `true` | Enables/disables the workbench entirely. When `false`, `COMPOSIO_REMOTE_WORKBENCH` and `COMPOSIO_REMOTE_BASH_TOOL` are excluded from the session. |+| `enableProxyExecution` | `boolean` | `true` | Controls proxy API execution in the workbench. |+| `autoOffloadThreshold` | `number` | auto | Character threshold for auto-offloading large responses to the workbench. |+### `experimental`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 {waitForConnections?: boolean; // NEW in v0.4.0: Wait for connections to complete};workbench?: {+ enable?: boolean; // Enable/disable workbench entirely (default: true)enableProxyExecution?: boolean;autoOffloadThreshold?: number;};