Skip to content
Composio Tool Router

Composio Tool RouterSkill

Added to Onei
MIT
Repository Docs

Summary

Composio's official skill for reaching 1,000+ external apps from an agent — CLI-driven actions, Tool Router sessions, per-user auth and trigger events.

Features

  • Search → link → execute loop over 1,000+ apps from the Composio CLI
  • Tool Router session creation and lifecycle for multi-user agents
  • Per-user connection and user-ID security practices
  • Framework integration: Vercel AI SDK, OpenAI Agents, LangChain, Claude, CrewAI
  • Triggers and webhooks for real-time events

Install This Skill

Add this skill to your favorite AI agent in a few steps.

Any AI agent

This skill is plain instructions — it works with any assistant that accepts custom instructions or system prompts.

  1. Copy the skill content with the button below.
  2. Paste it into your agent's instruction file or system prompt (for example AGENTS.md, .cursorrules, or a custom instructions field).
  3. Ask the agent to apply the skill whenever the task matches.

Skill Content

Markdown Content

Copy this content and use it with your preferred AI agent

---
name: composio
description: Use 1000+ external apps via Composio - either directly through the CLI or by building AI agents and apps with the SDK
tags: [composio, tool-router, agents, mcp, tools, api, automation, cli]
---

## When to Apply

- User wants to access or interact with external apps (Gmail, Slack, GitHub, Notion, etc.)
- User wants to automate a task using an external service (send email, create issue, post message)
- Building an AI agent or app that integrates with external tools
- Multi-user apps that need per-user connections to external services

## Setup

Check if the CLI is installed; if not, install it:
```bash
curl -fsSL https://composio.dev/install | bash
```

After installation, restart your terminal or source your shell config, then authenticate:
```bash
composio login       # OAuth; interactive org/project picker (use -y to skip)
composio whoami      # verify org_id, project_id, user_id
```
For agents without direct browser access: `composio login --no-wait | jq` to get URL/key, share URL with user, then `composio login --key <cli_key> --no-wait` once they complete login.

---

### 1. Use Apps via Composio CLI

**Use this when:** The user wants to take action on an external app directly — no code writing needed. The agent uses the CLI to search, connect, and execute tools on behalf of the user.

Key commands (new top-level aliases):
- `composio search "<query>"` — find tools by use case
- `composio execute "<TOOL_SLUG>" -d '{...<input params>}'` — execute a tool
- `composio link [toolkit]` — connect a user account to an app (agents: always use `--no-wait` for non-interactive mode)
- `composio listen` — listen for real-time trigger events

Typical workflow: **search → link (if needed) → execute**

> Full reference: [Composio CLI Guide](rules/composio-cli.md)

---

### 2. Building Apps and Agents with Composio

**Use this when:** Writing code — an AI agent, app, or backend service that integrates with external tools via the Composio SDK.

Run this first inside the project directory to set up the API key:
```bash
composio init
```

> Full reference: [Building with Composio](rules/building-with-composio.md)

Usage Instructions

Learn how to use this skill with different AI agents.

Generic Instructions
npx skills add composiohq/skills

Then install the CLI (curl -fsSL https://composio.dev/install | bash) and run composio login. Inside a project, composio init writes the API key for SDK use.

Description

Composio's official agent skill, covering both ways developers use the platform: taking action on external apps directly from the terminal, and building agents that do it in code.

Path one — the CLI. When the task is "send this email" or "open that issue", the agent installs the Composio CLI, authenticates once with composio login, and then works a three-step loop: composio search "<query>" to find a tool by use case, composio link <toolkit> to connect the user's account to the app, and composio execute "<TOOL_SLUG>" -d '{...}' to run it. composio listen streams real-time trigger events. The skill includes the non-interactive variants agents actually need — --no-wait for headless linking, and the composio login --no-wait flow that hands a URL to a human when the agent has no browser.

Path two — the SDK. For agents and backends, the skill covers Composio's Tool Router: session creation and lifecycle, the user-ID practices that keep one user's connections from leaking into another's session, native tools versus MCP integration, and framework wiring for Vercel AI SDK, OpenAI Agents, LangChain, Claude and CrewAI. Separate rule files cover triggers and webhooks, and production concerns — security, error handling, deployment.

The reason to reach for this rather than wiring OAuth per service is the multi-tenant case: apps where each end user needs their own Gmail, Slack, GitHub or Notion connection, and the agent has to pick the right one at call time. That is the problem Composio's session and user-ID model is built around, and the part of this skill worth reading closely.

MIT licensed.

Related Skills

New

Build crash-safe AI agents on AgentKit and step.ai — durable tool calls, human-in-the-loop approval, realtime progress, and when not to reach for an agent loop at all.

2 views

Inngest's durable-execution playbook as an agent skill — steps and memoisation, event and cron triggers, idempotency, cancellation, retries and non-retriable errors.

2 views
New

Temporal's official skill for building durable workflows — SDK patterns across seven languages, plus the determinism rules that decide whether a workflow survives a replay.

6 views
Browse all skills →