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.19.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.19.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: composio_crewai-0.19.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.19.0.tar.gz
Algorithm Hash digest
SHA256 1ab384d9bdf580559927c262c3274fcdeae01d818424e78d0ed9b9d4df5fba61
MD5 f788505ef27ae96db08f5b777202cc24
BLAKE2b-256 5add643ff0020fd6343d0f0e2229f0dd3dbaffdf6c2cd245187ea6ce39dcfe34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for composio_crewai-0.19.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa2fc5e90a56e73670fafb01ad10215d8d5bc614f5fe69ff7c1bfd230e32dd9e
MD5 abacea753e7535048915f6367cc448d5
BLAKE2b-256 fcf14ef543d1f97112b26a5fcf719f580cdb34624b63591770a57be1cae8a05e

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