Skip to main content

Use Composio to get array of strongly typed tools for OpenAI Agents

Project description

Composio Integration for OpenAI Agents

This package integrates the OpenAI Agents framework with Composio, allowing you to use Composio's rich set of tools with the OpenAI Agents framework.

Installation

pip install composio_openai_agents

Usage

import asyncio
import dotenv
from agents import Agent, Runner

from composio_openai_agents import Action, ComposioToolSet

# Load environment variables from .env
dotenv.load_dotenv()

# Initialize Composio toolset
composio_toolset = ComposioToolSet()

# Get all the tools
tools = composio_toolset.get_tools(actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER])

# Create an agent with the tools
agent = Agent(
    name="GitHub Agent",
    instructions="You are a helpful assistant that helps users with GitHub tasks.",
    tools=tools,
)

# Run the agent
async def main():
    result = await Runner.run(agent, "Star the repository composiohq/composio on GitHub")
    print(result.final_output)

asyncio.run(main())

Features

  • Seamlessly integrate Composio's tools with OpenAI Agents
  • Access hundreds of pre-built API integrations
  • Maintain consistent schema formats between frameworks
  • Error handling for validation issues
  • Proper type annotations that work with mypy and pylance

Requirements

  • Python 3.9+
  • OpenAI Agents framework
  • Composio (with valid API key)

License

Apache 2.0

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

composio_openai_agents-0.11.6.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

composio_openai_agents-0.11.6-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file composio_openai_agents-0.11.6.tar.gz.

File metadata

  • Download URL: composio_openai_agents-0.11.6.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for composio_openai_agents-0.11.6.tar.gz
Algorithm Hash digest
SHA256 2d853013868d5082a91963ca0450f61ca7dc8b170c4ff24361627b9fd545f51e
MD5 54b7167067c2c9ff3361f8066fdf59f0
BLAKE2b-256 1a0a7da9f1b15b9eccbfde10addefedbacd67bb69482b4e2063d232ffe15f47a

See more details on using hashes here.

File details

Details for the file composio_openai_agents-0.11.6-py3-none-any.whl.

File metadata

File hashes

Hashes for composio_openai_agents-0.11.6-py3-none-any.whl
Algorithm Hash digest
SHA256 04c76408d1e0e50cb0c166d5527af307a7739e01c509032ae8a6057e90ae5152
MD5 bc622a4c69691c9bd27b73d005119f67
BLAKE2b-256 00a4643b5b17524a83d8e4f6f331af03f8b3f1385d6a36ae210347e3de4914be

See more details on using hashes here.

Supported by

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