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
Add Tools and Triggers documentation section
Sushmithamallesh1c2ff77dfe33
diff --git a/fumadocs/app/(home)/docs/layout.tsx b/fumadocs/app/(home)/docs/layout.tsxindex 464140e93..5a1da0fab 100644--- a/fumadocs/app/(home)/docs/layout.tsx+++ b/fumadocs/app/(home)/docs/layout.tsx@@ -8,8 +8,8 @@ const pageTree = {children: source.pageTree.children.flatMap((child) =>child.type === 'separator' && child.name === 'Tools and Triggers'? [changelogPage, child]- : child- ),+ : [child]+ ) as typeof source.pageTree.children,};export default function Layout({ children }: LayoutProps<'/docs'>) {diff --git a/fumadocs/components/figure.tsx b/fumadocs/components/figure.tsxnew file mode 100644index 000000000..77a114a76--- /dev/null+++ b/fumadocs/components/figure.tsx@@ -0,0 +1,47 @@+'use client';++import Zoom from 'react-medium-image-zoom';+import 'react-medium-image-zoom/dist/styles.css';+import { cn } from '@/lib/utils';++type FigureSize = 'sm' | 'md' | 'lg' | 'full';++interface FigureProps {+ src: string;+ alt: string;+ caption?: string;+ size?: FigureSize;+ className?: string;+}++const sizeClasses: Record<FigureSize, string> = {+ sm: 'max-w-[300px]', // Small dialogs, icons+ md: 'max-w-[500px]', // Medium screenshots+ lg: 'max-w-[700px]', // Large screenshots+ full: 'max-w-full', // Full-width diagrams+};++export function Figure({ src, alt, caption, size = 'full', className }: FigureProps) {+ const isConstrained = size !== 'full';++ return (+ <figure className={cn('my-8', isConstrained && 'flex flex-col items-center', className)}>+ <Zoom>+ <img+ src={src}+ alt={alt}+ className={cn(+ 'rounded-lg border border-fd-border',+ sizeClasses[size],+ isConstrained ? 'w-auto' : 'w-full'+ )}+ />+ </Zoom>+ {caption && (+ <figcaption className="mt-3 text-sm text-fd-muted-foreground text-center">+ {caption}+ </figcaption>+ )}+ </figure>+ );+}diff --git a/fumadocs/components/video.tsx b/fumadocs/components/video.tsxnew file mode 100644index 000000000..4a093238d--- /dev/null+++ b/fumadocs/components/video.tsx@@ -0,0 +1,46 @@+'use client';++import { cn } from '@/lib/utils';++interface VideoProps {+ src: string;+ caption?: string;+ poster?: string;+ autoPlay?: boolean;+ loop?: boolean;+ muted?: boolean;+ controls?: boolean;+ className?: string;+}++export function Video({+ src,+ caption,+ poster,+ autoPlay = false,+ loop = true,+ muted = true,+ controls = true,+ className,+}: VideoProps) {+ return (+ <figure className={cn('my-8', className)}>+ <video+ src={src}+ poster={poster}+ autoPlay={autoPlay}+ loop={loop}+ muted={muted}+ controls={controls}+ playsInline+ preload="metadata"+ className="w-full rounded-lg border border-fd-border"+ />+ {caption && (+ <figcaption className="mt-3 text-sm text-fd-muted-foreground text-center">+ {caption}+ </figcaption>+ )}+ </figure>+ );+}diff --git a/fumadocs/content/docs/authenticating-tools.mdx b/fumadocs/content/docs/authenticating-tools.mdxnew file mode 100644index 000000000..fa7679932--- /dev/null+++ b/fumadocs/content/docs/authenticating-tools.mdx@@ -0,0 +1,484 @@+---+title: Authenticating Tools+description: Create auth configs and connect user accounts+---++The first step in authenticating your users is to create an **Auth Config**. Every toolkit has its own authentication method such as `OAuth`, `API key`, `Basic Auth`, or custom schemes.++An **Auth Config** is a blueprint that defines how authentication works for a toolkit across all your users. It defines:++1. **Authentication method** - `OAuth2`, `Bearer token`, `API key`, or `Basic Auth`+2. **Scopes** - what actions your tools can perform+3. **Credentials** - whether you'll use your own app credentials or Composio's managed auth++## Creating an auth config++### Using the Dashboard++<Steps>+<Step>+### Selecting a toolkit++Navigate to [Auth Configs](https://platform.composio.dev?next_page=%2Fauth-configs) tab in your dashboard and click "**Create Auth Config**". Find and select the toolkit you want to integrate (e.g., **Gmail**, **Slack**, **GitHub**).+</Step>++<Step>+### Selecting the Authentication method++Each toolkit supports different authentication methods such as **OAuth**, **API Key**, **Bearer Token**. Select from the available options for your toolkit.+</Step>++<Step>+### Configure scopes++Depending on your authentication method, you may need to configure scopes:+- **OAuth2**: Configure scopes for what data and actions your integration can access.+- **API Key/Bearer Token**: Permissions are typically fixed based on the key's access level.+</Step>++<Step>+### Authentication Management++**For OAuth toolkits:**+- **Development/Testing**: Use Composio's managed authentication (no setup required)+- **Production**: Generate your own OAuth credentials from the toolkit's developer portal++**For custom authentication schemes:**++You must provide your own credentials regardless of environment.++<Callout type="info">+Want to remove Composio branding from OAuth screens? See [Custom Auth Configs](/docs/custom-auth-configs#white-labeling-the-oauth-consent-screen) for white-labeling options.+</Callout>+</Step>++<Step>+### You are all set!++Click "**Create Auth Configuration**" button and you have completed your first step! Now you can move ahead to authenticating your users by [Connecting an Account](#connecting-an-account).+</Step>+</Steps>++<Callout type="info" title="Auth configs are reusable">+Auth configs contain your developer credentials and app-level settings (*scopes*, *authentication method*, etc.). Once created, you can reuse the same auth config for all your users.+</Callout>++### When to create multiple auth configs?++You should create multiple auth configs for the same toolkit when you need:++- **Different authentication methods** - One OAuth config and one API key config+- **Different scopes** - Separate configs for read-only vs full access+- **Different OAuth apps** - Using separate client credentials for different environments+- **Different permission levels** - Limiting actions for specific use cases++<Cards>+ <Card title="Programmatic creation" href="/docs/programmatic-auth-configs">+ For managing auth configs across multiple projects, you can create them programmatically via the API+ </Card>+ <Card title="Production white-labeling" href="/docs/custom-auth-configs#white-labeling-the-oauth-consent-screen">+ Remove Composio branding from OAuth screens for a fully white-labeled authentication experience+ </Card>+</Cards>++## Connecting an account++With an auth config created, you're ready to authenticate your users!++You can either use [**Connect Link**](#hosted-authentication-connect-link) for a hosted authentication flow, or use [**Direct SDK Integration**](#direct-sdk-integration).++<Callout>+User authentication requires a User ID - a unique identifier that groups connected accounts together. Learn more about [User Management](/docs/user-management) to understand how to structure User IDs for your application.+</Callout>++**Choose the section below that matches your toolkit's authentication method:**++### Hosted Authentication (Connect Link)++Redirect users to a Composio-hosted URL that handles the entire authentication process—OAuth flows, API key collection, or custom fields like subdomain. You can specify a callback URL to control where users return after authentication.++<Figure+ src="/images/auth-screen-example.png"+ alt="Connect Link authentication screen"+ caption="Connect Link authentication screen"+ size="sm"+/>++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio++composio = Composio(api_key="your_api_key")++# Use the "AUTH CONFIG ID" from your dashboard+auth_config_id = "your_auth_config_id"++# Use a unique identifier for each user in your application+user_id = 'user-1349-129-12'++connection_request = composio.connected_accounts.link(+ user_id=user_id,+ auth_config_id=auth_config_id,+ callback_url='https://your-app.com/callback'+)++redirect_url = connection_request.redirect_url+print(f"Visit: {redirect_url} to authenticate your account")+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';++const composio = new Composio({apiKey: "your_api_key"});++// Use the "AUTH CONFIG ID" from your dashboard+const authConfigId = 'your_auth_config_id';++// Use a unique identifier for each user in your application+const userId = 'user-1349-129-12';++const connectionRequest = await composio.connectedAccounts.link(userId, authConfigId, {+ callbackUrl: 'https://your-app.com/callback'+});+const redirectUrl = connectionRequest.redirectUrl;+console.log(`Visit: ${redirectUrl} to authenticate your account`);+```+ </Tab>+</Tabs>++#### Customizing Connect Link++By default, users will see a Composio-branded authentication experience when connecting their accounts. To customize this interface with your application's branding:++1. Navigate to your Project Settings and select [Auth Screen](https://platform.composio.dev?next_page=/settings/auth-screen)+2. Configure your **Logo** and **App Title**++These settings will apply to all authentication flows using Connect Link, providing a white-labeled experience that maintains your brand identity throughout the authentication process.++<Callout>+For complete white-labeling including OAuth consent screens (removing Composio's domain), see [Custom Auth Configs - White-labeling](/docs/custom-auth-configs#white-labeling-the-oauth-consent-screen).+</Callout>++### Direct SDK Integration++**Choose the section below that matches your toolkit's authentication method:**++#### OAuth Connections++For OAuth flows, you'll redirect users to complete authorization. You can specify a callback URL to control where users return after authentication:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio++composio = Composio(api_key="YOUR_COMPOSIO_API_KEY")++# Use the "AUTH CONFIG ID" from your dashboard+auth_config_id = "your_auth_config_id"++# Use a unique identifier for each user in your application+user_id = "user-1349-129-12"++connection_request = composio.connected_accounts.initiate(+ user_id=user_id,+ auth_config_id=auth_config_id,+ config={"auth_scheme": "OAUTH2"},+ callback_url="https://www.yourapp.com/callback"+)+print(f"Redirect URL: {connection_request.redirect_url}")++connected_account = connection_request.wait_for_connection()++# Alternative: if you only have the connection request ID+# connected_account = composio.connected_accounts.wait_for_connection(+# connection_request.id)+# Recommended when the connection_request object is no longer available++print(f"Connection established: {connected_account.id}")+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';++const composio = new Composio({apiKey: "YOUR_COMPOSIO_API_KEY"});++// Use the "AUTH CONFIG ID" from your dashboard+const authConfigId = 'your_auth_config_id';+// Use a unique identifier for each user in your application+const userId = 'user_4567';++const connRequest = await composio.connectedAccounts.initiate(+ userId,+ authConfigId,+ {+ callbackUrl: 'https://www.yourapp.com/callback',+ }+);+console.log(`Redirect URL: ${connRequest.redirectUrl}`);++const connectedAccount = await connRequest.waitForConnection();++// Alternative: if you only have the connection request ID+// const connectedAccount = await composio.connectedAccounts+// .waitForConnection(connRequest.id);+// Recommended when the connRequest object is no longer available++console.log(`Connection established: ${connectedAccount.id}`);+```+ </Tab>+</Tabs>++#### Services with Additional Parameters++Some services like Zendesk require additional parameters such as `subdomain`:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+# For Zendesk - include subdomain+connection_request = composio.connected_accounts.initiate(+ user_id=user_id,+ auth_config_id=auth_config_id,+ config=auth_scheme.oauth2(subdomain="mycompany") # For mycompany.zendesk.com+)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { AuthScheme } from '@composio/core';+// For Zendesk - include subdomain+const connRequest = await composio.connectedAccounts.initiate(userId, authConfigId, {+ config: AuthScheme.OAuth2({+ subdomain: 'mycompany',+ }),+});+```+ </Tab>+</Tabs>++#### API Key Connections++For API key authentication, you can either collect API keys from each user or use your own API key for all users. Popular toolkits that use API keys include Stripe, Perplexity, etc.++Here is how to initiate the flow:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio++composio = Composio(api_key="your_api_key")++# Use the "AUTH CONFIG ID" from your dashboard+auth_config_id = "your_auth_config_id"++# Use a unique identifier for each user in your application+user_id = "user_12323"++# API key provided by the user (collected from your app's UI)+# or use your own key+user_api_key = "user_api_key_here"++connection_request = composio.connected_accounts.initiate(+ user_id=user_id,+ auth_config_id=auth_config_id,+ config={+ "auth_scheme": "API_KEY", "val": {"api_key": user_api_key}+ }+)++print(f"Connection established: {connection_request.id}")+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio, AuthScheme } from '@composio/core';++const composio = new Composio({ apiKey: 'your_api_key' });++// Use the "AUTH CONFIG ID" from your dashboard+const authConfigId = 'your_auth_config_id';+// Use a unique identifier for each user in your application+const userId = 'user12345678';+// API key provided by the user (collected from your app's UI)+const userApiKey = 'user_api_key_here';++const connectionRequest = await composio.connectedAccounts.initiate(userId, authConfigId, {+ config: AuthScheme.APIKey({+ api_key: userApiKey,+ }),+});++console.log(`Connection established: ${connectionRequest.id}`);+```+ </Tab>+</Tabs>++## Fetching the required config parameters for an Auth Config++When working with any toolkit, you can inspect an auth config to understand its authentication requirements and expected parameters.++Here is how you would fetch the authentication method and input fields:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio++composio = Composio(api_key="your_api_key")++# Use the "AUTH CONFIG ID" from your dashboard+auth_config_id = "your_auth_config_id"++# Fetch the auth configuration details+auth_config = composio.auth_configs.get(auth_config_id)++# Check what authentication method this config uses+print(f"Authentication method: {auth_config.auth_scheme}")++# See what input fields are required+print(f"Required fields: {auth_config.expected_input_fields}")+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';++const composio = new Composio({ apiKey: 'your_api_key' });++// Use the "AUTH CONFIG ID" from your dashboard+const authConfigId = 'your_auth_config_id';++// Fetch the auth configuration details+const authConfig = await composio.authConfigs.get(authConfigId);++console.log(`Authentication method: ${authConfig.authScheme}`);+console.log(`Required fields:`, authConfig.expectedInputFields);+```+ </Tab>+</Tabs>++## Other Authentication Methods++Composio also supports a wide range of other auth schemas:++**Bearer Token** - Similar to API keys, provide the user's bearer token directly when creating the connection.++**Basic Auth** - Provide username and password credentials for services that use HTTP Basic Authentication.++**Custom Schemes** - Some toolkits use their own custom authentication methods. Follow the toolkit-specific requirements for such cases.++<Callout title="Fetching auth config">+For any of these methods, [fetch the config parameter](#fetching-the-required-config-parameters-for-an-auth-config) to determine the exact fields required. Every toolkit has its own requirements, and understanding these is essential for successfully creating connections.+</Callout>++Learn how to [Manage connected accounts](/docs/connected-accounts) after users authenticate.++## Connection Statuses++After creating a connection, it will have one of the following statuses that indicates its current state:++| Status | Description |+|--------|-------------|+| **ACTIVE** | Connection is established and working. You can execute tools with this connection. |+| **INACTIVE** | Connection is temporarily disabled. Re-enable it to use the connection again. |+| **PENDING** | Connection is being processed. Wait for it to become active. |+| **INITIATED** | Connection request has started but not yet completed. User may still need to complete authentication. |+| **EXPIRED** | Connection credentials have expired. Composio automatically attempts to refresh credentials before marking as expired. Re-authenticate to restore access. |+| **FAILED** | Connection attempt failed. Check error details and try creating a new connection. |++<Callout>+When credentials expire for OAuth connections, Composio automatically attempts to refresh them using the refresh token. The connection is only marked as **EXPIRED** after multiple refresh attempts have failed.+</Callout>++### Waiting for Connection Establishment++The `waitForConnection` method allows you to poll for a connection to become active after initiating authentication. This is useful when you need to ensure a connection is ready before proceeding.++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+# Wait for the connection to be established+connected_account = connection_request.wait_for_connection()+print(connected_account.id)++# Alternative: Wait with custom timeout+# connected_account = connection_request.wait_for_connection(120) # 2 minute timeout++# Alternative: If you only have the connection request ID (e.g., stored in database)+# connection_id = connection_request.id # You can store this ID in your database+# connected_account = composio.connected_accounts.wait_for_connection(connection_id, 60)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+// Wait for the connection to be established+const connectedAccount = await connectionRequest.waitForConnection();+console.log(connectedAccount.id);++// Alternative: Wait with custom timeout+// const connectedAccount = await connectionRequest.waitForConnection(120000); // 2 minutes++// Alternative: If you only have the connection request ID (e.g., stored in database)+// const connectionId = connectionRequest.id; // You can store this ID in your database+// const connectedAccount = await composio.connectedAccounts.waitForConnection(connectionId, 60000);+```+ </Tab>+</Tabs>++The method continuously polls the Composio API until the connection:+- Becomes **ACTIVE** (returns the connected account)+- Enters a terminal state like **FAILED** or **EXPIRED** (throws an error)+- Exceeds the specified timeout (throws a timeout error)++### Checking Connection Status++You can check the status of a connected account programmatically:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+# Get a specific connected account+connected_account = composio.connected_accounts.get("your_connected_account_id")+print(f"Status: {connected_account.status}")++# Filter connections by user_id, auth_config_id, and status (only active accounts)+filtered_connections = composio.connected_accounts.list(+ user_ids=["user_123"],+ auth_config_ids=["your_auth_config_id"],+ statuses=["ACTIVE"]+)+for connection in filtered_connections.items:+ print(f"{connection.id}: {connection.status}")+```+ </Tab>+ <Tab value="TypeScript">+```typescript+// Get a specific connected account by its nanoid+const connectedAccount = await composio.connectedAccounts.get('your_connected_account_id');+console.log(`Status: ${connectedAccount.status}`);++// Filter connections by user_id, auth_config_id, and status (only active accounts)+const filteredConnections = await composio.connectedAccounts.list({+ userIds: ['user_123'],+ authConfigIds: ['your_auth_config_id'],+ statuses: ['ACTIVE']+});+filteredConnections.items.forEach(connection => {+ console.log(`${connection.id}: ${connection.status}`);+});+```+ </Tab>+</Tabs>++<Callout>+Only connections with **ACTIVE** status can be used to execute tools. If a connection is in any other state, you'll need to take appropriate action (re-authenticate, wait for processing, etc.) before using it.+</Callout>++## Next Step++With authentication set up, you can now fetch and execute tools. See [Executing Tools](/docs/executing-tools) to get started.diff --git a/fumadocs/content/docs/custom-tools.mdx b/fumadocs/content/docs/custom-tools.mdxnew file mode 100644index 000000000..eb1f8f037--- /dev/null+++ b/fumadocs/content/docs/custom-tools.mdx@@ -0,0 +1,344 @@+---+title: Creating Custom Tools+description: Learn how to extend Composio's toolkits with your own tools+---++Custom tools allow you to create your own tools that can be used with Composio.++1. **Standalone tools** - Simple tools that don't require any authentication+2. **Toolkit-based tools** - Tools that require authentication and can use toolkit credentials++## Creating a Custom Tool++### Standalone Tool++A standalone tool is the simplest form of custom tool. It only requires input parameters and an execute function:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from pydantic import BaseModel, Field++from composio import Composio+from composio.types import ExecuteRequestFn++composio = Composio()+++class AddTwoNumbersInput(BaseModel):+ a: int = Field(+ ...,+ description="The first number to add",+ )+ b: int = Field(+ ...,+ description="The second number to add",+ )++# function name will be used as slug[email protected]_tool+def add_two_numbers(request: AddTwoNumbersInput) -> int:+ """Add two numbers."""+ return request.a + request.b+```+ </Tab>+ <Tab value="TypeScript">+```typescript+const tool = await composio.tools.createCustomTool({+ slug: 'CALCULATE_SQUARE',+ name: 'Calculate Square',+ description: 'Calculates the square of a number',+ inputParams: z.object({+ number: z.number().describe('The number to calculate the square of'),+ }),+ execute: async input => {+ const { number } = input;+ return {+ data: { result: number * number },+ error: null,+ successful: true,+ };+ },+});+```+ </Tab>+</Tabs>++### Toolkit-based Tool++A toolkit-based tool has access to two ways of making authenticated requests:++**1. Using `executeToolRequest`** - The recommended way to make authenticated requests to the toolkit's API endpoints. Composio automatically handles credential injection and baseURL resolution:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+class GetIssueInfoInput(BaseModel):+ issue_number: int = Field(+ ...,+ description="The number of the issue to get information about",+ )++# function name will be used as slug[email protected]_tool(toolkit="github")+def get_issue_info(+ request: GetIssueInfoInput,+ execute_request: ExecuteRequestFn,+ auth_credentials: dict,+) -> dict:+ """Get information about a GitHub issue."""+ response = execute_request(+ endpoint=f"/repos/composiohq/composio/issues/{request.issue_number}",+ method="GET",+ parameters=[+ {+ "name": "Accept",+ "value": "application/vnd.github.v3+json",+ "type": "header",+ },+ {+ "name": "Authorization",+ "value": f"Bearer {auth_credentials['access_token']}",+ "type": "header",+ },+ ],+ )+ return {"data": response.data}+```+ </Tab>+ <Tab value="TypeScript">+```typescript+const tool = await composio.tools.createCustomTool({+ slug: 'GITHUB_STAR_COMPOSIOHQ_REPOSITORY',+ name: 'Github star composio repositories',+ toolkitSlug: 'github',+ description: 'Star any specified repo of `composiohq` user',+ inputParams: z.object({+ repository: z.string().describe('The repository to star'),+ page: z.number().optional().describe('Pagination page number'),+ customHeader: z.string().optional().describe('Custom header'),+ }),+ execute: async (input, connectionConfig, executeToolRequest) => {+ // This method makes authenticated requests to the relevant API+ // You can use relative paths!+ // Composio will automatically inject the baseURL+ const result = await executeToolRequest({+ endpoint: `/user/starred/composiohq/${input.repository}`,+ method: 'PUT',+ body: {},+ // Add custom headers or query parameters+ parameters: [+ // Add query parameters+ {+ name: 'page',+ value: input.page?.toString() || '1',+ in: 'query',+ },+ // Add custom headers+ {+ name: 'x-custom-header',+ value: input.customHeader || 'default-value',+ in: 'header',+ },+ ],+ });+ return result;+ },+});+```+ </Tab>+</Tabs>++**2. Using `connectionConfig`** - For making direct API calls when needed:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+import requests+[email protected]_tool(toolkit="github")+def get_issue_info_direct(+ request: GetIssueInfoInput,+ execute_request: ExecuteRequestFn,+ auth_credentials: dict,+) -> dict:+ """Get information about a GitHub issue."""+ response = requests.get(+ f"https://api.github.com/repos/composiohq/composio/issues/{request.issue_number}",+ headers={+ "Accept": "application/vnd.github.v3+json",+ "Authorization": f"Bearer {auth_credentials['access_token']}",+ },+ )+ return {"data": response.json()}+```+ </Tab>+ <Tab value="TypeScript">+```typescript+const tool = await composio.tools.createCustomTool({+ slug: 'GITHUB_DIRECT_API',+ name: 'Direct GitHub API Call',+ description: 'Makes direct calls to GitHub API',+ toolkitSlug: 'github',+ inputParams: z.object({+ repo: z.string().describe('Repository name'),+ }),+ execute: async (input, connectionConfig, executeToolRequest) => {+ // Use connectionConfig for direct API calls+ const result = await fetch(`https://api.github.com/repos/${input.repo}`, {+ headers: {+ Authorization: `Bearer ${connectionConfig.access_token}`,+ },+ });++ return {+ data: await result.json(),+ error: null,+ successful: true,+ };+ },+});+```+ </Tab>+</Tabs>++### Using Custom Headers and Query Parameters++You can add custom headers and query parameters to your toolkit-based tools using the `parameters` option in `executeToolRequest`:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python[email protected]_tool(toolkit="github")+def get_issue_info(+ request: GetIssueInfoInput,+ execute_request: ExecuteRequestFn,+ auth_credentials: dict,+) -> dict:+ """Get information about a GitHub issue."""+ response = execute_request(+ endpoint=f"/repos/composiohq/composio/issues/{request.issue_number}",+ method="GET",+ parameters=[+ {+ "name": "Accept",+ "value": "application/vnd.github.v3+json",+ "type": "header",+ },+ {+ "name": "Authorization",+ "value": f"Bearer {auth_credentials['access_token']}",+ "type": "header",+ },+ {+ "name": 'X-Custom-Header',+ "value": 'custom-value',+ "type": 'header',+ },+ ],+ )+ return {"data": response.data}+```+ </Tab>+ <Tab value="TypeScript">+```typescript+const tool = await composio.tools.createCustomTool({+ slug: 'GITHUB_SEARCH_REPOSITORIES',+ name: 'Search GitHub Repositories',+ description: 'Search for repositories with custom parameters',+ toolkitSlug: 'github',+ inputParams: z.object({+ query: z.string().describe('Search query'),+ perPage: z.number().optional().describe('Results per page'),+ acceptType: z.string().optional().describe('Custom accept header'),+ }),+ execute: async (input, connectionConfig, executeToolRequest) => {+ const result = await executeToolRequest({+ endpoint: '/search/repositories',+ method: 'GET',+ parameters: [+ // Add query parameters for pagination+ {+ name: 'q',+ value: input.query,+ in: 'query',+ },+ {+ name: 'per_page',+ value: (input.perPage || 30).toString(),+ in: 'query',+ },+ // Add custom headers+ {+ name: 'Accept',+ value: input.acceptType || 'application/vnd.github.v3+json',+ in: 'header',+ },+ {+ name: 'X-Custom-Header',+ value: 'custom-value',+ in: 'header',+ },+ ],+ });+ return result;+ },+});+```+ </Tab>+</Tabs>++## Executing Custom Tools++You can execute custom tools just like any other tool:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+response = composio.tools.execute(+ user_id="default",+ slug="TOOL_SLUG", # For the tool above you can use `get_issue_info.slug`+ arguments={"issue_number": 1},+)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+const result = await composio.tools.execute('TOOL_SLUG', {+ arguments: {+ // Tool input parameters+ },+ userId: 'user-id',+ connectedAccountId: 'optional-account-id', // Required for toolkit-based tools+});+```+ </Tab>+</Tabs>++## Best Practices++1. Use descriptive names and slugs for your tools+2. Always provide descriptions for input parameters using `describe()`+3. Handle errors gracefully in your execute function+4. For toolkit-based tools:+ - Prefer `executeToolRequest` over direct API calls when possible+ - Use relative paths with `executeToolRequest` - Composio will automatically inject the correct baseURL+ - Use the `parameters` option to add custom headers or query parameters:+ ```typescript+ parameters: [+ { name: 'page', value: '1', in: 'query' }, // Adds ?page=1 to URL+ { name: 'x-custom', value: 'value', in: 'header' }, // Adds header+ ];+ ```+ - Remember that `executeToolRequest` can only call tools from the same toolkit+ - Use `executeToolRequest` to leverage Composio's automatic credential handling+ - Only use `connectionConfig` when you need to make direct API calls or interact with different services+5. Chain multiple toolkit operations using `executeToolRequest` for better maintainability++## Limitations++1. Custom tools are stored in memory and are not persisted+2. They need to be recreated when the application restarts+3. Toolkit-based tools require a valid connected account with the specified toolkit+4. `executeToolRequest` can only execute tools from the same toolkit that the custom tool belongs to+5. Each toolkit-based tool can only use one connected account at a timediff --git a/fumadocs/content/docs/executing-tools.mdx b/fumadocs/content/docs/executing-tools.mdxnew file mode 100644index 000000000..5725adb03--- /dev/null+++ b/fumadocs/content/docs/executing-tools.mdx@@ -0,0 +1,384 @@+---+title: Executing Tools+description: Learn how to execute Composio tools with different providers and frameworks+---++LLMs on their own can only do generation. Tool calling changes that by letting them interact with external services. Instead of just drafting an email, the model can call `GMAIL_SEND_EMAIL` to actually send it. The tool's results feed back to the LLM, closing the loop so it can decide, act, observe, and adapt.++In Composio, every **tool** is a single API action—fully described with schema, parameters, and return type. Tools live inside **toolkits** like Gmail, Slack, or GitHub, and Composio handles authentication and user scoping.++<Callout type="info">+**User Scoping**: All tools are scoped to a specific user - that's why every example includes a `user_id`. Learn how to structure User IDs in [User Management](/docs/user-management). Each user must authenticate with their respective services (Gmail, Calendar, etc.) - see [Authentication](/docs/authenticating-tools).+</Callout>++## Using Chat Completions++Use the Composio SDK with providers like OpenAI, Anthropic, and Google AI. To learn how to set up these providers, see [Providers](/providers/openai).++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio+from composio_openai import OpenAIProvider+from openai import OpenAI+from datetime import datetime++# Use a unique identifier for each user in your application+user_id = "user-k7334"++# Create composio client+composio = Composio(provider=OpenAIProvider(), api_key="your_composio_api_key")++# Create openai client+openai = OpenAI()++# Get calendar tools for this user+tools = composio.tools.get(+ user_id=user_id,+ tools=["GOOGLECALENDAR_EVENTS_LIST"]+)++# Ask the LLM to check calendar+result = openai.chat.completions.create(+ model="gpt-4o-mini",+ tools=tools,+ messages=[+ {"role": "system", "content": "You are a helpful assistant."},+ {"role": "user", "content": f"What's on my calendar for the next 7 days?"}+ ]+)++# Handle tool calls+result = composio.provider.handle_tool_calls(user_id=user_id, response=result)+print(result)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';+import { AnthropicProvider } from '@composio/anthropic';+import { Anthropic } from '@anthropic-ai/sdk';++// Use a unique identifier for each user in your application+const userId = 'user-k7334';++// Create anthropic client+const anthropic = new Anthropic();++// Create Composio client+const composio = new Composio({+ apiKey: "your-composio-api-key",+ provider: new AnthropicProvider(),+});++// Get calendar tools for this user+const tools = await composio.tools.get(userId, {+ tools: ['GOOGLECALENDAR_EVENTS_LIST'],+});++// Ask the LLM to check calendar+const msg = await anthropic.messages.create({+ model: 'claude-sonnet-4-20250514',+ tools: tools,+ messages: [+ {+ role: 'user',+ content: `What's on my calendar for the next 7 days?`,+ },+ ],+ max_tokens: 1024,+});++// Handle tool calls+const result = await composio.provider.handleToolCalls(userId, msg);+console.log('Results:', JSON.stringify(result, null, 2));+```+ </Tab>+</Tabs>++## Using Agentic Frameworks++Agentic frameworks automatically handle the tool execution loop. Composio provides support for frameworks like this by making sure the tools are formatted into the correct objects for the agentic framework to execute.++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+import asyncio+from agents import Agent, Runner+from composio import Composio+from composio_openai_agents import OpenAIAgentsProvider++# Use a unique identifier for each user in your application+user_id = "user-k7334"++# Initialize Composio toolset+composio = Composio(provider=OpenAIAgentsProvider(), api_key="your_composio_api_key")++# Get all tools for the user+tools = composio.tools.get(+ user_id=user_id,+ toolkits=["COMPOSIO_SEARCH"],+)++# Create an agent with the tools+agent = Agent(+ name="Deep Researcher",+ instructions="You are an investigative journalist.",+ tools=tools,+)++async def main():+ result = await Runner.run(+ starting_agent=agent,+ input=("Do a thorough DEEP research on Golden Gate Bridge"),+ )+ print(result.final_output)++# Run the agent+asyncio.run(main())+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';+import { generateText } from 'ai';+import { anthropic } from '@ai-sdk/anthropic';+import { VercelProvider } from '@composio/vercel';++// Use a unique identifier for each user in your application+const userId = 'user-k7334';++// Initialize Composio toolset+const composio = new Composio({+ apiKey: process.env.COMPOSIO_API_KEY,+ provider: new VercelProvider(),+});++// Get all tools for the user+const tools = await composio.tools.get(userId, {+ toolkits: ['HACKERNEWS_GET_LATEST_POSTS'],+ limit: 10,+});++// Generate text with tool use+const { text } = await generateText({+ model: anthropic('claude-sonnet-4-20250514'),+ messages: [+ {+ role: 'user',+ content: 'Do a thorough DEEP research on the top articles on Hacker News about Composio',+ },+ ],+ tools,+});++console.log(text);+```+ </Tab>+</Tabs>++## Direct Tool Execution++If you just want to call a tool without using any framework or LLM provider, you can use the `execute` method directly.++<Callout type="info">+**Finding tool parameters and types:**++**Platform UI**: [Auth Configs](https://platform.composio.dev?next_page=/auth-configs) → Select your toolkit → Tools & Triggers → Select the tool to see its required and optional parameters++**CLI**: For Python and TypeScript projects, run `composio generate` to generate types. [Learn more →](/docs/cli#generate-type-definitions)+</Callout>++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio++user_id = "user-k7334"+# Configure toolkit versions at SDK level+composio = Composio(+ api_key="your_composio_key",+ toolkit_versions={"github": "20251027_00"}+)++# Find available arguments for any tool in the Composio dashboard+result = composio.tools.execute(+ "GITHUB_LIST_STARGAZERS",+ user_id=user_id,+ arguments={"owner": "ComposioHQ", "repo": "composio", "page": 1, "per_page": 5}+)+print(result)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from "@composio/core";++const userId = "user-k7334";+// Configure toolkit versions at SDK level+const composio = new Composio({+ apiKey: "your_composio_key",+ toolkitVersions: { github: "20251027_00" }+});++// Find available arguments for any tool in the Composio dashboard+const result = await composio.tools.execute("GITHUB_LIST_STARGAZERS", {+ userId,+ arguments: {+ "owner": "ComposioHQ",+ "repo": "composio",+ "page": 1,+ "per_page": 5+ },+});+console.log('GitHub stargazers:', JSON.stringify(result, null, 2));+```+ </Tab>+</Tabs>++<Callout>+The examples above configure toolkit versions at SDK initialization. You can also pass versions per-execution or use environment variables. See [toolkit versioning](/docs/toolkit-versioning) for all configuration options.+</Callout>++### Proxy Execute++You can proxy requests to any supported toolkit API and let Composio inject the authentication state. This is useful when you need an API endpoint that isn't available as a predefined tool.++The `endpoint` can be a relative path or absolute URL. Composio uses the `connected_account_id` to determine the toolkit and resolve relative paths against the appropriate base URL.++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+# Send a proxy request to the endpoint+response = composio.tools.proxy(+ endpoint="/repos/composiohq/composio/issues/1",+ method="GET",+ connected_account_id="ca_jI6********", # use connected account for github+ parameters=[+ {+ "name": "Accept",+ "value": "application/vnd.github.v3+json",+ "type": "header",+ },+ ],+)++print(response)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+// Send a proxy request to the endpoint+const { data } = await composio.tools.proxyExecute({+ endpoint:'/repos/composiohq/composio/issues/1',+ method: 'GET',+ connectedAccountId: 'ca_jI*****', // use connected account for github+ parameters:[+ {+ "name": "Accept",+ "value": "application/vnd.github.v3+json",+ "in": "header",+ },+ ],+});++console.log(data);+```+ </Tab>+</Tabs>++<Callout type="info">+Need an API that isn't supported by any Composio toolkit, or want to extend an existing one? Learn how to [create custom tools](/docs/custom-tools).+</Callout>++## Automatic File Handling++Composio handles file operations automatically. Pass file paths to tools that need them, and get local file paths back from tools that return files.++### File Upload++Pass local file paths, URLs, or File objects to tools that accept files:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+# Upload a local file to Google Drive+result = composio.tools.execute(+ slug="GOOGLEDRIVE_UPLOAD_FILE",+ user_id="user-1235***",+ arguments={"file_to_upload": os.path.join(os.getcwd(), "document.pdf")},+)++print(result) # Print Google Drive file details+```+ </Tab>+ <Tab value="TypeScript">+```typescript+// Upload a local file to Google Drive+const result = await composio.tools.execute('GOOGLEDRIVE_UPLOAD_FILE', {+ userId: 'user-4235***',+ arguments: {+ file_to_upload: path.join(__dirname, 'document.pdf')+ }+});++console.log(result.data); // Contains Google Drive file details+```+ </Tab>+</Tabs>++### File Download++When tools return files, Composio downloads them to the local directory and provides the file path in the response:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+composio = Composio(+ api_key="your_composio_key",+ file_download_dir="./downloads" # Optional: Specify download directory+)++result = composio.tools.execute(+ "GOOGLEDRIVE_DOWNLOAD_FILE",+ user_id="user-1235***",+ arguments={"file_id": "your_file_id"},+)++# Result includes local file path+print(result)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+// Download a file from Google Drive+const result = await composio.tools.execute('GOOGLEDRIVE_DOWNLOAD_FILE', {+ userId: 'user-1235***',+ arguments: {+ file_id: 'your-file-id'+ }+ });++// Result includes local file path+console.log(result);+```+ </Tab>+</Tabs>++### Disabling Auto File Handling++You can disable automatic file handling when initializing the TypeScript SDK. When disabled, handle file uploads and downloads manually using `files.upload` and `files.download`:++```typescript+const composio = new Composio({+ apiKey: process.env.COMPOSIO_API_KEY,+ autoUploadDownloadFiles: false+});++// Now you need to handle files manually using composio.files API+const fileData = await composio.files.upload({+ filePath: path.join(__dirname, 'document.pdf'),+ toolSlug: 'GOOGLEDRIVE_UPLOAD_FILE',+ toolkitSlug: 'googledrive'+});+```diff --git a/fumadocs/content/docs/meta.json b/fumadocs/content/docs/meta.jsonindex 402439578..533eed04f 100644--- a/fumadocs/content/docs/meta.json+++ b/fumadocs/content/docs/meta.json@@ -5,6 +5,12 @@"quickstart","capabilities","---Tools and Triggers---",- "fetching-tools"+ "fetching-tools",+ "authenticating-tools",+ "executing-tools",+ "using-triggers",+ "modify-tool-behavior",+ "custom-tools",+ "toolkit-versioning"]}diff --git a/fumadocs/content/docs/modify-tool-behavior/after-execution-modifiers.mdx b/fumadocs/content/docs/modify-tool-behavior/after-execution-modifiers.mdxnew file mode 100644index 000000000..593a45fa7--- /dev/null+++ b/fumadocs/content/docs/modify-tool-behavior/after-execution-modifiers.mdx@@ -0,0 +1,177 @@+---+title: After Execution Modifiers+description: Transform tool results after execution+---++After execution modifiers are part of Composio SDK's powerful middleware capabilities that allow you to customize and extend the behavior of tools.++These modifiers are called after the tool is executed. This allows you to modify the result of the tool before it is returned to the agent.++**Useful for:**+- Modifying or truncating the output of the tool+- Converting the output to a different format before returning it to the agent++<Figure src="/images/after-execute.png" alt="After Execution Modifier" />++<Callout>+Below we use the `afterExecute` modifier to truncate the output of `HACKERNEWS_GET_USER` and only return the karma of the user.+</Callout>++## With Chat Completions++Since completion providers don't have a function execution step, Composio executes the tool call directly. The modifier is configured on the `tools.execute` method.++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio, after_execute+from composio.types import ToolExecutionResponse++@after_execute(tools=["HACKERNEWS_GET_USER"])+def after_execute_modifier(+ tool: str,+ toolkit: str,+ response: ToolExecutionResponse,+) -> ToolExecutionResponse:+ return {+ **response,+ "data": {+ "karma": response["data"]["karma"],+ },+ }++tools = composio.tools.get(user_id=user_id, slug="HACKERNEWS_GET_USER")++# Get response from the LLM+response = openai_client.chat.completions.create(+ model="gpt-4o-mini",+ tools=tools,+ messages=messages,+)+print(response)++# Execute the function calls+result = composio.provider.handle_tool_calls(+ response=response,+ user_id="default",+ modifiers=[+ after_execute_modifier,+ ]+)+print(result)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+const response = await openai.chat.completions.create({+ model: "gpt-4o-mini",+ messages,+ tools,+ tool_choice: "auto",+});++const { tool_calls } = response.choices[0].message;+console.log(tool_calls);++if (tool_calls) {+ const {+ function: { arguments: toolArgs },+ } = tool_calls[0];++ const result = await composio.tools.execute(+ "HACKERNEWS_GET_USER",+ {+ userId,+ arguments: JSON.parse(toolArgs),+ },+ {+ afterExecute: ({ toolSlug, toolkitSlug, result }) => {+ if (toolSlug === "HACKERNEWS_GET_USER") {+ const { data } = result;+ const { karma } = data.response_data as { karma: number };+ return {+ ...result,+ data: { karma },+ };+ }+ return result;+ },+ }+ );+ console.log(JSON.stringify(result, null, 2));+}+```+ </Tab>+</Tabs>++## With Agentic Frameworks++Agentic providers have a function execution step. The modifier is configured on the `tools.get` method which modifies the execution logic within the framework.++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio, after_execute+from composio.types import ToolExecutionResponse+from composio_crewai import CrewAIProvider++composio = Composio(provider=CrewAIProvider())++@after_execute(tools=["HACKERNEWS_GET_USER"])+def after_execute_modifier(+ tool: str,+ toolkit: str,+ response: ToolExecutionResponse,+) -> ToolExecutionResponse:+ return {+ **response,+ "data": {+ "karma": response["data"]["karma"],+ },+ }++tools = composio.tools.get(+ user_id="default",+ slug="HACKERNEWS_GET_USER",+ modifiers=[+ after_execute_modifier,+ ]+)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from "@composio/core";+import { VercelProvider } from "@composio/vercel";+import { v4 as uuidv4 } from "uuid";++const composio = new Composio({+ apiKey: process.env.COMPOSIO_API_KEY,+ provider: new VercelProvider(),+});++const userId = uuidv4();++const agenticTools = await composio.tools.get(+ userId,+ {+ tools: ["HACKERNEWS_GET_USER"],+ },+ {+ afterExecute: ({ toolSlug, toolkitSlug, result }) => {+ if (toolSlug === "HACKERNEWS_GET_USER") {+ const {+ data: { response_data: { karma } = {} } = {},+ } = result;+ return {+ ...result,+ data: { karma },+ };+ }+ return result;+ },+ }+);+```+ </Tab>+</Tabs>diff --git a/fumadocs/content/docs/modify-tool-behavior/before-execution-modifiers.mdx b/fumadocs/content/docs/modify-tool-behavior/before-execution-modifiers.mdxnew file mode 100644index 000000000..cae278aa9--- /dev/null+++ b/fumadocs/content/docs/modify-tool-behavior/before-execution-modifiers.mdx@@ -0,0 +1,172 @@+---+title: Before Execution Modifiers+description: Modify tool arguments before execution+---++Before execution modifiers are part of Composio SDK's powerful middleware capabilities that allow you to customize and extend the behavior of tools.++These modifiers are called before the tool is executed by the LLM. This allows you to modify the arguments called by the LLM before they are executed by Composio.++**Useful for:**+- Injecting an argument into the tool execution+- Overriding the arguments emitted by the LLM++<Figure src="/images/before-execute.png" alt="Before Execution Modifier" />++<Callout>+Below we use the `beforeExecute` modifier to modify the number of posts returned by `HACKERNEWS_GET_LATEST_POSTS`.+</Callout>++## With Chat Completions++Since completion providers don't have a function execution step, Composio executes the tool call directly. The modifier is configured on the `tools.execute` method.++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from openai import OpenAI+from composio import Composio, before_execute+from composio.types import ToolExecuteParams++composio = Composio()+openai_client = OpenAI()+user_id = "[email protected]"++@before_execute(tools=["HACKERNEWS_GET_LATEST_POSTS"])+def before_execute_modifier(+ tool: str,+ toolkit: str,+ params: ToolExecuteParams,+) -> ToolExecuteParams:+ params["arguments"]["size"] = 1+ return params++# Get tools+tools = composio.tools.get(user_id=user_id, slug="HACKERNEWS_GET_LATEST_POSTS")++# Get response from the LLM+response = openai_client.chat.completions.create(+ model="gpt-4o-mini",+ tools=tools,+ messages=[{"role": "user", "content": "Fetch latest posts from hackernews"}],+)+print(response)++# Execute the function calls+result = composio.provider.handle_tool_calls(+ response=response,+ user_id="default",+ modifiers=[+ before_execute_modifier,+ ],+)+print(result)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+const response = await openai.chat.completions.create({+ model: "gpt-4o-mini",+ messages,+ tools,+ tool_choice: "auto",+});++const { tool_calls } = response.choices[0].message;+console.log(tool_calls);++if (tool_calls) {+ const {+ function: { arguments: toolArgs },+ } = tool_calls[0];++ const result = await composio.tools.execute(+ "HACKERNEWS_GET_LATEST_POSTS",+ {+ userId,+ arguments: JSON.parse(toolArgs),+ },+ {+ beforeExecute: ({ toolSlug, toolkitSlug, params }) => {+ if (toolSlug === "HACKERNEWS_GET_LATEST_POSTS") {+ params.arguments.size = 1;+ }+ console.log(params);+ return params;+ },+ }+ );+ console.log(JSON.stringify(result, null, 2));+}+```+ </Tab>+</Tabs>++## With Agentic Frameworks++Agentic providers have a function execution step. The modifier is configured on the `tools.get` method which modifies the execution logic within the framework.++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio, before_execute+from composio.types import ToolExecuteParams+from composio_crewai import CrewAIProvider++composio = Composio(provider=CrewAIProvider())++@before_execute(tools=["LINEAR_CREATE_LINEAR_ISSUE"])+def modify_linear_project_id(+ tool: str,+ toolkit: str,+ params: ToolExecuteParams,+) -> ToolExecuteParams:+ params["arguments"]["project_id"] = "1234567890"+ return params++tools = composio.tools.get(+ user_id="default",+ tools=[+ "HACKERNEWS_GET_LATEST_POSTS",+ "HACKERNEWS_GET_USER",+ "LINEAR_CREATE_LINEAR_ISSUE",+ ],+ modifiers=[+ modify_linear_project_id,+ ]+)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from "@composio/core";+import { MastraProvider } from "@composio/mastra";++const composio = new Composio({+ apiKey: process.env.COMPOSIO_API_KEY,+ provider: new MastraProvider(),+});++const userId = "[email protected]";++const agenticTools = await composio.tools.get(+ userId,+ {+ tools: [+ "HACKERNEWS_GET_LATEST_POSTS",+ "HACKERNEWS_GET_USER",+ "LINEAR_CREATE_LINEAR_ISSUE",+ ],+ },+ {+ beforeExecute: ({toolSlug, toolkitSlug, params}) => {+ if (toolSlug === "LINEAR_CREATE_LINEAR_ISSUE") {+ params.arguments.project_id = "1234567890";+ }+ return params;+ },+ }+);+```+ </Tab>+</Tabs>diff --git a/fumadocs/content/docs/modify-tool-behavior/meta.json b/fumadocs/content/docs/modify-tool-behavior/meta.jsonnew file mode 100644index 000000000..60111583e--- /dev/null+++ b/fumadocs/content/docs/modify-tool-behavior/meta.json@@ -0,0 +1,8 @@+{+ "title": "Modify tool behavior",+ "pages": [+ "schema-modifiers",+ "before-execution-modifiers",+ "after-execution-modifiers"+ ]+}diff --git a/fumadocs/content/docs/modify-tool-behavior/schema-modifiers.mdx b/fumadocs/content/docs/modify-tool-behavior/schema-modifiers.mdxnew file mode 100644index 000000000..418aed7a3--- /dev/null+++ b/fumadocs/content/docs/modify-tool-behavior/schema-modifiers.mdx@@ -0,0 +1,261 @@+---+title: Schema Modifiers+description: Customize how tools appear to agents+---++Schema modifiers are part of Composio SDK's powerful middleware capabilities that allow you to customize and extend the behavior of tools.++Schema modifiers transform a tool's schema before the tool is seen by an agent.++<Figure src="/images/schema-modifier.png" alt="Schema Modifier" />++**Useful for:**+- Modifying or rewriting the tool description to better fit your use case+- Adding arguments to the tool (e.g., adding a `thought` argument to prompt the agent to explain reasoning)+- Hiding arguments from the tool when they're irrelevant+- Adding extra arguments for custom use cases+- Adding default values to tool arguments++<Callout>+Below we modify the schema of `HACKERNEWS_GET_LATEST_POSTS` to make the `size` argument required and remove the `page` argument.+</Callout>++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio, schema_modifier+from composio.types import Tool++user_id = "[email protected]"++@schema_modifier(tools=["HACKERNEWS_GET_LATEST_POSTS"])+def modify_schema(+ tool: str,+ toolkit: str,+ schema: Tool,+) -> Tool:+ _ = schema.input_parameters["properties"].pop("page", None)+ schema.input_parameters["required"] = ["size"]+ return schema++tools = composio.tools.get(+ user_id=user_id,+ tools=["HACKERNEWS_GET_LATEST_POSTS", "HACKERNEWS_GET_USER"],+ modifiers=[+ modify_schema,+ ]+)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+const userId = "[email protected]";++const tools = await composio.tools.get(+ userId,+ {+ tools: ["HACKERNEWS_GET_LATEST_POSTS", "HACKERNEWS_GET_USER"],+ },+ {+ modifySchema: ({ toolSlug, toolkitSlug, schema }) => {+ if (toolSlug === "HACKERNEWS_GET_LATEST_POSTS") {+ const { inputParameters } = schema;+ if (inputParameters?.properties) {+ delete inputParameters.properties["page"];+ }+ inputParameters.required = ["size"];+ }+ return schema;+ },+ }+);++console.log(JSON.stringify(tools, null, 2));+```+ </Tab>+</Tabs>++With the modified tool schema, the `page` argument is removed and `size` is required.++<Accordions>+ <Accordion title="Full example with LLM">+<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from openai import OpenAI+from composio import Composio, schema_modifier+from composio.types import Tool+from composio_openai import OpenAIProvider++@schema_modifier(tools=["HACKERNEWS_GET_LATEST_POSTS"])+def modify_schema(+ tool: str,+ toolkit: str,+ schema: Tool,+) -> Tool:+ _ = schema.input_parameters["properties"].pop("page", None)+ schema.input_parameters["required"] = ["size"]+ return schema++# Initialize tools+openai_client = OpenAI()+composio = Composio(provider=OpenAIProvider())++# Define task+task = "Get the latest posts from Hacker News"++# Get tools with modifier+tools = composio.tools.get(+ user_id="default",+ tools=['HACKERNEWS_GET_LATEST_POSTS', 'HACKERNEWS_GET_USER'],+ modifiers=[+ modify_schema,+ ],+)++# Get response from the LLM+response = openai_client.chat.completions.create(+ model="gpt-4o-mini",+ tools=tools,+ messages=[+ {"role": "system", "content": "You are a helpful assistant."},+ {"role": "user", "content": task},+ ],+)+print(response)++# Execute the function calls+result = composio.provider.handle_tool_calls(response=response, user_id="default")+print(result)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';+import { OpenAI } from 'openai';++const composio = new Composio({+ apiKey: process.env.COMPOSIO_API_KEY,+});+const openai = new OpenAI();++const userId = '[email protected]';++const tools = await composio.tools.get(+ userId,+ {+ tools: ['HACKERNEWS_GET_LATEST_POSTS', 'HACKERNEWS_GET_USER'],+ },+ {+ modifySchema: ({ toolSlug, toolkitSlug, schema }) => {+ if (toolSlug === 'HACKERNEWS_GET_LATEST_POSTS') {+ const { inputParameters } = schema;+ if (inputParameters?.properties) {+ delete inputParameters.properties['page'];+ }+ inputParameters.required = ['size'];+ }+ return schema;+ },+ }+);++console.log(JSON.stringify(tools, null, 2));++const response = await openai.chat.completions.create({+ model: 'gpt-4o-mini',+ messages: [+ {+ role: 'system',+ content: 'You are a helpful assistant that can help with tasks.',+ },+ { role: 'user', content: 'Get the latest posts from Hacker News' },+ ],+ tools: tools,+ tool_choice: 'auto',+});++console.log(response.choices[0].message.tool_calls);+```+ </Tab>+</Tabs>+ </Accordion>+</Accordions>++## Example: Modifying the tool description++Sometimes you need to provide additional context to help the agent understand how to use a tool correctly. This example demonstrates modifying the description of `GITHUB_LIST_REPOSITORY_ISSUES` to specify a default repository.++<Callout>+This approach is useful when you want to guide the agent's behavior without changing the tool's underlying functionality.+</Callout>++In this example:+- We append additional instructions to the tool's description+- The modified description tells the agent to use `composiohq/composio` as the default repository+- This helps prevent errors when the agent forgets to specify a repository parameter++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio, schema_modifier+from composio.types import Tool+from composio_google import GoogleProvider+from google import genai+from uuid import uuid4++composio = Composio(provider=GoogleProvider())+client = genai.Client()+user_id = uuid4()++@schema_modifier(tools=["GITHUB_LIST_REPOSITORY_ISSUES"])+def append_repository(+ tool: str,+ toolkit: str,+ schema: Tool,+) -> Tool:+ schema.description += " When not specified, use the `composiohq/composio` repository"+ return schema++tools = composio.tools.get(+ user_id=user_id,+ tools=["GITHUB_LIST_REPOSITORY_ISSUES"],+ modifiers=[append_repository]+)++print(tools)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';+import { VercelProvider } from '@composio/vercel';+import { v4 as uuidv4 } from 'uuid';++const userId = uuidv4();+const composio = new Composio({+ apiKey: process.env.COMPOSIO_API_KEY,+ provider: new VercelProvider(),+});++const addDescription = ({ toolSlug, toolkitSlug, schema }) => {+ if (toolSlug === 'GITHUB_LIST_REPOSITORY_ISSUES') {+ schema.description += 'If not specified, use the `composiohq/composio` repository';+ }+ return schema;+};++const tools = await composio.tools.get(+ userId,+ {+ tools: ['GITHUB_LIST_REPOSITORY_ISSUES'],+ },+ {+ modifySchema: addDescription,+ }+);++console.log(tools);+```+ </Tab>+</Tabs>diff --git a/fumadocs/content/docs/toolkit-versioning.mdx b/fumadocs/content/docs/toolkit-versioning.mdxnew file mode 100644index 000000000..cf52733fc--- /dev/null+++ b/fumadocs/content/docs/toolkit-versioning.mdx@@ -0,0 +1,154 @@+---+title: Toolkit Versioning+description: Pin specific tool versions for consistent behavior in production+---++Toolkit versioning ensures your tools behave consistently across deployments. You can pin specific versions in production, test new releases in development, and roll back when needed.++<Callout type="info">+Starting from Python SDK v0.9.0 and TypeScript SDK v0.2.0, specifying versions is required for manual tool execution.+</Callout>++## Configuration methods++Configure toolkit versions using one of three methods:++### SDK initialization++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio++# Pin specific versions for each toolkit+composio = Composio(+ api_key="YOUR_API_KEY",+ toolkit_versions={+ "github": "20251027_00",+ "slack": "20251027_00",+ "gmail": "20251027_00"+ }+)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from "@composio/core";++// Pin specific versions for each toolkit+const composio = new Composio({+ apiKey: "YOUR_API_KEY",+ toolkitVersions: {+ github: "20251027_00",+ slack: "20251027_00",+ gmail: "20251027_00"+ }+});+```+ </Tab>+</Tabs>++### Environment variables++```bash+# Set versions for specific toolkits+export COMPOSIO_TOOLKIT_VERSION_GITHUB="20251027_00"+export COMPOSIO_TOOLKIT_VERSION_SLACK="20251027_00"+export COMPOSIO_TOOLKIT_VERSION_GMAIL="20251027_00"+```++### Per-execution override++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio++composio = Composio(api_key="YOUR_API_KEY")++# Specify version directly in execute call+result = composio.tools.execute(+ "GITHUB_LIST_STARGAZERS",+ arguments={+ "owner": "ComposioHQ",+ "repo": "composio"+ },+ user_id="user-k7334",+ version="20251027_00" # Override version for this execution+)+print(result)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from "@composio/core";++const composio = new Composio({ apiKey: "YOUR_API_KEY" });++// Specify version directly in execute call+const result = await composio.tools.execute("GITHUB_LIST_STARGAZERS", {+ userId: "user-k7334",+ arguments: {+ owner: "ComposioHQ",+ repo: "composio"+ },+ version: "20251027_00" // Override version for this execution+});+console.log(result);+```+ </Tab>+</Tabs>++## Version format++Versions follow the format `YYYYMMDD_NN`:+- `YYYYMMDD`: Release date+- `NN`: Sequential release number++```python+# Production+toolkit_versions = {"github": "20251027_00"}++# Development+toolkit_versions = {"github": "latest"}+```++<Callout type="warn">+Never use `latest` in production. It can introduce breaking changes.+</Callout>++## Version resolution order++1. Per-execution version (highest priority)+2. SDK initialization version+3. Environment variable (toolkit-specific)++## Managing versions++Check available versions using:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+# Get toolkit information including available versions+toolkit = composio.toolkits.get(slug="github")++# Extract and print version information+print(f"Toolkit: {toolkit.name}")+print(f"Current Version: {toolkit.meta.version}")+print(f"Available Versions: {toolkit.meta.available_versions}")+```+ </Tab>+ <Tab value="TypeScript">+```typescript+// Get toolkit information including available versions+const toolkit = await composio.toolkits.get("github");++// Extract and print version information+console.log("Toolkit:", toolkit.name);+console.log("Current Version:", toolkit.meta.version);+console.log("Available Versions:", toolkit.meta.availableVersions);+console.log("Latest Version:", toolkit.meta.availableVersions[0]); // First one is usually the latest+```+ </Tab>+</Tabs>diff --git a/fumadocs/content/docs/using-triggers.mdx b/fumadocs/content/docs/using-triggers.mdxnew file mode 100644index 000000000..1fee0616d--- /dev/null+++ b/fumadocs/content/docs/using-triggers.mdx@@ -0,0 +1,384 @@+---+title: Using Triggers+description: Send payloads to your AI agents or systems based on events in apps+---++When events occur in connected apps (like new Slack messages or GitHub commits), triggers automatically send the event data to your application.++Each event is delivered as a structured payload to your webhook endpoint (via webhooks or WebSockets), enabling your applications or AI agents to respond proactively.++<Figure src="/images/triggers.png" alt="Triggers Overview" caption="Triggers through Composio" />++<Callout type="info" title="Prerequisites">+Before proceeding, ensure you've created an [auth config](/docs/authenticating-tools#creating-an-auth-config) and [established a connection](/docs/authenticating-tools#hosted-authentication-connect-link) to an app (e.g., Slack, GitHub). Triggers are scoped to specific users - learn about [User Management](/docs/user-management) for guidance on structuring User IDs.+</Callout>++## Creating a trigger++You can create triggers using either the Composio dashboard or programmatically via the SDK.++### Using Dashboard++To create triggers through the dashboard:++1. Navigate to the [Auth Configs](https://platform.composio.dev?next_page=%2Fauth-configs) page+2. Select the auth config+3. Click "Add Trigger" and navigate to "Active Triggers" tab to fetch the trigger ID++<Video src="/videos/enabling-triggers.mp4" caption="Creating a trigger from the dashboard" />++Some triggers require additional configuration. The dashboard will prompt you for any required fields during setup.++<Figure+ src="/images/trigger-config.png"+ alt="Trigger configuration example"+ caption="Example: Gmail trigger configuration"+ size="sm"+/>++### Using SDK++Create triggers programmatically by providing the trigger type and any required configuration. The trigger instance will be created using the toolkit version configured during Composio initialization (defaults to `'latest'`).++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio++composio = Composio(api_key="your-api-key")+user_id = "user-id-123435"++# Check what configuration is required+trigger_type = composio.triggers.get_type("GITHUB_COMMIT_EVENT")+print(trigger_type.config)+# Returns: {"properties": {...}, "required": ["owner", "repo"], ...}++# Create trigger with the required config+trigger = composio.triggers.create(+ slug="GITHUB_COMMIT_EVENT",+ user_id=user_id,+ trigger_config={"owner": "your-repo-owner", "repo": "your-repo-name"},+)+print(f"Trigger created: {trigger.trigger_id}")+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';++const composio = new Composio({apiKey: "your-api-key"});+const userId = 'user-id-123435';++// Check what configuration is required+const triggerType = await composio.triggers.getType("GITHUB_COMMIT_EVENT");+console.log(triggerType.config);+// Returns: {"properties": {...}, "required": ["owner", "repo"], ...}++// Create trigger with the required config+const trigger = await composio.triggers.create(+ userId,+ 'GITHUB_COMMIT_EVENT',+ {+ triggerConfig: {+ owner: 'your-repo-owner',+ repo: 'your-repo-name'+ }+ }+);+console.log(`Trigger created: ${trigger.triggerId}`);+```+ </Tab>+</Tabs>++<Callout>+To use a specific toolkit version when creating triggers, configure `toolkitVersions` during initialization. See [Toolkit Versioning](/docs/toolkit-versioning) for more details.+</Callout>++## Subscribing to triggers++### Webhooks++The recommended way to subscribe to triggers is through webhooks. Configure your webhook URL in the [Event & Trigger settings](https://platform.composio.dev?next_page=/settings/events).++Use a publicly accessible URL where Composio can send event payloads. This endpoint should be able to process incoming POST requests containing the trigger data.++<Callout type="info">+**Local development:** Use [ngrok](https://ngrok.com) or [webhook.site](https://webhook.site) to expose your local server to the internet for testing.+</Callout>++Webhook payloads contain:+- `type`: The trigger type identifier+- `data`: The actual event data+- `timestamp`: When the event occurred+- `log_id`: Unique identifier for this event++Below are examples of webhook handlers for FastAPI and Next.js applications:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python[email protected]("/webhook")+async def webhook_handler(request: Request):+ payload = await request.json()++ trigger_type = payload.get("type")+ event_data = payload.get("data", {})++ if trigger_type == "github_star_added_event":+ repo_name = event_data.get("repository_name")+ starred_by = event_data.get("starred_by")+ print(f"Repository {repo_name} starred by {starred_by}")+ # Add your business logic here++ return {"status": "success", "message": "Webhook processed"}+```+ </Tab>+ <Tab value="TypeScript">+```typescript+export default async function webhookHandler(req: NextApiRequest, res: NextApiResponse) {+ const payload = req.body;++ if (payload.type === 'github_star_added_event') {+ const event: TriggerEvent<GitHubStarEventData> = {+ type: payload.type,+ timestamp: payload.timestamp,+ data: payload.data+ };++ console.log(`Repository ${event.data.repository_name} starred by ${event.data.starred_by}`);+ // Add your business logic here+ }++ res.status(200).json({+ status: 'success',+ message: 'Webhook processed'+ });+}+```+ </Tab>+</Tabs>++### Verifying webhook signatures++Composio signs all webhook requests so you can verify they're authentic. Each webhook includes these headers:++- `webhook-signature`: HMAC signature in format `v1,<base64_signature>`+- `webhook-id`: Unique message identifier+- `webhook-timestamp`: Unix timestamp when the webhook was sent++To enable verification:++1. Obtain your webhook secret from the [Composio dashboard](https://platform.composio.dev?next_page=/settings/webhook) under Project Settings → Webhook+2. Set it as the `COMPOSIO_WEBHOOK_SECRET` environment variable+3. Use the verification function in your webhook handler:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+def verify_webhook_signature(request: Request, body: bytes) -> bool:+ """Verify Composio webhook signature"""+ webhook_signature = request.headers.get("webhook-signature")+ webhook_id = request.headers.get("webhook-id")+ webhook_timestamp = request.headers.get("webhook-timestamp")+ webhook_secret = os.getenv("COMPOSIO_WEBHOOK_SECRET")++ if not all([webhook_signature, webhook_id, webhook_timestamp, webhook_secret]):+ raise HTTPException(status_code=400, detail="Missing required webhook headers or secret")++ if not webhook_signature.startswith("v1,"):+ raise HTTPException(status_code=401, detail="Invalid signature format")++ received = webhook_signature[3:]+ signing_string = f"{webhook_id}.{webhook_timestamp}.{body.decode()}"+ expected = base64.b64encode(+ hmac.new(webhook_secret.encode(), signing_string.encode(), hashlib.sha256).digest()+ ).decode()++ if not hmac.compare_digest(received, expected):+ raise HTTPException(status_code=401, detail="Invalid webhook signature")++ return True+```+ </Tab>+ <Tab value="TypeScript">+```typescript+function verifyWebhookSignature(+ req: NextApiRequest,+ body: string+): boolean {+ const signature = req.headers['webhook-signature'] as string | undefined;+ const msgId = req.headers['webhook-id'] as string | undefined;+ const timestamp = req.headers['webhook-timestamp'] as string | undefined;+ const secret = process.env.COMPOSIO_WEBHOOK_SECRET;++ if (!signature || !msgId || !timestamp || !secret) {+ throw new Error('Missing required webhook headers or secret');+ }++ if (!signature.startsWith('v1,')) {+ throw new Error('Invalid signature format');+ }++ const received = signature.slice(3);+ const signingString = `${msgId}.${timestamp}.${body}`;+ const expected = crypto+ .createHmac('sha256', secret)+ .update(signingString)+ .digest('base64');++ return crypto.timingSafeEqual(Buffer.from(received), Buffer.from(expected));+}+```+ </Tab>+</Tabs>++The signature is calculated as:+```+signing_string = "{webhook-id}.{webhook-timestamp}.{raw_body}"+signature = HMAC-SHA256(signing_string, secret)+```++### Prototyping with trigger subscriptions++During development, you can subscribe to triggers directly through the SDK without setting up webhooks.++You can subscribe to multiple trigger events by configuring the filters. When you specify multiple filters, ALL of them must match for the trigger to be subscribed to.++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+from composio import Composio++# Initialize Composio client+composio = Composio(api_key="your_api_key_here")++# Subscribe to trigger events+subscription = composio.triggers.subscribe()++# Define event handler[email protected](trigger_id="your_trigger_id")+def handle_github_commit(data):+ print(f"New commit detected: {data}")+ # Add your custom logic here++# listen for events on the trigger+subscription.wait_forever()+# Note: For production use, set up webhooks instead+```+ </Tab>+ <Tab value="TypeScript">+```typescript+import { Composio } from '@composio/core';++// Initialize Composio client+const composio = new Composio({ apiKey: "your_api_key_here" });++// Subscribe to trigger events+composio.triggers.subscribe(+ (data) => {+ console.log(`New commit detected:`, data);+ // Add your custom logic here+ },+ { triggerId: 'your_trigger_id' }+);++// Note: For production use, set up webhooks instead+```+ </Tab>+</Tabs>++## Trigger payload types++To see what data you'll receive in your webhook handler, inspect the trigger's payload:++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+# Get trigger type to inspect payload structure+trigger = composio.triggers.get_type(slug="GITHUB_COMMIT_EVENT")+print(trigger.payload)+```+ </Tab>+ <Tab value="TypeScript">+```typescript+// Get trigger type to inspect payload structure+const triggerType = await composio.triggers.getType('GITHUB_COMMIT_EVENT');+console.log(triggerType.payload);+```+ </Tab>+</Tabs>++### Type-safe trigger handling (TypeScript)++For better type safety and developer experience in TypeScript, you can define specific payload types and use the `TriggerEvent<T>` interface:++```typescript+import { Composio, TriggerEvent } from '@composio/core';++// Define type-safe payload for GitHub Star Added event+export type GitHubStarAddedEventPayload = {+ action: "created";+ repository_id: number;+ repository_name: string;+ repository_url: string;+ starred_at: string;+ starred_by: string;+};++// Type-safe trigger event handler+function handleGitHubStarEvent(event: TriggerEvent<GitHubStarAddedEventPayload>) {+ console.log(`⭐ ${event.data.repository_name} starred by ${event.data.starred_by}`);+}+```++This approach provides:++- **IntelliSense support** for trigger payload fields+- **Compile-time error checking** for typos and invalid field access+- **Better documentation** through TypeScript types+- **Improved maintainability** of trigger handling code++## Managing triggers++### Enable/disable triggers++You can pause triggers temporarily without deleting them.++<Tabs groupId="language" items={['Python', 'TypeScript']} persist>+ <Tab value="Python">+```python+# Disable a trigger+composio.triggers.disable(trigger_id="ti_abcd123")++# Re-enable when needed+composio.triggers.enable(trigger_id="ti_abcd123")+```+ </Tab>+ <Tab value="TypeScript">+```typescript+// Disable a trigger+await composio.triggers.disable('ti_abcd123');++// Re-enable when needed+await composio.triggers.enable('ti_abcd123');+```+ </Tab>+</Tabs>++You can also manage triggers from the dashboard:++1. Go to the [Auth Config](https://platform.composio.dev?next_page=/auth-configs) page+2. Select your auth config+3. Navigate to "Active Triggers"+4. Disable/Enable the trigger++<Figure+ src="/images/trigger-enable-disable.png"+ alt="Enable/disable triggers"+ caption="Enable/disable triggers in dashboard"+ size="sm"+/>++## Troubleshooting++View detailed trigger logs and debug issues on the [Composio dashboard](https://platform.composio.dev?next_page=/logs/triggers).diff --git a/fumadocs/mdx-components.tsx b/fumadocs/mdx-components.tsxindex 018936156..dbf29644c 100644--- a/fumadocs/mdx-components.tsx+++ b/fumadocs/mdx-components.tsx@@ -4,7 +4,12 @@ import { YouTube } from '@/components/youtube';import { Tabs, Tab, TabsList, TabsTrigger, TabsContent } from 'fumadocs-ui/components/tabs';import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';import { Callout } from 'fumadocs-ui/components/callout';+import { Step, Steps } from 'fumadocs-ui/components/steps';+import { Card, Cards } from 'fumadocs-ui/components/card';+import { ImageZoom } from 'fumadocs-ui/components/image-zoom';import { ProviderCard, ProviderGrid } from '@/components/provider-card';+import { Figure } from '@/components/figure';+import { Video } from '@/components/video';import { CapabilityCard, CapabilityList } from '@/components/capability-card';import { ShieldCheck, Route as RouteIcon } from 'lucide-react';import {@@ -21,6 +26,7 @@ import {export function getMDXComponents(components?: MDXComponents): MDXComponents {return {...defaultMdxComponents,+ img: (props) => <ImageZoom {...(props as any)} />,YouTube,Tabs,Tab,@@ -30,8 +36,14 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {Accordion,Accordions,Callout,+ Step,+ Steps,+ Card,+ Cards,ProviderCard,ProviderGrid,+ Figure,+ Video,CapabilityCard,CapabilityList,// Lucide icons - available globally in MDX without importsdiff --git a/fumadocs/public/images/after-execute.png b/fumadocs/public/images/after-execute.pngnew file mode 100644index 000000000..879931b17Binary files /dev/null and b/fumadocs/public/images/after-execute.png differdiff --git a/fumadocs/public/images/auth-screen-example.png b/fumadocs/public/images/auth-screen-example.pngnew file mode 100644index 000000000..9f7a15766Binary files /dev/null and b/fumadocs/public/images/auth-screen-example.png differdiff --git a/fumadocs/public/images/before-execute.png b/fumadocs/public/images/before-execute.pngnew file mode 100644index 000000000..1211dab55Binary files /dev/null and b/fumadocs/public/images/before-execute.png differdiff --git a/fumadocs/public/images/schema-modifier.png b/fumadocs/public/images/schema-modifier.pngnew file mode 100644index 000000000..c977bd6cdBinary files /dev/null and b/fumadocs/public/images/schema-modifier.png differdiff --git a/fumadocs/public/images/trigger-config.png b/fumadocs/public/images/trigger-config.pngnew file mode 100644index 000000000..2a07003d9Binary files /dev/null and b/fumadocs/public/images/trigger-config.png differdiff --git a/fumadocs/public/images/trigger-enable-disable.png b/fumadocs/public/images/trigger-enable-disable.pngnew file mode 100644index 000000000..6bb555c26Binary files /dev/null and b/fumadocs/public/images/trigger-enable-disable.png differdiff --git a/fumadocs/public/images/triggers.png b/fumadocs/public/images/triggers.pngnew file mode 100644index 000000000..4040c8b53Binary files /dev/null and b/fumadocs/public/images/triggers.png differdiff --git a/fumadocs/public/videos/enabling-triggers.mp4 b/fumadocs/public/videos/enabling-triggers.mp4new file mode 100644index 000000000..7a9f089f5Binary files /dev/null and b/fumadocs/public/videos/enabling-triggers.mp4 differ