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 for user_123. The session scopes connections and tool calls to that ID.
  • Composio sessions persist. In an application, store the session ID (session.session_id in Python, session.sessionId in TypeScript) and restore it with composio.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