Skip to main content

The Inference of AI Agents. Drain-proof wallets, signed AgentCards (JWS), hash-chained AuditChains — out of the box.

Project description

ainfera — Python SDK for Ainfera

PyPI version Python versions CI License: Apache 2.0

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:

License

Apache 2.0. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ainfera-1.0.1.tar.gz (16.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ainfera-1.0.1-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file ainfera-1.0.1.tar.gz.

File metadata

  • Download URL: ainfera-1.0.1.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.4

File hashes

Hashes for ainfera-1.0.1.tar.gz
Algorithm Hash digest
SHA256 fd1ae307454250f572c2a53d112ef512fc19ff6f9588f776acd616895fd14a53
MD5 5703629d9e4cfa250555f61af98ed613
BLAKE2b-256 972ab55090f10bb9ef72aa9cfa47329bd56fcbcc92871f95d0b5d3907a659e81

See more details on using hashes here.

File details

Details for the file ainfera-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ainfera-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.4

File hashes

Hashes for ainfera-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8d455b2a86516609602201a68fb61af2620870f1034d77f468d134065d4e80cf
MD5 b858cb91f6b1b09558377cc48339551b
BLAKE2b-256 42d1887cd0b108a88caf2e087d5b290eb6f2940bb0995c90d96583ed2900808a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page