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
import { Composio } from '@composio/core';
const composio = new Composio();
const toolkit = await composio.toolkits.get('gmail');
console.log(toolkit);
const connectionRequest = await composio.toolkits.authorize('default', 'gmail');
console.log(connectionRequest.toJSON());
const redirectURL = connectionRequest.redirectUrl;
console.log(`Please visit the following URL to authorize the toolkit: ${redirectURL}`);
const connectedAccount = await connectionRequest.waitForConnection();
console.log(connectedAccount);