cred-autogen
Microsoft AutoGen integration for Cred. OAuth2 credential delegation for AI agents.
Install
pip install cred-autogen
Quick Start
import os
from cred_autogen import cred_delegate_tool
tool = cred_delegate_tool(
agent_token=os.environ["CRED_AGENT_TOKEN"],
user_id="user_123",
app_client_id="my_app_client_id",
)
# Register with an AutoGen AssistantAgent
from autogen_agentchat.agents import AssistantAgent
agent = AssistantAgent(
name="assistant",
tools=[tool],
)
Tool Schema
The cred_delegate tool accepts:
| 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.
from cred import ConsentRequiredError
try:
result = await tool.run_json(
{"service": "google", "scopes": ["calendar.readonly"]},
cancellation_token,
)
except ConsentRequiredError as e:
print(f"Redirect user to: {e.consent_url}")
Cred Cloud (Coming Soon)
Managed cloud delegation is coming. Join the waitlist.
Metadata
Release files for cred-autogen 1.0.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_autogen-1.0.0.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cred_autogen-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.8 kB
Release files / cred_autogen-1.0.0.tar.gz
| Download URL | cred_autogen-1.0.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57521324ec667b97d6d849387dc081cc1fded7b198c85853685c2bc3b888133c
|
|
BLAKE2b-256 checksum How to use checksums |
cf24f0b2fc2f0955bc43f74db86765facb769fa3d1bcc099833e6f3873554b01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / cred_autogen-1.0.0-py3-none-any.whl
| Download URL | cred_autogen-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b3ed939d6827f94a128ade218b55c5f8a620ca5cbed05087ada3cc477c79bc11
|
|
BLAKE2b-256 checksum How to use checksums |
687fcf817d810f84d5c4b47185d799bcaf5ea7874cafef6946708fba6e039586
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|