EN | CN | JP
Production Ready Toolset for AI Agents
What is Composio?
Composio provides production-ready toolset for AI agents, offering:
- Support for over 250+ tools across multiple categories:
- Software tools like GitHub, Notion, Linear, Gmail, Slack, Hubspot, Salesforce &
more
- OS operations including file tool, shell tool, code analysis tool &
more
- Search capabilities through Google, Perplexity, Tavily, and Exa &
more
- Comprehensive framework support including OpenAI, Groq, Claude, LlamaIndex, Langchain, CrewAI, Autogen, Gemini,
and more
- Managed authentication supporting multiple protocols (OAuth, API Keys, Basic JWT)
- Up to 40% improved tool call accuracy through optimized design
- Whitelabel solution for backend integration
- Pluggable architecture supporting custom tools and extensions
Table of contents
Getting Started with Python
1. Installation
Start by installing the package
pip install composio-core
If you want to install the 'composio' package along with its openai plugin: pip install composio-openai
.
2. Creating an agent & executing a tool
Let's create an AI Agent using OpenAI and use Composio's GitHub tool to star a GitHub repository
[!NOTE]
Set your COMPOSIO_API_KEY & OPENAI_API_KEY in your environment variables.
Connect your GitHub account to Composio
composio add github
from openai import OpenAI
from composio_openai import ComposioToolSet, App, Action
openai_client = OpenAI(
api_key="{{OPENAIKEY}}"
)
composio_tool_set = ComposioToolSet()
actions = composio_tool_set.get_actions(
actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER]
)
my_task = "Star a repo composiodev/composio on GitHub"
assistant_instruction = "You are a super intelligent personal assistant"
assistant = openai_client.beta.assistants.create(
name="Personal Assistant",
instructions=assistant_instruction,
model="gpt-4-turbo",
tools=actions,
)
thread = openai_client.beta.threads.create()
message = openai_client.beta.threads.messages.create(
thread_id=thread.id,
role="user",
content=my_task
)
run = openai_client.beta.threads.runs.create(
thread_id=thread.id,
assistant_id=assistant.id
)
response_after_tool_calls = composio_tool_set.wait_and_handle_assistant_tool_calls(
client=openai_client,
run=run,
thread=thread,
)
print(response_after_tool_calls)
Getting Started with JavaScript
To get started with the Composio SDK in JavaScript, follow these steps:
1. Installation:
npm install composio-core
2. Creating an agent & executing a tool
Let's create an AI Agent using OpenAI and use Composio's GitHub tool to star a GitHub repository
[!NOTE]
Set your COMPOSIO_API_KEY & OPENAI_API_KEY in your environment variables.
Connect your GitHub account to Composio
composio add github
import { OpenAIToolSet } from "composio-core";
import OpenAI from "openai";
const toolset = new OpenAIToolSet({ apiKey: process.env.COMPOSIO_API_KEY });
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const tools = await toolset.getTools({ actions: ["GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER"] });
async function createGithubAssistant(openai, tools) {
return await openai.beta.assistants.create({
name: "Github Assistant",
instructions: "You're a GitHub Assistant, you can do operations on GitHub",
tools: tools,
model: "gpt-4o"
});
}
async function executeAssistantTask(openai, toolset, assistant, task) {
const thread = await openai.beta.threads.create();
const run = await openai.beta.threads.runs.create(thread.id, {
assistant_id: assistant.id,
instructions: task,
tools: tools,
model: "gpt-4o",
stream: false
});
const call = await toolset.waitAndHandleAssistantToolCalls(openai, run, thread);
console.log(call);
}
(async () => {
const githubAssistant = await createGithubAssistant(openai, tools);
await executeAssistantTask(
openai,
toolset,
githubAssistant,
"Star the repository 'composiohq/composio'"
);
})();
Examples
Star History

Getting help
Contributions
We're an open-source project and welcome contributions. Please read the contributing guide for more information and check our code of conduct before you start.
Request a feature
- If you have a feature request, please open an issue,
make a pull request, or submit it in our feature requests channel.
- If you have ideas for improvements, you can also start a discussion in our GitHub repository.
Thanks To All Contributors