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
docs: improve tools and toolkits concept page
Sushmithamallesh1405f4f1dfc2
diff --git a/docs/content/docs/toolkits/fetching-tools-and-toolkits.mdx b/docs/content/docs/toolkits/fetching-tools-and-toolkits.mdxindex 990bd5a1d..7e8516ee4 100644--- a/docs/content/docs/toolkits/fetching-tools-and-toolkits.mdx+++ b/docs/content/docs/toolkits/fetching-tools-and-toolkits.mdx@@ -1,5 +1,175 @@---title: Fetching tools and toolkits-description: How to fetch and filter tools and toolkits for your AI agents+description: How to browse Composio's catalog and fetch tools for your sessions---+There are two ways to explore tools and toolkits:++1. **Browse the catalog** - Discover what toolkits Composio offers+2. **Fetch for a session** - Get tools enabled for a session++## Browsing Composio's catalog++Composio offers 800+ toolkits. You can explore the full catalog to discover what's available.++### Using the platform++Browse all toolkits at [platform.composio.dev](https://platform.composio.dev). Each toolkit page shows:+- Available tools with input/output parameters+- Supported authentication methods+- Required OAuth scopes++You can also browse toolkits directly in these docs:++<Card icon={<Blocks />} title="Browse all toolkits" href="/toolkits">+ Explore 800+ available toolkits with their tools and authentication methods+</Card>++### Using the SDK++List available toolkits programmatically:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+<Tab value="Python">+```python+from composio import Composio++composio = Composio()++# List available toolkits (top 20 by default)+toolkits = composio.toolkits.get()++for toolkit in toolkits:+ print(f"{toolkit.name} - {toolkit.meta.tools_count} tools")+```+</Tab>+<Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';+const composio = new Composio({ apiKey: 'your_api_key' });+// ---cut---+// List available toolkits (top 20 by default)+const toolkits = await composio.toolkits.get();++for (const toolkit of toolkits) {+ console.log(`${toolkit.name} - ${toolkit.meta.toolsCount} tools`);+}+```+</Tab>+</Tabs>++Get a specific toolkit's details:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+<Tab value="Python">+```python+# Get details for a specific toolkit+github = composio.toolkits.get_by_slug("github")+print(github.meta.description)+```+</Tab>+<Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';+const composio = new Composio({ apiKey: 'your_api_key' });+// ---cut---+// Get details for a specific toolkit+const github = await composio.toolkits.getBySlug("github");+console.log(github.meta.description);+```+</Tab>+</Tabs>++Get a specific tool's schema:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+<Tab value="Python">+```python+# Get schema for a specific tool+tool = composio.tools.get_raw_composio_tool_by_slug("GMAIL_SEND_EMAIL")+print(tool.input_parameters)+```+</Tab>+<Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';+const composio = new Composio({ apiKey: 'your_api_key' });+// ---cut---+// Get schema for a specific tool+const tool = await composio.tools.getRawComposioToolBySlug("GMAIL_SEND_EMAIL");+console.log(tool.inputParameters);+```+</Tab>+</Tabs>++## Fetching tools for a session++Once you create a session for a user, you can fetch tools and check which toolkits are enabled.++### List enabled toolkits++`session.toolkits()` returns toolkits enabled for the session along with their connection status:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+<Tab value="Python">+```python+session = composio.create(user_id="user_123")++# List toolkits enabled for this session+toolkits = session.toolkits()++for toolkit in toolkits:+ print(f"{toolkit.name}: {toolkit.connection_status}")+```+</Tab>+<Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';+const composio = new Composio({ apiKey: 'your_api_key' });+// ---cut---+const session = await composio.create("user_123");++// List toolkits enabled for this session+const toolkits = await session.toolkits();++for (const toolkit of toolkits) {+ console.log(`${toolkit.name}: ${toolkit.connectionStatus}`);+}+```+</Tab>+</Tabs>++The connection status tells you if the user has authenticated with that toolkit.++### Get tools for your AI framework++`session.tools()` returns tools formatted for your AI provider:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+<Tab value="Python">+```python+# Get tools from specific toolkits+tools = session.tools(toolkits=["github", "gmail"])++# Or get specific tools by name+tools = session.tools(tools=["GITHUB_CREATE_ISSUE", "GMAIL_SEND_EMAIL"])+```+</Tab>+<Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';+const composio = new Composio({ apiKey: 'your_api_key' });+const session = await composio.create("user_123");+// ---cut---+// Get tools from specific toolkits+const tools = await session.tools({ toolkits: ["github", "gmail"] });++// Or get specific tools by name+const specificTools = await session.tools({+ tools: ["GITHUB_CREATE_ISSUE", "GMAIL_SEND_EMAIL"]+});+```+</Tab>+</Tabs>++Tools are automatically formatted for your configured provider (OpenAI, Anthropic, etc.).diff --git a/docs/content/docs/tools-and-toolkits.mdx b/docs/content/docs/tools-and-toolkits.mdxindex 4b0ead410..84f5f6865 100644--- a/docs/content/docs/tools-and-toolkits.mdx+++ b/docs/content/docs/tools-and-toolkits.mdx@@ -1,84 +1,90 @@---title: Tools and toolkits-description: Access 800+ toolkits through Tool Router-keywords: [available tools, browse toolkits]+description: Understand how tools and toolkits work in Composio+keywords: [tools, toolkits, meta tools, context management]----Tool Router gives your agent access to most Composio toolkits by default. For details on configuring which toolkits are available in a session, see [Users and sessions](/docs/users-and-sessions#enabling-toolkits).+Composio offers 800+ toolkits, but loading all the tools into context would overwhelm your agent. Instead, your agent has access to 5 meta tools that discover, authenticate, and execute the right tools at runtime.-## Toolkits and tools--A **toolkit** is a collection of related tools for a service and a **tool** is an individual action your agent can execute.--| Toolkit | Tools |-|---------|-------|-| `github` | `GITHUB_CREATE_A_COMMIT`, `GITHUB_ACTIVITY_LIST_STARGAZERS_FOR_REPO`, `GITHUB_SEARCH_REPO_S`, ... |-| `gmail` | `GMAIL_SEND_EMAIL`, `GMAIL_FETCH_EMAILS`, `GMAIL_CREATE_EMAIL_DRAFT`, ... |-| `linear` | `LINEAR_CREATE_LINEAR_ISSUE`, `LINEAR_UPDATE_ISSUE`, `LINEAR_CREATE_LINEAR_LABEL`, ... |+## Meta tools-## Available toolkits+When you create a session, your agent gets these 5 meta tools:-Browse all available toolkits in the [Composio platform](https://platform.composio.dev) under "All Toolkits". Each toolkit page shows its tools (with input and output parameters) and authentication methods supported for that toolkit.+| Meta tool | What it does |+|-----------|--------------|+| `COMPOSIO_SEARCH_TOOLS` | Discover relevant tools across 500+ apps |+| `COMPOSIO_MANAGE_CONNECTIONS` | Handle OAuth and API key authentication |+| `COMPOSIO_MULTI_EXECUTE_TOOL` | Execute up to 20 tools in parallel |+| `COMPOSIO_REMOTE_WORKBENCH` | Run Python code in a persistent sandbox |+| `COMPOSIO_REMOTE_BASH_TOOL` | Execute bash commands for file and data processing |-You can also list toolkits programmatically:+Meta tool calls in a session are correlated using a `session_id`, allowing them to share context. The tools can also store useful information (like IDs and relationships discovered during execution) in memory for subsequent calls.-<Tabs groupId="language" items={['Python', 'TypeScript']} persist>-<Tab value="Python">-```python-# Returns top 20 toolkits by default-toolkits = composio.toolkits.get()+### How it works-for toolkit in toolkits:- print(toolkit.name)```-</Tab>-<Tab value="TypeScript">-```typescript-import { Composio } from '@composio/core';-const composio = new Composio({ apiKey: 'your_api_key' });-// ---cut----// Returns top 20 toolkits by default-const toolkits = await composio.toolkits.get();--for (const toolkit of toolkits) {- console.log(toolkit.name);-}+User: "Create a GitHub issue for this bug"+ ↓+1. Agent calls COMPOSIO_SEARCH_TOOLS+ → Returns GITHUB_CREATE_ISSUE with input schema+ → Returns connection status: "not connected"+ → Returns execution plan and tips+ ↓+2. Agent calls COMPOSIO_MANAGE_CONNECTIONS (because not connected)+ → Returns auth link for GitHub+ → User clicks link and authenticates+ ↓+3. Agent calls COMPOSIO_MULTI_EXECUTE_TOOL+ → Executes GITHUB_CREATE_ISSUE with arguments+ → Returns the created issue details+ ↓+Done. (For large results, agent can use REMOTE_WORKBENCH to process)```-</Tab>-</Tabs>-For details on browsing tools within toolkits and inspecting schemas, see [Fetching tools and schemas](/docs/fetching-tools).+### What SEARCH_TOOLS returns-<Callout type="info">-Some toolkits require you to provide your own credentials. See [Using custom auth configs](/docs/guides/using-custom-auth-configuration).-</Callout>+`COMPOSIO_SEARCH_TOOLS` returns:-<Callout type="info">-Need a toolkit that doesn't exist? [Request it here](https://request.composio.dev/boards/tool-requests).-</Callout>+- **Tools with schemas** - Matching tools with their slugs, descriptions, and input parameters+- **Connection status** - Whether the user has already authenticated with each toolkit+- **Execution plan** - Recommended steps and common pitfalls for the task+- **Related tools** - Prerequisites, alternatives, and follow-up tools-## Default session behavior+### Processing large results-When you create a session, all toolkits are available:+For most tasks, `COMPOSIO_MULTI_EXECUTE_TOOL` returns results directly. But when dealing with large responses or bulk operations, your agent uses the workbench tools:-<Tabs groupId="language" items={['Python', 'TypeScript']} persist>-<Tab value="Python">-```python-session = composio.create(user_id="user_123")-```-</Tab>-<Tab value="TypeScript">-```typescript-import { Composio } from '@composio/core';-const composio = new Composio({ apiKey: 'your_api_key' });-// ---cut----const session = await composio.create("user_123");-```-</Tab>-</Tabs>+- **`COMPOSIO_REMOTE_WORKBENCH`** - Run Python code in a persistent sandbox. Use for bulk operations (e.g., labeling 100 emails), complex data transformations, or when results need further analysis with helper functions like `invoke_llm`.-Your agent can search and use tools from any toolkit. To restrict or configure which toolkits are available, see [Users and sessions](/docs/users-and-sessions#enabling-toolkits).+- **`COMPOSIO_REMOTE_BASH_TOOL`** - Execute bash commands for simpler file operations and data extraction using tools like `jq`, `awk`, `sed`, and `grep`.++## Toolkits and tools-<Callout type="info">-Triggers can be used alongside Tool Router to respond to events in connected apps. See [Triggers](/docs/triggers) for setup instructions.+A **toolkit** is a collection of related tools for a service. For example, the `github` toolkit contains tools for creating issues, managing pull requests, and starring repositories.++A **tool** is an individual action your agent can execute. Each tool has an input schema (required and optional parameters) and an output schema (what it returns). Tools follow a `{TOOLKIT}_{ACTION}` naming pattern, like `GITHUB_CREATE_ISSUE`.++<Callout>+If you know exactly which tools you need, you can [execute them directly](/docs/tools-direct/executing-tools) without meta tools.</Callout>++## Authentication++Tools execute with the user's authenticated credentials. When a user connects their GitHub account, all GitHub tools run with their permissions.++If a tool requires authentication and the user hasn't connected yet, the agent can use `COMPOSIO_MANAGE_CONNECTIONS` to prompt them.++<Card icon={<Key />} title="Authentication" href="/docs/authentication">+ Learn how Composio handles user authentication+</Card>++## Useful links++<Cards>+ <Card icon={<Blocks />} title="Browse toolkits" href="/toolkits">+ Explore all available toolkits+ </Card>+ <Card icon={<BookOpen />} title="Fetching tools" href="/docs/toolkits/fetching-tools-and-toolkits">+ Browse the catalog and fetch tools for sessions+ </Card>+</Cards>