Catalog PyPI
PACKAGE EXPLORERView in registry

aiap-client

PyPI

AI Agency Protocol (AIAP) client — identity, scope, and ephemeral authority for AI agents

agencyagentsaiaiapcredentialsidentityjitprotocol
Versions collected1
Direct dependencies7From release 1.0.2
Last observed21 Oct, 09:55 UTC

README

Version 1.0.2 documentation

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://broker.example.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": "<model-id>", "body": {...}},
)
print(result.output)  # Only the result

Certificate Authentication

from aiap_client import AgencyClient, CertificateSigner

client = AgencyClient(
    broker_url="https://broker.example.com",
    agent_id="YXFQTW0VCL",
    signer=CertificateSigner(cert_path="agent.pem", key_path="agent-key.pem"),
)

Protocol

See RFC-001: AI Agency Protocol

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.22 Oct 20267

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:55 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:586fa1857e659f55e9aca7a6f1ead1f805972a441563194c1b36bd8b6ce006d2