Skip to main content

OpenAgent SDK for Python

Identity, authentication, and Agent Capability Token (ACT) verification for autonomous agents. The verify-first path is four lines; everything the protocol offers stays reachable underneath.

from openagent_sdk import Agent, Verifier, Scope

# Mint or restore an identity (keys are generated/restored, not phoned home).
agent = await Agent.create("my-agent")

# Run the Core Protocol challenge-response flow against a server.
session = await agent.authenticate("https://api.example.com")

# Build a capability grant request (scope grammar enforced client-side).
grant = await session.grant("tools:calendar:invoke", ttl_seconds=300)

# ...and on the verifying side - four lines, spec-exact:
verifier = Verifier(
    [broker_public_key],           # raw 32-byte Ed25519 keys
    "arsenal:broker:prod-1",       # expected issuer
    "my-service",                  # this service's audience
    required_scopes=[Scope.parse("tools:calendar:invoke")],
)
claims = verifier.verify(token_bytes)

What you get

  • Verifier / verify_builder() — canonical ACT verification per act/SPECIFICATION.md: envelope decode, version/algorithm checks, Ed25519 signature verification before any claim check (the order is normative), temporal checks with leeway, and issuer/audience/scope policy. Distinct errors for forgery, expiry, and misconfiguration.
  • Agent / Session — the façade: identity, the Core Protocol challenge-response flow, and grant requests.
  • Key custody — keys.generate(), keys.from_seed(), keys.from_seed_hex(), keys.from_seed_file(), keys.from_env(), keys.save_seed(). Everything derives deterministically from one 32-byte seed (Ed25519 signing + X25519 encryption keypairs, the same BLAKE3 context-separated derivation as the Rust/TS SDKs — install the optional blake3 package for cross-SDK seed movement; HKDF-SHA256 is the fallback).
  • Middleware — require_act(verifier, scopes=[...]) FastAPI dependency and require_act_starlette(verifier) ASGI middleware. A missing, forged, expired, wrong-audience, or under-scoped token gets a 401 with the reason; the route never runs.

Install

pip install openagentid-sdk            # core
pip install "openagentid-sdk[fastapi]" # with the FastAPI dependency
pip install blake3                    # optional: canonical cross-SDK key derivation

Conformance

This SDK is gated by the same 13 canonical ACT vectors that gate Rust and TypeScript (conformance/vectors/arsenal/act-verify.json):

python scripts/run_vectors.py

The drift rule: Python verifies through its own spec-exact implementation of the published format, and the vectors prove it agrees with the canonical crate — the suite that exists so three handwritten implementations never drift again.

License

Copyright © 2026 L1fe Labs, Inc.

Licensed under either of Apache License 2.0 or MIT license, at your option.

Metadata

Release files for openagentid-sdk 0.1.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 openagentid-sdk 0.1.0
File Size Uploaded Provenance Actions
openagentid_sdk-0.1.0.tar.gz 18.8 kB Without provenance Details for openagentid_sdk-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openagentid-sdk 0.1.0
File Interpreter ABI Platform Actions
openagentid_sdk-0.1.0-py3-none-any.whl Python 3 none any Details for openagentid_sdk-0.1.0-py3-none-any.whl

Total release size: 37.7 kB

Release files / openagentid_sdk-0.1.0.tar.gz

Download URL openagentid_sdk-0.1.0.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
258e4f4278f8a41514bba9672b208185b37dc9d4f991850c3ac212c893ac1242
BLAKE2b-256 checksum
How to use checksums
2030b7739fdd1a45e56f8b23875be8bb9bb6fc9b86ba050a9d0f3da49fdda4c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release files / openagentid_sdk-0.1.0-py3-none-any.whl

Download URL openagentid_sdk-0.1.0-py3-none-any.whl
Size 18.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce3294bd5224f0adc00995a0e5c25cc9dd63b18ccf419fc5bed46d105d051c9f
BLAKE2b-256 checksum
How to use checksums
d956d34dc59a1008f23f8adc09739a846252a3112995502df9ed03bbf09b293f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Security for openagentid-sdk 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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