Migrating from Experimental Tool Router
This guide is for users who adopted the experimental tool router (devcaster.experimental.tool_router) during its beta period. The tool router has now graduated to a stable, first-class feature called sessions — with a simpler API, better auth handling, and full framework support.
If you never used devcaster.experimental.tool_router, you can skip this guide and head straight to the Quickstart.
The basics
Upgrade devcaster package
Upgrade to the latest stable version:
pip install --upgrade devcasternpm install @devcaster/core@latestUpdate session creation
# Beta (before)
session = devcaster.experimental.tool_router.create_session(
user_id="user@example.com"
)
# Stable (after)
session = devcaster.create(
user_id="user@example.com"
)// Beta (before)
const session = await devcaster.experimental.toolRouter.createSession('user_123');
// Stable (after)
const session = await devcaster.create('user_123');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.
session = devcaster.create(
user_id="user_123",
auth_configs={
"github": "ac_your_github_config",
"slack": "ac_your_slack_config"
}
)import { Devcaster } from '@devcaster/core';
const devcaster = new Devcaster({ apiKey: 'your_api_key' });
// ---cut---
const session = await devcaster.create('user_123',
{
authConfigs: {
github: "ac_your_github_config",
slack: "ac_your_slack_config",
},
}
);