Skip to main content

Cred OpenAI Agents SDK integration — credential delegation FunctionTool

Project description

cred-openai-agents

OpenAI Agents SDK integration for Cred. OAuth2 credential delegation for AI agents.

Install

pip install cred-openai-agents

Quick Start

import os
from cred_openai_agents import cred_delegate_tool
from agents import Agent

tool = cred_delegate_tool(
    agent_token=os.environ["CRED_AGENT_TOKEN"],
    user_id="user_123",
    app_client_id="my_app_client_id",
)

agent = Agent(
    name="assistant",
    tools=[tool],
)

Tool Schema

The cred_delegate tool matches the Cred MCP tool spec:

Parameter Type Description
service string Service slug (e.g. google, github)
scopes string[] OAuth scopes to request

user_id and app_client_id are pre-configured at factory time, not agent-controlled.

Handling Consent

When the user hasn't connected the service, the tool raises ConsentRequiredError. The error's consent_url attribute contains the URL to redirect the user.

Cred Cloud (Coming Soon)

Managed cloud delegation is coming. Join the waitlist.

Project details


Download files

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

Source Distribution

cred_openai_agents-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

cred_openai_agents-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file cred_openai_agents-0.1.0.tar.gz.

File metadata

  • Download URL: cred_openai_agents-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for cred_openai_agents-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7d4d42fbee680592e0789aa731edf6701d8bd07792911ee2ddc8a37098a9a816
MD5 a8d8b36c67002805a6039301beb6972c
BLAKE2b-256 4e08fb6660c0dbac3bc6a9e9aa3f2c43c404ff71cfdb3c74930271d328703271

See more details on using hashes here.

File details

Details for the file cred_openai_agents-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cred_openai_agents-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3168b4f3f128e0da95520669b42f1030f4e8ae7217170bc6a9371efa265a5830
MD5 d329363177fee79db1c619de76cdab77
BLAKE2b-256 870a9105cf13d48a1b917bce5f0699843702d1da0659c88886c72127df613d7a

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