Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

quickstart p0

Sushmithamallesh007c6639afa1
diff --git a/fern/pages/src/tool-router/quickstart.mdx b/fern/pages/src/tool-router/quickstart.mdx
index 93cef2d78..130048a54 100644
--- a/fern/pages/src/tool-router/quickstart.mdx
+++ b/fern/pages/src/tool-router/quickstart.mdx
@@ -22,7 +22,8 @@ pip install composio openai-agents composio-openai-agents
Sessions are ephemeral, user-scoped and manage connections and tools for that user. See [Session Management](/docs/user-management) and [Configuring Toolkits](/tool-router/configuring-toolkits).
<Info>
-Replace `your-api-key` with your Composio API key from the [developer dashboard](https://platform.composio.dev/?next_page=/settings). Replace `user_123` with the ID of the user in your system.
+`your-api-key`: Your Composio API key from the [dashboard](https://platform.composio.dev/?next_page=/settings).
+`user_123`: The [ID of the user](/docs/user-management) in your system.
</Info>
```python
from composio import Composio
@@ -32,6 +33,8 @@ composio = Composio(
api_key="your-api-key",
provider=OpenAIAgentsProvider()
)
+
+# Create a session for a user
session = composio.create(user_id="user_123")
```
</Step>
@@ -42,8 +45,8 @@ When the agent needs authentication, it will prompt the user to connect. To pre-
from agents import Agent, Runner
agent = Agent(
- name="Assistant",
- instructions="You are a helpful assistant.",
+ name="Personal Assistant",
+ instructions="You are a helpful personal assistant.",
tools=session.tools()
)
@@ -73,7 +76,8 @@ npm install @composio/core @composio/openai-agents @openai/agents
Sessions are ephemeral, user-scoped and manage connections and tools for that user. See [Session Management](/docs/user-management) and [Configuring Toolkits](/tool-router/configuring-toolkits).
<Info>
-Replace `your-api-key` with your Composio API key from the [developer dashboard](https://platform.composio.dev/?next_page=/settings). Replace `user_123` with the ID of the user in your system.
+`your-api-key`: Your Composio API key from the [dashboard](https://platform.composio.dev/?next_page=/settings).
+`user_123`: The [ID of the user](/docs/user-management) in your system.
</Info>
```typescript
import { Composio } from "@composio/core";
@@ -83,6 +87,8 @@ const composio = new Composio({
apiKey: "your-api-key",
provider: new OpenAIAgentsProvider(),
});
+
+// Create a session for a user
const { tools } = await composio.create("user_123");
```
</Step>
@@ -93,8 +99,8 @@ When the agent needs authentication, it will prompt the user to connect. To pre-
import { Agent, run } from "@openai/agents";
const agent = new Agent({
- name: "Assistant",
- instructions: "You are a helpful assistant.",
+ name: "Personal Assistant",
+ instructions: "You are a helpful personal assistant.",
tools: await tools(),
});
@@ -124,7 +130,8 @@ pip install composio anthropic-agents composio-anthropic
Sessions are ephemeral, user-scoped and manage connections and tools for that user. See [Session Management](/docs/user-management) and [Configuring Toolkits](/tool-router/configuring-toolkits).
<Info>
-Replace `your-api-key` with your Composio API key from the [developer dashboard](https://platform.composio.dev/?next_page=/settings). Replace `user_123` with the ID of the user in your system.
+`your-api-key`: Your Composio API key from the [dashboard](https://platform.composio.dev/?next_page=/settings).
+`user_123`: The [ID of the user](/docs/user-management) in your system.
</Info>
```python
from composio import Composio
@@ -134,6 +141,8 @@ composio = Composio(
api_key="your-api-key",
provider=AnthropicProvider()
)
+
+# Create a session for a user
session = composio.create(user_id="user_123")
```
</Step>
@@ -144,8 +153,8 @@ When the agent needs authentication, it will prompt the user to connect. To pre-
from anthropic_agents import Agent, run
agent = Agent(
- name="Assistant",
- instructions="You are a helpful assistant.",
+ name="Personal Assistant",
+ instructions="You are a helpful personal assistant.",
mcp_servers=[session.mcp.url]
)
@@ -175,7 +184,8 @@ npm install @composio/core @composio/anthropic @anthropic-ai/agent
Sessions are ephemeral, user-scoped and manage connections and tools for that user. See [Session Management](/docs/user-management) and [Configuring Toolkits](/tool-router/configuring-toolkits).
<Info>
-Replace `your-api-key` with your Composio API key from the [developer dashboard](https://platform.composio.dev/?next_page=/settings). Replace `user_123` with the ID of the user in your system.
+`your-api-key`: Your Composio API key from the [dashboard](https://platform.composio.dev/?next_page=/settings).
+`user_123`: The [ID of the user](/docs/user-management) in your system.
</Info>
```typescript
import { Composio } from "@composio/core";
@@ -185,6 +195,8 @@ const composio = new Composio({
apiKey: "your-api-key",
provider: new AnthropicProvider(),
});
+
+// Create a session for a user
const { mcp } = await composio.create("user_123");
```
</Step>
@@ -195,8 +207,8 @@ When the agent needs authentication, it will prompt the user to connect. To pre-
import { Agent, run } from "@anthropic-ai/agent";
const agent = new Agent({
- name: "Assistant",
- instructions: "You are a helpful assistant.",
+ name: "Personal Assistant",
+ instructions: "You are a helpful personal assistant.",
mcpServers: [mcp.url],
});
@@ -226,7 +238,8 @@ npm install @composio/core @composio/vercel ai @ai-sdk/openai
Sessions are ephemeral, user-scoped and manage connections and tools for that user. See [Session Management](/docs/user-management) and [Configuring Toolkits](/tool-router/configuring-toolkits).
<Info>
-Replace `your-api-key` with your Composio API key from the [developer dashboard](https://platform.composio.dev/?next_page=/settings). Replace `user_123` with the ID of the user in your system.
+`your-api-key`: Your Composio API key from the [dashboard](https://platform.composio.dev/?next_page=/settings).
+`user_123`: The [ID of the user](/docs/user-management) in your system.
</Info>
```typescript
import { Composio } from "@composio/core";
@@ -236,6 +249,8 @@ const composio = new Composio({
apiKey: "your-api-key",
provider: new VercelProvider(),
});
+
+// Create a session for a user
const { tools } = await composio.create("user_123");
```
</Step>