@devries-cameron20 / composio Mirror · read-only / commits / 5140c7714
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, 09:45 UTC

docs: update Python SDK reference from source (#4836)

## Summary Auto-generated Python SDK reference docs from `python/composio/`. Regenerates pages at `docs/content/reference/sdk-reference/python/` to reflect changes in the Python package's public API (new methods, updated signatures, changed types). Co-authored-by: jkomyno <12381818+jkomyno@users.noreply.github.com>

sdkrelease[bot] committed Oct 15, 2026 at 14:03 UTC 5140c77146a8aa24bbe6178330eb8407134b9f68
4 files changed +43 -6
docs/content/reference/sdk-reference/python/mcp.mdx
+1 -1
@@ -251,4 +251,4 @@ def generate(user_id: str, mcp_config_id: str, manually_manage_connections: bool
251
252 ---
253
254 -[View source](https://github.com/composiohq/composio/blob/next/python/composio/core/models/mcp.py#L104)
254 +[View source](https://github.com/composiohq/composio/blob/next/python/composio/core/models/mcp.py#L122)
docs/content/reference/sdk-reference/python/session.mdx
+40 -3
@@ -130,6 +130,42 @@ def execute(tool_slug: str, arguments: Dict[str, Any | None] = ..., account: str
130
131 ---
132
133 +### execute_meta()
134 +
135 +Execute a Composio meta tool (`COMPOSIO_*`) within the session. `execute` also runs meta tools. This method only accepts meta tool slugs, so a typo is a type error instead of a failed request. The call is sent to the Composio backend as is: custom tools named in a `COMPOSIO_MULTI_EXECUTE_TOOL` call are not run in-process here.
136 +
137 +```python
138 +def execute_meta(slug: ToolRouterSessionMetaToolSlug, arguments: Dict[str, Any | None] = ...) -> ToolRouterSessionExecuteResponse
139 +```
140 +
141 +**Parameters**
142 +
143 +| Name | Type |
144 +|------|------|
145 +| `slug` | `ToolRouterSessionMetaToolSlug` |
146 +| `arguments?` | `Dict[str, Any \| None]` |
147 +
148 +**Returns**
149 +
150 +`ToolRouterSessionExecuteResponse` — The tool execution result, in the same shape as `execute`.
151 +
152 +**Raises**
153 +
154 +- `ToolInputRequiredError` — If the tool needs input from the user (for example an approval) before it can run. Nothing was executed.
155 +- `ValidationError` — If the API response carries no `result_type`, or one this SDK does not know.
156 +
157 +**Example**
158 +
159 +```python
160 +result = session.execute_meta(
161 + "COMPOSIO_SEARCH_TOOLS",
162 + arguments={"queries": [{"use_case": "send an email"}]},
163 +)
164 +print(result.result_type, result.data)
165 +```
166 +
167 +---
168 +
169 ### custom_tools()
170
171 List all custom tools registered in this session. Returns tools with their final slugs, schemas, and resolved toolkit.
@@ -194,10 +230,10 @@ def proxy_execute(toolkit: str, endpoint: str, method: Literal['GET', 'POST', 'P
230
231 ### update()
232
197 -Partially update the session configuration. Only the fields provided are changed; omitted fields are preserved. For each policy block `None` removes the stored override (which can increase access: `toolkits=None` restores the unrestricted default, while `toolkits={"enable": []}` denies every app toolkit and is sent as-is). Supplied `tools`, `auth_configs` and `connected_accounts` maps replace the stored map entirely. Inside `manage_connections`, `callback_url=None` removes only the stored callback URL. Experimental `instant` accepts `False` to disable billed access or an object to set its filters; it does not accept `None`. Any object, even one that only sets `return_instant_charge`, re-enables Instant usage on a Session set to `False`. By default the request carries no precondition: the last writer wins. Pass `expected_config_version` (for example this object's `config_version`) to make the update conditional: the API then applies it only when the stored version still matches, and a concurrent change raises `SessionConfigConflictError` (HTTP 409) instead of being overwritten. The API must support the `expected_config_version` field; otherwise it rejects the request with a 400. `expected_config_version=False` is the same as omitting it. The PATCH is never retried by the transport, so a 409 is reported exactly once. On conflict this object stays unchanged: re-fetch the session with `composio.sessions.use(session_id)` and retry against the fresh `config_version`. `config`, `config_version` and `preload` are refreshed in place only after a successful response, and the updated `config` is returned. `workbench` is a backwards-compatible alias for `sandbox`. Prefer `sandbox` in new code. All other parameters use the same types as the generated `client.tool_router.session.patch()` method.
233 +Partially update the session configuration. Only the fields provided are changed; omitted fields are preserved. For each policy block `None` removes the stored override (which can increase access: `toolkits=None` restores the unrestricted default, while `toolkits={"enable": []}` denies every app toolkit and is sent as-is). Supplied `tools`, `auth_configs` and `connected_accounts` maps replace the stored map entirely. Inside `manage_connections`, `callback_url=None` removes only the stored callback URL. Experimental `instant` accepts `False` to disable billed access or an object to set its filters; it does not accept `None`. Any object, even one that only sets `return_instant_charge` or `return_prices_in_search`, re-enables Instant usage on a Session set to `False`. `proxy_execute` takes a bool or `{"enable": bool}`; `True` exposes the `COMPOSIO_PROXY_EXECUTE` meta tool, `False` also turns off the sandbox `proxy_execute()` helper, and `None` removes the stored block. By default the request carries no precondition: the last writer wins. Pass `expected_config_version` (for example this object's `config_version`) to make the update conditional: the API then applies it only when the stored version still matches, and a concurrent change raises `SessionConfigConflictError` (HTTP 409) instead of being overwritten. The API must support the `expected_config_version` field; otherwise it rejects the request with a 400. `expected_config_version=False` is the same as omitting it. The PATCH is never retried by the transport, so a 409 is reported exactly once. On conflict this object stays unchanged: re-fetch the session with `composio.sessions.use(session_id)` and retry against the fresh `config_version`. `config`, `config_version` and `preload` are refreshed in place only after a successful response, and the updated `config` is returned. `workbench` is a backwards-compatible alias for `sandbox`. Prefer `sandbox` in new code. All other parameters use the same types as the generated `client.tool_router.session.patch()` method.
234
235 ```python
200 -def update(toolkits: Union[session_patch_params.Toolkits | None, 'Omit'] = ..., instant: Union[Literal[False], ToolRouterInstantConfig, 'Omit'] = ..., tools: Union[Dict[str, session_patch_params.Tools | None], 'Omit'] = ..., tags: Union[session_patch_params.Tags | None, 'Omit'] = ..., auth_configs: Union[Dict[str, str | None], 'Omit'] = ..., connected_accounts: Union[Dict[str, SequenceNotStr[str | None]], 'Omit'] = ..., manage_connections: Union[session_patch_params.ManageConnections | None, ToolRouterUpdateManageConnectionsConfig | None, 'Omit'] = ..., sandbox: Union[session_patch_params.Workbench | None, 'Omit'] = ..., workbench: Union[session_patch_params.Workbench | None, 'Omit'] = ..., multi_account: Union[session_patch_params.MultiAccount | None, ToolRouterUpdateMultiAccountConfig | None, 'Omit'] = ..., preload: Union[session_patch_params.Preload | None, 'Omit'] = ..., search: Union[session_patch_params.Search | None, 'Omit'] = ..., execute: Union[session_patch_params.Execute | None, 'Omit'] = ..., experimental: Union[session_patch_params.Experimental | None, ToolRouterUpdateExperimentalConfig | None, 'Omit'] = ..., expected_config_version: Union[int, None, Literal[False]] = ...) -> ToolRouterSessionConfig
236 +def update(toolkits: Union[session_patch_params.Toolkits | None, 'Omit'] = ..., instant: Union[Literal[False], ToolRouterInstantConfig, 'Omit'] = ..., tools: Union[Dict[str, session_patch_params.Tools | None], 'Omit'] = ..., tags: Union[session_patch_params.Tags | None, 'Omit'] = ..., auth_configs: Union[Dict[str, str | None], 'Omit'] = ..., connected_accounts: Union[Dict[str, SequenceNotStr[str | None]], 'Omit'] = ..., manage_connections: Union[session_patch_params.ManageConnections | None, ToolRouterUpdateManageConnectionsConfig | None, 'Omit'] = ..., sandbox: Union[session_patch_params.Workbench | None, 'Omit'] = ..., workbench: Union[session_patch_params.Workbench | None, 'Omit'] = ..., multi_account: Union[session_patch_params.MultiAccount | None, ToolRouterUpdateMultiAccountConfig | None, 'Omit'] = ..., proxy_execute: Union[Union[bool, ToolRouterProxyExecuteConfig | None], 'Omit'] = ..., preload: Union[session_patch_params.Preload | None, 'Omit'] = ..., search: Union[session_patch_params.Search | None, 'Omit'] = ..., execute: Union[session_patch_params.Execute | None, 'Omit'] = ..., experimental: Union[session_patch_params.Experimental | None, ToolRouterUpdateExperimentalConfig | None, 'Omit'] = ..., expected_config_version: Union[int, None, Literal[False]] = ...) -> ToolRouterSessionConfig
237 ```
238
239 **Parameters**
@@ -214,6 +250,7 @@ def update(toolkits: Union[session_patch_params.Toolkits | None, 'Omit'] = ...,
250 | `sandbox?` | `Union[session_patch_params.Workbench \| None, 'Omit']` |
251 | `workbench?` | `Union[session_patch_params.Workbench \| None, 'Omit']` |
252 | `multi_account?` | `Union[session_patch_params.MultiAccount \| None, ToolRouterUpdateMultiAccountConfig \| None, 'Omit']` |
253 +| `proxy_execute?` | `Union[Union[bool, ToolRouterProxyExecuteConfig \| None], 'Omit']` |
254 | `preload?` | `Union[session_patch_params.Preload \| None, 'Omit']` |
255 | `search?` | `Union[session_patch_params.Search \| None, 'Omit']` |
256 | `execute?` | `Union[session_patch_params.Execute \| None, 'Omit']` |
@@ -268,4 +305,4 @@ def delete() -> ToolRouterSessionDeleteResponse
305
306 ---
307
271 -[View source](https://github.com/composiohq/composio/blob/next/python/composio/core/models/tool_router_session.py#L210)
308 +[View source](https://github.com/composiohq/composio/blob/next/python/composio/core/models/tool_router_session.py#L242)
docs/content/reference/sdk-reference/python/tools.mdx
+1 -1
@@ -183,4 +183,4 @@ def proxy(endpoint: str, method: Literal['GET', 'POST', 'PUT', 'DELETE', 'PATCH'
183
184 ---
185
186 -[View source](https://github.com/composiohq/composio/blob/next/python/composio/core/models/tools.py#L213)
186 +[View source](https://github.com/composiohq/composio/blob/next/python/composio/core/models/tools.py#L249)
docs/content/reference/sdk-reference/python/triggers.mdx
+1 -1
@@ -247,4 +247,4 @@ async def webhook(request: Request):
247
248 ---
249
250 -[View source](https://github.com/composiohq/composio/blob/next/python/composio/core/models/triggers.py#L1129)
250 +[View source](https://github.com/composiohq/composio/blob/next/python/composio/core/models/triggers.py#L1147)