Metadata-Version: 2.4
Name: agentkeys
Version: 0.1.0
Summary: Python SDK for AgentKeys — proxy API calls through a secure credential vault
Author-email: AgentKeys <support@agentkeys.io>
License: MIT
Project-URL: Homepage, https://agentkeys.io
Project-URL: Documentation, https://agentkeys.io/docs
Project-URL: Repository, https://github.com/alexandr-belogubov/agentkeys
Keywords: agentkeys,sdk,credentials,proxy,ai-agents,api-keys
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.25

# agentkeys-io

Python SDK for [AgentKeys](https://agentkeys.io) — proxy API calls through a secure credential vault. Your agent never sees the real API keys.

## Install

```bash
pip install agentkeys-io
```

## Usage

### With API key (recommended — access all credentials by name)

```python
from agentkeys import AgentKeys

ak = AgentKeys(
    token="ak_ws_your_key...",
    proxy_url="https://proxy.agentkeys.io",
)

# Proxy a request through the "resend" credential
response = ak.proxy(
    credential="resend",
    url="https://api.resend.com/emails",
    method="POST",
    body={
    },
)

print(response.json())
```

### With proxy token (single credential)

```python
ak = AgentKeys(token="pxr_resend_abc123...")

response = ak.proxy(
    credential="ignored",
    url="https://api.resend.com/emails",
    method="POST",
    body={""from": "hi@example.com", "to": "user@example.com", "subject": "Hello", "text": "Sent via AgentKeys"},
)
```

### Scoped client

```python
resend = ak.for_credential("resend")
stripe = ak.for_credential("stripe")

resend.post("https://api.resend.com/emails", body={
    "from": "hi@example.com",
    "to": "user@example.com",
    "subject": "Hello",
    "text": "Sent via AgentKeys",
})

balance = stripe.get("https://api.stripe.com/v1/balance")
```

### Context manager

```python
with AgentKeys(token="ak_ws_...") as ak:
    response = ak.proxy("resend", url="https://api.resend.com/emails", method="POST", body={...})
```

## Links

- [Dashboard](https://app.agentkeys.io)
- [Docs](https://agentkeys.io/docs)
- [Support](mailto:support@agentkeys.io)
