Skip to main content

Python client for AgentVault — AI-native credential vault for autonomous agents.

Project description

agentkeyring

Python client for AgentVault — AI-native credential vault for autonomous agents.

Install

pip install agentkeyring

Quickstart

from agentkeyring import Vault

vault = Vault(
    base_url="https://agentvault-api-production.up.railway.app",
    agent_key="avk_...",
)

# Retrieve a credential (decrypted, TTL 300s)
stripe_key = vault.get("stripe_key", cost=0.05)

# List what this agent can access
names = vault.list()

# Async variant
import asyncio
from agentkeyring import AsyncVault

async def main():
    async with AsyncVault(base_url="...", agent_key="avk_...") as v:
        return await v.get("openai_key")

asyncio.run(main())

API

  • Vault(base_url, agent_key, timeout=10.0) — sync client
  • AsyncVault(base_url, agent_key, timeout=10.0) — async context-manager client
  • .get(name: str, cost: float = 0.0) -> str — returns the decrypted value
  • .list() -> list[str] — names accessible to this agent

Both raise VaultError on 4xx/5xx with the server's detail message.

License

MIT.

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

agentkeyring-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

agentkeyring-0.1.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agentkeyring-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c7856f0ecfbfa8df1667b46c3c573589b9717077b4e5f4787f9f70811a20228e
MD5 37e708452aebfb8f06200c85b4ebabd3
BLAKE2b-256 7d10bd47ad5c8618065543e14d0e6bc8e1cdf704bac94c38fe2549dbe1241a28

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agentkeyring-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for agentkeyring-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40cf9c663889d07e6b07bfec3ed1378b015e9bc687b0d745252bce22c98b48ec
MD5 da46cff67b4ac19ce64c141d2cb8348d
BLAKE2b-256 5be56fef8ddb1c385f2bf0f196adfc5579eb6422ae2f98757d9ba3a842a716d3

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