Migration from the beta release version

Migrate from Tool Router beta to the stable version

The stable version includes improved session management, multiple configuring options, and enhanced authentication capabilities.

The basics

1

Upgrade composio package

Upgrade to the latest stable version:

$pip install --upgrade composio
2

Update session creation

1# Beta (before)
2session = composio.experimental.tool_router.create_session(
3 user_id="user@example.com"
4)
5
6# Stable (after)
7session = composio.create(
8 user_id="user@example.com"
9)
3

Moving users (optional)

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 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.
1session = composio.create(
2 user_id="user_123",
3 auth_configs={
4 "github": "ac_your_github_config",
5 "slack": "ac_your_slack_config"
6 }
7)
4

Explore new capabilities

Check out these new features available in the stable version: