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.1.0.tar.gz (24.8 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.1.0-py3-none-any.whl (31.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ainfera-1.1.0.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for ainfera-1.1.0.tar.gz
Algorithm Hash digest
SHA256 427247e393aa806017b415347ec2e9553a5881bc00d09dfe3108bea0bec02ddd
MD5 a32db1bcd4fb4743aa4d810f5fc3357b
BLAKE2b-256 a186b4ee398356007fd7dca1f911ad57a6367b2803d01f4369b80cdf166da314

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ainfera-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 31.8 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for ainfera-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14e4fcd926f1053950c9f0cb6fc9910078bdb69566ee724237c8dd88fd2cfc09
MD5 ca0479df735b87fd547319f5f9f31d7b
BLAKE2b-256 1f01b31baa9e09f7e27d77285e54ea5121337b1230f7b46199f3f84ef2a49c6f

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