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
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_openai_agents-0.11.2.tar.gz.
File metadata
- Download URL: composio_openai_agents-0.11.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
004865387f4e6f1b369b987cc0e1ce4b57ebce0d9a0d43a3665e7f95eaf73270
|
|
| MD5 |
f3cc7fb02b8849cb7924fe9a27addb78
|
|
| BLAKE2b-256 |
4db38e685d0dcf8c1500dac75cccf622c1a9bc4723d9a211099f66067fb9a817
|
File details
Details for the file composio_openai_agents-0.11.2-py3-none-any.whl.
File metadata
- Download URL: composio_openai_agents-0.11.2-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9059d76d3fbfd6a759716dbe94f561ef282ba45bdf99d2fab19f197156509f71
|
|
| MD5 |
38ce47a9f866cf941b4717e166527f81
|
|
| BLAKE2b-256 |
15fa93fe665b232c598717092f73b6eaf96bedf353daa4d2917307d6edc07f1f
|