Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
Restore original tool-router-beta migration guide content
Sushmithamallesh0f3f5c72c89e
diff --git a/docs/content/docs/index.mdx b/docs/content/docs/index.mdxindex 4a1a76792..c383adf80 100644--- a/docs/content/docs/index.mdx+++ b/docs/content/docs/index.mdx@@ -80,7 +80,7 @@ Composio works with any AI framework. Pick your preferred SDK:<ProviderCard name="LlamaIndex" href="/docs/providers/llamaindex" logo="/images/providers/llamaIndex-logo.svg" languages={["Python", "TypeScript"]} /><ProviderCard name="OpenAI Agents" href="/docs/providers/openai-agents" logo="/images/providers/openai-logo.svg" logoDark="/images/providers/openai-logo-dark.svg" languages={["Python"]} /><ProviderCard name="CrewAI" href="/docs/providers/crewai" logo="/images/providers/crewai-logo.svg" languages={["Python"]} />- <ProviderCard name="Mastra" href="/docs/providers/mastra" logo="/images/providers/mastra-logo.svg" languages={["TypeScript"]} />+ <ProviderCard name="Mastra" href="/docs/providers/mastra" logo="/images/providers/mastra-logo.svg" logoDark="/images/providers/mastra-logo-dark.svg" languages={["TypeScript"]} /><ProviderCard name="Build your own" href="/docs/providers/custom-providers" icon={<Blocks size={32} />} languages={["Python", "TypeScript"]} /></ProviderGrid>diff --git a/docs/content/docs/migration-guide/tool-router-beta.mdx b/docs/content/docs/migration-guide/tool-router-beta.mdxindex af5385705..0d08b3282 100644--- a/docs/content/docs/migration-guide/tool-router-beta.mdx+++ b/docs/content/docs/migration-guide/tool-router-beta.mdx@@ -1,39 +1,113 @@----title: Tool Router Beta to Stable Migration-description: Migrate from Tool Router Beta to the stable release+title: Beta to Stable Migration+description: Migrate from Tool Router beta to the stable version+keywords: [upgrade, migrate, experimental, beta]----This guide helps you migrate from the Tool Router Beta to the stable release.+The stable version includes improved session management, multiple configuring options, and enhanced authentication capabilities.-## Breaking changes+## The basics-### Session creation+<Steps>+<Step>+### Upgrade composio package-The `create` method now accepts a user ID directly instead of an options object:+Upgrade to the latest stable version:+<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+<Tab value="Python">+```bash+pip install --upgrade composio+```+</Tab>+<Tab value="TypeScript">+```bash+npm install @composio/core@latest+```+</Tab>+</Tabs>+</Step>++<Step>+### Update session creation++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+<Tab value="Python">+```python+# Beta (before)+session = composio.experimental.tool_router.create_session(+ user_id="[email protected]"+)++# Stable (after)+session = composio.create(+ user_id="[email protected]"+)+```+</Tab>+<Tab value="TypeScript">```typescript-// Before (Beta)-const session = await composio.create({ userId: 'user_123' });+// @noErrors+// Beta (before)+const session = await composio.experimental.toolRouter.createSession('user_123');-// After (Stable)+// Stable (after)const session = await composio.create('user_123');```+</Tab>+</Tabs>+</Step>-### Tool fetching+<Step>+### Moving users (optional)-Tools are now fetched from the session object:+If you have existing users on tool router and you don't want them to authenticate again:+- Tool Router will auto-detect auth configs and connected accounts it created (from the beta version).+- If you have custom auth configs (not created by Tool Router):+ - Search for the Auth config for that connected account. See [Connected Accounts](/docs/connected-accounts) to fetch existing accounts programmatically.+ - While creating a session configure to use this Auth config.+ - You need to repeat this for each toolkit you want to enable for that session.+<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+<Tab value="Python">+```python+session = composio.create(+ user_id="user_123",+ auth_configs={+ "github": "ac_your_github_config",+ "slack": "ac_your_slack_config"+ }+)+```+</Tab>+<Tab value="TypeScript">```typescript-// Before (Beta)-const tools = await composio.tools.get('user_123', { toolkits: ['GITHUB'] });--// After (Stable)-const session = await composio.create('user_123');-const tools = await session.tools();+import { Composio } from '@composio/core';+const composio = new Composio({ apiKey: 'your_api_key' });+// ---cut---+const session = await composio.create('user_123',+ {+ authConfigs: {+ github: "ac_your_github_config",+ slack: "ac_your_slack_config",+ },+ }+);```+</Tab>+</Tabs>+</Step>++<Step>+### Explore new capabilities-## New features+Check out these new features available in the stable version:-- Simplified session-based API-- Built-in provider support for popular AI frameworks-- Improved type safety and error handling+- **[Native tools](/tool-router/using-as-a-native-tool)**: Use Tool Router with any AI framework+- **Better [session](/docs/users-and-sessions) and [auth](/docs/authentication) config**+- **[Multi-account support](/tool-router/managing-multiple-accounts)**: Manage multiple accounts per user seamlessly+- **[Manual authentication](/tool-router/manually-authenticating-users)**: Control when and how users authenticate+- **[Custom auth](/tool-router/using-custom-auth-configs)**: Support for toolkits that don't have composio managed auth+- **[White labeling](/tool-router/white-labeling-authentication)**: Customize authentication screens with your branding+</Step>+</Steps>