aiap-client — AI Agency Protocol SDK
Identity is persistent. Agency is ephemeral.
Python SDK for the AI Agency Protocol (AIAP). Enables agents to request scoped, time-limited authority from a central broker.
Install
pip install aiap-client
pip install aiap-client[aws] # + boto3 for credential sessions
pip install aiap-client[cert] # + cryptography for certificate auth
Quick Start
from aiap_client import AgencyClient, AgencyLevel
client = AgencyClient(
broker_url="https://www.cyber-ai-scim.com",
agent_id="YXFQTW0VCL",
mac_secret="your-hmac-secret",
)
# Request JIT credentials
grant = await client.request_agency(
intent="Invoke underwriting model",
use_case="underwriting",
resources=["bedrock:InvokeModel"],
duration_seconds=900,
)
if grant.granted:
session = grant.to_boto3_session(region="us-east-1")
bedrock = session.client("bedrock-runtime")
# Invoke with scoped creds — expires in 15 min
else:
print(f"Denied: {grant.reason}")
Mediated Execution (Level 2)
Agent never sees credentials:
result = await client.execute(
intent="Invoke model for risk assessment",
use_case="underwriting",
action="bedrock:InvokeModel",
parameters={"modelId": "anthropic.claude-sonnet-4-6", "body": {...}},
)
print(result.output) # Only the result
Certificate Authentication
from aiap_client import AgencyClient, CertificateSigner
client = AgencyClient(
broker_url="https://www.cyber-ai-scim.com",
agent_id="YXFQTW0VCL",
signer=CertificateSigner(cert_path="agent.pem", key_path="agent-key.pem"),
)
Protocol
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 aiap_client-1.0.0-py3-none-any.whl.
File metadata
- Download URL: aiap_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d770ecb49c4ddd3d2bff0e10fe57f5fe864b2ef7d2d0bd0eabad0207974682e6
|
|
| MD5 |
6d6092cc644f98488712591b2fd75676
|
|
| BLAKE2b-256 |
20528e4721f24cdacb9da57176cf7e3f464a943f7bc4f0e4c333b9ebe5a6a05b
|