Skip to main content

cred-langchain

LangChain integration for Cred. OAuth2 credential delegation for AI agents.

Install

pip install cred-langchain

Quick Start

import os
from cred_langchain import CredToolkit
from cred import ConsentRequiredError

toolkit = CredToolkit(
    agent_token=os.environ["CRED_AGENT_TOKEN"],
    user_id="user_123",
)
tools = toolkit.get_tools()
# tools = [CredDelegateTool, CredStatusTool, CredRevokeTool]

# Use with any LangChain agent
from langchain.agents import AgentExecutor
agent = AgentExecutor(agent=..., tools=tools)

Tools

Tool Name Description
CredDelegateTool cred_delegate Get an OAuth access token for a service
CredStatusTool cred_status List user's connected services
CredRevokeTool cred_revoke Revoke a service connection

When a user hasn't connected a service yet, CredDelegateTool raises ConsentRequiredError. Catch it and redirect the user to e.consent_url to complete the OAuth flow.

Cred Cloud (Coming Soon)

Managed cloud delegation is coming. Join the waitlist.

Metadata

Release files for cred-langchain 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cred-langchain 0.1.0
File Size Uploaded
cred_langchain-0.1.0.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cred-langchain 0.1.0
File Interpreter ABI Platform
cred_langchain-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.7 kB

Release files / cred_langchain-0.1.0.tar.gz

Download URL cred_langchain-0.1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3d3bbef7c4c2e6f56af4c36669eaae8bd47da55495aa800882f3617bce0fa4bd
BLAKE2b-256 checksum
How to use checksums
e4624155c6e3a1680fba1236e21054e4ede206bbbc40f7c0f4d8ccd6e8114c90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / cred_langchain-0.1.0-py3-none-any.whl

Download URL cred_langchain-0.1.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d4c28aff648cc05da0b8da909408fe47521e14cc9b4e663433b9528d2d7cfc1
BLAKE2b-256 checksum
How to use checksums
309cd893a442cdb743d086c104786940c3895774783c682180de579bc7684436
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page