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, 12:15 UTC
docs: update Python SDK reference from source (#4500)
## 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
Sep 18, 2026 at 18:29 UTC
00d252dd4907de50fc929f2d9a0c65792a1222a4
3 files changed
+12
-7
docs/content/reference/sdk-reference/python/session.mdx
+8
-3
@@ -8,6 +8,7 @@ description: "A Composio session \u2014 the object returned by `composio.create(
8
| Name | Type |
9
|------|------|
10
| `session_id` | `str` |
11
+| `config` | `ToolRouterSessionConfig` |
12
| `experimental` | `'ToolRouterSessionExperimental'` |
13
| `preload` | `Any` |
14
@@ -183,10 +184,10 @@ def proxy_execute(toolkit: str, endpoint: str, method: Literal['GET', 'POST', 'P
184
185
### update()
186
186
-Partially update the session configuration. Only the fields provided will be changed; omitted fields are preserved. Mutates this session's `preload` in-place. Pass `None` for `manage_connections`, `sandbox`/`workbench`, or `multi_account` to clear the stored value. `workbench` is a backwards-compatible alias for `sandbox`. Prefer `sandbox` in new code. All parameters use the same types as the Stainless-generated `client.tool_router.session.patch()` method.
187
+Partially update the session configuration. Only the fields provided will be changed; omitted fields are preserved. Mutates this session's `config` and `preload` in-place and returns the updated session configuration. Pass `None` for `manage_connections`, `sandbox`/`workbench`, or `multi_account` to clear the stored value. `workbench` is a backwards-compatible alias for `sandbox`. Prefer `sandbox` in new code. All parameters use the same types as the Stainless-generated `client.tool_router.session.patch()` method.
188
189
```python
189
-def update(toolkits: Union[session_patch_params.Toolkits, 'Omit'] = ..., tools: Union[Dict[str, session_patch_params.Tools], 'Omit'] = ..., tags: Union[session_patch_params.Tags, 'Omit'] = ..., auth_configs: Union[Dict[str, str], 'Omit'] = ..., connected_accounts: Union[Dict[str, SequenceNotStr[str | None]], 'Omit'] = ..., manage_connections: Union[session_patch_params.ManageConnections | 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, 'Omit'] = ..., preload: Union[session_patch_params.Preload, 'Omit'] = ...) -> None
190
+def update(toolkits: Union[session_patch_params.Toolkits, 'Omit'] = ..., tools: Union[Dict[str, session_patch_params.Tools], 'Omit'] = ..., tags: Union[session_patch_params.Tags, 'Omit'] = ..., auth_configs: Union[Dict[str, str], 'Omit'] = ..., connected_accounts: Union[Dict[str, SequenceNotStr[str | None]], 'Omit'] = ..., manage_connections: Union[session_patch_params.ManageConnections | 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, 'Omit'] = ..., preload: Union[session_patch_params.Preload, 'Omit'] = ...) -> ToolRouterSessionConfig
191
```
192
193
**Parameters**
@@ -204,6 +205,10 @@ def update(toolkits: Union[session_patch_params.Toolkits, 'Omit'] = ..., tools:
205
| `multi_account?` | `Union[session_patch_params.MultiAccount \| None, 'Omit']` |
206
| `preload?` | `Union[session_patch_params.Preload, 'Omit']` |
207
208
+**Returns**
209
+
210
+`ToolRouterSessionConfig`
211
+
212
---
213
214
### delete()
@@ -220,4 +225,4 @@ def delete() -> ToolRouterSessionDeleteResponse
225
226
---
227
223
-[View source](https://github.com/composiohq/composio/blob/next/python/composio/core/models/tool_router_session.py#L90)
228
+[View source](https://github.com/composiohq/composio/blob/next/python/composio/core/models/tool_router_session.py#L109)
docs/content/reference/sdk-reference/python/tools.mdx
+1
-1
@@ -7,7 +7,7 @@ description: "Tools class definition This class is used to manage tools in the
7
8
### get_raw_composio_tool_by_slug()
9
10
-Returns schema for the given tool slug. :raises ToolNotFoundError: when the backend reports the slug as unknown (404, or 400 for a malformed slug). Any other client error, such as an invalid API key, is re-raised unchanged.
10
+Returns schema for the given tool slug.
11
12
```python
13
def get_raw_composio_tool_by_slug(slug: str) -> Tool
docs/content/reference/sdk-reference/python/triggers.mdx
+3
-3
@@ -123,7 +123,7 @@ def create(slug: str, user_id: str | None = ..., connected_account_id: str | Non
123
Subscribe to a trigger and receive trigger events.
124
125
```python
126
-def subscribe(timeout: float = ..., on_subscription_error: Optional[Callable[[Dict[str, Any]], None]] = ...) -> TriggerSubscription
126
+def subscribe(timeout: float = ..., on_subscription_error: SubscriptionErrorCallback | None = ...) -> TriggerSubscription
127
```
128
129
**Parameters**
@@ -131,7 +131,7 @@ def subscribe(timeout: float = ..., on_subscription_error: Optional[Callable[[Di
131
| Name | Type |
132
|------|------|
133
| `timeout?` | `float` |
134
-| `on_subscription_error?` | `Optional[Callable[[Dict[str, Any]], None]]` — Optional callback invoked when the channel subscription fails: with the raw Pusher payload for asynchronous `pusher:subscription_error` events, or with `{"error": ...}` for failures raised while establishing the subscription (for example an auth rejection — pysher performs channel auth synchronously). Establish-time failures also make `subscribe()` raise the underlying error promptly instead of waiting out the timeout. Exceptions raised inside the callback are contained and logged, never rethrown. |
134
+| `on_subscription_error?` | `SubscriptionErrorCallback \| None` |
135
136
**Returns**
137
@@ -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#L1057)
250
+[View source](https://github.com/composiohq/composio/blob/next/python/composio/core/models/triggers.py#L1138)