Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 22, 17:00 UTC
Add quickstart page and switch to fumadocs tabs
- Add quickstart.mdx with SDK install instructions and provider examples - Switch from shadcn tabs to fumadocs tabs for better integration - Add meta.json for page ordering (welcome → quickstart) - Include examples for OpenAI Agents, Anthropic, and Vercel AI SDK 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sushmithamallesh committed
Dec 29, 2025 at 18:05 UTC
dc5c7808e6ba31646bd83dc7c2776e3f6a6dfc3b
3 files changed
+267
-1
fumadocs/content/docs/meta.json
new
+3
@@ -0,0 +1,3 @@
1
+{
2
+ "pages": ["welcome", "quickstart"]
3
+}
fumadocs/content/docs/quickstart.mdx
new
+262
@@ -0,0 +1,262 @@
1
+---
2
+title: Quickstart
3
+description: Add composio tools to your AI agents
4
+---
5
+
6
+import { Plug, Wrench, Key, Zap } from 'lucide-react';
7
+
8
+This guide walks you through **authenticated tool calling**—the foundation of how Composio connects your AI agents to real-world actions.
9
+
10
+You'll learn how to:
11
+1. **Discover and add tools** relevant to your use case (e.g., Slack, GitHub, Notion) to your AI agent
12
+2. **Authenticate tools** securely on behalf of a specific user, with fine-grained access control
13
+3. **Enable your LLM** (like OpenAI, Claude, or LangChain) to invoke these tools reliably using structured tool call formats
14
+
15
+## Prerequisites
16
+
17
+Before you begin, ensure you have:
18
+
19
+1. **A Composio account** - [Sign up here](https://platform.composio.dev) if you haven't already
20
+2. **Python 3.10+** or **Node.js 18+** installed on your system
21
+3. **Your API key** - Get it from the [developer dashboard](https://platform.composio.dev?next_page=/settings) and set it as an environment variable:
22
+
23
+```bash
24
+export COMPOSIO_API_KEY=your_api_key
25
+```
26
+
27
+## Install the SDK
28
+
29
+First, install the Composio SDK for your preferred language:
30
+
31
+<Tabs groupId="language" items={['Python', 'TypeScript']} persist>
32
+ <Tab value="Python">
33
+ ```bash
34
+ pip install composio
35
+ ```
36
+ </Tab>
37
+ <Tab value="TypeScript">
38
+ ```bash
39
+ npm install @composio/core
40
+ ```
41
+ </Tab>
42
+</Tabs>
43
+
44
+## Authorize Tools & Run Them with an Agent
45
+
46
+Composio supports multiple LLM providers. Here's how to use Composio with some of the most popular ones:
47
+
48
+<Tabs items={['OpenAI Agents (Python)', 'Anthropic (TypeScript)', 'Vercel AI SDK (TypeScript)']}>
49
+ <Tab value="OpenAI Agents (Python)">
50
+ Install the OpenAI Agents provider:
51
+
52
+ ```bash
53
+ pip install composio openai-agents composio-openai-agents
54
+ ```
55
+
56
+ ```python
57
+ import asyncio
58
+ from composio import Composio
59
+ from agents import Agent, Runner
60
+ from composio_openai_agents import OpenAIAgentsProvider
61
+
62
+ composio = Composio(api_key="your-api-key", provider=OpenAIAgentsProvider())
63
+
64
+ # Id of the user in your system
65
+ externalUserId = "pg-test-6dadae77-9ae1-40ca-8e2e-ba2d1ad9ebc4"
66
+
67
+ # Create an auth config for gmail from the dashboard or programmatically
68
+ auth_config_id = "your-auth-config-id"
69
+ connection_request = composio.connected_accounts.link(
70
+ user_id=externalUserId,
71
+ auth_config_id=auth_config_id,
72
+ )
73
+
74
+ # Redirect user to the OAuth flow
75
+ redirect_url = connection_request.redirect_url
76
+
77
+ print(
78
+ f"Please authorize the app by visiting this URL: {redirect_url}"
79
+ ) # Print the redirect url to the user
80
+
81
+ # Wait for the connection to be established
82
+ connected_account = connection_request.wait_for_connection()
83
+ print(
84
+ f"Connection established successfully! Connected account id: {connected_account.id}"
85
+ )
86
+
87
+ # Get Gmail tools that are pre-configured
88
+ tools = composio.tools.get(user_id=externalUserId, tools=["GMAIL_SEND_EMAIL"])
89
+
90
+ agent = Agent(
91
+ name="Email Manager", instructions="You are a helpful assistant", tools=tools
92
+ )
93
+
94
+ # Run the agent
95
+ async def main():
96
+ result = await Runner.run(
97
+ starting_agent=agent,
98
+ input="Send an email to soham.g@composio.dev with the subject 'Hello from composio' and the body 'Congratulations on sending your first email using AI Agents and Composio!'",
99
+ )
100
+ print(result.final_output)
101
+
102
+ asyncio.run(main())
103
+ ```
104
+ </Tab>
105
+ <Tab value="Anthropic (TypeScript)">
106
+ Install the Composio Anthropic provider:
107
+
108
+ ```bash
109
+ npm i @composio/core @composio/anthropic @anthropic-ai/sdk
110
+ ```
111
+
112
+ ```typescript
113
+ import { Composio } from "@composio/core";
114
+ import { AnthropicProvider } from "@composio/anthropic";
115
+ import Anthropic from "@anthropic-ai/sdk";
116
+
117
+ // env: ANTHROPIC_API_KEY
118
+ const anthropic = new Anthropic();
119
+
120
+ const composio = new Composio({
121
+ apiKey: "your-api-key",
122
+ provider: new AnthropicProvider(),
123
+ toolkitVersions: {
124
+ "gmail": "20251111_00",
125
+ }
126
+ });
127
+
128
+ // Id of the user in your system
129
+ const externalUserId = "pg-test-6dadae77-9ae1-40ca-8e2e-ba2d1ad9ebc4";
130
+
131
+ // Create an auth config for gmail from the dashboard or programmatically
132
+ const authConfigId = "your-auth-config-id";
133
+
134
+ const connectionRequest = await composio.connectedAccounts.link(
135
+ externalUserId,
136
+ authConfigId
137
+ );
138
+
139
+ // redirect the user to the OAuth flow
140
+ const redirectUrl = connectionRequest.redirectUrl;
141
+ console.log(`Please authorize the app by visiting this URL: ${redirectUrl}`);
142
+
143
+ // wait for connection to be established
144
+ const connectedAccount = await connectionRequest.waitForConnection();
145
+ console.log(
146
+ `Connection established successfully! Connected account id: ${connectedAccount.id}`
147
+ );
148
+
149
+ // Fetch tools for your user and execute
150
+ const tools = await composio.tools.get(externalUserId, {
151
+ tools: ["GMAIL_SEND_EMAIL"],
152
+ });
153
+
154
+ console.log(tools);
155
+ const msg = await anthropic.messages.create({
156
+ model: "claude-sonnet-4-5",
157
+ messages: [
158
+ {
159
+ role: "user",
160
+ content: `Send an email to soham.g@composio.dev with the subject 'Hello from composio' and the body 'Congratulations on sending your first email using AI Agents and Composio!'`,
161
+ },
162
+ ],
163
+ tools: tools,
164
+ max_tokens: 1000,
165
+ });
166
+
167
+ const res = await composio.provider.handleToolCalls(externalUserId, msg);
168
+ console.log("Email sent successfully!");
169
+ ```
170
+ </Tab>
171
+ <Tab value="Vercel AI SDK (TypeScript)">
172
+ Install the Composio Vercel Provider:
173
+
174
+ ```bash
175
+ npm i @composio/core @composio/vercel ai @ai-sdk/openai
176
+ ```
177
+
178
+ ```typescript
179
+ import { Composio } from "@composio/core";
180
+ import { VercelProvider } from "@composio/vercel";
181
+ import { generateText } from "ai";
182
+ import { openai } from "@ai-sdk/openai";
183
+
184
+ const composio = new Composio({
185
+ apiKey: "your-api-key",
186
+ provider: new VercelProvider(),
187
+ });
188
+
189
+ // Id of the user in your system
190
+ const externalUserId = "pg-test-6dadae77-9ae1-40ca-8e2e-ba2d1ac9ebc4";
191
+
192
+ // Create an auth config for gmail from the dashboard or programmatically
193
+ const authConfigId = "your-auth-config-id";
194
+
195
+ const connectionRequest = await composio.connectedAccounts.link(
196
+ externalUserId,
197
+ authConfigId
198
+ );
199
+
200
+ // redirect the user to the OAuth flow
201
+ const redirectUrl = connectionRequest.redirectUrl;
202
+ console.log(`Please authorize the app by visiting this URL: ${redirectUrl}`);
203
+
204
+ // wait for connection to be established
205
+ const connectedAccount = await connectionRequest.waitForConnection();
206
+
207
+ const tools = await composio.tools.get(externalUserId, "GMAIL_SEND_EMAIL");
208
+
209
+ // env: OPENAI_API_KEY
210
+ const { text } = await generateText({
211
+ model: openai("gpt-5"),
212
+ messages: [
213
+ {
214
+ role: "user",
215
+ content: `Send an email to soham.g@composio.dev with the subject 'Hello from composio' and the body 'Congratulations on sending your first email using AI Agents and Composio!'`,
216
+ },
217
+ ],
218
+ tools: tools
219
+ });
220
+
221
+ console.log("Email sent successfully!", { text });
222
+ ```
223
+ </Tab>
224
+</Tabs>
225
+
226
+<Callout title="What just happened?" type="info">
227
+You just:
228
+1. Authorized a user account with Composio
229
+2. Passed those tool permissions into an LLM framework
230
+3. Let the LLM securely call real tools on the user's behalf
231
+
232
+All OAuth flows and tool execution were automatically handled by Composio.
233
+</Callout>
234
+
235
+## Next steps
236
+
237
+<Cards>
238
+ <Card
239
+ icon={<Plug />}
240
+ title="Use Providers"
241
+ href="/providers/openai"
242
+ description="Learn how to use Composio with various agent SDK and frameworks."
243
+ />
244
+ <Card
245
+ icon={<Wrench />}
246
+ title="Work with tools"
247
+ href="/docs/executing-tools"
248
+ description="Learn how to work with tools and tool calling on a deeper level with Composio."
249
+ />
250
+ <Card
251
+ icon={<Key />}
252
+ title="Manage authentication"
253
+ href="/docs/custom-auth-configs"
254
+ description="Authorize tools for multiple users."
255
+ />
256
+ <Card
257
+ icon={<Zap />}
258
+ title="Triggers"
259
+ href="/docs/using-triggers"
260
+ description="Listen for external events to trigger actions in your agents."
261
+ />
262
+</Cards>
fumadocs/mdx-components.tsx
+2
-1
@@ -1,13 +1,14 @@
1
import defaultMdxComponents from 'fumadocs-ui/mdx';
2
import type { MDXComponents } from 'mdx/types';
3
import { YouTube } from '@/components/youtube';
4
-import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
4
+import { Tabs, Tab, TabsList, TabsTrigger, TabsContent } from 'fumadocs-ui/components/tabs';
5
6
export function getMDXComponents(components?: MDXComponents): MDXComponents {
7
return {
8
...defaultMdxComponents,
9
YouTube,
10
Tabs,
11
+ Tab,
12
TabsList,
13
TabsTrigger,
14
TabsContent,