composio-crewai
Adapts Composio tools to CrewAI's BaseTool format so your crew's agents can act across 1000+ apps through a single Composio session.
Installation
pip install composio composio-crewai crewai
Set COMPOSIO_API_KEY (get one from dashboard.composio.dev/settings) and OPENAI_API_KEY in your environment:
export COMPOSIO_API_KEY=xxxxxxxxx
export OPENAI_API_KEY=xxxxxxxxx
Quickstart
Create a session for your user, fetch its tools, and pass them to an Agent. CrewAI runs the task end to end; each tool executes itself through Composio.
from crewai import Agent, Crew, Task
from composio import Composio
from composio_crewai import CrewAIProvider
composio = Composio(provider=CrewAIProvider())
# Each session is scoped to one of your users
session = composio.create(user_id="user_123")
tools = session.tools()
agent = Agent(
role="Email Agent",
goal="Send emails on behalf of the user",
backstory="You are an AI agent that sends emails using Gmail.",
tools=tools,
llm="gpt-5.2",
)
task = Task(
description="Send an email to john@example.com with the subject 'Hello' and body 'Hello from Composio!'",
agent=agent,
expected_output="Confirmation that the email was sent",
)
crew = Crew(agents=[agent], tasks=[task])
result = crew.kickoff()
print(result)
Error handling
Each Composio tool becomes a CrewAI BaseTool whose args_schema is built from the tool's input schema, so CrewAI validates arguments before running anything. When validation fails, the tool does not raise; it returns a structured result:
{"successful": False, "error": "<validation message>", "data": None}
Check successful in your task output instead of wrapping calls in try/except.
Links
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file composio_crewai-0.18.1.tar.gz.
File metadata
- Download URL: composio_crewai-0.18.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d1245a4c69ea4a70add47207162fc59871cee3f64856695267df8fa34de9d96
|
|
| MD5 |
5f1f6c4a4c92b4ac6e00a4babe20471f
|
|
| BLAKE2b-256 |
0ba05523eafbbc383d0735265fa80f8fe48752c0176d09b00c1e2cf3862de9e8
|
File details
Details for the file composio_crewai-0.18.1-py3-none-any.whl.
File metadata
- Download URL: composio_crewai-0.18.1-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b374a3dcc5cee84fd67997c17528f8008afcede05290f1f27c8bbba90f5b7f65
|
|
| MD5 |
17ed1d9826087d5b1414ad22300d99c5
|
|
| BLAKE2b-256 |
d425645fda58f3f4945a46c16164f60a9c824c11929266a53c08e79acd145140
|