### Start Development Server Source: https://docs-composio.vercel.app/cookbooks/chat-app.md Starts the Next.js development server to run the chat application locally. Ensure all dependencies are installed and environment variables are set. ```bash bun dev ``` -------------------------------- ### Install Composio CLI Source: https://docs-composio.vercel.app/docs/cli.md Installs the Composio CLI using a curl script. This is the initial step to start using Composio from your terminal. ```bash curl -fsSL https://composio.dev/install | bash ``` -------------------------------- ### Example cURL Request to Get Project Configuration Source: https://docs-composio.vercel.app/reference/api-reference/projects/getOrgProjectConfig.md Use this cURL command to make a GET request to the project configuration endpoint. Ensure you replace 'YOUR_API_KEY' with your actual API key. ```bash curl -X GET "https://backend.composio.dev/api/v3/org/project/config" \ -H "x-api-key: YOUR_API_KEY" ``` -------------------------------- ### Get Formula 1 Starting Grid Source: https://docs-composio.vercel.app/toolkits/api_sports.md Retrieve the starting grid for a Formula 1 race. Use when you need to get the qualifying positions and times for drivers before a race starts. ```APIDOC ## Get Formula 1 Starting Grid ### Description Tool to retrieve the starting grid for a Formula 1 race. Use when you need to get the qualifying positions and times for drivers before a race starts. ### Slug `API_SPORTS_GET_FORMULA1_RANKINGS_STARTINGGRID` ``` -------------------------------- ### Project Setup with UV Source: https://docs-composio.vercel.app/cookbooks/workplace-search.md Initialize a new Python project and add necessary dependencies using UV. ```bash mkdir composio-workplace-search && cd composio-workplace-search uv init && uv add composio composio-openai-agents openai-agents ``` -------------------------------- ### Composio CLI: Getting Started Source: https://docs-composio.vercel.app/docs/cli.md Basic commands to authenticate, initialize a project, and check your account status. Use the '-y' flag with 'login' for non-interactive runs. ```bash # Authenticate with Composio composio login ``` ```bash # Initialize a project in the current directory composio init ``` ```bash # Check your account composio whoami ``` -------------------------------- ### Get App Installation Functions Source: https://docs-composio.vercel.app/toolkits/contentful.md Tool to get all functions for an app installation in a Contentful environment. Use when you need to retrieve the list of functions defined for an installed app in a specific space and environment. ```APIDOC ## Get App Installation Functions ### Description Retrieves all functions for an app installation in a Contentful environment. ### Method GET ### Endpoint /spaces/{spaceId}/environments/{environmentId}/app-installations/{appInstallationId}/functions ### Parameters #### Path Parameters - **spaceId** (string) - Required - The ID of the space. - **environmentId** (string) - Required - The ID of the environment. - **appInstallationId** (string) - Required - The ID of the app installation. ``` -------------------------------- ### Get a code scanning default setup configuration Source: https://docs-composio.vercel.app/toolkits/github.md Gets the default setup configuration for code scanning in a repository, including state, languages, query suite, and schedule for a repository if it exists. ```APIDOC ## Get a code scanning default setup configuration ### Description Gets the default setup configuration for code scanning in a repository, including state, languages, query suite, and schedule for a repository if it exists. ### Slug GITHUB_GET_CODE_SCANNING_DEFAULT_SETUP ``` -------------------------------- ### Quick Start: Composio Python SDK Source: https://docs-composio.vercel.app/reference/sdk-reference/python.md Initialize the Composio SDK with an API key, retrieve tools for a user, and execute a tool. ```python from composio import Composio composio = Composio(api_key="your-api-key") # Get tools for a user tools = composio.tools.get("user-123", toolkits=["github"]) # Execute a tool result = composio.tools.execute( "GITHUB_GET_REPOS", arguments={"owner": "composio"}, user_id="user-123" ) ``` -------------------------------- ### Create Session and Run Agent (Python) Source: https://docs-composio.vercel.app/docs/providers/langchain.md Python example demonstrating how to create a Composio session, retrieve tools, and use them with a LangChain agent. ```python from composio import Composio from composio_langchain import LangchainProvider from langchain.agents import create_agent from langchain_openai import ChatOpenAI composio = Composio(provider=LangchainProvider()) llm = ChatOpenAI(model="gpt-5.2") # Create a session for your user session = composio.create(user_id="user_123") tools = session.tools() agent = create_agent(tools=tools, model=llm) result = agent.invoke({"messages": [("user", "Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'")]}) print(result["messages"][-1].content) ``` -------------------------------- ### List transactions Source: https://docs-composio.vercel.app/toolkits/mx_technologies.md Retrieves all financial transactions for an MX user across all their connected accounts and members. Use this tool to get a user's complete transaction history. Supports pagination, date filtering, and optional enhanced data (merchants, geolocations, classifications, repeating transactions). Prerequisites: You need a valid MX user GUID (starts with 'USR-'). Get this from the List Users action. ```APIDOC ## List transactions ### Description Retrieve all financial transactions for an MX user across all their connected accounts and members. Use this tool to get a user's complete transaction history. Supports pagination, date filtering, and optional enhanced data (merchants, geolocations, classifications, repeating transactions). Prerequisites: You need a valid MX user GUID (starts with 'USR-'). Get this from the List Users action. ### Slug `MX_TECHNOLOGIES_LIST_TRANSACTIONS` ``` -------------------------------- ### Run the App Source: https://docs-composio.vercel.app/cookbooks/app-connections-dashboard.md Command to start the development server. ```bash bun dev ``` -------------------------------- ### Get User Source: https://docs-composio.vercel.app/toolkits/harvest.md Tool to retrieve a specific user by ID. Use after obtaining a valid user ID (for example via List Users). Example: "Get details of user 3230547". ```APIDOC ## Get User ### Description Tool to retrieve a specific user by ID. Use after obtaining a valid user ID (for example via List Users). Example: "Get details of user 3230547". ### Slug HARVEST_GET_USER ``` -------------------------------- ### Initialize and Run a Composio Agent in Python Source: https://docs-composio.vercel.app/llms-full.txt Demonstrates initializing Composio, fetching tools, creating an agent, and running it to perform a GitHub action. Ensure the 'agents', 'composio-myagent', and 'composio' libraries are installed. ```python import asyncio from agents import Agent, Runner from composio_myagent import MyAgentProvider from composio import Composio # Initialize Composio toolset composio = Composio(provider=MyAgentProvider()) # Get all the tools tools = composio.tools.get( user_id="default", tools=["GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER"], ) # Create an agent with the tools agent = Agent( name="GitHub Agent", instructions="You are a helpful assistant that helps users with GitHub tasks.", tools=tools, ) # Run the agent async def main(): result = await Runner.run( starting_agent=agent, input=( "Star the repository composiohq/composio on GitHub. If done " "successfully, respond with 'Action executed successfully'" ), ) print(result.final_output) asyncio.run(main()) ``` -------------------------------- ### Get paper recommendations Source: https://docs-composio.vercel.app/toolkits/semanticscholar.md Tool to get paper recommendations based on positive and negative example papers. Use when you need to find papers similar to ones you like (positive examples) and optionally dissimilar to ones you don't like (negative examples). The recommendation engine analyzes the provided examples and returns relevant papers from the Semantic Scholar database. ```APIDOC ## SEMANTICSCHOLAR_GET_PAPER_RECOMMENDATIONS ### Description Gets paper recommendations based on positive and negative example papers. ### Usage Use when you need to find papers similar to ones you like (positive examples) and optionally dissimilar to ones you don't like (negative examples). ``` -------------------------------- ### Get Installed EPM Packages Source: https://docs-composio.vercel.app/toolkits/kibana.md Retrieves the list of installed packages in the Elastic Package Manager. Use this when you need to check which packages are currently installed in Fleet. ```APIDOC ## Get Installed EPM Packages ### Description Tool to retrieve the list of installed packages in the Elastic Package Manager. Use this when you need to check which packages are currently installed in Fleet. ### Slug KIBANA_GET_FLEET_EPM_PACKAGES_INSTALLED ``` -------------------------------- ### Create Session and Run Agent (TypeScript) Source: https://docs-composio.vercel.app/docs/providers/langchain.md TypeScript example demonstrating how to create a Composio session, retrieve tools, and integrate them into a LangChain agent workflow. ```typescript import { ChatOpenAI } from '@langchain/openai'; import { HumanMessage, AIMessage } from '@langchain/core/messages'; import { ToolNode } from '@langchain/langgraph/prebuilt'; import { StateGraph, MessagesAnnotation } from '@langchain/langgraph'; import { Composio } from '@composio/core'; import { LangchainProvider } from '@composio/langchain'; const composio = new Composio({ provider: new LangchainProvider(), }); // Create a session for your user const session = await composio.create("user_123"); const tools = await session.tools(); const toolNode = new ToolNode(tools); const model = new ChatOpenAI({ model: 'gpt-5.2', temperature: 0, }).bindTools(tools); function shouldContinue({ messages }: typeof MessagesAnnotation.State) { const lastMessage = messages[messages.length - 1] as AIMessage; if (lastMessage.tool_calls?.length) { return 'tools'; } return '__end__'; } async function callModel(state: typeof MessagesAnnotation.State) { const response = await model.invoke(state.messages); return { messages: [response] }; } const workflow = new StateGraph(MessagesAnnotation) .addNode('agent', callModel) .addEdge('__start__', 'agent') .addNode('tools', toolNode) .addEdge('tools', 'agent') .addConditionalEdges('agent', shouldContinue); const app = workflow.compile(); const finalState = await app.invoke({ messages: [new HumanMessage("Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'")], }); console.log(finalState.messages[finalState.messages.length - 1].content); ``` -------------------------------- ### Get Integrations Apps Installation Source: https://docs-composio.vercel.app/toolkits/safetyculture.md Tool to retrieve details of a specific app installation by its app ID and installation ID. Use when you need to view an existing application installation's configuration and details. ```APIDOC ## Get Integrations Apps Installation ### Description Tool to retrieve details of a specific app installation by its app ID and installation ID. Use when you need to view an existing application installation's configuration and details. ### Slug `SAFETYCULTURE_GET_INTEGRATIONS_APPS_INSTALLATION` ``` -------------------------------- ### Composio SDK Quick Start Source: https://docs-composio.vercel.app/reference/sdk-reference/typescript.md Initialize the Composio SDK, retrieve tools for a user, and execute a tool. Ensure your COMPOSIO_API_KEY is set in the environment variables. ```typescript import { Composio } from '@composio/core'; const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY }); // Get tools for a user const tools = await composio.tools.get('user-123', { toolkits: ['github'] }); // Execute a tool const result = await composio.tools.execute('GITHUB_GET_REPOS', { userId: 'user-123', arguments: { owner: 'composio' } }); ``` -------------------------------- ### Get a Product Source: https://docs-composio.vercel.app/toolkits/fireberry.md Tool to retrieve a specific product record by its GUID. Use when you need to get detailed information about a product. ```APIDOC ## Get a Product ### Description Retrieves a specific product record by its GUID. ### Slug `FIREBERRY_GET_A_PRODUCT` ``` -------------------------------- ### Setup Composio SDK and Connect to Gmail Source: https://docs-composio.vercel.app/cookbooks/gmail-labeler.md Initializes the Composio SDK with a provider and sets up the connection to Gmail. It checks if Gmail is already connected and initiates OAuth if necessary, waiting for user authorization. ```python import sys # region setup import asyncio from composio import Composio from composio_claude_agent_sdk import ClaudeAgentSDKProvider from claude_agent_sdk import query, ClaudeAgentOptions, create_sdk_mcp_server composio = Composio(provider=ClaudeAgentSDKProvider()) # endregion setup # region connect def connect(user_id: str): """Check if Gmail is connected. If not, start OAuth and wait.""" session = composio.create(user_id=user_id, toolkits=["gmail"]) toolkits = session.toolkits() for t in toolkits.items: if t.slug == "gmail" and t.connection and t.connection.is_active: print("Gmail is already connected.") return connection_request = session.authorize("gmail") print(f"Open this URL to connect Gmail:\n{connection_request.redirect_url}") connection_request.wait_for_connection() print("Connected.") # endregion connect ``` -------------------------------- ### Get an Asset Source: https://docs-composio.vercel.app/toolkits/fireberry.md Tool to retrieve a specific asset record by its GUID. Use when you need to get detailed information about an asset. ```APIDOC ## Get an Asset ### Description Retrieves a specific asset record by its GUID. ### Slug `FIREBERRY_GET_AN_ASSET` ``` -------------------------------- ### Initial GitHub Connection Setup Script Source: https://docs-composio.vercel.app/llms-full.txt This Python script initializes a Composio session, creates a GitHub connection for a specified user ID, and prints a URL for the user to visit to authorize the connection. It then waits for the connection to be established. ```bash python -c " from composio import Composio composio = Composio() session = composio.create(user_id='user_123', toolkits=['github']) connection = session.authorize('github') print('Visit this URL to connect GitHub:', connection.redirect_url) connection.wait_for_connection() print('Connected!') " ``` -------------------------------- ### Get Sentry App Installations for Organization Source: https://docs-composio.vercel.app/toolkits/sentry.md Retrieves a list of Sentry App installations for a given organization, which must exist. ```APIDOC ## Get Sentry App Installations for Organization ### Description Retrieves a list of Sentry App installations for a given organization, which must exist. ### Slug `SENTRY_GET_SENTRY_APP_INSTALLATIONS_FOR_ORGANIZATION` ``` -------------------------------- ### Project Setup for Gmail Labeler Source: https://docs-composio.vercel.app/llms-full.txt Commands to create a new project directory, initialize it with UV, and add necessary dependencies for the Gmail Labeler cookbook. ```bash mkdir composio-gmail-labeler && cd composio-gmail-labeler uv init && uv add composio composio-claude-agent-sdk claude-agent-sdk ``` -------------------------------- ### Create and Run a CrewAI Crew with Composio Tools Source: https://docs-composio.vercel.app/docs/providers/crewai.md This example demonstrates how to initialize Composio with the CrewAI provider, create a user session, retrieve tools, define an agent, create a task, and run the crew. Ensure your LLM is set to 'gpt-5.2'. ```python from crewai import Agent, Crew, Task from composio import Composio from composio_crewai import CrewAIProvider composio = Composio(provider=CrewAIProvider()) # Create a session for your user session = composio.create(user_id="user_123") tools = session.tools() agent = Agent( role="Email Agent", goal="Send emails on behalf of the user", backstory="You are an AI agent that sends emails using Gmail.", tools=tools, llm="gpt-5.2", ) task = Task( description="Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'", agent=agent, expected_output="Confirmation that the email was sent", ) crew = Crew(agents=[agent], tasks=[task]) result = crew.kickoff() print(result) ``` -------------------------------- ### Get a Project Source: https://docs-composio.vercel.app/toolkits/fireberry.md Tool to retrieve a specific project from Fireberry by its GUID. Use when you need to get detailed information about a particular project. ```APIDOC ## Get a Project ### Description Retrieves a specific project from Fireberry by its GUID. ### Slug `FIREBERRY_GET_A_PROJECT` ``` -------------------------------- ### Complete Script Setup Source: https://docs-composio.vercel.app/llms-full.txt Imports necessary libraries and initializes the Composio client with the ClaudeAgentSDKProvider. This section consolidates the setup code required for the entire script. ```python import sys # region setup import asyncio from composio import Composio from composio_claude_agent_sdk import ClaudeAgentSDKProvider from claude_agent_sdk import query, ClaudeAgentOptions, create_sdk_mcp_server composio = Composio(provider=ClaudeAgentSDKProvider()) # endregion setup ``` -------------------------------- ### Get Project Source: https://docs-composio.vercel.app/toolkits/breeze.md Tool to get a specific project by ID. Use when you need detailed project information after confirming the project ID. Example: "Get project 123 details". ```APIDOC ## Get Project ### Description Tool to get a specific project by ID. Use when you need detailed project information after confirming the project ID. Example: "Get project 123 details". ### Slug `BREEZE_GET_PROJECT` ``` -------------------------------- ### Create OpenAI Agents Session and Run Agent Source: https://docs-composio.vercel.app/llms-full.txt This example demonstrates how to create a session with the OpenAI Agents provider and run an agent. It requires the `agents` library and Composio core. ```python import asyncio from composio import Composio from composio_openai_agents import OpenAIAgentsProvider from agents import Agent, Runner composio = Composio(provider=OpenAIAgentsProvider()) # Create a session for your user session = composio.create(user_id="user_123") tools = session.tools() agent = Agent( name="Email Agent", instructions="You are a helpful assistant.", tools=tools, ) async def main(): result = await Runner.run( starting_agent=agent, input="Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'", ) print(result.final_output) asyncio.run(main()) ``` ```typescript import { Composio } from "@composio/core"; import { OpenAIAgentsProvider } from "@composio/openai-agents"; import { Agent, run } from "@openai/agents"; const composio = new Composio({ provider: new OpenAIAgentsProvider(), }); // Create a session for your user const session = await composio.create("user_123"); const tools = await session.tools(); const agent = new Agent({ name: "Email Agent", instructions: "You are a helpful assistant.", tools, }); const result = await run( agent, "Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'" ); console.log(result.finalOutput); ``` -------------------------------- ### Get a Task Source: https://docs-composio.vercel.app/toolkits/fireberry.md Tool to retrieve a specific task record by its GUID. Use when you need to get detailed information about an existing task in Fireberry. ```APIDOC ## Get a Task ### Description Retrieves a specific task record by its GUID. ### Slug `FIREBERRY_GET_A_TASK` ``` -------------------------------- ### Python: Correct Composio Integration (Native Tools) Source: https://docs-composio.vercel.app/docs/migration-guide/toolkit-versioning.md Demonstrates the correct way to initialize the Composio SDK and create a session for using native tools, defaulting to OpenAI. ```python # ✅ CORRECT — Python (defaults to OpenAI) from composio import Composio composio = Composio() session = composio.create(user_id="user_123") tools = session.tools() ``` -------------------------------- ### Get All Starter Presets Source: https://docs-composio.vercel.app/toolkits/botsonic.md Tool to retrieve all starter presets for a bot by bot ID. Use when you need to fetch the bot's welcome message and starter questions configured for user interactions. ```APIDOC ## BOTSONIC_GET_ALL_STARTER_PRESETS ### Description Tool to retrieve all starter presets for a bot by bot ID. Use when you need to fetch the bot's welcome message and starter questions configured for user interactions. ### Method GET ### Endpoint /botsonic/bots/{bot_id}/starter-presets ### Parameters #### Path Parameters - **bot_id** (string) - Required - The unique identifier of the bot. ``` -------------------------------- ### Get App Installation Details Source: https://docs-composio.vercel.app/toolkits/shopify.md Query a specific app installation on a Shopify store. Use when you need to retrieve details about an app installation including access scopes, launch URL, and uninstall URL. ```APIDOC ## Get App Installation Details ### Description Query a specific app installation on a Shopify store. Retrieve details including access scopes, launch URL, and uninstall URL. ### Slug `SHOPIFY_GET_APP_INSTALLATION` ``` -------------------------------- ### Full Application Setup with Chat and Connections Source: https://docs-composio.vercel.app/llms-full.txt Provides a complete FastAPI application setup including agent chat, listing connections, checking specific connections, and initiating app connections. Requires setup for Composio and OpenAI agents. ```python # region setup from agents import Agent, Runner from composio import Composio from composio_openai_agents import OpenAIAgentsProvider from fastapi import FastAPI from pydantic import BaseModel composio = Composio(provider=OpenAIAgentsProvider()) app = FastAPI() # endregion setup # region chat class ChatRequest(BaseModel): user_id: str message: str @app.post("/chat") def chat(request: ChatRequest): """Send a message to an AI agent with access to all tools.""" session = composio.create(user_id=request.user_id) tools = session.tools() agent = Agent( name="Assistant", instructions="You are a helpful assistant. Use tools to help the user.", tools=tools, ) result = Runner.run_sync(starting_agent=agent, input=request.message) return {"response": result.final_output} # endregion chat # region list-connections @app.get("/connections/{user_id}") def list_connections(user_id: str): """List all toolkits and their connection status for a user.""" session = composio.create(user_id=user_id) toolkits = session.toolkits() return [ {"toolkit": t.slug, "connected": t.connection.is_active if t.connection else False} for t in toolkits.items ] # endregion list-connections # region check-connection @app.get("/connections/{user_id}/{toolkit}") def check_connection(user_id: str, toolkit: str): """Check if a specific toolkit is connected for a user.""" session = composio.create(user_id=user_id, toolkits=[toolkit]) toolkits = session.toolkits() for t in toolkits.items: if t.slug == toolkit: return {"toolkit": toolkit, "connected": t.connection.is_active if t.connection else False} return {"toolkit": toolkit, "connected": False} # endregion check-connection # region connect class ConnectRequest(BaseModel): user_id: str @app.post("/connect/{toolkit}") def connect_toolkit(toolkit: str, request: ConnectRequest): """Start OAuth for a toolkit. Returns a URL to redirect the user to.""" session = composio.create(user_id=request.user_id, toolkits=[toolkit]) connection_request = session.authorize(toolkit) return {"redirect_url": connection_request.redirect_url} # endregion connect ``` -------------------------------- ### Get an Order Item Source: https://docs-composio.vercel.app/toolkits/fireberry.md Tool to retrieve a specific order item record by its GUID. Use when you need to get detailed information about an order item. ```APIDOC ## Get an Order Item ### Description Retrieves a specific order item record by its GUID. ### Slug `FIREBERRY_GET_AN_ORDER_ITEM` ``` -------------------------------- ### Get and Execute a Tool with Composio SDK Source: https://docs-composio.vercel.app/llms-full.txt Demonstrates how to retrieve available tools for a user and then execute a specific tool with provided arguments. Ensure the user ID and toolkits are correctly specified. ```python tools = composio.tools.get("user-123", toolkits=["github"]) result = composio.tools.execute( "GITHUB_GET_REPOS", arguments={"owner": "composio"}, user_id="user-123" ) ``` -------------------------------- ### Get a CRM Order Source: https://docs-composio.vercel.app/toolkits/fireberry.md Tool to retrieve a specific CRM Order from Fireberry by its GUID. Use when you need to get detailed information about a particular order. ```APIDOC ## Get a CRM Order ### Description Tool to retrieve a specific CRM Order from Fireberry by its GUID. Use when you need to get detailed information about a particular order. ### Slug `FIREBERRY_GET_A_CRMORDER` ``` -------------------------------- ### Get all payments of a subscription Source: https://docs-composio.vercel.app/toolkits/pipedrive.md Returns all payments of an installment or recurring subscription. ```APIDOC ## Get all payments of a subscription ### Description Returns all payments of an installment or recurring subscription. ### Slug `PIPEDRIVE_GET_SUBSCRIPTION_PAYMENTS` ``` -------------------------------- ### Create MCP Server Using All Tools from Toolkits Source: https://docs-composio.vercel.app/llms-full.txt Demonstrates creating an MCP server where all available tools from the specified toolkits are included by default. This is the default behavior when `allowed_tools` is not provided. ```python server = composio.experimental.mcp.create( 'all-tools-server', toolkits=['composio_search', 'text_to_pdf'] # allowed_tools=None means all tools from these toolkits ) ``` -------------------------------- ### Initialize Composio and Agent with Tools (Python) Source: https://docs-composio.vercel.app/docs/authenticating-users/in-chat-authentication.md Set up Composio with an OpenAI Agents provider and initialize an agent with the necessary tools obtained from the session. Ensure environment variables like `COMPOSIO_API_KEY` are loaded. ```python from dotenv import load_dotenv from composio import Composio from agents import Agent, Runner, SQLiteSession from composio_openai_agents import OpenAIAgentsProvider load_dotenv() # Initialize Composio with OpenAI Agents provider (API key from env var COMPOSIO_API_KEY) composio = Composio(provider=OpenAIAgentsProvider()) # Unique identifier of the user user_id = "user_123" # Create a session and get native tools for the user session = composio.create(user_id=user_id) tools = session.tools() # Configure OpenAI agent with Composio tools agent = Agent( name="Personal Assistant", instructions="You are a helpful personal assistant. Use Composio tools to take action.", model="gpt-5.2", tools=tools, ) ``` -------------------------------- ### Cookbooks Source: https://docs-composio.vercel.app/llms.txt Practical examples and guides for using Composio in various applications. ```APIDOC ## GET /cookbooks/app-connections-dashboard.md ### Description Cookbook for building an app connections dashboard. ### Method GET ### Endpoint /cookbooks/app-connections-dashboard.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: App Connections Dashboard Learn how to create a dashboard to manage application connections... ``` ``` ```APIDOC ## GET /cookbooks/background-agent.md ### Description Cookbook for creating a background agent. ### Method GET ### Endpoint /cookbooks/background-agent.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: Background Agent Build a background agent to automate tasks... ``` ``` ```APIDOC ## GET /cookbooks/chat-app.md ### Description Cookbook for building a chat application with Composio. ### Method GET ### Endpoint /cookbooks/chat-app.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: Chat App Integrate Composio to power your chat application... ``` ``` ```APIDOC ## GET /cookbooks/fast-api.md ### Description Cookbook demonstrating Composio integration with FastAPI. ### Method GET ### Endpoint /cookbooks/fast-api.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: FastAPI Integration Use Composio within your FastAPI applications... ``` ``` ```APIDOC ## GET /cookbooks/gmail-labeler.md ### Description Cookbook for creating a Gmail labeler. ### Method GET ### Endpoint /cookbooks/gmail-labeler.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: Gmail Labeler Automate labeling of your Gmail messages... ``` ``` ```APIDOC ## GET /cookbooks/hono.md ### Description Cookbook demonstrating Composio integration with Hono. ### Method GET ### Endpoint /cookbooks/hono.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: Hono Integration Use Composio with the Hono framework... ``` ``` ```APIDOC ## GET /cookbooks/pr-review-agent.md ### Description Cookbook for building a pull request review agent. ### Method GET ### Endpoint /cookbooks/pr-review-agent.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: PR Review Agent Automate code reviews for your pull requests... ``` ``` ```APIDOC ## GET /cookbooks/slack-summariser.md ### Description Cookbook for creating a Slack message summarizer. ### Method GET ### Endpoint /cookbooks/slack-summariser.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: Slack Summarizer Summarize long Slack conversations... ``` ``` ```APIDOC ## GET /cookbooks/supabase-sql-agent.md ### Description Cookbook for using a SQL agent with Supabase. ### Method GET ### Endpoint /cookbooks/supabase-sql-agent.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: Supabase SQL Agent Interact with your Supabase database using a SQL agent... ``` ``` ```APIDOC ## GET /cookbooks/support-agent.md ### Description Cookbook for building a customer support agent. ### Method GET ### Endpoint /cookbooks/support-agent.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: Support Agent Develop an AI-powered support agent... ``` ``` ```APIDOC ## GET /cookbooks/templates.md ### Description Cookbook demonstrating the use of templates. ### Method GET ### Endpoint /cookbooks/templates.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: Templates Utilize pre-defined templates for common tasks... ``` ``` ```APIDOC ## GET /cookbooks/tool-generator.md ### Description Cookbook for generating custom tools. ### Method GET ### Endpoint /cookbooks/tool-generator.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: Tool Generator Learn how to create your own tools... ``` ``` ```APIDOC ## GET /cookbooks/workplace-search.md ### Description Cookbook for building a workplace search application. ### Method GET ### Endpoint /cookbooks/workplace-search.md ### Parameters None ### Response #### Success Response (200) - **content** (string) - Markdown content of the cookbook. #### Response Example ``` # Cookbook: Workplace Search Develop a powerful search tool for your organization... ``` ``` -------------------------------- ### Correct Composio Integration - Python Source: https://docs-composio.vercel.app/cookbooks/app-connections-dashboard.md Demonstrates the correct way to initialize the Composio SDK in Python, create a session, and fetch available tools. This is the default setup for AI agents. ```python # ✅ CORRECT — Python (defaults to OpenAI) from composio import Composio composio = Composio() session = composio.create(user_id="user_123") tools = session.tools() # Pass tools to your agent/LLM framework ``` -------------------------------- ### GET /api/v3/auth_configs Source: https://docs-composio.vercel.app/reference/api-reference/auth-configs/getAuthConfigs.md Example cURL request to fetch authentication configurations. ```APIDOC ## GET /api/v3/auth_configs ### Description Fetches the authentication configurations. ### Method GET ### Endpoint `/api/v3/auth_configs` ### Request Example ```bash curl -X GET "https://backend.composio.dev/api/v3/auth_configs" \ -H "x-api-key: YOUR_API_KEY" ``` ### Response #### Success Response (200) - `auth_configs` (array) - A list of authentication configurations. #### Response Example ```json { "auth_configs": [ { "id": "string", "name": "string", "type": "string", "created_at": "string", "updated_at": "string" } ] } ``` ``` -------------------------------- ### Get All Starter Questions Source: https://docs-composio.vercel.app/toolkits/botsonic.md Tool to retrieve all starter questions. Use after authenticating when you need to list the bot’s opening prompts. ```APIDOC ## BOTSONIC_GET_ALL_STARTER_QUESTIONS ### Description Tool to retrieve all starter questions. Use after authenticating when you need to list the bot’s opening prompts. ### Method GET ### Endpoint /botsonic/starter-questions ### Parameters #### Query Parameters - **limit** (integer) - Optional - The maximum number of items to return. - **offset** (integer) - Optional - The number of items to skip before starting to collect the result set. ``` -------------------------------- ### Get Project Tasks Source: https://docs-composio.vercel.app/toolkits/worksnaps.md Tool to retrieve tasks for a specific project. Use when you have a project ID and need its tasks. Example: 'Get tasks for project 42'. ```APIDOC ## Get Project Tasks ### Description Retrieves tasks for a specific project. ### Slug `WORKSNAPS_GET_TASKS` ``` -------------------------------- ### Get Estimate Source: https://docs-composio.vercel.app/toolkits/harvest.md Tool to retrieve a specific estimate by ID. Use after confirming the estimate ID. Example: "Get estimate with ID 123456". ```APIDOC ## Get Estimate ### Description Tool to retrieve a specific estimate by ID. Use after confirming the estimate ID. Example: "Get estimate with ID 123456". ### Slug HARVEST_GET_ESTIMATE ``` -------------------------------- ### Create Session and Get Tools (Python) Source: https://docs-composio.vercel.app/docs/providers/openai.md Use `composio.create(user_id)` to initiate a session and `session.tools()` to retrieve available tools for native tool integration. This is the entry point for all Composio integrations. ```python session = composio.create(user_id="user_123") tools = session.tools() ``` -------------------------------- ### Get Account Statements Source: https://docs-composio.vercel.app/toolkits/brex.md Get finalized statements for the primary cash account. Returns statement history including start and end balances for each statement period. ```APIDOC ## Get Account Statements ### Description Get finalized statements for the primary cash account. Returns statement history including start and end balances for each statement period. ### Slug `BREX_GET_ACCOUNT_STATEMENTS` ``` -------------------------------- ### Python: Initialize Composio with OpenAI Provider Source: https://docs-composio.vercel.app/docs/tools-direct/modify-tool-behavior/schema-modifiers.md Initialize the Composio client with the OpenAI provider. This is the default if no provider is specified. ```python from composio.providers import OpenAIProvider from composio.composio import Composio composio = Composio(provider=OpenAIProvider()) ``` -------------------------------- ### Example: Get Meta Tools for a Session Source: https://docs-composio.vercel.app/reference/sdk-reference/python/tools.md Demonstrates how to retrieve meta tools for a given session ID using the `get_raw_tool_router_meta_tools` method. This is a basic usage example. ```python from composio import Composio composio = Composio() tools_model = composio.tools # Get meta tools for a session meta_tools = tools_model.get_raw_tool_router_meta_tools("session_123") print(meta_tools) ``` -------------------------------- ### Create MCP Server with Toolkit Configurations Source: https://docs-composio.vercel.app/llms-full.txt Example of creating a new MCP server configuration using specific toolkit configurations, including authentication details. This method is useful for setting up complex environments with distinct authentication for each toolkit. ```python server = composio.experimental.mcp.create( 'personal-mcp-server', toolkits=[ { 'toolkit': 'github', 'auth_config_id': 'ac_xyz', }, { 'toolkit': 'slack', 'auth_config_id': 'ac_abc', }, ], allowed_tools=['GITHUB_CREATE_ISSUE', 'GITHUB_LIST_REPOS', 'SLACK_SEND_MESSAGE'], manually_manage_connections=False ) ``` -------------------------------- ### Create Session and Run Agent (Python) Source: https://docs-composio.vercel.app/docs/providers/openai-agents.md Demonstrates creating a Composio session with the OpenAI Agents provider and running an agent with tools. Ensure you have asyncio imported for asynchronous operations. ```python import asyncio from composio import Composio from composio_openai_agents import OpenAIAgentsProvider from agents import Agent, Runner composio = Composio(provider=OpenAIAgentsProvider()) # Create a session for your user session = composio.create(user_id="user_123") tools = session.tools() agent = Agent( name="Email Agent", instructions="You are a helpful assistant.", tools=tools, ) async def main(): result = await Runner.run( starting_agent=agent, input="Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'", ) print(result.final_output) asyncio.run(main()) ``` -------------------------------- ### Tool Execution Source: https://docs-composio.vercel.app/llms-full.txt Examples of how to get and execute tools using the Composio SDK. ```APIDOC ## Get tools for a user ```python tools = composio.tools.get("user-123", toolkits=["github"]) ``` ## Execute a tool ```python result = composio.tools.execute( "GITHUB_GET_REPOS", arguments={"owner": "composio"}, user_id="user-123" ) ``` ``` -------------------------------- ### Install Composio SDK (Python) Source: https://docs-composio.vercel.app/docs/single-toolkit-mcp.md Install the Composio Python SDK using pip. This is the first step to using Composio's features. ```bash pip install composio ``` -------------------------------- ### Get a Ticket Source: https://docs-composio.vercel.app/toolkits/fireberry.md Tool to retrieve a specific ticket (case) record by its GUID. Use when you need to get detailed information about an existing support ticket or case in Fireberry. ```APIDOC ## Get a Ticket ### Description Retrieves a specific ticket (case) record by its GUID. ### Slug `FIREBERRY_GET_A_TICKET` ``` -------------------------------- ### GET CARDS Source: https://docs-composio.vercel.app/toolkits/breeze.md Tool to get all cards (tasks) for a specific project. Use after confirming the project exists. Example: "List all cards in project 42." ```APIDOC ## GET CARDS ### Description Tool to get all cards (tasks) for a specific project. Use after confirming the project exists. Example: "List all cards in project 42." ### Slug `BREEZE_GET_CARDS` ``` -------------------------------- ### Create Session and Run Agent with Mastra Provider Source: https://docs-composio.vercel.app/docs/providers/mastra.md TypeScript example demonstrating how to initialize Composio with the Mastra provider, create a user session, fetch available tools, and run an agent with OpenAI. ```typescript import { Composio } from "@composio/core"; import { MastraProvider } from "@composio/mastra"; import { Agent } from "@mastra/core/agent"; import { openai } from "@ai-sdk/openai"; const composio = new Composio({ provider: new MastraProvider(), }); // Create a session for your user const session = await composio.create("user_123"); const tools = await session.tools(); const agent = new Agent({ id: "my-agent", name: "My Agent", instructions: "You are a helpful assistant.", model: openai("gpt-5.2"), tools, }); const { text } = await agent.generate([ { role: "user", content: "Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'" }, ]); console.log(text); ``` -------------------------------- ### Get Island Plays Source: https://docs-composio.vercel.app/toolkits/epic_games.md Retrieves the number of plays (session starts) for a Fortnite island within a specific time interval. Use this to get play metrics for an island. ```APIDOC ## Get Island Plays ### Description Tool to retrieve the number of plays (session starts) for a Fortnite island. Use when you need play metrics for a specific island and time interval. ### Slug `EPIC_GAMES_GET_ISLAND_PLAYS` ``` -------------------------------- ### Create Session with Auth Configs (Python) Source: https://docs-composio.vercel.app/docs/migration-guide/tool-router-beta.md Example of creating a session with specific authentication configurations for toolkits. ```python session = composio.create( user_id="user_123", auth_configs={ "github": "ac_your_github_config", "slack": "ac_your_slack_config" } ) ``` -------------------------------- ### Example cURL Request to Create Project Source: https://docs-composio.vercel.app/reference/api-reference/projects/postOrgOwnerProjectNew.md This cURL command demonstrates how to make a POST request to create a new project, including the necessary headers and a sample request body. ```bash curl -X POST "https://backend.composio.dev/api/v3/org/owner/project/new" \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "should_create_api_key": false, "config": { "is_2FA_enabled": true, "logo_url": "string", "display_name": "string", "mask_secret_keys_in_connected_account": true, "log_visibility_setting": "show_all", "require_mcp_api_key": true, "is_composio_link_enabled_for_managed_auth": true, "signed_url_file_expiry_in_seconds": 1 } }' ``` -------------------------------- ### Get Events Cursor Source: https://docs-composio.vercel.app/toolkits/egnyte.md Tool to get the latest event cursor position for starting event polling. Use this to obtain the current cursor before beginning to poll for events. ```APIDOC ## Get Events Cursor ### Description Tool to get the latest event cursor position for starting event polling. Use this to obtain the current cursor before beginning to poll for events. ### Slug `EGNYTE_GET_EVENTS_CURSOR` ``` -------------------------------- ### Get Automation Source: https://docs-composio.vercel.app/toolkits/mailerlite.md Tool to retrieve details of a specific automation by ID. Use when you have the automation ID and need its full configuration. Example: "Get automation 7267552". ```APIDOC ## Get Automation ### Description Retrieves the details of a specific automation. ### Method GET ### Endpoint /automations/{automation_id} ### Parameters #### Path Parameters - **automation_id** (string) - Required - The ID of the automation to retrieve. ``` -------------------------------- ### Initialize Composio Client (Python) Source: https://docs-composio.vercel.app/docs/single-toolkit-mcp.md Initialize the Composio client with your API key. Ensure you replace 'YOUR_API_KEY' with your actual key. ```python from composio import Composio composio = Composio(api_key="YOUR_API_KEY") ``` -------------------------------- ### Get Automation Trigger Types Source: https://docs-composio.vercel.app/toolkits/active_trail.md Retrieve all available start trigger options for automations. Use when you need to get the list of trigger types that can initiate automation workflows in ActiveTrail. ```APIDOC ## Get Automation Trigger Types ### Description Retrieve all available start trigger options for automations. ### Use Cases - Get the list of trigger types that can initiate automation workflows in ActiveTrail. ### Slug `ACTIVE_TRAIL_GET_AUTOMATION_TRIGGER_TYPES` ``` -------------------------------- ### Install Composio and Vercel AI SDK Packages Source: https://docs-composio.vercel.app/docs/providers/vercel.md Install the necessary packages for Composio core, the Vercel provider, the Vercel AI SDK, and Anthropic. ```bash npm install @composio/core @composio/vercel ai @ai-sdk/anthropic ``` -------------------------------- ### Get Specific Tool by Slug Example Source: https://docs-composio.vercel.app/reference/sdk-reference/typescript/tools.md Retrieves a specific tool, 'HACKERNEWS_GET_USER', by its slug. ```typescript // Get a specific tool by slug const hackerNewsUserTool = await composio.tools.get('default', 'HACKERNEWS_GET_USER'); ``` -------------------------------- ### Example JSON Response for Listing Files Source: https://docs-composio.vercel.app/reference/api-reference/tool-router/getToolRouterSessionBySessionIdMountsByMountIdItems.md This is an example of a successful response when listing files in a session mount. It includes file details and a cursor for pagination. ```json { "items": [ { "mount_relative_path": "string", "sandbox_mount_prefix": "string", "size": 1, "last_modified": "string" } ], "next_cursor": "string" } ``` -------------------------------- ### Get Streaming Profile Details Source: https://docs-composio.vercel.app/toolkits/cloudinary.md Tool to get details of a single streaming profile by name. Use when you need to inspect an existing profile's configuration before making changes. Example: "Get details of streaming profile 'hd'." ```APIDOC ## Get Streaming Profile Details ### Description Tool to get details of a single streaming profile by name. Use when you need to inspect an existing profile's configuration before making changes. Example: "Get details of streaming profile 'hd'." ### Slug `CLOUDINARY_GET_STREAMING_PROFILE_DETAILS` ``` -------------------------------- ### Create Session and Run Agentic Loop (Python) Source: https://docs-composio.vercel.app/docs/providers/google.md Python example demonstrating session creation, tool retrieval, and an agentic loop with Google Generative AI. ```python from composio import Composio from composio_google import GoogleProvider from google import genai from google.genai import types composio = Composio(provider=GoogleProvider()) client = genai.Client() # Create a session for your user session = composio.create(user_id="user_123") tools = session.tools() config = types.GenerateContentConfig(tools=tools) chat = client.chats.create(model="gemini-3-pro-preview", config=config) response = chat.send_message("Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'") # Agentic loop — keep executing tool calls until the model responds with text while response.function_calls: parts = [] for fc in response.function_calls: result = composio.provider.execute_tool_call(user_id="user_123", function_call=fc) parts.append(types.Part.from_function_response(name=fc.name, response=result)) response = chat.send_message(parts) print(response.text) ```