Metadata-Version: 2.4
Name: composio-openai-agents
Version: 0.13.1
Summary: Use Composio to get array of strongly typed tools for OpenAI Agents
Home-page: https://github.com/ComposioHQ/composio
Author: Composio
Author-email: Composio <tech@composio.dev>
Project-URL: Homepage, https://github.com/ComposioHQ/composio
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9,<4
Description-Content-Type: text/markdown
Requires-Dist: openai-agents>=0.0.3
Requires-Dist: composio
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# 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

```bash
pip install composio_openai_agents
```

## Usage

```python
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
