Skip to main content

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

composio_crewai-0.20.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

composio_crewai-0.20.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file composio_crewai-0.20.0.tar.gz.

File metadata

  • Download URL: composio_crewai-0.20.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for composio_crewai-0.20.0.tar.gz
Algorithm Hash digest
SHA256 8edc7e7ac2690b6468e0c7fdb870987cd87893ec504c3a03c1ff1c85d7df089a
MD5 51761bd2e86b94d694c385df41345f6a
BLAKE2b-256 2e5f0da33f9ed4eca984deb953f3b07f049197ac30a4af438bdb4a659bf2e084

See more details on using hashes here.

File details

Details for the file composio_crewai-0.20.0-py3-none-any.whl.

File metadata

File hashes

Hashes for composio_crewai-0.20.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71e91c0cf3b65c059cf79a4ae8bb01cb8a84bbec3026ff205e15b16e39845c7c
MD5 4900ea32ab28a23b255a2ca4713465a6
BLAKE2b-256 516d33d9a1c03e94c7f84d3d15d03797d51b48e93c9d6b1d5627573145b28d56

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

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