halvorai-ingest
Signed, attributed payment events for AI agents. HalvorAI records each payment an agent makes, with the agent, the owner it acted for, the instruction it followed and the network proof that came with it. It is never in the payment path: it cannot slow or block a payment.
Developer preview. The SDK works offline today: build, sign and inspect events with your own sink. Sandbox API keys go to early-access teams. Request access.
- Docs: docs.halvorai.com
- Event format: Agent Payment Event (APE) v0.1, open and Apache-2.0
- Python 3.10 or later
Install
pip install halvorai-ingest
Try it offline
No account needed. Events are signed with your own Ed25519 key and handed to your sink instead of the API.
import json
from halvorai_ingest import HalvorClient, agent_context, generate_source_key
halvor = HalvorClient(
source_key=generate_source_key(), # private JWK; keep it secret
environment="test",
sink=lambda envelopes: print(json.dumps(envelopes, indent=2)),
)
with agent_context(
agent={"id": "agt_travel_12", "name": "Travel booking agent"},
owner={"id": "own_u_4410", "type": "person", "country": "US"},
instruction={"id": "task_8890", "text": "Book a return flight to Austin under $500"},
):
halvor.emit(
{
"type": "payment.settled",
"payment": {
"payment_id": "pi_3QxAbCdEfGhIjKlM",
"rail": "stripe",
"amount": {"value": "41200", "unit": "minor", "currency": "USD"},
"status": "settled",
"rail_ref": {"payment_intent": "pi_3QxAbCdEfGhIjKlM"},
},
"payee": {"type": "merchant", "name": "Example Airways"},
}
)
halvor.flush()
emit returns at once and never raises. Instruction text is hashed on your machine and never sent. Anyone with the public half of the key (the JWK without d) can check an envelope with verify_event(envelope["event"], envelope["sig"], public_key).
Send to HalvorAI (early access)
With a sandbox key (hk_test_…) and a source key registered in the dashboard:
import os
from halvorai_ingest import HalvorClient
halvor = HalvorClient(
api_key=os.environ["HALVOR_API_KEY"],
source_key=os.environ["HALVOR_SOURCE_KEY"], # the private JWK as JSON
)
Call halvor.close() before your process exits so queued events are sent.
x402
Wrap the httpx client your agent pays with. Payment requirements, signed payment payloads and settlement responses become events:
import httpx
from halvorai_ingest.x402 import wrap_httpx
client = wrap_httpx(httpx.Client(), halvor)
Stripe, MPP and MCP adapters are in the Node.js SDK, @halvorai/ingest. Guides for each: docs.halvorai.com.
Develop
uv sync --extra dev
uv run pytest
uv run mypy
Security
Report vulnerabilities privately to hello@halvorai.com.
License
Apache-2.0
Metadata
Release files for halvorai-ingest 0.2.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 | Provenance | |
|---|---|---|---|---|
| halvorai_ingest-0.2.0.tar.gz | 23.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| halvorai_ingest-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.6 kB
Release files / halvorai_ingest-0.2.0.tar.gz
| Download URL | halvorai_ingest-0.2.0.tar.gz |
|---|---|
| Size | 23.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39447e366a15f7b1ef0a622887907fc71c251213dfba2c3829f173c0ae61e8e9
|
|
BLAKE2b-256 checksum How to use checksums |
8d3011b7a268de8be02894020867818c5ac89dca223c014e9e7d1d5896f0054a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / halvorai_ingest-0.2.0-py3-none-any.whl
| Download URL | halvorai_ingest-0.2.0-py3-none-any.whl |
|---|---|
| Size | 22.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67aae44646072a0b1fff93686ebbbc7bc9c36be398cf3ec22635c7c273176303
|
|
BLAKE2b-256 checksum How to use checksums |
1cddd46768cafaeb6d44280775dbf4db0b895b8433034df8fd1e24daa3a66865
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for halvorai-ingest 0.2.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for halvorai_ingest-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA 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.