Quickstart
Build an agent that chooses Composio tools at runtime. Type a task, connect an app if needed, and continue in the same conversation.
Pick your framework below. A Composio session gives your agent tool discovery, account connections, and execution across 1000+ apps. It exposes only a small set of meta tools, so app schemas are loaded when the agent needs them.
The TypeScript SDK is ESM-only and requires Node.js 22.22.3 or newer. Use import syntax rather than CommonJS require().
Ask for any task that needs an app tool: Summarize my unread emails from today, or List all open issues on the composio github repository. If a task needs access to an account, the agent gives you a Connect Link. Open it, approve the connection, and tell the agent to continue.
What just happened?
- The provider you picked formats Composio tools for your framework and wires in execution.
composio.sessions.create()creates a Composio session foruser_123. The session scopes connections and tool calls to that ID.- Composio sessions persist. In an application, store the session ID (
session.session_idin Python,session.sessionIdin TypeScript) and restore it withcomposio.use(session_id)instead of creating a new session for every turn. See Reusing a session. session.tools()gives the agent a small set of meta tools for finding, connecting, and running app tools. It does not load thousands of tool schemas into the model context.
Use your application's user ID in production
user_123 is only for this local example. Replace it with a stable ID from your database. Each ID gets separate connections and tool calls.
You can inspect the selected tools, inputs, responses, and timing with the Logs API.
Adapt the example
Use another framework
Choose OpenAI, Anthropic, Vercel AI SDK, LangChain, CrewAI, or another supported provider.
Configure the session
Restrict toolkits, preload tools, or select connected accounts.
Design authentication
Add Connect Links and per-user connections to your application.
Expose an MCP endpoint
Use the same Composio session from an MCP-compatible application.