Skip to main content

🛡️ Zerix

Policy-enforcing middleware wallet for AI agents.

Python 3.10+ License Version

Zerix sits between your AI agent and the blockchain. It ensures that no matter how smart (or easily manipulated) your agent is, it can never drain your funds or interact with malicious contracts.


✨ Features

  • Fail-Closed Policy Engine: Spending caps (per-tx, daily, weekly), recipient/contract allowlists, and time windows.
  • Human-in-the-Loop (HITL): Transactions above a specific threshold are HELD for manual approval.
  • Web3 Native: Generates real EIP-1559 transactions and broadcasts them to Base, Ethereum, or any EVM chain.
  • Zero-Dependency UI: A beautiful, read-only dashboard to monitor agent activity in real-time.
  • Framework Agnostic: Native tool schemas for LangChain, OpenAI Function Calling, and MCP.
  • Audit Logging: Every decision is recorded in a structured JSONL format (exportable to CSV).

🏗️ Architecture

[ AI Agent ] ---> [ Zerix Client ] ---> [ Blockchain (Base/EVM) ]
                         |
                         +-- [ Policy Engine ] (Caps, Allowlists, Time)
                         +-- [ HITL Engine ]   (Holds large transactions)
                         +-- [ EVM Signer ]    (Securely holds private keys)
                         +-- [ Audit Logger ]  (JSONL & Dashboard)

🚀 Quickstart

1. Installation

pip install zerix

2. Basic Usage (Simulation)

from decimal import Decimal
from zerix import ZerixClient, PolicyEngine, SpendingCap, MockSigner

# 1. Configure Policy (Max $10 per tx, hold above $5)
policy = PolicyEngine(
    cap=SpendingCap(
        per_tx_usd=Decimal("10.00"),
        require_human_above_usd=Decimal("5.00")
    )
)

# 2. Initialize Client
client = ZerixClient(policy_engine=policy, signer=MockSigner())

# 3. Execute Transfer
decision = client.transfer(to="0x123...", amount_usd=Decimal("2.00"))
print(f"Outcome: {decision.outcome.value}")

3. Web3 Native Setup (Real Transactions)

To send real transactions on Base or Ethereum, use the EVMSigner:

from zerix import EVMSigner, JSONRPCProvider

# Initialize real Web3 provider and signer
provider = JSONRPCProvider(rpc_url="https://sepolia.base.org", chain_id=84532)
signer = EVMSigner(rpc_url="https://sepolia.base.org", chain_id=84532)

client = ZerixClient(policy_engine=policy, signer=signer, provider=provider)

Read the full Web3 Guide for details.

📊 Dashboard

Zerix comes with a built-in, zero-dependency dashboard to monitor your agents.

python scripts/run_dashboard.py

Open http://localhost:8000 to view the UI.

📦 TypeScript SDK

If you are building AI agents in JavaScript or TypeScript (Node.js, Next.js), you can use our official SDK.

cd sdk/typescript

npm install

npm run build

🛡️ Security Principles

  1. Non-custodial forever: Zerix never stores private keys in a centralized server (unless self-hosted via ENV).
  2. Fail-closed: If anything goes wrong, the transaction is DENIED.
  3. Policy lives in code, not in prompts: Agents cannot "talk" their way out of a spending cap.

📄 License

Apache-2.0

Metadata

Release files for zerix 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zerix 0.4.0
File Size Uploaded Provenance Actions
zerix-0.4.0.tar.gz 26.4 kB Without provenance Details for zerix-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zerix 0.4.0
File Interpreter ABI Platform Actions
zerix-0.4.0-py3-none-any.whl Python 3 none any Details for zerix-0.4.0-py3-none-any.whl

Total release size: 52.7 kB

Release files / zerix-0.4.0.tar.gz

Download URL zerix-0.4.0.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5fb725ca0f9cb0a42f07ef0b96651f72df15b6623444f3391990294971fe5dd6
BLAKE2b-256 checksum
How to use checksums
477ff2d73089467b56947127adfbe4588d2d442eb80672a7c059a44f7bbbc7aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / zerix-0.4.0-py3-none-any.whl

Download URL zerix-0.4.0-py3-none-any.whl
Size 26.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d585228e06e90008c7f1adc311c14e68d4b5f076811c43cced80e4fb32cea77
BLAKE2b-256 checksum
How to use checksums
25ebdeb661767a30176c23dd21d5b65dd523fef6642bb00f938eabe559e7b6a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for zerix 0.4.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page