Skip to main content

EN | CN | JP

Composio logo Composio Logo

Read the Docs

PyPI NPM Downloads

Production Ready Toolset for AI Agents

Composio MCP Servers

Composio Cursor

🚀 Now launching Composio MCP🚀

We're excited to announce the launch of Composio MCP Servers! Connect Claude, Cursor and Windsurf to 100+ fully-managed MCP Servers with built-in auth! Check it out here

Learn More About MCP Servers

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 # Run this in terminal
from openai import OpenAI
from composio_openai import ComposioToolSet, App, Action

# Initialize OpenAI client
openai_client = OpenAI(
    api_key="{{OPENAIKEY}}"
)

# Initialize the Composio Tool Set
composio_tool_set = ComposioToolSet()

# Get GitHub tools that are pre-configured
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"

# Setup OpenAI assistant
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,
)

# Create a thread
thread = openai_client.beta.threads.create()

# Add user message to thread
message = openai_client.beta.threads.messages.create(
    thread_id=thread.id,
    role="user",
    content=my_task
)

# Execute Agent with integrations
run = openai_client.beta.threads.runs.create(
    thread_id=thread.id,
    assistant_id=assistant.id
)

# Execute Function calls
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 # Run this in terminal
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

Python Examples

Javascript Examples

Star History

Star History Chart

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

List of Contributors



discord     youtube     x     linkedin

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

composio_core-0.7.21.tar.gz (334.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

composio_core-0.7.21-py3-none-any.whl (501.2 kB view details)

Uploaded Python 3

File details

Details for the file composio_core-0.7.21.tar.gz.

File metadata

  • Download URL: composio_core-0.7.21.tar.gz
  • Upload date:
  • Size: 334.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for composio_core-0.7.21.tar.gz
Algorithm Hash digest
SHA256 776e8961ffcaaa422d2ce53516fb80a3832cef25be13475cf5282f8626a9abdc
MD5 314e11c29d68bd10bb8e0a66b721baed
BLAKE2b-256 42e4b0fadae584fd09290b4244f5bb5b7a067a3bb2b56562115ea55b66246949

See more details on using hashes here.

File details

Details for the file composio_core-0.7.21-py3-none-any.whl.

File metadata

  • Download URL: composio_core-0.7.21-py3-none-any.whl
  • Upload date:
  • Size: 501.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for composio_core-0.7.21-py3-none-any.whl
Algorithm Hash digest
SHA256 e9d296479b259ff8e41bfae2b211a71c5d97f682f4e2ccd0e8e2cd4c2a624f64
MD5 3dc163bfe5ffe20b0215a8d91c99a6be
BLAKE2b-256 6f2724d6f8a089e2c319a06da81f3350fb7f3214f22d1f363663eeb3ec2fc241

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.7.21 This release

2 files

0.7.20

2 files

0.7.19

2 files

0.7.18

2 files

0.7.17

2 files

0.7.16

2 files

0.7.15

2 files

0.7.14

2 files

0.7.13

2 files

0.7.12

2 files

0.7.11

2 files

0.7.10

2 files

0.7.9

2 files

0.7.8

2 files

0.7.7

2 files

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.19

2 files

0.6.18

2 files

0.6.17

2 files

0.6.16

2 files

0.6.15

2 files

0.6.14

2 files

0.6.13

2 files

0.6.12

2 files

0.6.11.post1

2 files

0.6.11

2 files

0.6.10

2 files

0.6.9

2 files

0.6.8

2 files

0.6.7

2 files

0.6.6

2 files

0.6.5

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.51

2 files

0.5.50

2 files

0.5.49

2 files

0.5.47

2 files

0.5.46

2 files

0.5.45

2 files

0.5.44

2 files

0.5.43

2 files

0.5.42

2 files

0.5.41

2 files

0.5.40

2 files

0.5.39

2 files

0.5.38

2 files

0.5.37

2 files

0.5.36

2 files

0.5.35

2 files

0.5.34

2 files

0.5.33

2 files

0.5.31

2 files

0.5.30

2 files

0.5.28

2 files

0.5.27

2 files

0.5.26

2 files

0.5.25

2 files

0.5.24

2 files

0.5.23

2 files

0.5.22

2 files

0.5.21

2 files

0.5.20

2 files

0.5.19

2 files

0.5.18

2 files

0.5.17

2 files

0.5.16

2 files

0.5.15

2 files

0.5.14

2 files

0.5.13

2 files

0.5.12

2 files

0.5.11

2 files

0.5.10

2 files

0.5.9

2 files

0.5.8

2 files

0.5.7

2 files

0.5.6

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.30

2 files

0.3.29

2 files

0.3.28

2 files

0.3.27

2 files

0.3.26

2 files

0.3.25

2 files

0.3.24

2 files

0.3.23

2 files

0.3.22

2 files

0.3.20

2 files

0.3.19

2 files

0.3.18

2 files

0.3.17

2 files

0.3.16

2 files

0.3.15

2 files

0.3.14

2 files

0.3.13

2 files

0.3.12

2 files

0.3.11

2 files

0.3.10

2 files

0.3.9

2 files

0.3.7

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.64

1 file

0.2.63

1 file

0.2.60

1 file

0.2.59

1 file

0.2.56

1 file

0.2.55

1 file

0.2.54

1 file

0.2.52

1 file

0.2.51

1 file

0.2.50

1 file

0.2.49

1 file

0.2.48

1 file

0.2.47

1 file

0.2.46

1 file

0.2.44

1 file

0.2.41

1 file

0.2.40

1 file

0.2.39

1 file

0.2.38

1 file

0.2.37

1 file

0.2.36

1 file

0.2.35

1 file

0.2.34

1 file

0.2.33

1 file

0.2.32

1 file

0.2.22

2 files

0.2.21

2 files

0.2.20

2 files

0.2.19

2 files

0.2.18

2 files

0.2.17

2 files

0.2.16

2 files

0.2.15

2 files

0.2.14

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.101

2 files

0.1.100

2 files

0.1.99

2 files

0.1.98

2 files

0.1.97

2 files

0.1.96

2 files

0.1.95

2 files

0.1.94

2 files

0.1.93

2 files

0.1.92

2 files

0.1.91

2 files

0.1.90

2 files

0.1.89

2 files

0.1.88

2 files

0.1.87

2 files

0.1.84

2 files

0.1.83

2 files

0.1.82

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page