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, 12:00 UTC
Add comprehensive agent building skills for Claude Code (#2537)
Musthaq Ahamad committed
Feb 1, 2026 at 11:00 UTC
e387f1eda6e31b6a64c46f3120b9becc32b5b93c
16 files changed
+2064
.claude/commands/api-update.md
renamed
.claude/commands/changelog.md
renamed
.claude/rules/bug-fix-testing.mdc
renamed
.claude/skills/building-agents-using-anthropic/SKILL.md
new
+134
@@ -0,0 +1,134 @@
1
+# Building Agents using Anthropic with Composio
2
+
3
+Build AI agents using Anthropic's Claude API with Composio tools.
4
+
5
+## Installation
6
+
7
+```bash
8
+npm install @composio/core @composio/anthropic @anthropic-ai/sdk
9
+npm install @composio/claude-agent-sdk @anthropic-ai/claude-agent-sdk # For Agent SDK
10
+```
11
+
12
+```bash
13
+pip install composio-anthropic
14
+```
15
+
16
+**Find Latest Versions:**
17
+```bash
18
+npm view @anthropic-ai/sdk version
19
+pip index versions anthropic | grep "Available versions" | head -1
20
+```
21
+
22
+## Integration Method
23
+
24
+**Anthropic Messages API is non-agentic** - uses direct tools. **Claude Agent SDK is agentic** - uses Tool Router.
25
+
26
+### Messages API (Non-Agentic)
27
+
28
+```typescript
29
+import { Composio } from '@composio/core';
30
+import { AnthropicProvider } from '@composio/anthropic';
31
+import Anthropic from '@anthropic-ai/sdk';
32
+
33
+const anthropic = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
34
+const composio = new Composio({
35
+ apiKey: process.env.COMPOSIO_API_KEY,
36
+ provider: new AnthropicProvider({ cacheTools: true }),
37
+});
38
+
39
+// Get tools
40
+const tools = await composio.tools.get('default', { toolkits: ['github'] });
41
+
42
+// Use with Claude
43
+const message = await anthropic.messages.create({
44
+ model: 'claude-3-7-sonnet-latest',
45
+ max_tokens: 1024,
46
+ tools: tools,
47
+ messages: [{ role: 'user', content: 'Create a GitHub issue' }],
48
+});
49
+
50
+// Handle tool calls
51
+const toolResults = await composio.provider.handleToolCalls('default', message);
52
+```
53
+
54
+```python
55
+from composio_anthropic import ComposioToolSet, Action
56
+from anthropic import Anthropic
57
+
58
+client = Anthropic(api_key="YOUR_KEY")
59
+composio_toolset = ComposioToolSet(api_key="YOUR_KEY")
60
+
61
+# Get tools
62
+tools = composio_toolset.get_tools(actions=[Action.GITHUB_CREATE_ISSUE])
63
+
64
+# Use with Claude
65
+message = client.messages.create(
66
+ model="claude-3-7-sonnet-latest",
67
+ max_tokens=1024,
68
+ tools=tools,
69
+ messages=[{"role": "user", "content": "Create a GitHub issue"}]
70
+)
71
+
72
+# Handle tool calls
73
+tool_results = composio_toolset.handle_tool_calls(message)
74
+```
75
+
76
+### Claude Agent SDK (Agentic - Requires Tool Router)
77
+
78
+```typescript
79
+import { Composio } from '@composio/core';
80
+import { ClaudeAgentSDKProvider } from '@composio/claude-agent-sdk';
81
+import { query } from '@anthropic-ai/claude-agent-sdk';
82
+
83
+const composio = new Composio({
84
+ apiKey: process.env.COMPOSIO_API_KEY,
85
+ provider: new ClaudeAgentSDKProvider()
86
+});
87
+
88
+async function runAgent(userId: string, prompt: string) {
89
+ // Create session
90
+ const session = await composio.create(userId, {
91
+ toolkits: ['github'],
92
+ manageConnections: true
93
+ });
94
+
95
+ const tools = await session.tools();
96
+
97
+ // Use with Claude Agent SDK
98
+ const stream = await query({
99
+ prompt,
100
+ options: {
101
+ model: 'claude-sonnet-4-5-20250929',
102
+ permissionMode: 'bypassPermissions',
103
+ tools
104
+ }
105
+ });
106
+
107
+ for await (const event of stream) {
108
+ if (event.type === 'result' && event.subtype === 'success') {
109
+ console.log(event.result);
110
+ }
111
+ }
112
+}
113
+```
114
+
115
+## Key Resources
116
+
117
+- **Anthropic Docs**: https://docs.anthropic.com/
118
+- **Tool Use Guide**: https://docs.anthropic.com/en/docs/build-with-claude/tool-use
119
+- **Claude Agent SDK**: https://docs.anthropic.com/en/docs/agents
120
+- **Messages API (Non-Agentic)**: Direct tools
121
+- **Claude Agent SDK (Agentic)**: Use Tool Router
122
+
123
+## Environment Variables
124
+
125
+```bash
126
+ANTHROPIC_API_KEY=sk-ant-...
127
+COMPOSIO_API_KEY=...
128
+```
129
+
130
+## Next Steps
131
+
132
+1. For Agent SDK (agentic), use `/building-agents`
133
+2. Check `ts/examples/anthropic/` for complete examples
134
+3. See [Anthropic docs](https://docs.anthropic.com/) for Claude features
.claude/skills/building-agents-using-autogen/SKILL.md
new
+143
@@ -0,0 +1,143 @@
1
+# Building Agents using Microsoft AutoGen with Composio
2
+
3
+Build multi-agent conversational systems using AutoGen with Composio Tool Router.
4
+
5
+## Installation
6
+
7
+```bash
8
+# For AgentChat (conversational agents)
9
+pip install composio-autogen autogen-agentchat autogen-ext[openai]
10
+
11
+# For AutoGen Studio (UI-based)
12
+pip install autogenstudio
13
+```
14
+
15
+**Find Latest Versions:**
16
+```bash
17
+pip index versions autogen-agentchat | grep "Available versions" | head -1
18
+pip index versions composio-autogen | grep "Available versions" | head -1
19
+```
20
+
21
+## Integration Method
22
+
23
+**AutoGen is an agentic provider** - use Tool Router for user isolation.
24
+
25
+### Native Tools with Tool Router
26
+
27
+```python
28
+import asyncio
29
+from autogen_agentchat.agents import AssistantAgent
30
+from autogen_ext.models.openai import OpenAIChatCompletionClient
31
+from composio_autogen import ComposioToolSet, App
32
+
33
+toolset = ComposioToolSet()
34
+
35
+async def create_agent(user_id: str):
36
+ # Create session
37
+ session = toolset.create(
38
+ user_id=user_id,
39
+ toolkits=["github"],
40
+ manage_connections=True
41
+ )
42
+
43
+ tools = session.tools()
44
+
45
+ # Create agent with tools
46
+ agent = AssistantAgent(
47
+ name="github_agent",
48
+ model_client=OpenAIChatCompletionClient(model="gpt-4o"),
49
+ tools=tools,
50
+ system_message="You manage GitHub repositories"
51
+ )
52
+
53
+ return agent
54
+
55
+async def main():
56
+ agent = await create_agent("user_123")
57
+ result = await agent.run(task="Create a GitHub issue titled 'Bug Report'")
58
+ print(result)
59
+
60
+asyncio.run(main())
61
+```
62
+
63
+### Multi-Agent Conversation
64
+
65
+```python
66
+import asyncio
67
+from autogen_agentchat.agents import AssistantAgent
68
+from autogen_agentchat.teams import RoundRobinGroupChat
69
+from autogen_ext.models.openai import OpenAIChatCompletionClient
70
+from composio_autogen import ComposioToolSet, App
71
+
72
+toolset = ComposioToolSet()
73
+
74
+async def create_team(user_id: str):
75
+ # Create session
76
+ session = toolset.create(
77
+ user_id=user_id,
78
+ toolkits=["github", "slack"],
79
+ manage_connections=True
80
+ )
81
+
82
+ tools = session.tools()
83
+
84
+ # Create specialized agents
85
+ github_agent = AssistantAgent(
86
+ name="github_agent",
87
+ model_client=OpenAIChatCompletionClient(model="gpt-4o"),
88
+ tools=tools,
89
+ system_message="You manage GitHub"
90
+ )
91
+
92
+ slack_agent = AssistantAgent(
93
+ name="slack_agent",
94
+ model_client=OpenAIChatCompletionClient(model="gpt-4o"),
95
+ tools=tools,
96
+ system_message="You manage Slack"
97
+ )
98
+
99
+ # Create team
100
+ team = RoundRobinGroupChat(
101
+ [github_agent, slack_agent],
102
+ max_turns=10
103
+ )
104
+
105
+ return team
106
+
107
+async def main():
108
+ team = await create_team("user_123")
109
+ result = await team.run(
110
+ task="Create a GitHub issue and notify team on Slack"
111
+ )
112
+ print(result)
113
+
114
+asyncio.run(main())
115
+```
116
+
117
+## Key Features
118
+
119
+- **Multi-Agent Conversations**: Agents collaborate and communicate
120
+- **AutoGen Studio**: No-code UI for prototyping
121
+- **Multiple Layers**: Studio, AgentChat, Core for different needs
122
+- **Team Patterns**: RoundRobin, Swarm, custom orchestration
123
+
124
+## Key Resources
125
+
126
+- **AutoGen Docs**: https://microsoft.github.io/autogen/stable/
127
+- **Tool Router Guide**: `/building-agents`
128
+- **GitHub**: https://github.com/microsoft/autogen
129
+- **Microsoft Agent Framework**: Successor to AutoGen
130
+
131
+## Environment Variables
132
+
133
+```bash
134
+OPENAI_API_KEY=sk-... # Or other LLM provider
135
+COMPOSIO_API_KEY=...
136
+```
137
+
138
+## Next Steps
139
+
140
+1. Use `/building-agents` for comprehensive guide
141
+2. Check `python/providers/autogen/` for complete examples
142
+3. See [AutoGen docs](https://microsoft.github.io/autogen/stable/) for conversation patterns
143
+4. Consider [Microsoft Agent Framework](https://learn.microsoft.com/en-us/agent-framework/) for new projects
.claude/skills/building-agents-using-cloudflare/SKILL.md
new
+124
@@ -0,0 +1,124 @@
1
+# Building Agents using Cloudflare with Composio
2
+
3
+Build edge-deployed AI agents using Cloudflare Workers AI with Composio Tool Router.
4
+
5
+## Installation
6
+
7
+```bash
8
+npm install @composio/core @composio/cloudflare agents @cloudflare/ai-utils
9
+npm install wrangler -D # For development
10
+```
11
+
12
+**Find Latest Versions:**
13
+```bash
14
+npm view agents version
15
+npm view @composio/cloudflare version
16
+```
17
+
18
+## Integration Method
19
+
20
+**Cloudflare is an agentic provider** - use Tool Router for user isolation.
21
+
22
+### Native Tools with Tool Router
23
+
24
+```typescript
25
+import { Agent } from 'agents';
26
+import { Composio } from '@composio/core';
27
+import { CloudflareProvider } from '@composio/cloudflare';
28
+
29
+export class MyAgent extends Agent {
30
+ private composio: Composio;
31
+
32
+ constructor(state: DurableObjectState, env: Env) {
33
+ super(state, env);
34
+
35
+ this.composio = new Composio({
36
+ apiKey: env.COMPOSIO_API_KEY,
37
+ provider: new CloudflareProvider(),
38
+ });
39
+ }
40
+
41
+ async onStart() {
42
+ // Initialize with user-specific session
43
+ const session = await this.composio.create(this.userId, {
44
+ toolkits: ['github'],
45
+ manageConnections: true
46
+ });
47
+
48
+ this.tools = await session.tools();
49
+ }
50
+
51
+ async handleMessage(message: string) {
52
+ // Use tools with Cloudflare AI
53
+ const response = await this.ai.run('@cf/meta/llama-3.1-70b-instruct', {
54
+ messages: [
55
+ { role: 'system', content: 'You are a helpful assistant' },
56
+ { role: 'user', content: message },
57
+ ],
58
+ tools: this.tools,
59
+ });
60
+
61
+ return response;
62
+ }
63
+}
64
+```
65
+
66
+### wrangler.toml Configuration
67
+
68
+```toml
69
+name = "my-agent"
70
+main = "src/index.ts"
71
+compatibility_date = "2024-01-01"
72
+
73
+[[durable_objects.bindings]]
74
+name = "MY_AGENT"
75
+class_name = "MyAgent"
76
+
77
+[ai]
78
+binding = "AI"
79
+
80
+[vars]
81
+COMPOSIO_API_KEY = "your-key-here"
82
+
83
+[[migrations]]
84
+tag = "v1"
85
+new_sqlite_classes = ["MyAgent"]
86
+```
87
+
88
+## Key Features
89
+
90
+- **Edge Deployment**: Low-latency worldwide
91
+- **Durable Objects**: Persistent agent state
92
+- **Workers AI**: Run models at the edge
93
+- **Embedded Function Calling**: AI executes functions automatically
94
+
95
+## Key Resources
96
+
97
+- **Cloudflare Agents SDK**: https://developers.cloudflare.com/agents/
98
+- **Tool Router Guide**: `/building-agents`
99
+- **Workers AI**: https://developers.cloudflare.com/workers-ai/
100
+- **Function Calling**: https://developers.cloudflare.com/workers-ai/features/function-calling/
101
+
102
+## Environment Variables
103
+
104
+```bash
105
+COMPOSIO_API_KEY=...
106
+CLOUDFLARE_ACCOUNT_ID=...
107
+CLOUDFLARE_API_TOKEN=...
108
+```
109
+
110
+## Deployment
111
+
112
+```bash
113
+# Deploy with Wrangler
114
+npx wrangler deploy
115
+
116
+# Tail logs
117
+npx wrangler tail
118
+```
119
+
120
+## Next Steps
121
+
122
+1. Use `/building-agents` for comprehensive guide
123
+2. Check `ts/examples/cloudflare-wrangler/` for complete examples
124
+3. See [Cloudflare docs](https://developers.cloudflare.com/agents/) for edge features
.claude/skills/building-agents-using-crewai/SKILL.md
new
+147
@@ -0,0 +1,147 @@
1
+# Building Agents using CrewAI with Composio
2
+
3
+Build multi-agent teams using CrewAI with Composio Tool Router.
4
+
5
+## Installation
6
+
7
+```bash
8
+pip install composio-crewai crewai crewai-tools
9
+```
10
+
11
+**Find Latest Versions:**
12
+```bash
13
+pip index versions crewai | grep "Available versions" | head -1
14
+pip index versions composio-crewai | grep "Available versions" | head -1
15
+```
16
+
17
+## Integration Method
18
+
19
+**CrewAI is an agentic provider** - use MCP for multi-agent teams.
20
+
21
+### MCP Integration
22
+
23
+```python
24
+from crewai import Agent, Task, Crew
25
+from crewai.mcp import MCPServerHTTP
26
+from composio import Composio
27
+
28
+composio = Composio()
29
+
30
+def create_crew(user_id: str):
31
+ # Create session
32
+ session = composio.create(user_id=user_id, toolkits=["github"])
33
+
34
+ # Create agent with MCP server
35
+ agent = Agent(
36
+ role="GitHub Manager",
37
+ goal="Manage GitHub repositories",
38
+ backstory="You are an expert at GitHub operations",
39
+ mcps=[
40
+ MCPServerHTTP(
41
+ url=session.mcp.url,
42
+ headers=session.mcp.headers
43
+ )
44
+ ]
45
+ )
46
+
47
+ # Define task
48
+ task = Task(
49
+ description="Create a GitHub issue titled 'Bug Report'",
50
+ expected_output="Confirmation of issue creation",
51
+ agent=agent
52
+ )
53
+
54
+ # Execute crew
55
+ crew = Crew(agents=[agent], tasks=[task])
56
+ return crew
57
+
58
+crew = create_crew("user_123")
59
+result = crew.kickoff()
60
+print(result)
61
+```
62
+
63
+### Multi-Agent Team Example
64
+
65
+```python
66
+from crewai import Agent, Task, Crew, Process
67
+from crewai.mcp import MCPServerHTTP
68
+from composio import Composio
69
+
70
+composio = Composio()
71
+
72
+def create_team(user_id: str):
73
+ session = composio.create(user_id=user_id, toolkits=["github", "slack"])
74
+
75
+ # Create MCP server connection
76
+ mcp_server = MCPServerHTTP(
77
+ url=session.mcp.url,
78
+ headers=session.mcp.headers
79
+ )
80
+
81
+ # Create specialized agents
82
+ researcher = Agent(
83
+ role="GitHub Researcher",
84
+ goal="Analyze repositories",
85
+ backstory="Expert at code analysis",
86
+ mcps=[mcp_server]
87
+ )
88
+
89
+ reporter = Agent(
90
+ role="Report Writer",
91
+ goal="Create reports",
92
+ backstory="Expert at documentation",
93
+ mcps=[mcp_server]
94
+ )
95
+
96
+ # Define tasks
97
+ research_task = Task(
98
+ description="Analyze the repository",
99
+ expected_output="Analysis report",
100
+ agent=researcher
101
+ )
102
+
103
+ report_task = Task(
104
+ description="Create a summary report",
105
+ expected_output="Markdown report",
106
+ agent=reporter,
107
+ context=[research_task]
108
+ )
109
+
110
+ crew = Crew(
111
+ agents=[researcher, reporter],
112
+ tasks=[research_task, report_task],
113
+ process=Process.sequential
114
+ )
115
+
116
+ return crew
117
+
118
+team = create_team("user_123")
119
+result = team.kickoff()
120
+```
121
+
122
+## Key Features
123
+
124
+- **Multi-Agent Teams**: Agents collaborate on tasks
125
+- **Task Dependencies**: Sequential or hierarchical execution
126
+- **YAML Configs**: Clean agent/task definitions
127
+- **Production Ready**: Mature framework
128
+
129
+## Key Resources
130
+
131
+- **CrewAI Docs**: https://docs.crewai.com/
132
+- **Tool Router Guide**: `/building-agents`
133
+- **Quickstart**: https://docs.crewai.com/en/quickstart
134
+- **GitHub**: https://github.com/crewAIInc/crewAI
135
+
136
+## Environment Variables
137
+
138
+```bash
139
+OPENAI_API_KEY=sk-... # Or other LLM provider
140
+COMPOSIO_API_KEY=...
141
+```
142
+
143
+## Next Steps
144
+
145
+1. Use `/building-agents` for comprehensive guide
146
+2. Check `python/providers/crewai/` for complete examples
147
+3. See [CrewAI docs](https://docs.crewai.com/) for multi-agent patterns
.claude/skills/building-agents-using-google/SKILL.md
new
+107
@@ -0,0 +1,107 @@
1
+# Building Agents using Google Gemini with Composio
2
+
3
+Build AI agents using Google's Gemini API with Composio tools.
4
+
5
+## Installation
6
+
7
+```bash
8
+npm install @composio/core @composio/google @google/genai
9
+```
10
+
11
+```bash
12
+pip install composio-google google-genai
13
+```
14
+
15
+**Find Latest Versions:**
16
+```bash
17
+npm view @google/genai version
18
+pip index versions google-genai | grep "Available versions" | head -1
19
+```
20
+
21
+## Integration Method
22
+
23
+**Google Gemini is a non-agentic provider** - uses direct tools (no Tool Router support).
24
+
25
+### TypeScript Example
26
+
27
+```typescript
28
+import { Composio } from '@composio/core';
29
+import { GoogleProvider } from '@composio/google';
30
+import { GoogleGenAI } from '@google/genai';
31
+
32
+const genai = new GoogleGenAI({ apiKey: process.env.GOOGLE_API_KEY });
33
+const composio = new Composio({
34
+ apiKey: process.env.COMPOSIO_API_KEY,
35
+ provider: new GoogleProvider(),
36
+});
37
+
38
+// Get tools
39
+const tools = await composio.tools.get('default', { toolkits: ['github'] });
40
+
41
+// Use with Gemini
42
+const response = await genai.models.generateContent({
43
+ model: 'gemini-3-flash-preview',
44
+ contents: 'Create a GitHub issue',
45
+ config: {
46
+ tools: tools,
47
+ temperature: 1.0 // Required for Gemini 3
48
+ },
49
+});
50
+
51
+// Handle function calls
52
+if (response.functionCalls) {
53
+ const results = await composio.provider.handleToolCalls('default', response);
54
+}
55
+```
56
+
57
+### Python Example
58
+
59
+```python
60
+from composio_google import ComposioToolSet, Action
61
+from google import genai
62
+from google.genai import types
63
+
64
+client = genai.Client(api_key="YOUR_KEY")
65
+composio_toolset = ComposioToolSet(api_key="YOUR_KEY")
66
+
67
+# Get tools
68
+tools = composio_toolset.get_tools(actions=[Action.GITHUB_CREATE_ISSUE])
69
+
70
+# Use with Gemini
71
+response = client.models.generate_content(
72
+ model="gemini-3-flash-preview",
73
+ contents="Create a GitHub issue",
74
+ config=types.GenerateContentConfig(
75
+ tools=tools,
76
+ temperature=1.0
77
+ )
78
+)
79
+
80
+# Handle function calls
81
+tool_results = composio_toolset.handle_tool_calls(response)
82
+```
83
+
84
+## Key Features
85
+
86
+- **Compositional Function Calling**: Chain multiple functions automatically
87
+- **Parallel Execution**: Execute independent functions simultaneously
88
+- **Internal Thinking**: Gemini 3 models reason through complex requests
89
+
90
+## Key Resources
91
+
92
+- **Gemini API Docs**: https://ai.google.dev/gemini-api/docs
93
+- **Function Calling**: https://ai.google.dev/gemini-api/docs/function-calling
94
+- **Available Models**: Gemini 3 Pro/Flash, Gemini 2.5 Pro/Flash
95
+
96
+## Environment Variables
97
+
98
+```bash
99
+GOOGLE_API_KEY=...
100
+COMPOSIO_API_KEY=...
101
+```
102
+
103
+## Next Steps
104
+
105
+1. Check `ts/examples/google/` for complete examples
106
+2. See [Gemini docs](https://ai.google.dev) for API features
107
+3. Note: Temperature must be 1.0 for Gemini 3 models
.claude/skills/building-agents-using-langchain/SKILL.md
new
+123
@@ -0,0 +1,123 @@
1
+# Building Agents using LangChain with Composio
2
+
3
+Build AI agents using LangChain/LangGraph with Composio Tool Router.
4
+
5
+## Installation
6
+
7
+```bash
8
+npm install @composio/core @composio/langchain langchain @langchain/core @langchain/openai
9
+```
10
+
11
+```bash
12
+pip install composio-langchain langchain langchain-openai
13
+```
14
+
15
+**Find Latest Versions:**
16
+```bash
17
+npm view langchain version
18
+pip index versions langchain | grep "Available versions" | head -1
19
+```
20
+
21
+## Integration Method
22
+
23
+**LangChain is an agentic provider** - use Tool Router (or MCP for flexibility).
24
+
25
+### Native Tools with Tool Router
26
+
27
+```typescript
28
+import { ChatOpenAI } from '@langchain/openai';
29
+import { Composio } from '@composio/core';
30
+import { LangchainProvider } from '@composio/langchain';
31
+
32
+const composio = new Composio({
33
+ apiKey: process.env.COMPOSIO_API_KEY,
34
+ provider: new LangchainProvider(),
35
+});
36
+
37
+async function runAgent(userId: string, prompt: string) {
38
+ // Create session
39
+ const session = await composio.create(userId, {
40
+ toolkits: ['github'],
41
+ manageConnections: true
42
+ });
43
+
44
+ const tools = await session.tools();
45
+
46
+ // Use with LangChain
47
+ const llm = new ChatOpenAI({ model: 'gpt-4o' });
48
+ const agent = llm.bindTools(tools);
49
+
50
+ const result = await agent.invoke(prompt);
51
+ return result;
52
+}
53
+```
54
+
55
+```python
56
+from langchain_openai import ChatOpenAI
57
+from composio_langchain import ComposioToolSet, App
58
+
59
+composio_toolset = ComposioToolSet()
60
+
61
+def run_agent(user_id: str, prompt: str):
62
+ # Create session
63
+ session = composio_toolset.create(
64
+ user_id=user_id,
65
+ toolkits=["github"],
66
+ manage_connections=True
67
+ )
68
+
69
+ tools = session.tools()
70
+
71
+ # Use with LangChain
72
+ llm = ChatOpenAI(model="gpt-4o")
73
+ agent = llm.bind_tools(tools)
74
+
75
+ result = agent.invoke(prompt)
76
+ return result
77
+```
78
+
79
+### MCP Integration
80
+
81
+```typescript
82
+import { MultiServerMCPClient } from '@langchain/mcp-adapters';
83
+import { Composio } from '@composio/core';
84
+
85
+const composio = new Composio();
86
+
87
+async function runAgentMCP(userId: string) {
88
+ const session = await composio.create(userId, {
89
+ toolkits: ['github']
90
+ });
91
+
92
+ const client = new MultiServerMCPClient({
93
+ composio: {
94
+ transport: 'http',
95
+ url: session.mcp.url,
96
+ headers: session.mcp.headers
97
+ }
98
+ });
99
+
100
+ const tools = await client.getTools();
101
+ // Use tools with LangChain
102
+}
103
+```
104
+
105
+## Key Resources
106
+
107
+- **LangChain Docs**: https://python.langchain.com/docs/introduction/
108
+- **Tool Router Guide**: `/building-agents`
109
+- **Agents Documentation**: https://docs.langchain.com/oss/python/langchain/agents
110
+- **Use LangGraph for production**: More flexible agent runtime
111
+
112
+## Environment Variables
113
+
114
+```bash
115
+OPENAI_API_KEY=sk-... # Or other LLM provider
116
+COMPOSIO_API_KEY=...
117
+```
118
+
119
+## Next Steps
120
+
121
+1. Use `/building-agents` for comprehensive guide
122
+2. Use `/building-agents-using-langgraph` for stateful agents
123
+3. Check `ts/examples/langchain/` for complete examples
.claude/skills/building-agents-using-langgraph/SKILL.md
new
+140
@@ -0,0 +1,140 @@
1
+# Building Agents using LangGraph with Composio
2
+
3
+Build stateful, durable AI agents using LangGraph with Composio Tool Router.
4
+
5
+## Installation
6
+
7
+```bash
8
+npm install @composio/core @composio/langchain @langchain/langgraph @langchain/core
9
+```
10
+
11
+```bash
12
+pip install composio-langchain langgraph langgraph-checkpoint-sqlite
13
+```
14
+
15
+**Find Latest Versions:**
16
+```bash
17
+npm view @langchain/langgraph version
18
+pip index versions langgraph | grep "Available versions" | head -1
19
+```
20
+
21
+## Integration Method
22
+
23
+**LangGraph is an agentic provider** - use Tool Router for user isolation.
24
+
25
+### Python Example with Tool Router
26
+
27
+```python
28
+from langgraph.graph import StateGraph, MessagesAnnotation, START, END
29
+from langgraph.prebuilt import ToolNode
30
+from langgraph.checkpoint.sqlite import SqliteSaver
31
+from langchain_openai import ChatOpenAI
32
+from composio_langchain import ComposioToolSet
33
+
34
+toolset = ComposioToolSet()
35
+
36
+def create_agent(user_id: str):
37
+ # Create session
38
+ session = toolset.create(
39
+ user_id=user_id,
40
+ toolkits=["github"],
41
+ manage_connections=True
42
+ )
43
+
44
+ tools = session.tools()
45
+
46
+ # Create graph
47
+ tool_node = ToolNode(tools)
48
+ model = ChatOpenAI(model="gpt-4o").bind_tools(tools)
49
+
50
+ def should_continue(state):
51
+ last_message = state["messages"][-1]
52
+ return "tools" if hasattr(last_message, "tool_calls") and last_message.tool_calls else END
53
+
54
+ def call_model(state):
55
+ return {"messages": [model.invoke(state["messages"])]}
56
+
57
+ workflow = StateGraph(MessagesAnnotation)
58
+ workflow.add_node("agent", call_model)
59
+ workflow.add_node("tools", tool_node)
60
+ workflow.add_edge(START, "agent")
61
+ workflow.add_edge("tools", "agent")
62
+ workflow.add_conditional_edges("agent", should_continue)
63
+
64
+ # Compile with checkpointer for durability
65
+ memory = SqliteSaver.from_conn_string(":memory:")
66
+ app = workflow.compile(checkpointer=memory)
67
+
68
+ return app
69
+
70
+# Use with thread_id for persistence
71
+app = create_agent("user_123")
72
+result = app.invoke(
73
+ {"messages": [{"role": "user", "content": "Create a GitHub issue"}]},
74
+ config={"configurable": {"thread_id": "user-123"}}
75
+)
76
+```
77
+
78
+### TypeScript Example with Tool Router
79
+
80
+```typescript
81
+import { StateGraph, MessagesAnnotation, START, END } from '@langchain/langgraph';
82
+import { ToolNode } from '@langchain/langgraph/prebuilt';
83
+import { ChatOpenAI } from '@langchain/openai';
84
+import { Composio } from '@composio/core';
85
+import { LangchainProvider } from '@composio/langchain';
86
+
87
+const composio = new Composio({
88
+ apiKey: process.env.COMPOSIO_API_KEY,
89
+ provider: new LangchainProvider(),
90
+});
91
+
92
+async function createAgent(userId: string) {
93
+ const session = await composio.create(userId, {
94
+ toolkits: ['github'],
95
+ manageConnections: true
96
+ });
97
+
98
+ const tools = await session.tools();
99
+ const toolNode = new ToolNode(tools);
100
+ const model = new ChatOpenAI({ model: 'gpt-4o' }).bindTools(tools);
101
+
102
+ const workflow = new StateGraph(MessagesAnnotation)
103
+ .addNode('agent', async (state) => ({ messages: [await model.invoke(state.messages)] }))
104
+ .addNode('tools', toolNode)
105
+ .addEdge(START, 'agent')
106
+ .addEdge('tools', 'agent')
107
+ .addConditionalEdges('agent', (state) => {
108
+ const last = state.messages[state.messages.length - 1];
109
+ return last.tool_calls?.length ? 'tools' : END;
110
+ });
111
+
112
+ return workflow.compile();
113
+}
114
+```
115
+
116
+## Key Features
117
+
118
+- **Durable Execution**: Agents persist through failures
119
+- **Human-in-the-Loop**: Pause for approvals
120
+- **Persistent Memory**: State saved across sessions
121
+- **Production Ready**: v1.0 released late 2025
122
+
123
+## Key Resources
124
+
125
+- **LangGraph Docs**: https://docs.langchain.com/oss/python/langgraph/
126
+- **Tool Router Guide**: `/building-agents`
127
+- **LangGraph v1.0**: https://www.blog.langchain.com/langchain-langgraph-1dot0/
128
+
129
+## Environment Variables
130
+
131
+```bash
132
+OPENAI_API_KEY=sk-...
133
+COMPOSIO_API_KEY=...
134
+```
135
+
136
+## Next Steps
137
+
138
+1. Use `/building-agents` for comprehensive guide
139
+2. Check `ts/examples/langchain/` for complete examples
140
+3. See [LangGraph docs](https://docs.langchain.com/oss/python/langgraph/) for advanced features
.claude/skills/building-agents-using-llamaindex/SKILL.md
new
+128
@@ -0,0 +1,128 @@
1
+# Building Agents using LlamaIndex with Composio
2
+
3
+Build RAG-enhanced AI agents using LlamaIndex with Composio Tool Router.
4
+
5
+## Installation
6
+
7
+```bash
8
+npm install @composio/core @composio/llamaindex llamaindex
9
+```
10
+
11
+```bash
12
+pip install composio-llamaindex llama-index llama-index-llms-openai
13
+```
14
+
15
+**Find Latest Versions:**
16
+```bash
17
+npm view llamaindex version
18
+pip index versions llama-index | grep "Available versions" | head -1
19
+```
20
+
21
+## Integration Method
22
+
23
+**LlamaIndex is an agentic provider** - use Tool Router for user isolation.
24
+
25
+### Python Example with Tool Router
26
+
27
+```python
28
+from llama_index.core.agent import ReActAgent
29
+from llama_index.llms.openai import OpenAI
30
+from composio_llamaindex import ComposioToolSet, App
31
+
32
+toolset = ComposioToolSet()
33
+
34
+def create_agent(user_id: str):
35
+ # Create session
36
+ session = toolset.create(
37
+ user_id=user_id,
38
+ toolkits=["github"],
39
+ manage_connections=True
40
+ )
41
+
42
+ tools = session.tools()
43
+
44
+ # Create agent
45
+ llm = OpenAI(model="gpt-4o")
46
+ agent = ReActAgent.from_tools(tools, llm=llm, verbose=True)
47
+
48
+ return agent
49
+
50
+agent = create_agent("user_123")
51
+response = agent.chat("Create a GitHub issue titled 'Bug Report'")
52
+print(response)
53
+```
54
+
55
+### TypeScript Example with Tool Router
56
+
57
+```typescript
58
+import { Composio } from '@composio/core';
59
+import { LlamaIndexProvider } from '@composio/llamaindex';
60
+import { OpenAI, FunctionCallingAgent } from 'llamaindex';
61
+
62
+const composio = new Composio({
63
+ apiKey: process.env.COMPOSIO_API_KEY,
64
+ provider: new LlamaIndexProvider(),
65
+});
66
+
67
+async function createAgent(userId: string) {
68
+ // Create session
69
+ const session = await composio.create(userId, {
70
+ toolkits: ['github'],
71
+ manageConnections: true
72
+ });
73
+
74
+ const tools = await session.tools();
75
+
76
+ // Create agent
77
+ const llm = new OpenAI({ model: 'gpt-4o' });
78
+ const agent = new FunctionCallingAgent({
79
+ llm,
80
+ tools,
81
+ verbose: true,
82
+ });
83
+
84
+ return agent;
85
+}
86
+
87
+const agent = await createAgent('user_123');
88
+const response = await agent.chat({ message: 'Create a GitHub issue' });
89
+```
90
+
91
+### MCP Integration
92
+
93
+```python
94
+# LlamaIndex also supports MCP for framework flexibility
95
+from composio import Composio
96
+
97
+composio = Composio()
98
+session = composio.create(user_id="user_123", toolkits=["github"])
99
+
100
+# Use session.mcp.url with LlamaIndex MCP adapters
101
+```
102
+
103
+## Key Features
104
+
105
+- **ReAct Agents**: Reasoning + Acting pattern
106
+- **RAG + Tools**: Combine retrieval with actions
107
+- **Workflows 1.0**: Event-driven orchestration
108
+- **Query Engines**: Tools for advanced RAG
109
+
110
+## Key Resources
111
+
112
+- **LlamaIndex Docs**: https://developers.llamaindex.ai/python/framework/
113
+- **Tool Router Guide**: `/building-agents`
114
+- **Agents Guide**: https://developers.llamaindex.ai/python/framework/use_cases/agents/
115
+- **Workflows**: https://www.llamaindex.ai/blog/announcing-workflows-1-0-a-lightweight-framework-for-agentic-systems
116
+
117
+## Environment Variables
118
+
119
+```bash
120
+OPENAI_API_KEY=sk-...
121
+COMPOSIO_API_KEY=...
122
+```
123
+
124
+## Next Steps
125
+
126
+1. Use `/building-agents` for comprehensive guide
127
+2. Check `ts/examples/llamaindex/` for complete examples
128
+3. See [LlamaIndex docs](https://developers.llamaindex.ai/) for RAG patterns
.claude/skills/building-agents-using-mastra/SKILL.md
new
+121
@@ -0,0 +1,121 @@
1
+# Building Agents using Mastra with Composio
2
+
3
+Build AI agents using Mastra with Composio Tool Router.
4
+
5
+## Installation
6
+
7
+```bash
8
+npm install @composio/core @composio/mastra @mastra/core
9
+```
10
+
11
+**Find Latest Versions:**
12
+```bash
13
+npm view @mastra/core version
14
+npm view @composio/mastra version
15
+```
16
+
17
+## Integration Method
18
+
19
+**Mastra is an agentic provider** - use Tool Router for user isolation.
20
+
21
+### Native Tools with Tool Router
22
+
23
+```typescript
24
+import { Composio } from '@composio/core';
25
+import { MastraProvider } from '@composio/mastra';
26
+import { Agent } from '@mastra/core/agent';
27
+
28
+const composio = new Composio({
29
+ apiKey: process.env.COMPOSIO_API_KEY,
30
+ provider: new MastraProvider(),
31
+});
32
+
33
+async function createAgent(userId: string) {
34
+ // Create session
35
+ const session = await composio.create(userId, {
36
+ toolkits: ['github'],
37
+ manageConnections: true
38
+ });
39
+
40
+ const tools = await session.tools();
41
+
42
+ // Create agent
43
+ const agent = new Agent({
44
+ id: 'github-agent',
45
+ name: 'GitHub Agent',
46
+ instructions: 'You manage GitHub repositories',
47
+ model: 'openai/gpt-4o',
48
+ tools: {
49
+ ...tools, // Spread Composio tools
50
+ },
51
+ });
52
+
53
+ return agent;
54
+}
55
+
56
+const agent = await createAgent('user_123');
57
+const result = await agent.generate({
58
+ prompt: 'Create a GitHub issue titled "Bug Report"',
59
+});
60
+
61
+console.log(result.text);
62
+```
63
+
64
+### Streaming with Tool Router
65
+
66
+```typescript
67
+async function streamAgent(userId: string, prompt: string) {
68
+ const session = await composio.create(userId, {
69
+ toolkits: ['github'],
70
+ manageConnections: true
71
+ });
72
+
73
+ const tools = await session.tools();
74
+
75
+ const agent = new Agent({
76
+ id: 'agent',
77
+ model: 'openai/gpt-4o',
78
+ tools: { ...tools },
79
+ maxSteps: 10,
80
+ });
81
+
82
+ // Stream response
83
+ const stream = await agent.stream({
84
+ prompt,
85
+ onStepFinish: (step) => {
86
+ console.log('Step completed:', step);
87
+ },
88
+ });
89
+
90
+ for await (const chunk of stream) {
91
+ process.stdout.write(chunk);
92
+ }
93
+}
94
+```
95
+
96
+## Key Features
97
+
98
+- **40+ Model Providers**: OpenAI, Anthropic, Google, Mistral, Groq, etc.
99
+- **Autonomous Agents**: Solve open-ended tasks
100
+- **Streaming Support**: Real-time responses
101
+- **v1.0 Released**: January 2026 - production ready
102
+
103
+## Key Resources
104
+
105
+- **Mastra Docs**: https://mastra.ai/docs
106
+- **Tool Router Guide**: `/building-agents`
107
+- **Agents Guide**: https://mastra.ai/docs/agents/overview
108
+- **GitHub**: https://github.com/mastra-ai/mastra
109
+
110
+## Environment Variables
111
+
112
+```bash
113
+OPENAI_API_KEY=sk-... # Or other model provider
114
+COMPOSIO_API_KEY=...
115
+```
116
+
117
+## Next Steps
118
+
119
+1. Use `/building-agents` for comprehensive guide
120
+2. Check `ts/examples/mastra/` for complete examples
121
+3. See [Mastra docs](https://mastra.ai/docs) for multi-provider routing
.claude/skills/building-agents-using-openai/SKILL.md
new
+125
@@ -0,0 +1,125 @@
1
+# Building Agents using OpenAI with Composio
2
+
3
+Build AI agents using OpenAI's APIs with Composio tools.
4
+
5
+## Installation
6
+
7
+```bash
8
+npm install @composio/core @composio/openai openai
9
+npm install @composio/openai-agents @openai/agents # For Agents API
10
+```
11
+
12
+```bash
13
+pip install composio-openai
14
+```
15
+
16
+**Find Latest Versions:**
17
+```bash
18
+npm view openai version
19
+pip index versions openai | grep "Available versions" | head -1
20
+```
21
+
22
+## Integration Method
23
+
24
+**OpenAI is a non-agentic provider** - uses direct tools (no Tool Router support).
25
+
26
+### Chat Completions API
27
+
28
+```typescript
29
+import { Composio } from '@composio/core';
30
+import { OpenAI } from 'openai';
31
+
32
+const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
33
+const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY });
34
+
35
+// Get tools
36
+const tools = await composio.tools.get('default', { toolkits: ['github'] });
37
+
38
+// Use with OpenAI
39
+const response = await openai.chat.completions.create({
40
+ model: 'gpt-4o',
41
+ messages: [{ role: 'user', content: 'Create a GitHub issue' }],
42
+ tools: tools,
43
+});
44
+
45
+// Handle tool calls
46
+if (response.choices[0].message.tool_calls) {
47
+ const result = await composio.provider.handleToolCalls('default', response);
48
+}
49
+```
50
+
51
+```python
52
+from composio_openai import ComposioToolSet, Action
53
+from openai import OpenAI
54
+
55
+openai_client = OpenAI(api_key="YOUR_KEY")
56
+composio_toolset = ComposioToolSet(api_key="YOUR_KEY")
57
+
58
+# Get tools
59
+tools = composio_toolset.get_tools(actions=[Action.GITHUB_CREATE_ISSUE])
60
+
61
+# Use with OpenAI
62
+response = openai_client.chat.completions.create(
63
+ model="gpt-4o",
64
+ messages=[{"role": "user", "content": "Create a GitHub issue"}],
65
+ tools=tools,
66
+)
67
+
68
+# Handle tool calls
69
+result = composio_toolset.handle_tool_calls(response)
70
+```
71
+
72
+### OpenAI Agents API (Agentic - Requires Tool Router)
73
+
74
+```typescript
75
+import { Composio } from '@composio/core';
76
+import { OpenAIAgentsProvider } from '@composio/openai-agents';
77
+import { Agent, run } from '@openai/agents';
78
+
79
+const composio = new Composio({
80
+ apiKey: process.env.COMPOSIO_API_KEY,
81
+ provider: new OpenAIAgentsProvider()
82
+});
83
+
84
+async function createAgent(userId: string) {
85
+ // Create session for user
86
+ const session = await composio.create(userId, {
87
+ toolkits: ['github'],
88
+ manageConnections: true
89
+ });
90
+
91
+ const tools = await session.tools();
92
+
93
+ const agent = new Agent({
94
+ name: 'GitHub Agent',
95
+ model: 'gpt-4o',
96
+ instructions: 'You help with GitHub operations',
97
+ tools
98
+ });
99
+
100
+ return agent;
101
+}
102
+
103
+const agent = await createAgent('user_123');
104
+const result = await run(agent, 'Create a GitHub issue');
105
+```
106
+
107
+## Key Resources
108
+
109
+- **OpenAI Docs**: https://platform.openai.com/docs
110
+- **Function Calling**: https://platform.openai.com/docs/guides/function-calling
111
+- **Agents API**: https://platform.openai.com/docs/agents
112
+- **OpenAI Agents SDK (Agentic)**: Use Tool Router with `@composio/openai-agents`
113
+
114
+## Environment Variables
115
+
116
+```bash
117
+OPENAI_API_KEY=sk-...
118
+COMPOSIO_API_KEY=...
119
+```
120
+
121
+## Next Steps
122
+
123
+1. For Agents API (agentic), use `/building-agents`
124
+2. Check `ts/examples/openai/` for complete examples
125
+3. See [OpenAI docs](https://platform.openai.com/docs) for API features
.claude/skills/building-agents-using-vercel/SKILL.md
new
+116
@@ -0,0 +1,116 @@
1
+# Building Agents using Vercel AI SDK with Composio
2
+
3
+Build AI agents using Vercel AI SDK with Composio Tool Router for user-isolated tool sessions.
4
+
5
+## Installation
6
+
7
+```bash
8
+npm install @composio/core @composio/vercel ai @ai-sdk/openai
9
+```
10
+
11
+**Find Latest Versions:**
12
+```bash
13
+npm view ai version
14
+npm view @composio/vercel version
15
+```
16
+
17
+## Integration Method
18
+
19
+**Vercel AI SDK is an agentic provider** - use Tool Router for user isolation.
20
+
21
+### Native Tools (Recommended)
22
+
23
+```typescript
24
+import { Composio } from '@composio/core';
25
+import { VercelProvider } from '@composio/vercel';
26
+import { openai } from '@ai-sdk/openai';
27
+import { generateText } from 'ai';
28
+
29
+const composio = new Composio({
30
+ apiKey: process.env.COMPOSIO_API_KEY,
31
+ provider: new VercelProvider(),
32
+});
33
+
34
+async function runAgent(userId: string, prompt: string) {
35
+ // Create user session
36
+ const session = await composio.create(userId, {
37
+ toolkits: ['github'],
38
+ manageConnections: true
39
+ });
40
+
41
+ // Get native Vercel-formatted tools
42
+ const tools = await session.tools();
43
+
44
+ // Use with Vercel AI SDK
45
+ const result = await generateText({
46
+ model: openai('gpt-4o'),
47
+ prompt,
48
+ tools,
49
+ maxSteps: 10,
50
+ });
51
+
52
+ return result.text;
53
+}
54
+
55
+await runAgent('user_123', 'Create a GitHub issue');
56
+```
57
+
58
+### MCP Integration (Optional)
59
+
60
+```typescript
61
+import { Composio } from '@composio/core';
62
+import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
63
+import { streamText } from 'ai';
64
+
65
+const composio = new Composio();
66
+
67
+async function runAgentMCP(userId: string, prompt: string) {
68
+ // Create session
69
+ const session = await composio.create(userId, {
70
+ toolkits: ['github'],
71
+ manageConnections: true
72
+ });
73
+
74
+ // Connect via MCP
75
+ const client = await createMCPClient({
76
+ transport: {
77
+ type: 'http',
78
+ url: session.mcp.url,
79
+ headers: session.mcp.headers
80
+ }
81
+ });
82
+
83
+ const tools = await client.tools();
84
+
85
+ // Use with any framework
86
+ const stream = await streamText({
87
+ model: openai('gpt-4o'),
88
+ prompt,
89
+ tools,
90
+ });
91
+
92
+ for await (const chunk of stream.textStream) {
93
+ process.stdout.write(chunk);
94
+ }
95
+}
96
+```
97
+
98
+## Key Resources
99
+
100
+- **Vercel AI SDK Docs**: https://ai-sdk.dev/docs/introduction
101
+- **Tool Router Guide**: `/building-agents`
102
+- **Building Agents Guide**: https://vercel.com/kb/guide/how-to-build-ai-agents-with-vercel-and-the-ai-sdk
103
+- **Native vs MCP**: Use native tools for better performance, MCP for framework flexibility
104
+
105
+## Environment Variables
106
+
107
+```bash
108
+COMPOSIO_API_KEY=...
109
+OPENAI_API_KEY=... # Or other model provider
110
+```
111
+
112
+## Next Steps
113
+
114
+1. Use `/building-agents` for comprehensive Tool Router documentation
115
+2. Check `ts/examples/vercel/` for complete examples
116
+3. See [Vercel AI SDK docs](https://ai-sdk.dev) for framework-specific features
.claude/skills/building-agents/SKILL.md
new
+440
@@ -0,0 +1,440 @@
1
+# Building AI Agents with Composio SDK
2
+
3
+This skill provides comprehensive guidance for building AI agents using Composio SDK with various provider frameworks.
4
+
5
+## Overview
6
+
7
+Composio integrates with 10+ major AI agent frameworks, allowing you to add tools and external integrations to your agents. Each framework-specific skill provides:
8
+- Installing and setting up the provider SDK
9
+- Finding latest SDK versions (NPM/PyPI)
10
+- Official documentation links and latest examples
11
+- Code examples for building agents with Composio tools
12
+- Best practices and troubleshooting tips
13
+
14
+## Installing Composio Packages
15
+
16
+### Working in Composio SDK Repository (This Workspace)
17
+
18
+If you're working within the Composio SDK repository itself, install packages from the workspace:
19
+
20
+**TypeScript:**
21
+```bash
22
+pnpm i @composio/core @composio/<provider> --workspace
23
+```
24
+
25
+**Example:**
26
+```bash
27
+pnpm i @composio/core @composio/openai --workspace
28
+```
29
+
30
+### External Projects (Outside SDK Repository)
31
+
32
+For projects outside the Composio SDK repository, install from NPM/PyPI:
33
+
34
+**TypeScript:**
35
+```bash
36
+npm install @composio/core @composio/<provider>
37
+```
38
+
39
+**Python:**
40
+```bash
41
+pip install composio-<provider>
42
+# or
43
+uv pip install composio-<provider>
44
+```
45
+
46
+**Examples:**
47
+```bash
48
+# TypeScript
49
+npm install @composio/core @composio/openai
50
+
51
+# Python
52
+pip install composio-openai
53
+```
54
+
55
+## Available Framework Skills
56
+
57
+Use `/building-agents-using-<framework>` to access specific guides:
58
+
59
+### 1. **building-agents-using-openai**
60
+Build agents using OpenAI's Chat Completions API, Assistants API, and Agents API.
61
+- **Languages**: TypeScript, Python
62
+- **Key Features**: Function calling, streaming, parallel tool calls
63
+- **Models**: GPT-4o, GPT-4o-mini, GPT-4 Turbo
64
+- **Use Cases**: General-purpose agents, chatbots, automation
65
+
66
+**Invoke:** `/building-agents-using-openai`
67
+
68
+### 2. **building-agents-using-anthropic**
69
+Build agents using Anthropic's Claude API and Claude Agent SDK.
70
+- **Languages**: TypeScript, Python
71
+- **Key Features**: Prompt caching, long context, thinking blocks
72
+- **Models**: Claude 3.7 Sonnet, Claude 3.5 Sonnet, Claude 3 Opus
73
+- **Use Cases**: Complex reasoning, code analysis, long documents
74
+
75
+**Invoke:** `/building-agents-using-anthropic`
76
+
77
+### 3. **building-agents-using-langchain**
78
+Build agents using LangChain and LangGraph for production workflows.
79
+- **Languages**: TypeScript, Python
80
+- **Key Features**: Graph-based agents, middleware, state management
81
+- **Framework**: LangGraph recommended for production
82
+- **Use Cases**: Multi-step workflows, RAG with actions, complex agents
83
+
84
+**Invoke:** `/building-agents-using-langchain`
85
+
86
+### 4. **building-agents-using-langgraph**
87
+Build stateful, durable agents using LangGraph (v1.0).
88
+- **Languages**: TypeScript, Python
89
+- **Key Features**: Durable execution, human-in-the-loop, persistent memory
90
+- **Status**: Production-ready (v1.0 released late 2025)
91
+- **Use Cases**: Long-running workflows, supervised agents, multi-agent systems
92
+
93
+**Invoke:** `/building-agents-using-langgraph`
94
+
95
+### 5. **building-agents-using-google**
96
+Build agents using Google's Gemini API and GenAI SDK.
97
+- **Languages**: TypeScript, Python
98
+- **Key Features**: Compositional function calling, parallel execution, thinking
99
+- **Models**: Gemini 3 Flash/Pro, Gemini 2.5 Flash/Pro
100
+- **Use Cases**: Multi-step workflows, location-based services, data analysis
101
+
102
+**Invoke:** `/building-agents-using-google`
103
+
104
+### 6. **building-agents-using-vercel**
105
+Build agents using Vercel AI SDK for TypeScript/JavaScript applications.
106
+- **Languages**: TypeScript, JavaScript
107
+- **Key Features**: ToolLoopAgent, streaming, multi-provider support (40+)
108
+- **Frameworks**: Next.js, Node.js, React, Vue, Svelte
109
+- **Use Cases**: AI chatbots, web applications, full-stack AI
110
+
111
+**Invoke:** `/building-agents-using-vercel`
112
+
113
+### 7. **building-agents-using-llamaindex**
114
+Build RAG-enhanced agents using LlamaIndex.
115
+- **Languages**: TypeScript, Python
116
+- **Key Features**: ReAct agents, query engines as tools, workflows
117
+- **Framework**: Workflows 1.0 for complex agentic systems
118
+- **Use Cases**: RAG + actions, documentation bots, code assistants
119
+
120
+**Invoke:** `/building-agents-using-llamaindex`
121
+
122
+### 8. **building-agents-using-mastra**
123
+Build agents using Mastra, the modern TypeScript framework from the Gatsby team.
124
+- **Languages**: TypeScript
125
+- **Key Features**: Autonomous agents, 40+ model providers, streaming
126
+- **Status**: v1.0 released January 2026
127
+- **Use Cases**: GitHub automation, web search, multi-tool workflows
128
+
129
+**Invoke:** `/building-agents-using-mastra`
130
+
131
+### 9. **building-agents-using-cloudflare**
132
+Build edge-deployed agents using Cloudflare Workers AI and Agents SDK.
133
+- **Languages**: TypeScript, JavaScript
134
+- **Key Features**: Edge deployment, embedded function calling, Durable Objects
135
+- **Platform**: Cloudflare Workers, Workers AI
136
+- **Use Cases**: Low-latency agents, real-time chat, API orchestration
137
+
138
+**Invoke:** `/building-agents-using-cloudflare`
139
+
140
+### 10. **building-agents-using-crewai**
141
+Build multi-agent teams using CrewAI for collaborative AI.
142
+- **Languages**: Python
143
+- **Key Features**: Role-based agents, task dependencies, YAML configs
144
+- **Framework**: Lean, fast, independent of LangChain
145
+- **Use Cases**: Research & reporting, content creation, data analysis
146
+
147
+**Invoke:** `/building-agents-using-crewai`
148
+
149
+### 11. **building-agents-using-autogen**
150
+Build multi-agent conversational systems using Microsoft AutoGen.
151
+- **Languages**: Python
152
+- **Key Features**: Multi-agent chat, AutoGen Studio, event-driven core
153
+- **Status**: Microsoft Agent Framework is the successor
154
+- **Use Cases**: Multi-agent conversations, research, customer support
155
+
156
+**Invoke:** `/building-agents-using-autogen`
157
+
158
+## Finding Latest SDK Versions
159
+
160
+Each skill includes commands to find the latest versions of both Composio packages and provider SDKs.
161
+
162
+### Find Latest Composio Package Version
163
+
164
+**NPM (TypeScript):**
165
+```bash
166
+npm view @composio/<provider> version
167
+# Example
168
+npm view @composio/openai version
169
+```
170
+
171
+**PyPI (Python):**
172
+```bash
173
+pip index versions composio-<provider> | grep "Available versions" | head -1
174
+# Example
175
+pip index versions composio-openai | grep "Available versions" | head -1
176
+```
177
+
178
+### Find Latest Provider SDK Version
179
+
180
+**NPM (TypeScript):**
181
+```bash
182
+npm view <provider-package> version
183
+# Example
184
+npm view openai version
185
+```
186
+
187
+**PyPI (Python):**
188
+```bash
189
+pip index versions <provider-package> | grep "Available versions" | head -1
190
+# Example
191
+pip index versions openai | grep "Available versions" | head -1
192
+```
193
+
194
+## Tool Router vs Direct Tools
195
+
196
+Composio SDK supports two integration methods based on the provider type:
197
+
198
+### 🤖 Agentic Providers (Tool Router ONLY)
199
+
200
+These frameworks support full modifier capabilities and **MUST use Tool Router** for user-isolated sessions:
201
+
202
+| Framework | Package | Why Tool Router |
203
+|-----------|---------|----------------|
204
+| **Vercel AI SDK** | `@composio/vercel` | Multi-agent support, modifiers |
205
+| **LangChain** | `@composio/langchain` | Complex chains, state management |
206
+| **LangGraph** | `@composio/langchain` | Stateful workflows, durability |
207
+| **Mastra** | `@composio/mastra` | Multi-provider routing |
208
+| **LlamaIndex** | `@composio/llamaindex` | RAG + agents, workflows |
209
+| **Claude Agent SDK** | `@composio/claude-agent-sdk` | Claude agents framework |
210
+| **OpenAI Agents** | `@composio/openai-agents` | OpenAI Agents API |
211
+| **Cloudflare** | `@composio/cloudflare` | Edge agents, Durable Objects |
212
+| **CrewAI** | Python | Multi-agent teams |
213
+| **AutoGen** | Python | Multi-agent conversations |
214
+
215
+**Tool Router Benefits:**
216
+- ✅ **User Isolation**: Each user gets their own tool session
217
+- ✅ **Auto-Authentication**: In-chat OAuth flows
218
+- ✅ **Scoped Access**: Control toolkits per user
219
+- ✅ **Connection Management**: Automatic OAuth handling
220
+- ✅ **Production Ready**: Built for multi-user applications
221
+
222
+### 📦 Non-Agentic Providers (Direct Tools)
223
+
224
+These providers only support schema modifiers and use **direct tools** approach:
225
+
226
+| Framework | Package | Why Direct Tools |
227
+|-----------|---------|-----------------|
228
+| **OpenAI** | `@composio/openai` | Chat Completions, Assistants API |
229
+| **Anthropic** | `@composio/anthropic` | Claude Messages API |
230
+| **Google Gemini** | `@composio/google` | GenAI SDK |
231
+
232
+**Direct Tools Characteristics:**
233
+- ✅ Simpler for single-user apps
234
+- ✅ No session management needed
235
+- ⚠️ Not suitable for multi-user production apps
236
+- ⚠️ Manual authentication required
237
+
238
+### Tool Router Quick Start
239
+
240
+```typescript
241
+import { Composio } from '@composio/core';
242
+import { OpenAI } from 'openai';
243
+
244
+const composio = new Composio();
245
+const openai = new OpenAI();
246
+
247
+async function runAgent(userId: string, prompt: string) {
248
+ // Create isolated session for user
249
+ const session = await composio.create(userId, {
250
+ toolkits: ['github'],
251
+ manageConnections: true // Enable auto-authentication
252
+ });
253
+
254
+ // Get tools from session
255
+ const tools = await session.tools();
256
+
257
+ // Use with OpenAI
258
+ const response = await openai.chat.completions.create({
259
+ model: 'gpt-4o',
260
+ messages: [{ role: 'user', content: prompt }],
261
+ tools: tools,
262
+ });
263
+
264
+ // Handle tool calls
265
+ if (response.choices[0].message.tool_calls) {
266
+ const result = await composio.provider.handleToolCalls(userId, response);
267
+ return result;
268
+ }
269
+}
270
+
271
+// Each user gets isolated tools
272
+await runAgent('user_123', 'Create a GitHub issue');
273
+await runAgent('user_456', 'Check my Gmail'); // Different user, different session
274
+```
275
+
276
+### Tool Router with Framework Integration
277
+
278
+Each framework skill includes Tool Router examples. See:
279
+- `/building-agents-using-openai` - Tool Router with OpenAI
280
+- `/building-agents-using-anthropic` - Tool Router with Claude
281
+- `/building-agents-using-vercel` - Tool Router with Vercel AI SDK
282
+- And all other framework skills
283
+
284
+### Learn More About Tool Router
285
+
286
+For comprehensive Tool Router documentation, use:
287
+```bash
288
+/composio-tool-router
289
+```
290
+
291
+## Quick Start Example
292
+
293
+Here's a quick example using OpenAI with direct tools (single-user):
294
+
295
+### TypeScript
296
+
297
+```typescript
298
+import { Composio } from '@composio/core';
299
+import { OpenAI } from 'openai';
300
+
301
+const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
302
+const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY });
303
+
304
+// Get tools
305
+const tools = await composio.tools.get('default', { toolkits: ['github'] });
306
+
307
+// Use with OpenAI
308
+const response = await openai.chat.completions.create({
309
+ model: 'gpt-4o',
310
+ messages: [{ role: 'user', content: 'Create a GitHub issue' }],
311
+ tools: tools,
312
+});
313
+
314
+// Handle tool calls
315
+if (response.choices[0].message.tool_calls) {
316
+ const result = await composio.provider.handleToolCalls('default', response);
317
+ console.log(result);
318
+}
319
+```
320
+
321
+### Python
322
+
323
+```python
324
+from composio_openai import ComposioToolSet, Action
325
+from openai import OpenAI
326
+
327
+openai_client = OpenAI(api_key="YOUR_OPENAI_KEY")
328
+composio_toolset = ComposioToolSet(api_key="YOUR_COMPOSIO_KEY")
329
+
330
+# Get tools
331
+tools = composio_toolset.get_tools(actions=[Action.GITHUB_CREATE_ISSUE])
332
+
333
+# Use with OpenAI
334
+response = openai_client.chat.completions.create(
335
+ model="gpt-4o",
336
+ messages=[{"role": "user", "content": "Create a GitHub issue"}],
337
+ tools=tools,
338
+)
339
+
340
+# Handle tool calls
341
+result = composio_toolset.handle_tool_calls(response)
342
+```
343
+
344
+## Provider Comparison
345
+
346
+| Provider | Languages | Best For | Complexity | Maturity |
347
+|----------|-----------|----------|------------|----------|
348
+| OpenAI | TS, Py | General purpose, function calling | Low | Mature |
349
+| Anthropic | TS, Py | Complex reasoning, long context | Low | Mature |
350
+| LangChain | TS, Py | Prototyping multi-agent workflows | Medium | Mature |
351
+| LangGraph | TS, Py | Production stateful agents | High | Mature (v1.0) |
352
+| Google Gemini | TS, Py | Compositional function calling | Low | Mature |
353
+| Vercel AI SDK | TS | Full-stack web applications | Low | Mature (v6.0) |
354
+| LlamaIndex | TS, Py | RAG + agents | Medium | Mature |
355
+| Mastra | TS | Modern TypeScript apps | Low | New (v1.0 2026) |
356
+| Cloudflare | TS | Edge-deployed agents | Medium | Growing |
357
+| CrewAI | Py | Multi-agent teams | Medium | Mature |
358
+| AutoGen | Py | Research multi-agent systems | High | Mature |
359
+
360
+## Common Composio Features
361
+
362
+All frameworks support these Composio features:
363
+
364
+### 1. Tool Management
365
+```typescript
366
+// Get tools by app
367
+const tools = await composio.tools.get('default', { apps: ['github', 'slack'] });
368
+
369
+// Get specific actions
370
+const tools = await composio.tools.get('default', { actions: ['GITHUB_CREATE_ISSUE'] });
371
+
372
+// Get by toolkit
373
+const tools = await composio.tools.get('default', { toolkits: ['github'] });
374
+```
375
+
376
+### 2. Connected Accounts
377
+```typescript
378
+// Manage user integrations
379
+const account = await composio.connectedAccounts.initiate({
380
+ integrationId: 'github',
381
+ entityId: 'user-123',
382
+});
383
+```
384
+
385
+### 3. Custom Tools
386
+```typescript
387
+// Create custom tools
388
+const customTool = await composio.tools.createCustomTool({
389
+ name: 'My Tool',
390
+ description: 'Tool description',
391
+ execute: async (input) => {
392
+ // Implementation
393
+ return { data: 'result' };
394
+ },
395
+});
396
+```
397
+
398
+## Environment Variables
399
+
400
+Most examples require:
401
+
402
+```bash
403
+# Composio
404
+COMPOSIO_API_KEY=...
405
+
406
+# LLM Provider (choose one or more)
407
+OPENAI_API_KEY=sk-...
408
+ANTHROPIC_API_KEY=sk-ant-...
409
+GOOGLE_API_KEY=...
410
+```
411
+
412
+## Documentation Resources
413
+
414
+- **Composio Docs**: https://docs.composio.dev/
415
+- **Composio GitHub**: https://github.com/composiohq/composio-sdk
416
+- **API Reference**: https://docs.composio.dev/api-reference
417
+- **Examples**: Check `ts/examples/` and `python/examples/` in this repository
418
+
419
+## Getting Help
420
+
421
+- **Discord**: https://discord.gg/composio
422
+- **GitHub Issues**: https://github.com/composiohq/composio-sdk/issues
423
+- **Documentation**: https://docs.composio.dev/
424
+
425
+## Next Steps
426
+
427
+1. Choose a framework from the list above
428
+2. Invoke the corresponding skill (e.g., `/building-agents-using-openai`)
429
+3. Follow the installation and setup instructions
430
+4. Try the code examples
431
+5. Build your agent!
432
+
433
+## Tips
434
+
435
+- **Start simple** - Begin with OpenAI or Anthropic for easiest setup
436
+- **Use LangGraph** for production stateful agents
437
+- **Try Vercel AI SDK** for full-stack web applications
438
+- **Use CrewAI** for multi-agent collaborative systems
439
+- **Check examples** in the repository for working code
440
+- **Read framework docs** linked in each skill for advanced features
.claude/skills/test-sdk-in-realworld/SKILL.md
new
+216
@@ -0,0 +1,216 @@
1
+# Testing Composio SDK in Real-World Scenarios
2
+
3
+Test the Composio SDK viability using ephemeral test projects. Never commit these tests.
4
+
5
+## Overview
6
+
7
+This skill helps validate SDK functionality by creating temporary test projects that:
8
+- Test both agentic (Tool Router) and non-agentic (Direct Tools) approaches
9
+- Use non-auth apps like HackerNews for quick validation
10
+- Identify bugs and quality issues in SDK or providers
11
+- Clean up automatically - never committed to repository
12
+
13
+## Testing Approach
14
+
15
+### 1. Create Ephemeral Test Project
16
+
17
+Always use the .agent_cache directory for tests:
18
+```bash
19
+# Create test directory in .agent_cache (gitignored)
20
+TEST_DIR=".agent_cache/sdk-test-$(date +%s)"
21
+mkdir -p "$TEST_DIR"
22
+cd "$TEST_DIR"
23
+
24
+# Initialize project
25
+npm init -y
26
+npm install @composio/core openai
27
+```
28
+
29
+### 2. Test Non-Agentic Providers (Direct Tools)
30
+
31
+Test simple tool execution without Tool Router:
32
+
33
+```typescript
34
+// test-direct-tools.ts
35
+import { Composio } from '@composio/core';
36
+import OpenAI from 'openai';
37
+
38
+const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY });
39
+const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
40
+
41
+async function testDirectTools() {
42
+ // Get HackerNews tools (no auth required)
43
+ const tools = await composio.tools.get('default', {
44
+ toolkits: ['hackernews']
45
+ });
46
+
47
+ console.log(`✓ Got ${tools.length} HackerNews tools`);
48
+
49
+ // Test with OpenAI
50
+ const response = await openai.chat.completions.create({
51
+ model: 'gpt-5.2',
52
+ messages: [{ role: 'user', content: 'Get top 5 HackerNews stories' }],
53
+ tools: tools,
54
+ });
55
+
56
+ // Handle tool calls
57
+ if (response.choices[0].message.tool_calls) {
58
+ const result = await composio.provider.handleToolCalls('default', response);
59
+ console.log('✓ Tool execution successful');
60
+ return result;
61
+ }
62
+}
63
+
64
+testDirectTools().catch(console.error);
65
+```
66
+
67
+### 3. Test Agentic Providers (Tool Router)
68
+
69
+Test user-isolated sessions with Tool Router:
70
+
71
+```typescript
72
+// test-tool-router.ts
73
+import { Composio } from '@composio/core';
74
+import { VercelProvider } from '@composio/vercel';
75
+import { openai } from '@ai-sdk/openai';
76
+import { generateText } from 'ai';
77
+
78
+const composio = new Composio({
79
+ apiKey: process.env.COMPOSIO_API_KEY,
80
+ provider: new VercelProvider(),
81
+});
82
+
83
+async function testToolRouter() {
84
+ // Create session for test user
85
+ const session = await composio.create('test-user-001', {
86
+ toolkits: ['hackernews'],
87
+ manageConnections: false, // Non-auth app
88
+ });
89
+
90
+ console.log('✓ Created Tool Router session');
91
+
92
+ const tools = await session.tools();
93
+ console.log(`✓ Got ${Object.keys(tools).length} tools from session`);
94
+
95
+ // Test with Vercel AI SDK
96
+ const result = await generateText({
97
+ model: openai('gpt-5.2'),
98
+ prompt: 'Get the top 3 HackerNews stories',
99
+ tools,
100
+ maxSteps: 5,
101
+ });
102
+
103
+ console.log('✓ Tool Router execution successful');
104
+ return result.text;
105
+}
106
+
107
+testToolRouter().catch(console.error);
108
+```
109
+
110
+### 4. Test MCP Integration
111
+
112
+Test MCP protocol compatibility:
113
+
114
+```typescript
115
+// test-mcp.ts
116
+import { Composio } from '@composio/core';
117
+
118
+const composio = new Composio({ apiKey: process.env.COMPOSIO_API_KEY });
119
+
120
+async function testMCP() {
121
+ const session = await composio.create('test-user-mcp', {
122
+ toolkits: ['hackernews'],
123
+ manageConnections: false,
124
+ });
125
+
126
+ console.log('✓ MCP Session created');
127
+ console.log(' URL:', session.mcp.url);
128
+ console.log(' Headers:', Object.keys(session.mcp.headers));
129
+
130
+ // Test MCP endpoint accessibility
131
+ const response = await fetch(session.mcp.url + '/tools', {
132
+ headers: session.mcp.headers,
133
+ });
134
+
135
+ console.log('✓ MCP endpoint accessible:', response.ok);
136
+ return response.ok;
137
+}
138
+
139
+testMCP().catch(console.error);
140
+```
141
+
142
+## Running Tests
143
+
144
+```bash
145
+# Run direct tools test
146
+npx tsx test-direct-tools.ts
147
+
148
+# Run Tool Router test
149
+npm install @composio/vercel ai @ai-sdk/openai
150
+npx tsx test-tool-router.ts
151
+
152
+# Run MCP test
153
+npx tsx test-mcp.ts
154
+
155
+# Clean up (always run after testing)
156
+cd .. && rm -rf "$TEST_DIR"
157
+```
158
+
159
+## What to Test
160
+
161
+1. **Installation**: Does `npm install @composio/core` work?
162
+2. **Type Safety**: Are TypeScript types correct?
163
+3. **Tool Discovery**: Can we fetch tools from toolkits?
164
+4. **Tool Execution**: Do tools execute successfully?
165
+5. **Error Handling**: Are errors informative?
166
+6. **Session Management**: Does Tool Router create sessions?
167
+7. **MCP Protocol**: Is MCP endpoint accessible?
168
+8. **Provider Integration**: Do provider packages work?
169
+
170
+## Reporting Issues
171
+
172
+When you find bugs or quality issues:
173
+
174
+1. **SDK Core Issues**: Report in GitHub Issues with:
175
+ - Minimal reproduction code
176
+ - Expected vs actual behavior
177
+ - SDK version and environment
178
+
179
+2. **Provider Issues**: Note which provider package has issues
180
+
181
+3. **Documentation Issues**: Flag missing or incorrect docs
182
+
183
+## Best Practices
184
+
185
+- **Always use .agent_cache**: Never create tests in the main repository
186
+- **Use non-auth apps**: HackerNews, Public APIs for quick testing
187
+- **Test incrementally**: Start with simple tools, then complex workflows
188
+- **Clean up**: Always delete test directory after testing
189
+- **Check latest versions**: Use `npm view @composio/core version`
190
+
191
+## Available Environment Variables
192
+
193
+Assume these are available:
194
+```bash
195
+COMPOSIO_API_KEY # Composio API key
196
+OPENAI_API_KEY # OpenAI API key
197
+ANTHROPIC_API_KEY # Anthropic API key
198
+```
199
+
200
+## Quick Test Template
201
+
202
+```bash
203
+# One-liner to create and test
204
+TEST_DIR=".agent_cache/sdk-test-$(date +%s)" && \
205
+mkdir -p "$TEST_DIR" && cd "$TEST_DIR" && \
206
+npm init -y && npm install @composio/core openai && \
207
+echo "console.log('SDK Test Ready')" > test.ts && \
208
+npx tsx test.ts && \
209
+cd .. && rm -rf "$TEST_DIR"
210
+```
211
+
212
+## Next Steps
213
+
214
+1. Read `/building-agents` for comprehensive Tool Router documentation
215
+2. Check provider-specific skills for integration examples
216
+3. Report any bugs found during testing to the team