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.
Metadata
Release files for cred-openai-agents 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cred_openai_agents-0.1.0.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cred_openai_agents-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / cred_openai_agents-0.1.0.tar.gz
| Download URL | cred_openai_agents-0.1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d4d42fbee680592e0789aa731edf6701d8bd07792911ee2ddc8a37098a9a816
|
|
BLAKE2b-256 checksum How to use checksums |
4e08fb6660c0dbac3bc6a9e9aa3f2c43c404ff71cfdb3c74930271d328703271
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / cred_openai_agents-0.1.0-py3-none-any.whl
| Download URL | cred_openai_agents-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3168b4f3f128e0da95520669b42f1030f4e8ae7217170bc6a9371efa265a5830
|
|
BLAKE2b-256 checksum How to use checksums |
870a9105cf13d48a1b917bce5f0699843702d1da0659c88886c72127df613d7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|