ComposioHQ

composio-tool-router

2
0
# Install this skill:
npx skills add ComposioHQ/skills --skill "composio-tool-router"

Install specific skill from multi-skill repository

# Description

Build AI agents with Composio Tool Router - the fastest way to add tools to your agents

# SKILL.md


name: composio-tool-router
description: Build AI agents with Composio Tool Router - the fastest way to add tools to your agents
tags: [composio, tool-router, agents, mcp]


Composio Tool Router

Comprehensive guide to building AI agents with Composio Tool Router - create isolated, secure tool sessions for your users with seamless authentication and toolkit management.

When to use

Use this skill when:

  • Building AI agents that need access to external tools (Gmail, Slack, GitHub, etc.)
  • Creating multi-user applications with isolated tool access
  • Implementing authentication flows for external services
  • Managing toolkit connections and permissions
  • Integrating with AI frameworks (Vercel AI SDK, LangChain, OpenAI Agents, Claude)
  • Using MCP (Model Context Protocol) for tool discovery
  • Building UI for connection management

Core Concepts

Tool Router creates isolated MCP sessions for users with scoped access to toolkits and tools. It handles:
- 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

Rules

1. Building Agents with Tool Router

Essential patterns for creating agent sessions and configuring tools:

2. Authenticating Users

Authentication patterns for seamless user experiences:

3. Fetching Toolkits and Connection Status

Build connection UIs and check toolkit states:

Advanced (Coming Soon)

  • Session modifiers and middleware
  • Custom tool configuration
  • Workbench integration
  • Experimental features

Quick Start

import { Composio } from '@composio/core';

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

// Use with any MCP-compatible framework
console.log('MCP URL:', session.mcp.url);

4. Advanced Features (Triggers & Events)

Real-time event handling and webhook integration patterns:

References

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.