docs: add .use() with custom tools, update connectedAccounts to array#3357
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @abir-taheer's task in 1m 48s —— View job Doc Review
Looks good ✅ Verified the technical claims against the SDK source:
Other observations:
A developer copy-pasting any of these would land on working v3.1 code. |
|
Claude finished @abir-taheer's task in 1m 43s —— View job Doc Review
Verified the docs against the source:
One stale qualifier missedFile: The PR description says "Removed TypeScript-only qualifier for custom tools (Python now supported)", and that qualifier is correctly stripped from A user-defined tool used alongside Composio's built-in tools. For sessions, use local experimental custom tools and custom toolkits (TypeScript only) via [Custom tools and toolkits](/docs/toolkits/custom-tools-and-toolkits). For direct execution, see [Creating custom tools](/docs/tools-direct/custom-tools).Suggested fix — drop A user-defined tool used alongside Composio's built-in tools. For sessions, use local experimental custom tools and custom toolkits via [Custom tools and toolkits](/docs/toolkits/custom-tools-and-toolkits). For direct execution, see [Creating custom tools](/docs/tools-direct/custom-tools).Otherwise looks good — a developer copying the new |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates documentation to reflect the v3.1 SDK behavior around session configuration and connected accounts, and adds guidance for attaching custom tools to an existing session via .use().
Changes:
- Added a new “Attaching custom tools to an existing session” section with TypeScript + Python examples.
- Updated all
connectedAccounts/connected_accountsexamples fromstringtostring[]to match v3.1 SDK types. - Clarified session configuration immutability and the multi-account restriction when multi-account mode is disabled.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/content/docs/users-and-sessions.mdx | Clarifies session config immutability and documents the .use() custom tools exception. |
| docs/content/docs/toolkits/custom-tools-and-toolkits.mdx | Adds .use() rehydration + custom tools attachment examples (TS/Python). |
| docs/content/docs/sessions-vs-direct-execution.mdx | Updates connected accounts examples to array format in both TS and Python. |
| docs/content/docs/migration-guide/direct-to-sessions.mdx | Updates migration examples to array format for connected accounts. |
| docs/content/docs/managing-multiple-connected-accounts.mdx | Updates connected accounts pinning examples to array format. |
| docs/content/docs/configuring-sessions.mdx | Removes TS-only wording for custom tools and updates connected accounts examples + adds restriction note. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Claude finished @abir-taheer's task in 1m 48s —— View job Doc Review
Verified the technical claims against the SDK source on
One stale qualifier still missingFile: The PR description and A user-defined tool used alongside Composio's built-in tools. For sessions, use local experimental custom tools and custom toolkits (TypeScript only) via [Custom tools and toolkits](/docs/toolkits/custom-tools-and-toolkits). For direct execution, see [Creating custom tools](/docs/tools-direct/custom-tools).Suggested fix — drop A user-defined tool used alongside Composio's built-in tools. For sessions, use local experimental custom tools and custom toolkits via [Custom tools and toolkits](/docs/toolkits/custom-tools-and-toolkits). For direct execution, see [Creating custom tools](/docs/tools-direct/custom-tools).Re: the Copilot review commentsFor context (these are not blocking — just noting why I'm not echoing them):
Other than the glossary line, looks good — a developer following these examples on v3.1 will get working code. |
- Added "Attaching custom tools to an existing session" section to custom-tools-and-toolkits.mdx showing composio.use() with customs - Updated all connectedAccounts examples to array format (string[]) matching the v3.1 SDK types - Updated configuring-sessions to note multi-account restriction - Updated users-and-sessions: custom tools can be attached to existing sessions via .use() - Removed TypeScript-only qualifier for custom tools Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ee1bc98 to
0172eed
Compare
|
Claude finished @abir-taheer's task in 1m 30s —— View job Doc Review
Verified the technical claims against the SDK source on
The One stale qualifier still missingFile: The PR description and A user-defined tool used alongside Composio's built-in tools. For sessions, use local experimental custom tools and custom toolkits (TypeScript only) via [Custom tools and toolkits](/docs/toolkits/custom-tools-and-toolkits). For direct execution, see [Creating custom tools](/docs/tools-direct/custom-tools).Suggested fix — drop A user-defined tool used alongside Composio's built-in tools. For sessions, use local experimental custom tools and custom toolkits via [Custom tools and toolkits](/docs/toolkits/custom-tools-and-toolkits). For direct execution, see [Creating custom tools](/docs/tools-direct/custom-tools).Re: the Copilot review commentsNot blocking — just noting why I'm not echoing them:
Other than the glossary line, looks good — a developer following these examples on v3.1 will get working code. |
Python now supports custom tools and custom toolkits in sessions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @abir-taheer's task in 1m 40s —— View job Doc Review
Looks good ✅ Verified the technical claims against the SDK source on
Across the diff:
Re: the Copilot review commentsNot blocking — just noting why I'm not echoing them:
A developer copy-pasting any of these examples on v3.1 will land on working code. |
dhawal1
left a comment
There was a problem hiding this comment.
should we update examples for vercel sdk etc or anywhere else in docs?
|
|
||
| ## Attaching custom tools to an existing session | ||
|
|
||
| Use `composio.use()` to rehydrate an existing session and attach custom tools to it. This is useful when you have a session ID from a previous `create()` call and want to bind custom tools in a different process or request. |
There was a problem hiding this comment.
i guess main usecase is for multi-turn chat apps like vercel ai sdk? Like let's not focus so much on custom tools it doesn't have high usage
Primary use case is multi-turn chat apps reusing a session across requests. Custom tools are a secondary option when rehydrating. - Added "Reusing a session" section to users-and-sessions.mdx - Trimmed custom-tools page to a brief mention with link back - Updated "When should I create a new session?" accordion Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude encountered an error —— View job Doc Review
• [Branch: abir/docs-v31-customs-use-attach](https://github.com/ComposioHQ/composio/tree/abir/docs-v31-customs-use-attach)
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
|
Claude finished @abir-taheer's task in 2m 42s —— View job Doc Review
Looks good ✅ Re-verified the technical claims against the SDK source on
Across the diff:
Re: the Copilot review commentsNot blocking — just noting why I'm not echoing them:
Re: @dhawal1's comment about updating other docsI checked — no other docs use the A developer copy-pasting any of these examples on v3.1 will land on working code. |
Previously create() would return the same session ID for identical configs. Now it always returns a new one for better isolation and observability. Updated guidance to use composio.use() for multi-turn. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @abir-taheer's task in 1m 20s —— View job Doc Review
Looks good ✅ Re-verified the technical claims against the SDK source on
Across the diff:
Re: the Copilot review commentsNot blocking — just noting why I'm not echoing them:
Re: @dhawal1's comment about updating other docsI checked — no other docs use the A developer copy-pasting any of these examples on v3.1 will land on working code. |
…viders Shows the pattern of creating a session once, storing the ID, and reusing it across requests with composio.use(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @abir-taheer's task in 2m 52s —— View job Doc Review
Latest push (
One real issue in the new provider snippetsThe new
# Current
composio = Composio()// Current
const composio = new Composio({ apiKey: 'your_api_key' });Should match the existing example earlier on the page: from composio_anthropic import AnthropicProvider
composio = Composio(provider=AnthropicProvider())import { AnthropicProvider } from '@composio/anthropic';
const composio = new Composio({ provider: new AnthropicProvider() });
The Vercel page ( Other observations (not blocking)
Re: the Copilot review commentsNot blocking — same reasoning as before:
Re: @dhawal1's question about updating other docsThe new provider examples ( |
dhawal1
left a comment
There was a problem hiding this comment.
do we need to update these
https://docs.composio.dev/docs/quickstart - eg vercel ai sdk
https://docs.composio.dev/cookbooks/chat-app
lets do a scan across docs for what all to update?
| </Tab> | ||
| </Tabs> | ||
|
|
||
| This returns the same session with the same toolkits, auth configs, and connected accounts. The session's configuration is fixed at creation — to change toolkits or auth, create a new session. |
There was a problem hiding this comment.
i guess this will change with session.update docs?
) ## Summary Follow-up to #3357 per Dhawal's review comments. - **Chat-app cookbook**: Updated `route.ts` to create session once and reuse via `composio.use(sessionId)` across requests — the correct pattern for multi-turn chat apps - Updated cookbook description to explain the create-once/reuse pattern ### What was checked but didn't need changes - **Quickstart**: Single-turn examples, `.use()` doesn't apply - **Provider docs** (OpenAI, Vercel, Anthropic, etc.): Already updated with multi-turn sections in #3357 - **Other cookbook examples** (gmail-labeler, pr-review-agent, etc.): Single-shot scripts, not multi-turn ## Test plan - [ ] Verify docs build passes - [ ] Check chat-app example renders correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Summary
composio.use()with TS + Python examplesconnectedAccountsexamples from string to array format (string[]) matching the v3.1 SDK types shipped in feat(core): add custom tools support to session.use() via v3.1 attach #3350.use()Files changed
docs/content/docs/toolkits/custom-tools-and-toolkits.mdxdocs/content/docs/configuring-sessions.mdxdocs/content/docs/users-and-sessions.mdxdocs/content/docs/managing-multiple-connected-accounts.mdxdocs/content/docs/sessions-vs-direct-execution.mdxdocs/content/docs/migration-guide/direct-to-sessions.mdxTest plan
🤖 Generated with Claude Code