Skip to main content

Open-source Python SDK + CLI client for Keyhaven — OAuth and tool-calling for AI agents.

Project description

Keyhaven SDK

The open-source Python client for Keyhaven — OAuth & tool-calling for AI agents.

License: MIT PyPI Python

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


Client SDK — MIT. The Keyhaven server is a separate, proprietary component.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

keyhaven-0.0.1.tar.gz (466.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

keyhaven-0.0.1-py3-none-any.whl (577.6 kB view details)

Uploaded Python 3

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

Hashes for keyhaven-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5789f1002f91c560b1f0d6ff82e412b6e008acf0a3ef66d84936eeeff9c2bfc0
MD5 3ca8d39953d52e336caff4073bd35be6
BLAKE2b-256 77efaa0eb6c1823a5e485b2b09057a4a6025cbd2307a053c28e72efa129b1b6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for keyhaven-0.0.1.tar.gz:

Publisher: workflow.yml on Joselma-Jemk/keyhaven-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for keyhaven-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4eecdf050b398aa884912ef40f93e1e9e24a60f806e748fc20b55602292a5e4d
MD5 eceb602f515557958eb90078a6c4f98d
BLAKE2b-256 6eadcd5991e31dfa0bf83d35081573f7021ed48353aec6ea9b413c5866c28525

See more details on using hashes here.

Provenance

The following attestation bundles were made for keyhaven-0.0.1-py3-none-any.whl:

Publisher: workflow.yml on Joselma-Jemk/keyhaven-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page