360 Secure SkillHub
360 安全技能中心

composio cli

Composio核心是集成千+外部应用(如Gmail、Slack等),提供两种使用方式:一是通过CLI无代码操作,支持搜索工具、链接用户账号、执行任务、监听实时事件;二是通过SDK开发AI代理、多用户应用等。典型场景包括直接操作外部应用、自动化任务、构建集成工具的AI代理、为多用户应用实现账号关联。输入为CLI命令或SDK代码,输出对应外部应用操作结果。

eladrave
eladrave
热度 45.65
最近更新 2026-05-11 17:39:39
分类:开发依赖:代码执行 / 第三方 API / MCP 服务 / 联网浏览搜索应用场景:API 集成 / 自动化脚本 / 代码生成 / DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add composiocli
Metadata
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:

curl -fsSL https://composio.dev/install | bash

After installation, restart your terminal or source your shell config, then authenticate:

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


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:

composio init

Full reference: Building with Composio