@devries-cameron20 / composio Mirror · read-only / commits / f368b12fe
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

feat: add workbench.enable option to disable workbench in sessions (#3002)

## Summary Add the `enable` boolean field to the workbench session configuration in both TypeScript and Python SDKs, allowing users to disable the workbench entirely when creating a session. The server-side support for this field already exists — this PR exposes it through the SDKs. ## Changes - Added `enable` field to workbench Zod schema in TS SDK (`toolRouter.types.ts`) - Added `enable` to the `transformToolRouterWorkbenchParams` transform function (`toolRouterParams.ts`) - Added `enable` field to `ToolRouterWorkbenchConfig` TypedDict in Python SDK (`tool_router.py`) - Added `enable` to the Python payload construction logic - Updated docstrings and inline examples in both SDKs - Added tests for `enable: false` and `enable: true` with full config in both SDKs - Updated existing TS workbench tests to assert `enable: undefined` when omitted ## Type of change - [ ] Bug fix - [x] New feature - [ ] Refactor/Chore - [ ] Documentation - [ ] Breaking change ## How Has This Been Tested? - Ran the full Python test suite: `pytest tests/test_tool_router.py` — **70/70 passed** - New test cases: - `test_create_session_with_workbench_disabled` — verifies `{"enable": False}` is sent in the API payload - `test_create_session_with_workbench_enabled_and_configured` — verifies all three fields (`enable`, `enable_proxy_execution`, `auto_offload_threshold`) are sent correctly - TS: `should create a session with workbench entirely disabled` — verifies `{ enable: false }` transform - TS: `should create a session with workbench explicitly enabled` — verifies full config transform - Existing tests updated and still passing (backwards compat: `enable: undefined` when not set) - TS full test run blocked by pre-existing build environment issue (missing bun version on fresh clone), unrelated to these changes ## Screenshots (if applicable) N/A ## Checklist - [x] I have read the Code of Conduct and this PR adheres to it - [x] I ran linters/tests locally and they passed - [ ] I updated documentation as needed - [x] I added tests or explain why not applicable - [ ] I added a changeset if this change affects published packages ## Additional context - Defaults to `true` when omitted — fully backwards compatible, no migration needed - Documentation updates will follow in a separate PR once the SDK types are published (to avoid twoslash type-check failures in the docs build) - The server-side implementation filters out `COMPOSIO_REMOTE_WORKBENCH` and `COMPOSIO_REMOTE_BASH_TOOL`, strips workbench prompt lines, and rejects direct workbench calls with a 400 when `enable: false`

Abir Taheer committed Mar 24, 2026 at 14:19 UTC f368b12fe2c37d91eada7d4a9d6014989545c6ce

No changes.