agentkeys-io
Python SDK for AgentKeys — proxy API calls through a secure credential vault. Your agent never sees the real API keys.
Install
pip install agentkeys-io
Usage
With API key (recommended — access all credentials by name)
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)
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
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
with AgentKeys(token="ak_ws_...") as ak:
response = ak.proxy("resend", url="https://api.resend.com/emails", method="POST", body={...})
Links
Release files for agentkeys-io 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentkeys_io-0.1.1.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentkeys_io-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.7 kB
Release files / agentkeys_io-0.1.1.tar.gz
| Download URL | agentkeys_io-0.1.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c95fd75780a44fff3bdefb8a0249c7b1795f4af642bfe082f14f3112dea2f14e
|
|
BLAKE2b-256 checksum How to use checksums |
e289a74f85a448507b7266eac525bf1446a3f24c8973349adacd3216d34f2cc3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / agentkeys_io-0.1.1-py3-none-any.whl
| Download URL | agentkeys_io-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da59e80fa85334bc72b5acabf5954286b6e7bf8ce5ee699ee0e804fce123dfcb
|
|
BLAKE2b-256 checksum How to use checksums |
4ba0f4d1a50992b914a31ee6be04e352cba50f715724a741110d576c44778c44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|