Cred Semantic Kernel integration — credential delegation plugin for Microsoft Semantic Kernel agents
Project description
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cred_semantic_kernel-1.0.0.tar.gz.
File metadata
- Download URL: cred_semantic_kernel-1.0.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c34331cb45f3d5eba61cf84407c08d087618517742b56686ae55721f59d4270
|
|
| MD5 |
e7e61a05a45cea25f6c6160e6386eb01
|
|
| BLAKE2b-256 |
bf42feb7d9ff9d798232d40757af3a2702d199a0cf79b07089d8d6fef8655d60
|
File details
Details for the file cred_semantic_kernel-1.0.0-py3-none-any.whl.
File metadata
- Download URL: cred_semantic_kernel-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0e5bd80b9e119bae38c72ce2a401275010b048a1ddb83b0a554dac43225749f
|
|
| MD5 |
53db964919357e67ad384253b415123a
|
|
| BLAKE2b-256 |
9267d4a387d3024e8cba031f575ae50c34b891dc8f8bab54f1b99772deddb308
|