Skip to main content

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

Project description

composio-openai-agents

Adapts Composio tools to the OpenAI Agents framework's native tool format, so your agents can take action across 1000+ apps.

Installation

pip install composio composio-openai-agents openai-agents

Set COMPOSIO_API_KEY (from the dashboard) and OPENAI_API_KEY in your environment.

Quickstart

from composio import Composio
from composio_openai_agents import OpenAIAgentsProvider
from agents import Agent, Runner

composio = Composio(provider=OpenAIAgentsProvider())

# Each session is scoped to one of your users
session = composio.create(user_id="user_123")
tools = session.tools()

agent = Agent(
    name="Personal Assistant",
    instructions="You are a helpful assistant. Use Composio tools to take action.",
    tools=tools,
)

result = Runner.run_sync(starting_agent=agent, input="Summarize my emails from today")
print(result.final_output)

By default a session gets meta tools that discover, authenticate, and execute app tools at runtime. For multi-turn use, store session.session_id and reuse it with composio.use(session_id) instead of calling create() again.

Links

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.18.0.tar.gz (5.0 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.18.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for composio_openai_agents-0.18.0.tar.gz
Algorithm Hash digest
SHA256 7b298ceffdc8b7f2fb4b29fb5e017e16c9c04a7c1968d233c142d3418399ae75
MD5 e606bb13475c553d55d17284a81b74e8
BLAKE2b-256 6751f1d215338f980a9eaefd2142341d35cd068f04a67870f22c9a656b0630e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for composio_openai_agents-0.18.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85a3125763d02e7bf7f880c514e145e18da4b62c9c8516fdb286352574f629e3
MD5 2c0888bce33cffed0a3d5eab008656bc
BLAKE2b-256 6ad6b85d9a60a9df49169d8082d5d3f7e87a099baaa91d349fe7536f92c93f88

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