Metadata-Version: 2.4
Name: agentkeyring
Version: 0.1.0
Summary: Python client for AgentVault — AI-native credential vault for autonomous agents.
Project-URL: Homepage, https://agentvault-api-production.up.railway.app
Project-URL: Repository, https://github.com/bch1212/agentvault
Project-URL: Documentation, https://agentvault-api-production.up.railway.app/docs
Project-URL: Issues, https://github.com/bch1212/agentvault/issues
Author-email: Brett Halverson <brett.halverson@gmail.com>
License: MIT
Keywords: ai-agents,claude,credentials,mcp,openai,secrets,vault
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: httpx>=0.25.0
Description-Content-Type: text/markdown

# agentkeyring

Python client for [AgentVault](https://github.com/bch1212/agentvault) — AI-native credential vault for autonomous agents.

## Install

```bash
pip install agentkeyring
```

## Quickstart

```python
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.
