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.3.tar.gz (5.5 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.3-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clavis-0.2.3.tar.gz
  • Upload date:
  • Size: 5.5 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.3.tar.gz
Algorithm Hash digest
SHA256 aab2069b8bc052fc2b74569a86fd37d659664a2afec7032b737d4da8734876ae
MD5 004ab1d0249e05e0eed420735f1cc6bf
BLAKE2b-256 1d26fb1bcf90edcb02a4a1bac75670ef4820ab69d4c628dd8ec65b20eb724fb1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: clavis-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 257139f5d08e0aced8b4f69a4fe4d992ae3ce2b31efdcc6a99c7bf88e53a42e2
MD5 cdd3b2dde8b8ba70957884012bc3ace1
BLAKE2b-256 8a9cfc24c3f29ddb583e4a0a979d9cc52bf297720762cd3910c85468c622c8ff

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.4

2 files

This release

0.2.3 This release

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