Skip to main content

Zero-trust credential manager for AI agents — Python SDK

Project description

agent-vault Python SDK

Read-only Python SDK for agent-vault — a zero-trust credential manager for AI agents.

Installation

pip install agent-vault

# With MCP server support:
pip install 'agent-vault[mcp]'

Quick Start

from agent_vault import Vault

vault = Vault(
    repo_path="/path/to/vault",
    key_path="~/.agent-vault/agents/my-agent.key",
)

# Pull latest and decrypt
api_key = vault.get("stripe/api-key")

Key Resolution

The SDK resolves the identity key in this order:

  1. key_str= parameter (raw key string)
  2. key_path= parameter (path to key file)
  3. AGENT_VAULT_KEY environment variable (key as string)
  4. ~/.agent-vault/owner.key (default owner key)

API

Vault(repo_path, key_path=None, key_str=None, auto_pull=True)

Create a read-only vault connection.

  • repo_path: Path to the Git repo containing .agent-vault/
  • key_path: Path to an age private key file
  • key_str: Raw age private key string
  • auto_pull: Git pull before each get() (default: True)

vault.get(secret_path) -> str

Decrypt and return a secret. Raises SecretNotFoundError or NotAuthorizedError.

vault.list_secrets(group=None) -> list[SecretMetadata]

List secret metadata without decrypting.

vault.list_agents() -> list[dict]

List agents and their group memberships.

vault.pull()

Manually pull latest changes from Git remote.

vault.reload()

Reload the manifest from disk (e.g., after a pull).

MCP Server

The package includes an MCP server for use with MCP-compatible AI agents:

agent-vault-mcp --repo /path/to/vault --key ~/.agent-vault/agents/my-agent.key

This runs a stdio-based MCP server exposing:

  • agent_vault_get(secret) — retrieve and decrypt a secret
  • agent_vault_list(group?) — list available secrets

Claude Desktop Configuration

{
  "mcpServers": {
    "agent-vault": {
      "command": "agent-vault-mcp",
      "args": ["--repo", "/path/to/vault", "--key", "/path/to/agent.key"]
    }
  }
}

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

agent_vault_sdk-0.1.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

agent_vault_sdk-0.1.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file agent_vault_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: agent_vault_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for agent_vault_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d7c88dc16f61ae4614394ef287fa09222bec30ed6ee999b6bf5451e4b51ea214
MD5 937f14e08f40f03d5cdbc3a867d05608
BLAKE2b-256 7012e454a7d485abcc6bb245d774d8ef4e82eb94662757e996e32dbcaddc1a37

See more details on using hashes here.

File details

Details for the file agent_vault_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_vault_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6482580f9d38e564814cea7fe9cf8d4cd5a0bc62f3824212b3bb7b9ca2933b6f
MD5 5b0f97b2351e4a95936456b1c2bedb00
BLAKE2b-256 ed2e5afd3c1a4a36d5557c39a67189f04c55a4f7cc02f43b8af83753e5738fe0

See more details on using hashes here.

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