agentidentity_1
Python SDK for the Agent Identity Systems API.
Install
pip install agentidentity_1
Quickstart
from agentidentity_1 import AISClient, RegisterAgentInput
ais = AISClient(base_url="https://api.agentidentity_1.io")
# Register a new agent (plaintext key returned once)
resp = ais.register(RegisterAgentInput(
name="my-agent",
risk_tier="TIER_1",
owner_id="org-abc123",
))
print("Agent ID:", resp.agent.id)
print("API Key (store securely):", resp.api_key)
# Verify authorization
result = ais.verify(resp.agent.id)
print("Authorized:", result.authorized) # True
print("Query time:", result.query_ms, "ms")
# Get agent + credential summaries (no plaintext)
agent_resp = ais.get_agent(resp.agent.id)
cred = agent_resp.credentials[0]
# Revoke a credential
ais.revoke_credential(resp.agent.id, cred.id, revoke_reason="rotating keys")
# Authorized is now False
after = ais.verify(resp.agent.id)
print("Authorized after revoke:", after.authorized) # False
Context manager
with AISClient(base_url="https://api.agentidentity_1.io") as ais:
result = ais.verify(agent_id)
Error handling
from agentidentity_1 import AISClient, AISError
try:
ais.verify("does-not-exist")
except AISError as e:
print(e.status, e.body["error"]) # 404 agent not found
Requirements
- Python 3.10+
- httpx ≥ 0.27
Release files for agentidentity-1 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentidentity_1-0.1.0.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentidentity_1-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.9 kB
Release files / agentidentity_1-0.1.0.tar.gz
| Download URL | agentidentity_1-0.1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d900b19f36f7b98cda1a7d907aff17826e8f0d64022a0b5cc6635000d650d1bf
|
|
BLAKE2b-256 checksum How to use checksums |
fb7be046cdc03ef5a9ac299ab9d21b0771aed63ea91264167dee3b4970ae7d34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|
Release files / agentidentity_1-0.1.0-py3-none-any.whl
| Download URL | agentidentity_1-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76b7a5fe6cdef3edf30b3c68cf1fa63af300ae2e71fa8df40a2b4c32be0b91cf
|
|
BLAKE2b-256 checksum How to use checksums |
1fde142218102f8cd076486c1c92ac9ec80c42742fad915bd72fbb71b5f888bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|