Agent Identity Systems Python SDK
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
agentidentity_1-0.1.0.tar.gz
(4.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentidentity_1-0.1.0.tar.gz.
File metadata
- Download URL: agentidentity_1-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d900b19f36f7b98cda1a7d907aff17826e8f0d64022a0b5cc6635000d650d1bf
|
|
| MD5 |
e415cecce2f9a733c80d101c1cc5ff22
|
|
| BLAKE2b-256 |
fb7be046cdc03ef5a9ac299ab9d21b0771aed63ea91264167dee3b4970ae7d34
|
File details
Details for the file agentidentity_1-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentidentity_1-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76b7a5fe6cdef3edf30b3c68cf1fa63af300ae2e71fa8df40a2b4c32be0b91cf
|
|
| MD5 |
4829ef3c56306fe584216a9d9fdb6c0b
|
|
| BLAKE2b-256 |
1fde142218102f8cd076486c1c92ac9ec80c42742fad915bd72fbb71b5f888bd
|