cred-semantic-kernel
Microsoft Semantic Kernel integration for Cred. OAuth2 credential delegation for AI agents.
Install
pip install cred-semantic-kernel
Quick Start
import os
import semantic_kernel as sk
from cred_semantic_kernel import CredPlugin
kernel = sk.Kernel()
plugin = CredPlugin(
agent_token=os.environ["CRED_AGENT_TOKEN"],
user_id="user_123",
app_client_id="my_app_client_id",
)
kernel.add_plugin(plugin, plugin_name="cred")
Plugin Functions
The cred plugin exposes one kernel function:
delegate
| Parameter | Type | Description |
|---|---|---|
service |
string |
Service slug (e.g. google, github) |
scopes |
string |
Comma-separated OAuth scopes to request |
user_id and app_client_id are pre-configured at construction time, not agent-controlled.
Returns a JSON string with access_token, token_type, expires_in, service, scopes, and delegation_id.
Handling Consent
When the user hasn't connected the service, the delegate function raises ConsentRequiredError.
The error's consent_url attribute contains the URL to redirect the user.
from cred import ConsentRequiredError
try:
result = plugin.delegate(service="google", scopes="calendar.readonly")
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-semantic-kernel 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_semantic_kernel-1.0.0.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cred_semantic_kernel-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.7 kB
Release files / cred_semantic_kernel-1.0.0.tar.gz
| Download URL | cred_semantic_kernel-1.0.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c34331cb45f3d5eba61cf84407c08d087618517742b56686ae55721f59d4270
|
|
BLAKE2b-256 checksum How to use checksums |
bf42feb7d9ff9d798232d40757af3a2702d199a0cf79b07089d8d6fef8655d60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / cred_semantic_kernel-1.0.0-py3-none-any.whl
| Download URL | cred_semantic_kernel-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0e5bd80b9e119bae38c72ce2a401275010b048a1ddb83b0a554dac43225749f
|
|
BLAKE2b-256 checksum How to use checksums |
9267d4a387d3024e8cba031f575ae50c34b891dc8f8bab54f1b99772deddb308
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|