@devries-cameron20 / composio Mirror · read-only / commits / fa5424f26
Fork 0

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, 14:30 UTC

feat(docs): improve quickstart with API keys step and sample values

- Add Install step descriptions for each framework - Add Configure API Keys step with Callout for each framework - Add user ID callout linking to /docs/user-management - Replace placeholders with sample values (user_2nFh83Hd, soham.g@composio.dev) - Add recipient_email variable for copy-paste friendly code - Remove apiKey from Composio init (SDK reads from env) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Sushmithamallesh committed Jan 21, 2026 at 21:06 UTC fa5424f26084e8aebe3a93b7a7b3eb4b1b11c846
1 file changed +101 -26
docs/content/docs/quickstart.mdx
+101 -26
@@ -13,6 +13,8 @@ Build your first AI agent with Composio Tools.
13 <Step>
14 ### Install
15
16 +Install the Composio SDK and OpenAI Agents SDK.
17 +
18 <Tabs groupId="language" items={['Python', 'TypeScript']} persist>
19 <Tab value="Python">
20 ```bash
@@ -27,11 +29,28 @@ npm install @composio/core @composio/openai-agents @openai/agents
29 </Tabs>
30 </Step>
31
32 +<Step>
33 +### Configure API Keys
34 +
35 +<Callout type="info">
36 +Set `COMPOSIO_API_KEY` with your API key from [Settings](https://platform.composio.dev/?next_page=/settings) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).
37 +</Callout>
38 +
39 +```txt title=".env"
40 +COMPOSIO_API_KEY=xxxxxxxxx
41 +OPENAI_API_KEY=xxxxxxxxx
42 +```
43 +</Step>
44 +
45 <Step>
46 ### Create session and run agent
47
48 [Sessions](/tool-router/users-and-sessions) are ephemeral, user-scoped and manage connections and tools for that user.
49
50 +<Callout type="info">
51 +Replace the sample user ID with your own user's identifier. See [User Management](/docs/user-management) for details.
52 +</Callout>
53 +
54 <Tabs groupId="language" items={['Python', 'TypeScript']} persist>
55 <Tab value="Python">
56 ```python
@@ -41,9 +60,10 @@ from agents import Agent, Runner
60 from composio_openai_agents import OpenAIAgentsProvider
61
62 # Initialize Composio with OpenAI Agents provider
44 -composio = Composio(api_key="{{apiKey}}", provider=OpenAIAgentsProvider())
63 +composio = Composio(provider=OpenAIAgentsProvider())
64
46 -external_user_id = "{{userId}}"
65 +external_user_id = "user_2nFh83Hd"
66 +recipient_email = "soham.g@composio.dev"
67
68 # Create a tool router session
69 session = composio.create(
@@ -64,7 +84,7 @@ agent = Agent(
84 async def main():
85 result = await Runner.run(
86 starting_agent=agent,
67 - input="Send an email to {{email}} with the subject 'Hello from Composio' and the body 'This is a test email!'",
87 + input=f"Send an email to {recipient_email} with the subject 'Hello from Composio' and the body 'This is a test email!'",
88 )
89 print(result.final_output)
90
@@ -79,11 +99,11 @@ import { OpenAIAgentsProvider } from "@composio/openai-agents";
99
100 // Initialize Composio with OpenAI Agents provider
101 const composio = new Composio({
82 - apiKey: "{{apiKey}}",
102 provider: new OpenAIAgentsProvider(),
103 });
104
86 -const externalUserId = "{{userId}}";
105 +const externalUserId = "user_2nFh83Hd";
106 +const recipientEmail = "soham.g@composio.dev";
107
108 // Create a tool router session
109 const session = await composio.create(externalUserId);
@@ -103,7 +123,7 @@ const agent = new Agent({
123 console.log(`🔄 Running agent...`);
124 const result = await run(
125 agent,
106 - "Send an email to {{email}} with the subject 'Hello from Composio' and the body 'This is a test email!'"
126 + `Send an email to ${recipientEmail} with the subject 'Hello from Composio' and the body 'This is a test email!'`
127 );
128
129 console.log(`✅ Received response from agent`);
@@ -122,6 +142,8 @@ if (result.finalOutput) {
142 <Step>
143 ### Install
144
145 +Install the Composio SDK and Claude Agent SDK.
146 +
147 <Tabs groupId="language" items={['Python', 'TypeScript']} persist>
148 <Tab value="Python">
149 ```bash
@@ -136,11 +158,28 @@ npm install @composio/core @composio/claude-agent-sdk @anthropic-ai/claude-agent
158 </Tabs>
159 </Step>
160
161 +<Step>
162 +### Configure API Keys
163 +
164 +<Callout type="info">
165 +Set `COMPOSIO_API_KEY` with your API key from [Settings](https://platform.composio.dev/?next_page=/settings) and `ANTHROPIC_API_KEY` with your [Anthropic API key](https://console.anthropic.com/settings/keys).
166 +</Callout>
167 +
168 +```txt title=".env"
169 +COMPOSIO_API_KEY=xxxxxxxxx
170 +ANTHROPIC_API_KEY=xxxxxxxxx
171 +```
172 +</Step>
173 +
174 <Step>
175 ### Create session and run agent
176
177 [Sessions](/tool-router/users-and-sessions) are ephemeral, user-scoped and manage connections and tools for that user.
178
179 +<Callout type="info">
180 +Replace the sample user ID with your own user's identifier. See [User Management](/docs/user-management) for details.
181 +</Callout>
182 +
183 <Tabs groupId="language" items={['Python', 'TypeScript']} persist>
184 <Tab value="Python">
185 ```python
@@ -150,12 +189,10 @@ from composio_claude_agent_sdk import ClaudeAgentSDKProvider
189 from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, create_sdk_mcp_server
190
191 # Initialize Composio
153 -composio = Composio(
154 - api_key="{{apiKey}}",
155 - provider=ClaudeAgentSDKProvider()
156 -)
192 +composio = Composio(provider=ClaudeAgentSDKProvider())
193
158 -external_user_id = "{{userId}}"
194 +external_user_id = "user_2nFh83Hd"
195 +recipient_email = "soham.g@composio.dev"
196
197 # Create a tool router session
198 session = composio.create(
@@ -177,7 +214,7 @@ async def main():
214 )
215
216 async with ClaudeSDKClient(options=options) as client:
180 - await client.query(f"Send an email to {{email}} with the subject 'Hello from Composio' and the body 'This is a test email!'")
217 + await client.query(f"Send an email to {recipient_email} with the subject 'Hello from Composio' and the body 'This is a test email!'")
218 # Extract and print response
219 async for msg in client.receive_response():
220 print(msg)
@@ -193,11 +230,11 @@ import { createSdkMcpServer, query } from "@anthropic-ai/claude-agent-sdk";
230
231 // Initialize Composio
232 const composio = new Composio({
196 - apiKey: "{{apiKey}}",
233 provider: new ClaudeAgentSDKProvider(),
234 });
235
200 -const externalUserId = "{{userId}}";
236 +const externalUserId = "user_2nFh83Hd";
237 +const recipientEmail = "soham.g@composio.dev";
238
239 // Create a tool router session
240 const session = await composio.create(externalUserId);
@@ -212,7 +249,7 @@ const customServer = createSdkMcpServer({
249
250 // Initialize Claude client
251 for await (const content of query({
215 - prompt: "Send an email to {{email}} saying hello",
252 + prompt: `Send an email to ${recipientEmail} saying hello`,
253 options: {
254 mcpServers: { composio: customServer },
255 permissionMode: "bypassPermissions",
@@ -236,6 +273,8 @@ console.log(`✅ Received response from Claude`);
273 <Step>
274 ### Install
275
276 +Install the Composio SDK along with LangChain and its dependencies.
277 +
278 <Tabs groupId="language" items={['Python', 'TypeScript']} persist>
279 <Tab value="Python">
280 ```bash
@@ -250,11 +289,28 @@ npm install @composio/core langchain @langchain/openai @langchain/mcp-adapters
289 </Tabs>
290 </Step>
291
292 +<Step>
293 +### Configure API Keys
294 +
295 +<Callout type="info">
296 +Set `COMPOSIO_API_KEY` with your API key from [Settings](https://platform.composio.dev/?next_page=/settings) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).
297 +</Callout>
298 +
299 +```txt title=".env"
300 +COMPOSIO_API_KEY=xxxxxxxxx
301 +OPENAI_API_KEY=xxxxxxxxx
302 +```
303 +</Step>
304 +
305 <Step>
306 ### Create session and run agent
307
308 [Sessions](/tool-router/users-and-sessions) are ephemeral, user-scoped and manage connections and tools for that user.
309
310 +<Callout type="info">
311 +Replace the sample user ID with your own user's identifier. See [User Management](/docs/user-management) for details.
312 +</Callout>
313 +
314 <Tabs groupId="language" items={['Python', 'TypeScript']} persist>
315 <Tab value="Python">
316 ```python
@@ -263,9 +319,10 @@ from langchain.agents import create_agent
319 from langchain_openai.chat_models import ChatOpenAI
320
321 # Initialize Composio
266 -composio = Composio(api_key="{{apiKey}}")
322 +composio = Composio()
323
268 -external_user_id = "{{userId}}"
324 +external_user_id = "user_2nFh83Hd"
325 +recipient_email = "soham.g@composio.dev"
326
327 # Create a tool router session
328 session = composio.create(
@@ -290,7 +347,7 @@ result = agent.invoke(
347 "messages": [
348 {
349 "role": "user",
293 - "content": "Send an email to {{email}} with the subject 'Hello from Composio' and the body 'This is a test email!'",
350 + "content": f"Send an email to {recipient_email} with the subject 'Hello from Composio' and the body 'This is a test email!'",
351 }
352 ]
353 }
@@ -307,11 +364,10 @@ import { createAgent } from "langchain";
364 import { Composio } from "@composio/core";
365
366 // Initialize Composio
310 -const composio = new Composio({
311 - apiKey: "{{apiKey}}",
312 -});
367 +const composio = new Composio();
368
314 -const externalUserId = "{{userId}}";
369 +const externalUserId = "user_2nFh83Hd";
370 +const recipientEmail = "soham.g@composio.dev";
371
372 // Create a tool router session
373 const session = await composio.create(externalUserId);
@@ -338,7 +394,7 @@ const result = await agent.invoke({
394 messages: [
395 {
396 role: "user",
341 - content: "Send an email to {{email}} with the subject 'Hello from Composio' and the body 'This is a test email!'",
397 + content: `Send an email to ${recipientEmail} with the subject 'Hello from Composio' and the body 'This is a test email!'`,
398 },
399 ],
400 });
@@ -357,6 +413,8 @@ console.log(result);
413 <Step>
414 ### Install
415
416 +Install the Composio SDK and Vercel AI SDK.
417 +
418 <Tabs groupId="language" items={['TypeScript']} persist>
419 <Tab value="TypeScript">
420 ```bash
@@ -366,11 +424,28 @@ npm install @composio/core @composio/vercel ai @ai-sdk/openai @ai-sdk/mcp
424 </Tabs>
425 </Step>
426
427 +<Step>
428 +### Configure API Keys
429 +
430 +<Callout type="info">
431 +Set `COMPOSIO_API_KEY` with your API key from [Settings](https://platform.composio.dev/?next_page=/settings) and `OPENAI_API_KEY` with your [OpenAI API key](https://platform.openai.com/api-keys).
432 +</Callout>
433 +
434 +```txt title=".env"
435 +COMPOSIO_API_KEY=xxxxxxxxx
436 +OPENAI_API_KEY=xxxxxxxxx
437 +```
438 +</Step>
439 +
440 <Step>
441 ### Create session and run agent
442
443 [Sessions](/tool-router/users-and-sessions) are ephemeral, user-scoped and manage connections and tools for that user.
444
445 +<Callout type="info">
446 +Replace the sample user ID with your own user's identifier. See [User Management](/docs/user-management) for details.
447 +</Callout>
448 +
449 <Tabs groupId="language" items={['TypeScript']} persist>
450 <Tab value="TypeScript">
451 ```typescript
@@ -381,11 +456,11 @@ import { stepCountIs, streamText } from "ai";
456
457 // Initialize Composio with Vercel provider
458 const composio = new Composio({
384 - apiKey: "{{apiKey}}",
459 provider: new VercelProvider(),
460 });
461
388 -const externalUserId = "{{userId}}";
462 +const externalUserId = "user_2nFh83Hd";
463 +const recipientEmail = "soham.g@composio.dev";
464
465 // Create a tool router session
466 const session = await composio.create(externalUserId);
@@ -397,7 +472,7 @@ const tools = await session.tools();
472 console.log(`🔄 Running agent...`);
473 const stream = await streamText({
474 model: openai("gpt-4o-mini"),
400 - prompt: "Send an email to {{email}} with the subject 'Hello from Composio' and the body 'This is a test email!'",
475 + prompt: `Send an email to ${recipientEmail} with the subject 'Hello from Composio' and the body 'This is a test email!'`,
476 stopWhen: stepCountIs(10),
477 tools,
478 });