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

Download files

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

Source Distribution

clavis-0.2.4.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

clavis-0.2.4-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file clavis-0.2.4.tar.gz.

File metadata

  • Download URL: clavis-0.2.4.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for clavis-0.2.4.tar.gz
Algorithm Hash digest
SHA256 b0cb98de6156d71866bd6f73a6a16fd0499de2bcea2f280413653b0f2efe351d
MD5 59140869ed87795b8472483889c7a3e5
BLAKE2b-256 090ae25bc6051598d19617cf4a04d39222a8cda133fa7ababae729d2469b73e2

See more details on using hashes here.

File details

Details for the file clavis-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: clavis-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for clavis-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 41359da9da51a22c96f1a642cdaeaa335a37c5fbd7897dedf518e5c762fea9b1
MD5 6163cb1d980f19492a46f9f11436855a
BLAKE2b-256 22e0d72db9270d895940e34b1ab2141be822236591d99446412a69cb778385b7

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 files

0.2.3

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 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