LangChain tool that issues Vouch Credentials to authorize AI agent tool calls.
Project description
vouch-langchain
A LangChain tool that issues Vouch Credentials, so a LangChain agent can cryptographically authorize the tool calls it makes.
Each signed call carries a W3C Verifiable Credential with an eddsa-jcs-2022
Data Integrity proof, and optionally a delegation chain back to an accountable
human principal.
Install
pip install vouch-langchain
This pulls in vouch-protocol[langchain].
Configure
The tool reads two environment variables:
VOUCH_PRIVATE_KEYthe agent's private key (JWK JSON string).VOUCH_DIDthe agent's DID, e.g.did:web:agent.example.com.
Use
from vouch_langchain import VouchSignerTool
tool = VouchSignerTool() # reads VOUCH_PRIVATE_KEY / VOUCH_DID
credential_json = tool._run(
action="read",
target="https://api.example.com",
resource="customer:123",
)
# Attach credential_json as a 'Vouch-Credential' header on your request.
Add tool to any LangChain agent's tool list. The agent calls it before an
authenticated request and forwards the credential to your service.
Verify on the receiving side
from vouch import Verifier
ok, passport = Verifier.verify_credential(received_json, public_key=agent_pubkey)
License
Apache-2.0.
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 vouch_langchain-0.1.0.tar.gz.
File metadata
- Download URL: vouch_langchain-0.1.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8d406bc883db71fa80200f3298218f4fdb0efa26059d996c35d986143402696
|
|
| MD5 |
883332add7d300fb390bf41672690b79
|
|
| BLAKE2b-256 |
4999ea784d23c683b95dc22720e5b71a362d07098332dbe4e455d246cd8373e6
|
Provenance
The following attestation bundles were made for vouch_langchain-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on vouch-protocol/vouch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vouch_langchain-0.1.0.tar.gz -
Subject digest:
c8d406bc883db71fa80200f3298218f4fdb0efa26059d996c35d986143402696 - Sigstore transparency entry: 2083155196
- Sigstore integration time:
-
Permalink:
vouch-protocol/vouch@353754361e03afc4e237a165af06666e5d2a212f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/vouch-protocol
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@353754361e03afc4e237a165af06666e5d2a212f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file vouch_langchain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vouch_langchain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7769ffdd0ddd75452ce94c34338c06554546523d9fece12a6de0a7c706e159af
|
|
| MD5 |
8cb557e3f56a3a1488587202b4c80f78
|
|
| BLAKE2b-256 |
c342bf511acabe9875ceefa9a2e2a179cc70144767ef0d4129a58fb09400f8b3
|