Python SDK for Helix — self-healing infrastructure for AI agent payments
Project description
helix-agent-sdk
Python SDK for Helix — self-healing infrastructure for AI agent payments.
Install
pip install helix-agent-sdk
Option A: Docker (recommended)
docker run -d -p 7842:7842 adrianhihi/helix-server
Option B: Node.js
npm install -g @helix-agent/core
npx helix serve --port 7842
Quick Start
Method 1: Client
from helix_agent import HelixClient
client = HelixClient(platform="coinbase")
result = client.repair("AA25 invalid account nonce")
print(f"Strategy: {result.strategy}") # refresh_nonce
print(f"Immune: {result.immune}") # True on 2nd call
Method 2: Decorator
from helix_agent import helix_wrap
@helix_wrap(platform="coinbase", max_retries=3)
def send_payment(to: str, amount: float):
return agent.transfer(to, amount)
result = send_payment("0x...", 1.5)
Method 3: Context Manager
from helix_agent import helix_guard
with helix_guard("tempo") as guard:
try:
result = agent.transfer(to, amount)
except Exception as e:
repair = guard.repair(str(e))
if repair.immune:
result = agent.transfer(to, amount)
Features (via Helix Server)
The Python SDK talks to the Helix server which provides:
- 17 Coinbase patterns — CDP API, ERC-4337, x402, policy, network
- Cross-platform immunity — genes learned on Tempo/Privy auto-heal Coinbase errors
- LLM fallback — unknown errors classified by Claude/GPT in real-time ($0.001), then cached forever ($0)
- Gene Telemetry — anonymous network learning, coverage grows over time
- Gene Dream — background memory consolidation, Gene Map gets smarter over time
- Data Versioning — auto-migrates schema on server startup
- 343+ TypeScript tests + 14 Python tests — production-grade reliability
Enable LLM on the server:
export ANTHROPIC_API_KEY=sk-ant-...
docker run -d -p 7842:7842 -e ANTHROPIC_API_KEY adrianhihi/helix-server
Architecture
┌──────────────────┐ HTTP/JSON ┌──────────────────┐
│ Your Python Agent│ ──────────────→ │ Helix Server │
│ (AgentKit, etc) │ │ PCEC + Gene Map │
│ │ ←────────────── │ LLM + Telemetry │
│ pip install │ Strategy │ docker run or │
│ helix-agent-sdk │ │ npm install │
└──────────────────┘ └──────────────────┘
All intelligence runs server-side. The Python SDK is a lightweight HTTP client. Your agent gets the full power of PCEC, Gene Map, LLM, and network learning.
Gene Dream + Data Versioning
The Helix server includes background memory consolidation:
import requests
# Trigger Gene Dream manually
requests.post("http://localhost:7842/dream", json={"force": True})
# Check dream status
requests.get("http://localhost:7842/dream/status").json()
# Check schema version
requests.get("http://localhost:7842/schema").json()
Gene Dream runs automatically when your agent is idle. Data Versioning auto-migrates on server startup.
Configuration
HELIX_URL=http://localhost:7842 # env var
client = HelixClient(
base_url="http://localhost:7842",
platform="coinbase",
agent_id="my-agent-1",
)
Supported Platforms
tempo— Tempo L1 blockchainprivy— Privy embedded walletscoinbase— Coinbase CDP + AgentKitgeneric— Any HTTP/RPC service
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file helix_agent_sdk-0.2.0.tar.gz.
File metadata
- Download URL: helix_agent_sdk-0.2.0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6ead32a1a233ab478b9df0920951cafd66c235d94ac1045cab546d17805c3fe
|
|
| MD5 |
9b938363dcfb5313ba7fff273ca97ee1
|
|
| BLAKE2b-256 |
a6ee23360dff4b0dc4da7ca293f3e826c2740ab43719f8830c0a09a708f3465f
|
File details
Details for the file helix_agent_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: helix_agent_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3584146b7518a3d80ff6a8dacf9e784b4b381df5324eb7fb73c3ebeccc33be13
|
|
| MD5 |
0b874ec54c65755e474f07b5b577a52a
|
|
| BLAKE2b-256 |
5cccdeeb9cd169a144f5579bf572b78d289be8085fefe6d3a48d2923d3c26aeb
|