@devries-cameron20 / composio Mirror · read-only
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, 07:15 UTC

next
mdx 125 lines 3.61 KB
Raw
1 ---
2 title: "Experimental Assistive Prompts and API Updates"
3 description: "Tool Router sessions now support timezone-aware assistive prompts configuration"
4 date: "2026-01-22"
5 ---
6
7 ## Version Information
8
9 ### TypeScript/JavaScript
10 - Package: `@composio/core`
11 - Version: `0.5.5`+
12
13 ### Python
14 - Package: `composio`
15 - Version: `0.10.10`+
16
17 ## New Features
18
19 ### Experimental Assistive Prompt Configuration
20
21 Tool Router sessions now support experimental configuration for timezone-aware assistive prompts. When you provide a user's timezone, the session returns a contextual assistive prompt that includes timezone-specific guidance.
22
23 <Callout type="warn">
24 This is an experimental feature. The API may change or be removed in future versions.
25 </Callout>
26
27 <Tabs groupId="language" items={['Python', 'TypeScript']}>
28 <Tab value="Python">
29 ```python
30 from composio import Composio
31
32 composio = Composio()
33
34 session = composio.tool_router.create(
35 user_id="user_123",
36 toolkits=["github"],
37 experimental={
38 "assistive_prompt": {
39 "user_timezone": "America/New_York",
40 }
41 },
42 )
43
44 # Access the generated assistive prompt
45 if session.experimental:
46 print(session.experimental.assistive_prompt)
47 ```
48 </Tab>
49 <Tab value="TypeScript">
50 ```typescript
51 // @noErrors
52 import { Composio } from "@composio/core";
53
54 const composio = new Composio();
55
56 const session = await composio.toolRouter.create("user_123", {
57 toolkits: ["github"],
58 experimental: {
59 assistivePrompt: {
60 userTimezone: "America/New_York",
61 },
62 },
63 });
64
65 // Access the generated assistive prompt
66 if (session.experimental) {
67 console.log(session.experimental.assistivePrompt);
68 }
69 ```
70 </Tab>
71 </Tabs>
72
73 <Callout type="info">
74 The `experimental` field is only available on sessions created with `create()`. Sessions retrieved with `use()` do not include the experimental data.
75 </Callout>
76
77 ### Toolkit Endpoint Method
78
79 The toolkit retrieve response now includes `getCurrentUserEndpointMethod` (TypeScript) / `get_current_user_endpoint_method` (Python) to indicate the HTTP method for the current user endpoint.
80
81 ## Breaking Changes
82
83 ### Trigger Pagination: `page` Replaced with `cursor`
84
85 The `page` parameter in `listActive` / `list_active` for trigger instances has been replaced with `cursor` for cursor-based pagination. There was a bug in earlier APIs which caused `page` param to be ignored, going ahead for pagination please use `cursor` instead.
86
87 <Tabs groupId="language" items={['Python', 'TypeScript']}>
88 <Tab value="Python">
89 ```python
90 # Before (deprecated)
91 triggers = composio.triggers.list_active(page=1, limit=10)
92
93 # After
94 triggers = composio.triggers.list_active(cursor="cursor_string", limit=10)
95 # Use response.next_cursor for the next page
96 ```
97 </Tab>
98 <Tab value="TypeScript">
99 ```typescript
100 // @noErrors
101 // Before (deprecated)
102 const triggers = await composio.triggers.listActive({ page: 1, limit: 10 });
103
104 // After
105 const triggers2 = await composio.triggers.listActive({ cursor: "cursor_string", limit: 10 });
106 // Use response.nextCursor for the next page
107 ```
108 </Tab>
109 </Tabs>
110
111 ## Impact Summary
112
113 | Change | Runtime Breaking | TypeScript Breaking | Migration Required |
114 |--------|------------------|---------------------|-------------------|
115 | Experimental assistive prompts | No | No | No |
116 | `getCurrentUserEndpointMethod` field | No | No | No |
117 | `page` → `cursor` in triggers | Yes | Yes | Yes (if using `page`) |
118
119 ## Migration Guide
120
121 If you are using the `page` parameter in `listActive` / `list_active`:
122
123 1. Replace `page` with `cursor`
124 2. For the first request, omit the `cursor` parameter or pass `undefined`/`None`
125 3. Use the `nextCursor` / `next_cursor` from the response for subsequent requests