Skip to main content

APS Python SDK

Python SDK for the Agent Passport Standard v1.0.0.

Install

pip install aps

Quick Start

from aps import AgentPassport, PassportConfig, Skill, Soul, Policies, Lineage, generate_key_pair

pub, priv = generate_key_pair()
from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat
pub_hex = pub.public_bytes(Encoding.Raw, PublicFormat.Raw).hex()

passport = AgentPassport.new(PassportConfig(
    id="did:key:z6MkExample",
    public_key=pub_hex,
    owner_did="did:key:z6MkOwner",
    skills=[Skill("python", "1.0.0", "Python dev", ["code_write"], "0x" + "ab" * 32)],
    soul=Soul("focused", "tdd", [], "0x" + "cd" * 32),
    policies=Policies("0x" + "ef" * 32, ["can_bid"]),
    lineage=Lineage("original", [], 0),
))

passport.sign(priv)
assert passport.verify(pub)

Development Build

python -m pip install -e ".[dev]"
python -m pytest tests/ -v
python -m build

Publish Commands

python -m twine upload dist/*

Tests

python -m pytest tests/ -v

Metadata

Release files for agent-passport-standard 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-passport-standard 1.0.0
File Size Uploaded
agent_passport_standard-1.0.0.tar.gz 30.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for agent-passport-standard 1.0.0
File Interpreter ABI Platform
agent_passport_standard-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 56.3 kB

Release files / agent_passport_standard-1.0.0.tar.gz

Download URL agent_passport_standard-1.0.0.tar.gz
Size 30.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f2a9413d11e4111284be8df912fda61fbd5213a5af63a0ddfc84e90eb37f8127
BLAKE2b-256 checksum
How to use checksums
a0449f9cdd718ae11f1f6628e85a65ee0c4851645e7346398a60e507407157a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / agent_passport_standard-1.0.0-py3-none-any.whl

Download URL agent_passport_standard-1.0.0-py3-none-any.whl
Size 26.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3986d01b9c6e0f10d42a72d5959f7ad8917ea55d2c584cefc81daf85e213c6a8
BLAKE2b-256 checksum
How to use checksums
2e42b8a994aec5f97ad9af045a0c6dd553faef53577d71187286c4e31e91116a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page