ainfera — Python SDK for Ainfera
The Inference of AI Agents. Signed AgentCards, x402-ready Wallets, hash-chained AuditChains — out of the box.
Install
pip install ainfera
Requires Python 3.10+.
Quickstart
from ainfera import AinferaClient
# api_key also reads from the AINFERA_API_KEY environment variable
client = AinferaClient(api_key="ak_...")
agent = client.agents.register(name="my-agent")
agent.wallet.topup(amount_usd=10)
response = agent.inference(
model="claude-opus-4-7",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.text)
print(response.receipt.audit_url)
What is Ainfera?
The Inference of AI Agents. Drain-proof wallet for AI agents. Your agent's wallet survives prompt injection. One Agent Card across Anthropic, OpenAI, and Together — more Providers in v1.7. Every call cryptographically audited. See ainfera.ai.
Features
- Signed AgentCards per Agent (JWS, RFC 7515)
- Provider-neutral routing across Anthropic, OpenAI, Together (more soon)
- Atomic per-call settlement out of an Agent-scoped Wallet
- Tamper-evident hash-chained AuditChain for every Agent
- Local verification — auditors can verify a chain offline, no Ainfera trust required
- Sync + async clients sharing one resource surface
Concepts
Compose, don't invent
This SDK is a thin wrapper around the Ainfera API. The underlying primitives align with — and link to — public standards work:
- Open Agent Identity (OAI) Spec — Autonomy Next, Inc., draft v1.0.5 (Feb 2026)
- Mastercard Verifiable Intent — open agentic-commerce trust layer (March 2026)
- x402 Foundation — HTTP-native payments protocol, Linux Foundation (April 2026)
- NIST AI Agent Standards Initiative — NIST CAISI (Feb 2026)
- EU AI Act Annex IV — technical documentation for high-risk AI systems (Regulation 2024/1689)
- JWS, RFC 7515 — used internally for AgentCard signing
License
Apache 2.0. See LICENSE.
Release files for ainfera 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ainfera-1.1.0.tar.gz | 24.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ainfera-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 56.6 kB
Release files / ainfera-1.1.0.tar.gz
| Download URL | ainfera-1.1.0.tar.gz |
|---|---|
| Size | 24.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
427247e393aa806017b415347ec2e9553a5881bc00d09dfe3108bea0bec02ddd
|
|
BLAKE2b-256 checksum How to use checksums |
a186b4ee398356007fd7dca1f911ad57a6367b2803d01f4369b80cdf166da314
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ainfera-1.1.0-py3-none-any.whl
| Download URL | ainfera-1.1.0-py3-none-any.whl |
|---|---|
| Size | 31.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14e4fcd926f1053950c9f0cb6fc9910078bdb69566ee724237c8dd88fd2cfc09
|
|
BLAKE2b-256 checksum How to use checksums |
1f01b31baa9e09f7e27d77285e54ea5121337b1230f7b46199f3f84ef2a49c6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|