Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
docs: remove // @noErrors from all provider pages, fix type errors
Sushmithamalleshd87d4d161991
diff --git a/docs/content/docs/providers/google.mdx b/docs/content/docs/providers/google.mdxindex b10dc8d48..2ad5b0974 100644--- a/docs/content/docs/providers/google.mdx+++ b/docs/content/docs/providers/google.mdx@@ -72,7 +72,6 @@ print(response.text)</Tab><Tab value="TypeScript">```typescript-// @noErrorsimport { Composio } from '@composio/core';import { GoogleProvider } from '@composio/google';import { GoogleGenAI, type Part } from '@google/genai';diff --git a/docs/content/docs/providers/langchain.mdx b/docs/content/docs/providers/langchain.mdxindex a8f7abd34..949654172 100644--- a/docs/content/docs/providers/langchain.mdx+++ b/docs/content/docs/providers/langchain.mdx@@ -18,7 +18,7 @@ pip install composio composio_langchain langchain langchain_openai</Tab><Tab value="TypeScript">```bash-npm install @composio/core @composio/langchain langchain @langchain/openai+npm install @composio/core @composio/langchain @langchain/openai @langchain/langgraph @langchain/core```</Tab></Tabs>@@ -63,9 +63,10 @@ print(result["messages"][-1].content)</Tab><Tab value="TypeScript">```typescript-// @noErrorsimport { ChatOpenAI } from '@langchain/openai';-import { createAgent } from 'langchain';+import { HumanMessage, AIMessage } from '@langchain/core/messages';+import { ToolNode } from '@langchain/langgraph/prebuilt';+import { StateGraph, MessagesAnnotation } from '@langchain/langgraph';import { Composio } from '@composio/core';import { LangchainProvider } from '@composio/langchain';@@ -77,18 +78,39 @@ const composio = new Composio({const session = await composio.create("user_123");const tools = await session.tools();-const model = new ChatOpenAI({ model: 'gpt-5.2' });--const agent = createAgent({- model,- tools,-});--const result = await agent.invoke({- messages: [{ role: "user", content: "Send an email to [email protected] with the subject 'Hello' and body 'Hello from Composio!'" }],+const toolNode = new ToolNode(tools);++const model = new ChatOpenAI({+ model: 'gpt-5.2',+ temperature: 0,+}).bindTools(tools);++function shouldContinue({ messages }: typeof MessagesAnnotation.State) {+ const lastMessage = messages[messages.length - 1] as AIMessage;+ if (lastMessage.tool_calls?.length) {+ return 'tools';+ }+ return '__end__';+}++async function callModel(state: typeof MessagesAnnotation.State) {+ const response = await model.invoke(state.messages);+ return { messages: [response] };+}++const workflow = new StateGraph(MessagesAnnotation)+ .addNode('agent', callModel)+ .addEdge('__start__', 'agent')+ .addNode('tools', toolNode)+ .addEdge('tools', 'agent')+ .addConditionalEdges('agent', shouldContinue);++const app = workflow.compile();++const finalState = await app.invoke({+ messages: [new HumanMessage("Send an email to [email protected] with the subject 'Hello' and body 'Hello from Composio!'")],});--console.log(result.messages[result.messages.length - 1].content);+console.log(finalState.messages[finalState.messages.length - 1].content);```</Tab></Tabs>diff --git a/docs/content/docs/providers/llamaindex.mdx b/docs/content/docs/providers/llamaindex.mdxindex 0a855a2c6..dd4d68aa5 100644--- a/docs/content/docs/providers/llamaindex.mdx+++ b/docs/content/docs/providers/llamaindex.mdx@@ -69,7 +69,6 @@ asyncio.run(main())</Tab><Tab value="TypeScript">```typescript-// @noErrorsimport { Composio } from '@composio/core';import { LlamaindexProvider } from '@composio/llamaindex';import { openai } from '@llamaindex/openai';diff --git a/docs/content/docs/providers/mastra.mdx b/docs/content/docs/providers/mastra.mdxindex d46c8d339..63b151f1b 100644--- a/docs/content/docs/providers/mastra.mdx+++ b/docs/content/docs/providers/mastra.mdx@@ -4,15 +4,36 @@ description: Build an agent with Mastra and enable it to use 800+ tools with Comkeywords: [mastra]----The Mastra provider formats Composio tools into a format compatible with [Mastra](https://mastra.ai/en/docs/tools-mcp/overview#creating-tools)'s tool calling capabilities, including input schemas, execution logic, and descriptions.+The Mastra provider transforms Composio tools into [Mastra's tool format](https://mastra.ai/en/docs/tools-mcp/overview#creating-tools) with built-in execution.-## Setup+<Callout type="info">+Mastra is TypeScript only. There is no Python SDK.+</Callout>++<Steps>+<Step>+**Install**```bashnpm install @composio/core @composio/mastra @mastra/core @ai-sdk/openai```+</Step>++<Step>+**Configure API Keys**-## Usage+<Callout type="info">+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).+</Callout>++```txt title=".env"+COMPOSIO_API_KEY=xxxxxxxxx+OPENAI_API_KEY=xxxxxxxxx+```+</Step>++<Step>+**Create session and run**```typescriptimport { Composio } from "@composio/core";@@ -29,58 +50,18 @@ const session = await composio.create("user_123");const tools = await session.tools();const agent = new Agent({- id: "github-agent",- name: "GitHub Agent",- instructions: "You are a helpful assistant that can perform GitHub actions.",- model: openai("gpt-4.1"),- tools: tools,+ id: "my-agent",+ name: "My Agent",+ instructions: "You are a helpful assistant.",+ model: openai("gpt-5.2"),+ tools,});const { text } = await agent.generate([- { role: "user", content: "Star the composiohq/composio repository on GitHub" },+ { role: "user", content: "Send an email to [email protected] with the subject 'Hello' and body 'Hello from Composio!'" },]);console.log(text);```--## Usage with MCP--You can also use Composio MCP servers directly with Mastra's MCPClient.--<Callout type="info">-Composio MCP servers only support Streamable HTTP transport.-</Callout>--```typescript-// @noErrors-import { MCPClient } from "@mastra/mcp";-import { openai } from "@ai-sdk/openai";-import { Agent } from "@mastra/core/agent";-import { Composio } from "@composio/core";--const composio = new Composio();--// Create a session for your user-const session = await composio.create("user_123");--// Create MCP client with the session's MCP server-const mcpClient = new MCPClient({- id: "composio-mcp-client",- servers: {- composio: { url: new URL(session.mcp.url) },- }-});--const agent = new Agent({- id: "dev-assistant",- name: "Dev Assistant",- instructions: "Help manage GitHub repos, Linear issues, and Notion documentation.",- model: openai("gpt-4-turbo"),- tools: await mcpClient.getTools()-});--const response = await agent.generate(- "Star the composiohq/composio repository on GitHub"-);-console.log(response.text);-```+</Step>+</Steps>diff --git a/docs/content/docs/providers/vercel.mdx b/docs/content/docs/providers/vercel.mdxindex 460015a2f..3d46f5e7d 100644--- a/docs/content/docs/providers/vercel.mdx+++ b/docs/content/docs/providers/vercel.mdx@@ -38,7 +38,6 @@ ANTHROPIC_API_KEY=xxxxxxxxxThe Vercel provider is **agentic** — tools include an `execute` function, so the AI SDK handles tool calls automatically via [`stopWhen`](https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling).```typescript-// @noErrorsimport { anthropic } from "@ai-sdk/anthropic";import { Composio } from "@composio/core";import { VercelProvider } from "@composio/vercel";