Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Migrate from Composio

Move an agent from Composio to AgentKit: map Composio users, auth configs and tools to AgentKit, move your users, and update your tool calls.

Use this page if your agent uses Composio today. It covers what’s specific to Composio: how its concepts map to AgentKit, how to move your users, and how your tool calls change. The steps every migration shares, such as setting up Scalekit and creating connections, are in Migrate to AgentKit.

ComposioAgentKit
User ID (user_id)Identifier: your app’s ID for the user, passed on each call
Auth configConnection: one per app, with its auth type, scopes and OAuth app
Connected accountConnected account: one per user and connection
ToolkitConnector, such as Gmail or Slack
Tool, such as GMAIL_FETCH_EMAILSTool, such as gmail_fetch_mails
Session (composio.create(...))No session to create: each call names the user with identifier
Session MCP URLVirtual MCP server with a session token per agent run
Proxy Executeactions.request() through the Scalekit proxy

Composio’s connected-account API redacts stored tokens, for both Composio-managed and custom auth configs. See Composio’s authentication docs. So plan for each user to authorize again: send them an authorization link for each app they use, as in Option A. If Composio support exports tokens for an auth config that used your own OAuth app, you can import them instead.

  1. Create a connection in Scalekit for each Composio auth config your agent uses. If the auth config used your own OAuth app, you can use the same app in Scalekit, so users see the same consent screen. See Bring your own OAuth app.
  2. For each user, get an authorization link for each app they connected in Composio, and send it to them. Use the same user ID you passed to Composio as the identifier.
# The Composio user IDs and the Scalekit connections each one needs
users = {"user_123": ["gmail", "slack"]}
for identifier, connection_names in users.items():
for connection_name in connection_names:
link = actions.get_authorization_link(
connection_name=connection_name, identifier=identifier
).link
print(identifier, connection_name, link) # send this to the user

These blocks reuse the client from Set up Scalekit. To find which apps a user connected, list their connected accounts in Composio with composio.connected_accounts.list(user_ids=[...]).

For an app that uses an API key, bearer token or basic auth, you can skip the link: if you still hold the user’s key, import it instead.

Before (Composio):

session = composio.create(user_id="user_123")
tools = session.tools() # all tools the user is authorized for

After (Scalekit):

tools_response, _ = scalekit_client.actions.tools.list_scoped_tools(
identifier="user_123",
# Required: list every connection whose tools the agent should see
filter={"connection_names": ["gmail"]},
page_size=100, # up to 100 tools per page; pass next_page_token back as page_token for more
)
result = actions.execute_tool(
tool_name="gmail_fetch_mails",
identifier="user_123",
connection_name="gmail",
tool_input={"query": "is:unread", "max_results": 5},
)
print(result.data)

Pass identifier and the connection name on every executeTool call: connection_name in Python, connector in Node.js.

Composio names tools in upper case, {TOOLKIT}_{ACTION}. AgentKit tool names are lower case, and the action part can differ. Find each tool’s exact name and input in the connector catalog. For example:

Composio toolAgentKit tool
GMAIL_FETCH_EMAILSgmail_fetch_mails
SLACK_SEND_MESSAGEslack_send_message
GITHUB_CREATE_ISSUEgithub_issue_create
NOTION_CREATE_PAGEnotion_page_create

Calls you made with Composio’s Proxy Execute go through the Scalekit proxy with actions.request(), which adds the user’s credentials:

response = actions.request(
connection_name="gmail",
identifier="user_123",
method="GET",
path="/gmail/v1/users/me/messages",
)

If your agent connected to a Composio session’s MCP URL, create a Virtual MCP server with the same connections and tools. It has one static URL for all users; mint a session token for the user before each agent run and pass it as a bearer token.

API reference

The endpoints this page's code calls, with every field and the SDK method for each: