Skip to main content

Clavis

Self-Hosted Credential Infrastructure for Autonomous Agents

Your AI agents need API keys, OAuth tokens, and wallet keys.
Hardcoding them = one prompt injection away from disaster.

Clavis stores credentials server-side and injects them at runtime.
Your agents never see the secrets.

Installation

pip install clavis

Quick Start

from clavis import ClavisClient

client = ClavisClient(
    api_key="your-jwt-token",       # from POST /v1/auth/login
    base_url="https://your-clavis-instance.com"
)

# Secure call — credential injected server-side, never touches agent memory
response = await client.call(
    "stripe",
    "GET",
    "https://api.stripe.com/v1/balance"
)
print(response["body"])  # {"object": "balance", ...}

# Check credential health without making external calls
status = await client.check_credentials("stripe")
# {"valid": True, "status": "healthy", "expires_in": 3542}

# Proxy a request (path-based, credential injected server-side)
response = await client.proxy(
    "openai",
    "POST",
    "/v1/chat/completions",
    body={"model": "gpt-4o", "messages": messages}
)

Why Clavis

Hardcoded secrets Clavis
Agent sees raw key Yes No
Prompt injection risk High Eliminated
Token auto-refresh Manual Automatic
Audit log None Every request
Rate limiting Manual Built-in
Self-hostable — Yes

Security Model

clavis.call() is the core primitive. When your agent calls it:

  1. Clavis fetches the credential from its encrypted vault
  2. Injects it into the upstream HTTP request server-side
  3. Returns only the API response — no credential ever leaves the server

Even a fully compromised agent cannot exfiltrate credentials it never received.

Features

  • call() — Server-side credential injection; agent never sees raw secrets
  • proxy() — Path-based proxying with automatic auth
  • check_credentials() — Dry-run health check; no external calls made
  • get_token() — Retrieve a valid token for custom auth flows
  • Encrypted credentials at rest (Fernet)
  • Automatic OAuth token refresh
  • Redis-backed rate limiting (cross-agent)
  • Full audit log on every auth event
  • MCP server for Claude Desktop integration

Self-Hosting

Clavis is fully self-hostable. See clavisagent.com/docs/mcp.html for setup.

License

MIT

Metadata

Release files for clavis 0.2.4

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

Source distribution (sdist)

Source distribution for clavis 0.2.4
File Size Uploaded Provenance Actions
clavis-0.2.4.tar.gz 5.8 kB Without provenance Details for clavis-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for clavis 0.2.4
File Interpreter ABI Platform Actions
clavis-0.2.4-py3-none-any.whl Python 3 none any Details for clavis-0.2.4-py3-none-any.whl

Total release size: 11.5 kB

Release files / clavis-0.2.4.tar.gz

Download URL clavis-0.2.4.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b0cb98de6156d71866bd6f73a6a16fd0499de2bcea2f280413653b0f2efe351d
BLAKE2b-256 checksum
How to use checksums
090ae25bc6051598d19617cf4a04d39222a8cda133fa7ababae729d2469b73e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / clavis-0.2.4-py3-none-any.whl

Download URL clavis-0.2.4-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41359da9da51a22c96f1a642cdaeaa335a37c5fbd7897dedf518e5c762fea9b1
BLAKE2b-256 checksum
How to use checksums
22e0d72db9270d895940e34b1ab2141be822236591d99446412a69cb778385b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for clavis 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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