← Back to Payloads
tutorial

Finding the Right Tool for Your AI Agent in 30 Seconds with Composio CLI

Stop hunting through docs for the right API. Composio CLI does semantic search across 100+ tool integrations, connects your accounts, and gives you a ready-to-use tool slug for your agent. Here's how to actually use it.
Quick Access
Install command
$ mrt install Composio
Browse related skills

When you're building AI agents, the boring part isn't the model — it's finding the right tools. You know the API exists somewhere. You just don't know what it's called, what parameters it takes, or which SDK wraps it cleanly.

Composio CLI solves that. Instead of hunting docs, you search from the terminal, get a tool definition instantly, and connect your account in one command. No UI, no browser, no "sign in with Google" redirect hell.

This is the workflow nobody writes down but everyone needs.

Install and Authenticate

If you don't have it yet:

npm install -g composio-cli

or

pip install composio-cli

Authenticate once:

composio login

That's it. The CLI caches your session. You won't need to do this again for months.

Find a Tool with Semantic Search

This is the part that actually saves time. You don't need to know the exact tool name — you search by what you want to do.

composio search "get slack messages from a channel"

This returns a ranked list of matching tools, each with a slug, description, and parameter summary. Composio's search is semantic, not keyword-based. "Get slack messages from a channel" surfaces the right tool even though the exact words don't match the tool name.

That's useful because most tool names are garbage. The Slack API tools are called things like `conversations_history` — which makes perfect sense if you've read the Slack API docs 47 times, which you haven't.

Connect an Integration

Once you've found the right tool, connect your account:

composio connect slack

This runs the OAuth flow in your terminal. No browser needed, no copy-pasting tokens. The CLI handles the full authentication pipeline. When it finishes, your Slack workspace is linked and ready.

You can see all active connections:

composio integrations list

And disconnect anything with:

composio disconnect slack

Get the Tool Schema for Your Agent

Every tool in Composio has a structured schema — name, description, parameters, return type. You need this to pass the tool to your agent.

composio get-schema slack --tool conversations_history

This outputs a JSON schema you can drop directly into your agent's tool definitions. No more reading API reference pages to figure out whether a parameter is called `channel_id` or `channelId` or `channel`.

Use It in Your Agent

With Composio's SDK, the tool slug is all you need:

from composio import Composio

from openai import OpenAI

client = Composio(api_key="your-key")

openai_client = OpenAI()

Get the tool with the slug from composio search

tool = client.get_tool("slack", "conversations_history")

Attach it to your agent

agent = openai_client.beta.assistants.create(

model="gpt-4o",

tools=[tool],

)

The SDK handles tool call formatting, executes the actual API call, and returns structured results. You write the agent code. Composio handles the integration plumbing.

Why This Actually Matters

The composability story is what makes this worth the setup time. When you have 30 connected tools across different platforms, you stop treating each one as a one-off integration. You write agent logic that can use any connected tool, and the tool set becomes a runtime parameter rather than a hard-coded dependency.

That's the architectural shift: your agent isn't built around a specific tool — it's built around a toolbus. Composio is the layer that makes the toolbus actually work.

The CLI is the fast path to that setup. Get familiar with `composio search` and `composio connect` and you'll stop dreading the "now I need to integrate X" phase of every agent project.