mcpField
C
composio

composio

github.com/composiohqAgent workflows78.4k70 installsUpdated 14w ago
Repository

About composio

A development guide for building AI agents and applications with Composio. It covers isolated MCP sessions with managed authentication as well as direct tool execution for traditional applications.

Key features

  1. 01Create isolated Tool Router sessions
  2. 02Configure toolkits and tools dynamically
  3. 03Manage authentication and connected accounts
  4. 04Execute tools directly with hooks
  5. 05Build event-driven workflows with triggers

Use cases

  1. 01Build multi-user agents with scoped tools
  2. 02Add authentication flows to chat applications
  3. 03Create CRUD apps that run tools directly
  4. 04Handle events through triggers and webhooks

MCP support

Tool Router creates MCP-compatible server URLs and isolated sessions for agents, supporting dynamic tool discovery and authentication management.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/composiohq/awesome-claude-skills --skill composio

After installing, type/composioin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

AGENTS.md
rules/
_template.md
app-auth-configs.md
app-connected-accounts.md
app-custom-tools.md
app-execute-tools.md
app-fetch-tools.md
app-modifiers.md
app-tool-versions.md
app-toolkits.md
app-user-context.md
tr-auth-auto.md
tr-auth-connections.md
tr-auth-manual.md
tr-building-chat-ui.md
tr-framework-integration.md
tr-mcp-vs-native.md
tr-session-basic.md
tr-session-config.md
tr-session-lifecycle.md
tr-toolkit-query.md
tr-userid-best-practices.md
triggers-create.md
triggers-manage.md
triggers-subscribe.md
triggers-webhook.md

Details

From the project README

Composio

Comprehensive guide to building AI agents and applications with Composio. Choose between:

  • Tool Router - Create isolated, secure MCP sessions for AI agents with automatic authentication
  • Direct Execution - Build traditional apps with manual tool execution and CRUD operations

When to use

Use this skill when:

Building AI Agents:

  • Building chat-based or autonomous agents that need access to external tools (Gmail, Slack, GitHub, etc.)
  • Creating multi-user applications with isolated tool access per session
  • Implementing automatic authentication flows for external services
  • Integrating with AI frameworks (Vercel AI SDK, LangChain, OpenAI Agents, Claude)
  • Using MCP (Model Context Protocol) for dynamic tool discovery
  • Building event-driven agents with triggers

Building Traditional Applications:

  • Creating CRUD applications that execute tools directly
  • Building automation workflows without agent frameworks
  • Managing connected accounts and authentication configurations
  • Creating custom tools with specific authentication requirements
  • Implementing multi-tenant applications with session isolation
  • Building tools with pre/post-execution hooks and modifiers
1. Building Agents

Use Tool Router to build interactive chat-based agents or autonomous long-running task agents. Tool Router creates isolated MCP sessions for users with scoped access to toolkits and tools.

Key Features:

  • Session-based isolation per user
  • Dynamic toolkit and tool configuration
  • Automatic authentication management
  • MCP-compatible server URLs for any AI framework
  • Connection state querying for UI building
  • Real-time event handling with triggers
1.1 Session Management & Configuration

Essential patterns for creating agent sessions and configuring tools:

1.2 Authentication Flows

Authentication patterns for seamless user experiences:

1.3 Toolkit Querying & UI Building

Build connection UIs and check toolkit states:

  • Building Chat UIs - Build chat applications with toolkit selection, connection management, and session handling
  • Query Toolkit States - Use session.toolkits() to check connections, filter toolkits, and build connection UIs
1.4 Event-Driven Agents (Triggers)

Real-time event handling and webhook integration patterns:

2. Building Apps with Composio Tools

Use Composio for traditional applications where tools are executed manually without agent frameworks. This approach gives you full control over tool execution, authentication, and resource management.

Key Capabilities:

  • Direct tool execution with manual control
  • CRUD operations on connected accounts, auth configs, and toolkits
  • Custom tool creation with authentication
  • Session isolation for multi-tenant apps
  • Pre/post-execution hooks and modifiers
  • Event-driven workflows with triggers
2.1 Core Operations

Fundamental patterns for fetching and executing tools:

2.2 Resource Management (CRUD Patterns)

Manage authentication and connections programmatically:

2.3 Extensibility & Customization

Extend Composio with custom tools and behavior:

2.4 Event-Driven Applications

Build reactive applications with triggers (shared with agents):

2.5 User Context & Multi-Tenancy

Manage user context and multi-tenant isolation:

Quick Start Examples

Building an Agent with Tool Router
import { Composio } from '@composio/core';

const composio = new Composio();

// Create a session with Gmail tools
const session = await composio.create('user_123', {
  toolkits: ['gmail'],
  manageConnections: true
});

// Use MCP URL with any AI framework
console.log('MCP URL:', session.mcp.url);
Building an App with Direct Execution
import { Composio } from '@composio/core';

const composio = new Composio({
  apiKey: 'your-api-key',
  toolkitVersions: { github: '12082025_00' }
});

// Fetch tools
const tools = await composio.tools.get('user_123', {
  toolkits: ['github']
});

// Execute a tool
const result = await composio.tools.execute('GITHUB_GET_REPO', {
  userId: 'user_123',
  arguments: { owner: 'composio', repo: 'sdk' },
});

console.log(result.data);

References

Tool Router (Agents):

Direct Execution (Apps):

Shared:

Comments

Markdown supported