Open-source Python SDK + CLI client for Keyhaven — OAuth and tool-calling for AI agents.
Project description
key + haven — a safe harbour for the keys your agents act through.
What is this?
Keyhaven is the OAuth + tool-calling layer for AI agents: your users connect their SaaS apps once, and your agents act on their behalf — through a per-tenant encrypted credential vault you never have to build.
This package is the client SDK (MIT). It talks over HTTP to a Keyhaven server. The server core is operated as a managed service (or self-hosted by the project owner); you only need this SDK and an API key.
Install
pip install keyhaven
Quickstart
from keyhaven import Keyhaven
async with Keyhaven(base_url="https://your-keyhaven-host", api_key="<your-api-key>") as kh:
# 1. Start an OAuth connection for one of your users
auth_url = await kh.connect("gmail", owner_id="user_123")
# → the user visits auth_url and consents; Keyhaven stores encrypted credentials
# 2. Execute a tool on their behalf — anytime
result = await kh.execute(
"gmail.send_email",
owner_id="user_123",
args={"to": "boss@company.com", "subject": "Status", "body": "All good"},
)
Sync variants (connect_sync, execute_sync, …) are available for non-async code.
Links
- Issues & docs: https://github.com/Joselma-Jemk/keyhaven-sdk
Client SDK — MIT. The Keyhaven server is a separate, proprietary component.
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 keyhaven-0.0.1.tar.gz.
File metadata
- Download URL: keyhaven-0.0.1.tar.gz
- Upload date:
- Size: 466.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5789f1002f91c560b1f0d6ff82e412b6e008acf0a3ef66d84936eeeff9c2bfc0
|
|
| MD5 |
3ca8d39953d52e336caff4073bd35be6
|
|
| BLAKE2b-256 |
77efaa0eb6c1823a5e485b2b09057a4a6025cbd2307a053c28e72efa129b1b6c
|
Provenance
The following attestation bundles were made for keyhaven-0.0.1.tar.gz:
Publisher:
workflow.yml on Joselma-Jemk/keyhaven-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keyhaven-0.0.1.tar.gz -
Subject digest:
5789f1002f91c560b1f0d6ff82e412b6e008acf0a3ef66d84936eeeff9c2bfc0 - Sigstore transparency entry: 1750803115
- Sigstore integration time:
-
Permalink:
Joselma-Jemk/keyhaven-sdk@ef965400544f1f94f56f7fd4bbefe2888a546a80 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Joselma-Jemk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@ef965400544f1f94f56f7fd4bbefe2888a546a80 -
Trigger Event:
release
-
Statement type:
File details
Details for the file keyhaven-0.0.1-py3-none-any.whl.
File metadata
- Download URL: keyhaven-0.0.1-py3-none-any.whl
- Upload date:
- Size: 577.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4eecdf050b398aa884912ef40f93e1e9e24a60f806e748fc20b55602292a5e4d
|
|
| MD5 |
eceb602f515557958eb90078a6c4f98d
|
|
| BLAKE2b-256 |
6eadcd5991e31dfa0bf83d35081573f7021ed48353aec6ea9b413c5866c28525
|
Provenance
The following attestation bundles were made for keyhaven-0.0.1-py3-none-any.whl:
Publisher:
workflow.yml on Joselma-Jemk/keyhaven-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keyhaven-0.0.1-py3-none-any.whl -
Subject digest:
4eecdf050b398aa884912ef40f93e1e9e24a60f806e748fc20b55602292a5e4d - Sigstore transparency entry: 1750803191
- Sigstore integration time:
-
Permalink:
Joselma-Jemk/keyhaven-sdk@ef965400544f1f94f56f7fd4bbefe2888a546a80 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Joselma-Jemk
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@ef965400544f1f94f56f7fd4bbefe2888a546a80 -
Trigger Event:
release
-
Statement type: