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, 03:37 UTC
| 1 | --- |
| 2 | title: "Python SDK 0.14.0 removes the legacy custom-tool registry" |
| 3 | description: "Python SDK 0.14.0 removes the legacy in-memory custom-tool registry. Tool Router custom tools remain the supported path." |
| 4 | date: "2026-06-16" |
| 5 | --- |
| 6 | |
| 7 | Python SDK `composio` `0.14.0` removes the legacy `composio.tools.custom_tool` registry. It was an older, separate custom-tool path that duplicated the Tool Router model and made it unclear which execution surface a tool belonged to. |
| 8 | |
| 9 | ### SDK versions |
| 10 | |
| 11 | | SDK | Version | |
| 12 | | --- | --- | |
| 13 | | Python `composio` | `0.14.0` | |
| 14 | |
| 15 | ### Breaking change |
| 16 | |
| 17 | <Callout type="warn"> |
| 18 | **Breaking change** |
| 19 | |
| 20 | `composio.tools.custom_tool`, `core.models.custom_tools`, and their legacy execution wiring were removed. Use `composio.experimental.tool()` and `composio.experimental.Toolkit` with a Tool Router session instead. |
| 21 | </Callout> |
| 22 | |
| 23 | The current custom-tool APIs support inline execution and Tool Router preload, attach, and reuse flows. They are the only custom-tool path supported by the SDK. |
| 24 | |
| 25 | ### Migration |
| 26 | |
| 27 | 1. Replace `@composio.tools.custom_tool` with `@composio.experimental.tool`. |
| 28 | 2. Change the tool signature from a request object plus execution callback to `input, ctx`. |
| 29 | 3. Attach the tool when creating the session through `experimental.custom_tools`. |
| 30 | |
| 31 | Before: |
| 32 | |
| 33 | ```python |
| 34 | from composio import Composio |
| 35 | |
| 36 | composio = Composio() |
| 37 | |
| 38 | |
| 39 | @composio.tools.custom_tool |
| 40 | def add_two_numbers(request: AddTwoNumbersInput) -> int: |
| 41 | return request.a + request.b |
| 42 | ``` |
| 43 | |
| 44 | After: |
| 45 | |
| 46 | ```python |
| 47 | from composio import Composio |
| 48 | |
| 49 | composio = Composio() |
| 50 | |
| 51 | |
| 52 | @composio.experimental.tool |
| 53 | def add_two_numbers(input: AddTwoNumbersInput, ctx): |
| 54 | return {"result": input.a + input.b} |
| 55 | |
| 56 | |
| 57 | session = composio.create( |
| 58 | user_id="user_123", |
| 59 | experimental={"custom_tools": [add_two_numbers]}, |
| 60 | ) |
| 61 | ``` |
| 62 | |
| 63 | For a tool that calls a toolkit API, set `extends_toolkit` on the decorator and use `ctx.proxy_execute(...)` from the function body. |