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.

fix(examples): declare provider deps and drop magic-flow-demo (#4221)

Alberto Schiabeld787107dfac5
diff --git a/examples-manifest.json b/examples-manifest.json
index aae276a32..71268fb64 100644
--- a/examples-manifest.json
+++ b/examples-manifest.json
@@ -118,18 +118,6 @@
"toolkits": [],
"timeoutSec": 90
},
- {
- "id": "ts/connected-accounts/magic-flow-demo",
- "lang": "ts",
- "pkg": "connected-accounts-example",
- "file": "ts/examples/connected-accounts/src/magic-flow-demo.ts",
- "tier": "3",
- "env": [
- "OPENAI_API_KEY"
- ],
- "readiness": "Redirect the user to https?://",
- "timeoutSec": 120
- },
{
"id": "ts/connected-accounts/multiple-connected-accounts",
"lang": "ts",
@@ -1073,7 +1061,9 @@
],
"timeoutSec": 240,
"pyWith": [
- "openai-agents>=0.19"
+ "openai-agents>=0.19",
+ "./python/providers/openai_agents",
+ "./python"
]
},
{
@@ -1131,7 +1121,7 @@
],
"pyWith": [
"claude-agent-sdk",
- "composio-claude-agent-sdk",
+ "./python/providers/claude_agent_sdk",
"./python"
],
"timeoutSec": 300,
@@ -1171,7 +1161,9 @@
],
"timeoutSec": 180,
"pyWith": [
- "openai-agents>=0.19"
+ "openai-agents>=0.19",
+ "./python/providers/openai_agents",
+ "./python"
]
},
{
@@ -1187,7 +1179,9 @@
],
"timeoutSec": 180,
"pyWith": [
- "openai-agents>=0.19"
+ "openai-agents>=0.19",
+ "./python/providers/openai_agents",
+ "./python"
]
},
{
@@ -1199,7 +1193,11 @@
"OPENAI_API_KEY"
],
"toolkits": [],
- "timeoutSec": 180
+ "timeoutSec": 180,
+ "pyWith": [
+ "./python/providers/openai",
+ "./python"
+ ]
},
{
"id": "py/tool_router/langchain_agent",
@@ -1252,7 +1250,9 @@
],
"timeoutSec": 240,
"pyWith": [
- "openai-agents>=0.19"
+ "openai-agents>=0.19",
+ "./python/providers/openai_agents",
+ "./python"
]
},
{
@@ -1287,7 +1287,9 @@
],
"timeoutSec": 180,
"pyWith": [
- "openai-agents>=0.19"
+ "openai-agents>=0.19",
+ "./python/providers/openai_agents",
+ "./python"
]
}
]
diff --git a/ts/examples/connected-accounts/README.md b/ts/examples/connected-accounts/README.md
index 4fdad69a5..9f615f84c 100644
--- a/ts/examples/connected-accounts/README.md
+++ b/ts/examples/connected-accounts/README.md
@@ -14,7 +14,6 @@ Connected accounts in Composio enable your application to interact with third-pa
## Example Files
- **toolkit-authorize.ts**: Demonstrates authorizing a toolkit and waiting for the connection
-- **magic-flow-demo.ts**: Shows how to use the magic flow for a streamlined connection experience
- **index.ts**: Basic entry point that imports the examples
## Using the waitForConnection Method
diff --git a/ts/examples/connected-accounts/src/magic-flow-demo.ts b/ts/examples/connected-accounts/src/magic-flow-demo.ts
deleted file mode 100644
index 03f434fe2..000000000
--- a/ts/examples/connected-accounts/src/magic-flow-demo.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import { Composio } from '@composio/core';
-import { OpenAI } from 'openai';
-
-const userId = 'default';
-
-const composio = new Composio({
- apiKey: process.env.COMPOSIO_API_KEY,
-});
-
-const openai = new OpenAI({
- apiKey: process.env.OPENAI_API_KEY,
-});
-
-// ------------------------------------------------------------
-// 1. Authorize the user to GitHub
-// ------------------------------------------------------------
-
-const connectionRequest = await composio.toolkits.authorize(userId, 'github');
-// Redirect the user to continue to auth flow
-const redirectUrl = connectionRequest.redirectUrl;
-
-console.log(`Redirect the user to ${redirectUrl}`);
-
-// Wait for the user to connect the account / singin to GitHub
-const connectedAccount = await connectionRequest.waitForConnection();
-
-console.log(`Connected account created: ${JSON.stringify(connectedAccount, null, 2)}`);
-
-// ------------------------------------------------------------
-// 2. Get the GitHub tools
-// ------------------------------------------------------------
-
-const tools = await composio.tools.get(userId, {
- toolkits: ['github'],
-});
-
-// ------------------------------------------------------------
-// 3. Use the Composio GitHub tools with OpenAI
-// ------------------------------------------------------------
-const task = 'Star the composio repository on GitHub';
-const messages: OpenAI.ChatCompletionMessageParam[] = [
- { role: 'system', content: 'You are a helpful assistant that can help with tasks.' },
- { role: 'user', content: task },
-];
-
-const response = await openai.chat.completions.create({
- model: 'gpt-4o-mini',
- messages,
- tools: tools,
- tool_choice: 'auto',
-});
-
-console.log(`Response: ${JSON.stringify(response, null, 2)}`);