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.

chore: update composio package versions and clean up template imports

[email protected]1673d79383e1
diff --git a/fern/generators/tool_doc_generator/templates/python/api_key.py b/fern/generators/tool_doc_generator/templates/python/api_key.py
index 926f666da..30ff43a0a 100644
--- a/fern/generators/tool_doc_generator/templates/python/api_key.py
+++ b/fern/generators/tool_doc_generator/templates/python/api_key.py
@@ -1,5 +1,4 @@
from composio import Composio
-from composio.types import auth_scheme
# Replace these with your actual values
{{toolkit_slug}}_auth_config_id = "{{auth_config_id|default:'ac_YOUR_AUTH_CONFIG_ID'}}" # Auth config ID created above
diff --git a/fern/generators/tool_doc_generator/templates/python/bearer_token.py b/fern/generators/tool_doc_generator/templates/python/bearer_token.py
index 9c8a406d9..48c4fe6c9 100644
--- a/fern/generators/tool_doc_generator/templates/python/bearer_token.py
+++ b/fern/generators/tool_doc_generator/templates/python/bearer_token.py
@@ -1,5 +1,4 @@
from composio import Composio
-from composio.types import auth_scheme
# Auth config ID created above
{{toolkit_slug}}_auth_config_id = "{{auth_config_id|default:'ac_YOUR_AUTH_CONFIG_ID'}}"
diff --git a/fern/generators/tool_doc_generator/templates/python/oauth2.py b/fern/generators/tool_doc_generator/templates/python/oauth2.py
index 6a3503d96..e546b7126 100644
--- a/fern/generators/tool_doc_generator/templates/python/oauth2.py
+++ b/fern/generators/tool_doc_generator/templates/python/oauth2.py
@@ -1,5 +1,4 @@
from composio import Composio
-from composio.types import auth_scheme
# Replace these with your actual values
{{toolkit_slug}}_auth_config_id = "{{auth_config_id|default:'ac_YOUR_AUTH_CONFIG_ID'}}" # Auth config ID created above
diff --git a/fern/generators/tool_doc_generator/templates/typescript/api_key.ts b/fern/generators/tool_doc_generator/templates/typescript/api_key.ts
index 057f79aa5..1a4768c29 100644
--- a/fern/generators/tool_doc_generator/templates/typescript/api_key.ts
+++ b/fern/generators/tool_doc_generator/templates/typescript/api_key.ts
@@ -1,7 +1,7 @@
import { Composio } from '@composio/core';
-
+import { AuthScheme } from '@composio/core';
// Replace these with your actual values
-const {{toolkit_slug}}_auth_config_id = "{{auth_config_id|default:'ac_YOUR_AUTH_CONFIG_ID'}}"; // Auth config ID created above
+const {{toolkit_slug}}_auth_config_id = "ac_YOUR_{{toolkit_slug|upper}}_CONFIG_ID"; // Auth config ID created above
const userId = "{{user_id|default:'[email protected]'}}"; // User ID from database/application
const composio = new Composio();
@@ -10,18 +10,17 @@ async function authenticateToolkit(userId: string, authConfigId: string) {
// TODO: Replace this with a method to retrieve the API key from the user.
// In production, this should be securely retrieved from your database or user input.
// For example: const userApiKey = await getUserApiKey(userId);
- const userApiKey = "{{api_key_placeholder|default:'your_api_key_here'}}"; // Replace with actual API key
+ const userApiKey = "your_{{toolkit_slug}}_api_key"; // Replace with actual API key
- const connectionRequest = await composio.connectedAccounts.initiate({
- userId: userId,
- authConfigId: authConfigId,
- config: {
- authScheme: "API_KEY",
- config: {
+ const connectionRequest = await composio.connectedAccounts.initiate(
+ userId,
+ authConfigId,
+ {
+ config: AuthScheme.APIKey({
api_key: userApiKey
- }
+ })
}
- });
+ );
// API Key authentication is immediate - no redirect needed
console.log(`Successfully connected {{toolkit_name}} for user ${userId}`);
diff --git a/fern/generators/tool_doc_generator/templates/typescript/bearer_token.ts b/fern/generators/tool_doc_generator/templates/typescript/bearer_token.ts
index a6343e218..cb7306e64 100644
--- a/fern/generators/tool_doc_generator/templates/typescript/bearer_token.ts
+++ b/fern/generators/tool_doc_generator/templates/typescript/bearer_token.ts
@@ -1,7 +1,7 @@
import { Composio } from '@composio/core';
-
+import { AuthScheme } from '@composio/core';
// Replace these with your actual values
-const {{toolkit_slug}}_auth_config_id = "{{auth_config_id|default:'ac_YOUR_AUTH_CONFIG_ID'}}"; // Auth config ID created above
+const {{toolkit_slug}}_auth_config_id = "ac_YOUR_{{toolkit_slug|upper}}_CONFIG_ID"; // Auth config ID created above
const userId = "{{user_id|default:'[email protected]'}}"; // User ID from database/application
const composio = new Composio();
@@ -10,18 +10,17 @@ async function authenticateToolkit(userId: string, authConfigId: string) {
// TODO: Replace this with a method to retrieve the Bearer Token from the user.
// In production, this should be securely retrieved from your database or user input.
// For example: const bearerToken = await getUserBearerToken(userId);
- const bearerToken = "{{bearer_token_placeholder|default:'your_bearer_token_here'}}"; // Replace with actual bearer token
+ const bearerToken = "your_{{toolkit_slug}}_bearer_token"; // Replace with actual bearer token
- const connectionRequest = await composio.connectedAccounts.initiate({
- userId: userId,
- authConfigId: authConfigId,
- config: {
- authScheme: "BEARER_TOKEN",
- config: {
+ const connectionRequest = await composio.connectedAccounts.initiate(
+ userId,
+ authConfigId,
+ {
+ config: AuthScheme.BearerToken({
token: bearerToken
- }
+ })
}
- });
+ );
// Bearer token authentication is immediate - no redirect needed
console.log(`Successfully connected {{toolkit_name}} for user ${userId}`);
diff --git a/fern/generators/tool_doc_generator/templates/typescript/oauth2.ts b/fern/generators/tool_doc_generator/templates/typescript/oauth2.ts
index bcace48a6..9ae7387f2 100644
--- a/fern/generators/tool_doc_generator/templates/typescript/oauth2.ts
+++ b/fern/generators/tool_doc_generator/templates/typescript/oauth2.ts
@@ -1,16 +1,16 @@
import { Composio } from '@composio/core';
// Replace these with your actual values
-const {{toolkit_slug}}_auth_config_id = "{{auth_config_id|default:'ac_YOUR_AUTH_CONFIG_ID'}}"; // Auth config ID created above
+const {{toolkit_slug}}_auth_config_id = "ac_YOUR_{{toolkit_slug|upper}}_CONFIG_ID"; // Auth config ID created above
const userId = "{{user_id|default:'[email protected]'}}"; // User ID from database/application
const composio = new Composio();
async function authenticateToolkit(userId: string, authConfigId: string) {
- const connectionRequest = await composio.connectedAccounts.initiate({
- userId: userId,
- authConfigId: authConfigId,
- });
+ const connectionRequest = await composio.connectedAccounts.initiate(
+ userId,
+ authConfigId
+ );
console.log(`Visit this URL to authenticate {{toolkit_name}}: ${connectionRequest.redirectUrl}`);
diff --git a/fern/package.json b/fern/package.json
index e0e4e88e1..cc746404e 100644
--- a/fern/package.json
+++ b/fern/package.json
@@ -20,7 +20,7 @@
"snippets:dev": "bun watch scripts/build-snippets.ts --watch",
"add-og": "uv run scripts/add_og_imgs.py",
"check": "fern check",
- "dev": "bun run scripts/build-snippets.ts && (bun run scripts/build-snippets.ts --watch & fern docs dev) && pnpm css:watch",
+ "dev": "bun run scripts/build-snippets.ts && (bun run scripts/build-snippets.ts --watch & fern docs dev)",
"dev:docs": "fern docs dev",
"links": "fern docs broken-links",
"build": "echo 'Build orchestrated by Turbo'",
diff --git a/uv.lock b/uv.lock
index 4058e8f2e..dc90759b4 100644
--- a/uv.lock
+++ b/uv.lock
@@ -467,7 +467,7 @@ wheels = [
[[package]]
name = "composio"
-version = "0.8.1"
+version = "0.8.5"
source = { virtual = "python" }
dependencies = [
{ name = "composio-client" },
@@ -514,7 +514,7 @@ dev = [
[[package]]
name = "composio-anthropic"
-version = "0.8.1"
+version = "0.8.5"
source = { virtual = "python/providers/anthropic" }
dependencies = [
{ name = "anthropic" },
@@ -546,7 +546,7 @@ wheels = [
[[package]]
name = "composio-crewai"
-version = "0.8.1"
+version = "0.8.5"
source = { virtual = "python/providers/crewai" }
dependencies = [
{ name = "composio" },
@@ -561,7 +561,7 @@ requires-dist = [
[[package]]
name = "composio-gemini"
-version = "0.8.1"
+version = "0.8.5"
source = { virtual = "python/providers/gemini" }
dependencies = [
{ name = "composio" },
@@ -576,7 +576,7 @@ requires-dist = [
[[package]]
name = "composio-google"
-version = "0.8.1"
+version = "0.8.5"
source = { virtual = "python/providers/google" }
dependencies = [
{ name = "composio" },
@@ -591,7 +591,7 @@ requires-dist = [
[[package]]
name = "composio-google-adk"
-version = "0.8.1"
+version = "0.8.5"
source = { virtual = "python/providers/google_adk" }
dependencies = [
{ name = "composio" },
@@ -606,7 +606,7 @@ requires-dist = [
[[package]]
name = "composio-langchain"
-version = "0.8.1"
+version = "0.8.5"
source = { virtual = "python/providers/langchain" }
dependencies = [
{ name = "composio" },
@@ -621,7 +621,7 @@ requires-dist = [
[[package]]
name = "composio-openai"
-version = "0.8.1"
+version = "0.8.5"
source = { virtual = "python/providers/openai" }
dependencies = [
{ name = "composio" },
@@ -636,7 +636,7 @@ requires-dist = [
[[package]]
name = "composio-openai-agents"
-version = "0.8.1"
+version = "0.8.5"
source = { virtual = "python/providers/openai_agents" }
dependencies = [
{ name = "composio" },