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 optionalblake3package for cross-SDK seed movement; HKDF-SHA256 is the fallback). - Middleware —
require_act(verifier, scopes=[...])FastAPI dependency andrequire_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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 openagentid_sdk-0.1.0.tar.gz.
File metadata
- Download URL: openagentid_sdk-0.1.0.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
258e4f4278f8a41514bba9672b208185b37dc9d4f991850c3ac212c893ac1242
|
|
| MD5 |
29858711ec3c2fd195007d3b5ccadc9c
|
|
| BLAKE2b-256 |
2030b7739fdd1a45e56f8b23875be8bb9bb6fc9b86ba050a9d0f3da49fdda4c9
|
File details
Details for the file openagentid_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: openagentid_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce3294bd5224f0adc00995a0e5c25cc9dd63b18ccf419fc5bed46d105d051c9f
|
|
| MD5 |
b07c1e5f165dc037f871826ec8030470
|
|
| BLAKE2b-256 |
d956d34dc59a1008f23f8adc09739a846252a3112995502df9ed03bbf09b293f
|