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
Update docs
haxzie5ca299f91373
diff --git a/fern/pages/src/get-started/dev-setup.mdx b/fern/pages/src/get-started/dev-setup.mdxindex 449844d6b..421c6b5ba 100644--- a/fern/pages/src/get-started/dev-setup.mdx+++ b/fern/pages/src/get-started/dev-setup.mdx@@ -7,31 +7,45 @@ keywords: ''hide-nav-links: false----This guide explains how to setup your IDE, and coding agents to help you ship faster with Composio.+This comprehensive guide explains how to setup your IDE and coding agents to help you ship faster with Composio. We'll cover optimal configurations for popular editors and AI coding assistants.-## Index docs-Cursor can index docs which is a great way to ask questions about Composio and building with our SDKs.+## Cursor+Cursor is an AI-powered code editor that can significantly accelerate your development with Composio. Here's how to set it up optimally.++### Index Documentation+Cursor can index documentation, making it easy to ask questions about Composio and get contextual answers while coding.<Frame><img src="../../../assets/images/index-docs.png" alt="Index docs" /></Frame>-Once indexed, you can ask questions!+### To index Composio documentation:++1. Open Cursor Settings (Shift + Cmd/Ctrl + J)+2. Navigate to "Features" → "Codebase indexing"+3. Add the Composio documentation URLs:++- https://v3.docs.composio.dev+- https://github.com/ComposioHQ/composio (for source code reference)+Once indexed, you can ask questions directly in the chat!<Frame><img src="../../../assets/images/ask-index-docs.png" alt="Index docs question" /></Frame>-## Optimise Cursor--To optimize your experience building with Composio, you can add also instructions to Cursor's system settings. We recommend adding the below prompt to the project rules.+### Optimize Cursor with Custom Rules+To get the best experience building with Composio, add custom instructions to Cursor's AI system. This helps the AI understand Composio's patterns and best practices.<Frame><img src="../../../assets/images/cursor-settings.png" alt="Cursor settings" /></Frame>-You can add the following to your Cursor "Rules for AI" to help you build with Composio.+**To add custom rules:**++1. Open Cursor Settings (Shift + Cmd/Ctrl + J)+2. Go to "General" → "Rules for AI"+3. Add the appropriate prompt below based on your language<CodeGroup>```md TypeScriptdiff --git a/fern/pages/src/get-started/providers.mdx b/fern/pages/src/get-started/providers.mdxindex 5145b60ca..b507db783 100644--- a/fern/pages/src/get-started/providers.mdx+++ b/fern/pages/src/get-started/providers.mdx@@ -5,28 +5,138 @@ keywords: ''hide-nav-links: false----Every LLM framework and provider essentially does the same thing - **tool calling and giving agents skills** - but each has its own unique syntax and implementation. Whether you're using OpenAI, Anthropic, CrewAI, or LangGraph, you're solving the same problems with different APIs.+Providers in Composio act as bridges between your AI models and external tools. They transform Composio's tools into formats that different AI platforms can understand and use, making it possible to integrate with any AI framework seamlessly.-<Frame>- <img- src="../../../assets/images/providers-and-toolsets.png"- alt="Providers and Toolsets"- width="400px"- height="auto"- />-</Frame>+## What are Providers?+Think of providers as translators. Different AI platforms (like OpenAI, Anthropic Claude, or LangChain) expect tools to be formatted in their specific way. Instead of manually converting Composio tools for each platform, providers handle this transformation automatically.-Composio standardizes this mess. Use the same tools across any framework with our unified interface, or create custom toolsets for frameworks we don't support yet. No more rewriting tool integrations when you switch providers.+For example:+- OpenAI expects tools in a specific JSON schema format with type: "function"+- Anthropic Claude expects tools with an input_schema structure+- LangChain expects tools as callable functions with specific parameters-Composio has two types of providers:+Providers ensure that Composio tools work correctly with your chosen AI platform without you having to worry about the technical details.-- **Completion Providers**: These frameworks are simply used to generate text, function calls. They don't have an automatic function execution step.-- **Agentic Providers**: These providers are used to create agents. They have a function execution step and the tools are executed automatically.+## How Providers Work+When you get tools from Composio, the provider:+- Takes Composio tools (which have a standardized format)+- Transforms them into your AI platform's expected format+- Returns the formatted tools ready to use with your AI model-## Providers+<CodeGroup>+```typescript TypeScript+// This happens automatically behind the scenes+const composioTool = {+ slug: "GITHUB_GET_REPO",+ description: "Get repository information",+ inputParameters: { owner: "string", repo: "string" }+}++// Provider transforms it to OpenAI format+const openaiTool = {+ type: "function",+ function: {+ name: "GITHUB_GET_REPO",+ description: "Get repository information",+ parameters: { properties: { owner: { type: "string" }, repo: { type: "string" } } }+ }+}+```+</CodeGroup>++## Available Providers+Composio supports two categories of providers:++### Non-Agentic Providers+These providers work with AI platforms that use chat completion APIs, where you control the tool execution flow. The AI model analyzes your conversation and suggests which tools to use, but your code decides when and how to execute them.+With chat completion APIs, the typical flow is:++1. You send a message to the AI model along with available tools+2. The AI responds with either a text message or a request to use specific tools+3. If tools are requested, you execute them and send the results back to continue the conversation+Example providers:+- **OpenAI Provider** - Works with GPT-3.5, GPT-4, and other OpenAI models via their Chat Completions API+- **Anthropic Provider** - Works with Claude models via Anthropic's Messages API+- **Google Provider** - Works with Gemini models via Google's generateContent API++### Agentic Providers+These providers work with AI frameworks that can execute tools autonomously. The AI agent can decide to run tools on its own without your direct intervention.++- **LangChain Provider** - Works with LangChain framework+- **Vercel Provider** - Works with Vercel AI SDK+- **Mastra Provider** - Works with Mastra framework++## Using ProvidersHere's how you can generate text with various providers using Composio SDK:+### Default Provider (OpenAI)+If you don't specify a provider, Composio uses the OpenAI provider by default:+<CodeGroup>+```python Python+from openai import OpenAI+from composio import Composio++# Initialize tools.+openai_client = OpenAI()+composio = Composio(api_key="your-composio-api-key")++# Define task.+task = "Star a repo composiohq/composio on GitHub"++# Get GitHub tools that are pre-configured+tools = composio.tools.get(user_id="default", toolkits=["GITHUB"])++# 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)+++```+```typescript TypeScript+import { Composio } from '@composio/core';++// Uses OpenAI provider automatically+const composio = new Composio({+ apiKey: 'your-composio-api-key'+});++// Get tools formatted for OpenAI+const tools = await composio.tools.get('default', {+ toolkits: ['github']+});++// Use with OpenAI+const completion = await openai.chat.completions.create({+ model: 'gpt-4',+ messages: [+ { role: 'system', content: 'You are a helpful assistant.' },+ { role: 'user', content: 'Star the repo composiohq/composio on GitHub' },+ ],+ tools: tools // Already formatted for OpenAI+});++// Execute the function calls.+const result = await composio.provider.handleToolCalls("[email protected]", completion)+console.log(result)++```+</CodeGroup>++### Using a Different Provider+To use a different provider, specify it when initializing Composio:+<Tabs><Tab title="OpenAI (Default)">OpenAI is a completion provider. You can use it to generate text, function calls.@@ -133,6 +243,43 @@ asyncio.run(main())</Tabs>+## Installation+Different providers may require additional packages:+++<CodeGroup>+```shell Python+# Core SDK (includes OpenAI provider)+npm install @composio/core++# Additional providers+npm install @composio/anthropic+npm install @composio/google+npm install @composio/langchain+npm install @composio/vercel+```+```shell Typescript+# Core SDK (includes OpenAI provider)+npm install @composio/core++# Additional providers+npm install @composio/anthropic+npm install @composio/google+npm install @composio/langchain+npm install @composio/vercel+```+</CodeGroup>++### Choosing the Right Provider+Select a provider based on your AI platform:++- **Building with OpenAI models?** → Use OpenAIProvider (default)+- **Using Claude?** → Use AnthropicProvider+- **Working with Gemini?** → Use GoogleProvider+- **Building LangChain agents?** → Use LangChainProvider+- **Using Vercel AI SDK?** → Use VercelProvider+- **Working with Mastra?** → Use MastraProvider+## Supported Providers### Chat Completions<CardGroup cols={3}>@@ -200,4 +347,31 @@ asyncio.run(main())<Tip title="Custom Toolsets" icon="puzzle">Using a framework not supported? Create a [custom provider](/providers/custom)!-</Tip>\ No newline at end of file+</Tip>++## Best Practices++- Choose the right provider for your AI platform from the start+- Stick with one provider per application for consistency+- Use provider-specific helper methods when available for easier integration+- Handle errors consistently regardless of provider choice+- Test tool execution in your development environment before deployment++++## Common Questions++**Q: Can I switch providers after initializing Composio?**+> No, providers are set during initialization. Create a new Composio instance with a different provider if needed.++**Q: Do I need different API keys for different providers?**+> Yes, your Composio API key is used only for tool authentication, and is not used by the provider. You need to use provider specific API keys for each provider.++**Q: Can I use multiple providers in the same application?**+> Yes, create separate Composio instances with different providers for different parts of your application.++**Q: What happens if I use the wrong provider?**+> Your AI platform might not understand the tool format, leading to errors. Always match the provider to your AI platform.++**Q: Are there performance differences between providers?**+> Providers are lightweight adapters and have minimal performance impact. The main differences are in features and AI platform compatibility.\ No newline at end of filediff --git a/fern/pages/src/get-started/quickstart.mdx b/fern/pages/src/get-started/quickstart.mdxindex 967b0be60..c21d0ae74 100644--- a/fern/pages/src/get-started/quickstart.mdx+++ b/fern/pages/src/get-started/quickstart.mdx@@ -7,15 +7,18 @@ subtitle: ""hide-nav-links: true----This guide covers authenticated tool calling, one of the most core features of Composio.-You will learn how to:-- Add tools to your AI agent-- Authenticate the agent/tools for a user-- Call the tools generated by the LLM+This guide walks you through **authenticated tool calling**—the foundation of how Composio connects your AI agents to real-world actions.++You'll learn how to:+1. **Discover and add tools** relevant to your use case (e.g., Slack, GitHub, Notion) to your AI agent+2. **Authenticate tools** securely on behalf of a specific user, with fine-grained access control+3. **Enable your LLM** (like OpenAI, Claude, or LangChain) to invoke these tools reliably using structured tool call formats++Composio provides first-class SDKs for both **TypeScript** and **Python**, making it easy to integrate no matter what stack you're building with.**Before you start!**<Accordion title='Prerequisites'>-1. Ensure you have created an account on [Composio](https://app.composio.dev) and have Python 3.8+ _or_ NodeJS 16+ installed!+1. Ensure you have created an account on [Composio](https://app.composio.dev) and have Python 3.8+ _or_ NodeJS 18+ installed!2. Get your API key from the [developer dashboard](https://app.composio.dev/developers) and set it as an environment variable.```bashexport COMPOSIO_API_KEY=your_api_key@@ -24,7 +27,8 @@ export COMPOSIO_API_KEY=your_api_key</Accordion>## Install the SDK-First and foremost, install the Composio SDK.+First, install the Composio SDK for your preferred language:+<CodeGroup>```bash title="Python" for="python"pip install composio@@ -34,9 +38,8 @@ npm install @composio/core@next```</CodeGroup>-## Initialise--To use the SDK, you need to initialize it with your API key:+## Initialize the SDK+You’ll need to initialize the SDK with your Composio API key. This allows you to authenticate requests and access tools on behalf of your users.<CodeGroup>```python Python@@ -57,7 +60,8 @@ const composio = new Composio({</CodeGroup>-## Authorize and run tools+## Authorize Tools & Run Them with an Agent+Composio supports multiple LLM providers. Here’s how to use Composio with some of the most popular ones:<Tabs><Tab title="OpenAI (Python)">Composio ships with support for OpenAI provider out of the box.@@ -115,7 +119,12 @@ pip install composio[openai-agents]</Tabs><Note title="What just happened?">-You authenticated your account through Composio and used LLMs to execute tools. Composio handled the OAuth flow and tool execution.+You just:+1. Authorized a user account with Composio+2. Passed those tool permissions into an LLM framework+3. Let the LLM securely call real tools on the user’s behalf++All OAuth flows and tool execution were automatically handled by Composio.</Note>diff --git a/fern/pages/src/get-started/welcome.mdx b/fern/pages/src/get-started/welcome.mdxindex dc795d221..1c5400150 100644--- a/fern/pages/src/get-started/welcome.mdx+++ b/fern/pages/src/get-started/welcome.mdx@@ -1,11 +1,11 @@---title: Welcome to Composio-image: "https://og.composio.dev/api/og?title=Welcome%20to%20Composio" # image for socials+image: 'https://og.composio.dev/api/og?title=Welcome%20to%20Composio' # image for socialskeywords: ''# subtitle: 'Our API and SDKs enable developers to build AI applications and experiences that are a step above the rest.'hide-nav-links: false----+<Frame><img src="../../../assets/images/hero.png" alt="Composio introduction image" /></Frame>@@ -14,15 +14,15 @@ hide-nav-links: false.txt](/llms.txt), [long .txt](/llms-full.txt))</Tip>-Composio is the fastest way to allow your agents to take action across your apps.+Composio is the fastest way to enable your AI agents to take real-world actions—without dealing with individual API integrations, authentication flows, or complex tool formatting.-- Support [3000+ out of the box tools](/tools/) across hundreds of apps.-- Precisely control the access and data your agents get and can use, with [fine grained access control](/docs/authenticating-tools)-- [Listen and trigger](/docs/using-triggers) agents and workflows from external events (e.g., new Slack message, GitHub issue).-- [Customize tools](/docs/modifiers/schema-modifiers) for proprietary APIs or specific functions.-- Seamlessly integrate tool-calling into frameworks like OpenAI Agents, Vercel AI, LangChain, etc.-- Refine tool interactions with [input/output processing](/docs/modifiers/before-execution) for greater reliability.+- **Access 3000+ tools** out of the box across popular apps like Slack, GitHub, Notion, and more. [Browse tools →](/tools/)+- **Enforce strict access and data controls** with [fine-grained permissions](/docs/authenticating-tools) for each tool and user.+- **Trigger agents and workflows** using [external events](/docs/using-triggers) (e.g., new message in Slack, new issue in GitHub).+- **Customize tools** for your proprietary APIs or internal functions via [modifiers](/docs/modifiers/schema-modifiers).+- **Integrate seamlessly** with frameworks like OpenAI, Anthropic, LangChain, Vercel AI SDK, and more.+- **Enhance reliability** with [input/output processing hooks](/docs/modifiers/before-execution) to clean or transform data on the fly.-You get to connect your AI agents faster without wrestling with individual API integrations and managing their authentication or converting them into LLM tool calls.+No more writing dozens of bespoke integrations. Composio handles auth, tool normalization, and execution—so your agents can focus on reasoning, not plumbing.-We also optimise the tool calls for you for maximum accuracy, free of cost! 😉+**We even optimize tool calls automatically for better accuracy—free of cost.**