Self-healing runtime for autonomous agents. Fix once, immune forever.
Agent payment intelligence β predict costs, optimize execution, fix failures. Powered by VialOS Runtime.
Your agent's API call failed. Helix diagnosed it, fixed it, and remembered. Next time β instant fix, zero cost. Think of stackoverflow + crowdstrike for agents.
// Before: hope for the best
await agent.sendPayment(invoice);
// After: self-healing in one line
const safePay = wrap(agent.sendPayment.bind(agent), { mode: 'auto' });
await safePay(invoice);If this helped, please β β it helps us reach more developers.
Helix wraps your function. When it fails, a 6-stage pipeline kicks in:
Error occurs β Perceive β Construct β Evaluate β Commit β Verify β Gene
β β β β β β
What broke? Find fixes Score them Execute Worked? Remember
The fix is stored in the Gene Map β a SQLite knowledge base scored by reinforcement learning. Next time the same error hits any agent, it's fixed in under 1ms. No diagnosis, no LLM call, no cost.
npm install @helix-agent/coreimport { wrap } from '@helix-agent/core';
// Wrap any async function β payments, API calls, anything
const safeCall = wrap(myFunction, { mode: 'auto' });
const result = await safeCall(args);
// Errors are automatically:
// 1. Diagnosed (what type of error?)
// 2. Fixed (modify params, retry with backoff, refresh token...)
// 3. Remembered (next time β instant fix)Three modes, three risk levels:
| Mode | Behavior | Risk |
|---|---|---|
observe |
Diagnose only, never touch your call | Zero |
auto |
Diagnose + fix params + retry | Low β only changes how, never what |
full |
Auto + fund movement strategies | Medium |
Helix is the first vertical product of VialOS β an AI agent operating system. The VialOS Runtime provides the PCEC engine, Gene Map, and all learning modules. Helix adds payment-specific adapters on top.
@vial/core Generic self-healing engine
βββ PCEC Engine 6-stage repair pipeline
βββ Gene Map SQLite knowledge base + RL scoring
βββ Self-Refine Iterative failure refinement
βββ Meta-Learning 3 similar fixes β pattern β 4th is instant
βββ Safety Verifier 7 pre-execution constraints
βββ Self-Play Autonomous error discovery
βββ Federated Learning Privacy-preserving distributed RL
βββ Prompt Optimizer LLM classification auto-improves
@helix-agent/core Payment vertical (powered by Vial)
βββ Coinbase 17 error patterns (CDP, ERC-4337, x402)
βββ Tempo 13 error patterns (MPP, session, DEX)
βββ Privy 7 error patterns (embedded wallet)
βββ Generic 3 error patterns (HTTP)
@vial/adapter-api API vertical (powered by Vial)
βββ Rate limits 429, throttle
βββ Server errors 500, 502, 503, 504
βββ Timeouts ETIMEDOUT, socket, gateway
βββ Connection ECONNREFUSED, ECONNRESET, DNS
βββ Auth 401, 403, expired token
βββ Client 400, 413, 422, parse errors
Build your own adapter β implement the PlatformAdapter interface for any domain:
import { wrap } from '@vial/core';
import type { PlatformAdapter } from '@vial/core';
const myAdapter: PlatformAdapter = {
name: 'my-service',
perceive(error) {
if (error.message.includes('rate limit'))
return { code: 'rate-limited', category: 'throttle', strategy: 'backoff_retry' };
return null;
},
getPatterns() { return [/* ... */]; },
};
const safeCall = wrap(myFunction, { adapter: myAdapter, mode: 'auto' });Helix runs on the VialOS Runtime. Enable VialOS integration with --beta:
npx @helix-agent/core serve --port 7842 --mode observe --betaThis activates:
GET /vial/statusβ VialOS runtime information (13 modules, 5 adapters)- VialOS metadata in
GET /healthresponse - "Powered by VialOS Runtime" dashboard badge
Without --beta, Helix behaves identically to the stable release.
| Sentry/Datadog | Simple retry | Helix | |
|---|---|---|---|
| Detects errors | β | β | β |
| Fixes errors | β | β smart fix | |
| Learns from fixes | β | β | β Gene Map |
| Cross-agent learning | β | β | β Federated |
| Safety constraints | N/A | β | β 7 checks |
Sentry tells you something broke. Helix fixes it.
TypeScript/JavaScript:
npm install @helix-agent/corePython:
pip install helix-agent-sdkDocker:
docker run -d -p 7842:7842 adrianhihi/helix-serverREST API:
curl -X POST http://localhost:7842/repair \
-H 'Content-Type: application/json' \
-d '{"error": "nonce too low", "platform": "coinbase"}'# β οΈ Use @helix-agent/core β "npx helix" installs a WRONG third-party package
npx @helix-agent/core serve --port 7842 # Start server + dashboard
npx @helix-agent/core scan ./src # Scan codebase for error patterns
npx @helix-agent/core simulate "nonce too low" # Dry-run diagnosis
npx @helix-agent/core self-play 10 # Autonomous error discovery
npx @helix-agent/core dream # Memory consolidation
npx @helix-agent/core discover # Find adapter gapsHelix includes 15 learning and safety modules, all integrated into the core PCEC pipeline:
Learning β Gene Map (RL), Meta-Learning (few-shot), Causal Graph (prediction), Negative Knowledge (anti-patterns), Adaptive Weights (auto-tuning), Self-Play (exploration), Federated Learning (distributed), Gene Dream (memory consolidation), Prompt Optimizer (LLM self-improvement), Auto Strategy Generation (creates new fixes via LLM)
Safety β 7 pre-execution constraints (never modifies recipient or calldata), 4-layer adversarial defense (reputation, verification, anomaly detection, auto-rollback), cost ceilings, strategy allowlists
Execution β refresh_nonce, speed_up (gas Γ 1.3), reduce_request (value Γ· 2), backoff_retry (1s β 2s β 4s β 8s β 16s cap), renew_session (callback), split_transaction, remove_and_resubmit
Helix doesn't just fix errors β it gets better over time:
Level 1: Data Evolution
Every fix improves Q-values β better strategy selection
Level 2: Strategy Evolution
Meta-Learning spots patterns across fixes
Self-Play discovers errors before users hit them
Gene Dream consolidates knowledge during idle time
Level 3: Architecture Evolution
Auto Strategy Generation invents new fix methods via LLM
Adaptive Weights auto-tunes scoring per error category
Auto Adapter Discovery detects when new platforms need support
526+ tests across 55 test files
Schema v12 (auto-migrating)
61 error patterns (40 payment + 21 API)
21 API error patterns
7 safety constraints
12 repair strategies
- PCEC Engine β 6-stage self-healing pipeline
- Gene Map β SQLite + Q-value reinforcement learning
- Platform Adapters β Coinbase, Tempo, Privy, Generic HTTP
- Self-Evolution β Meta-Learning, Self-Play, Federated, Gene Dream
- Safety β 7 constraints, adversarial defense, cost ceilings
- CI/CD Integration β
npx @helix-agent/core scanfor GitHub Actions - Vial Framework β Generic core extracted (
@vial/core) - API Adapter β Second vertical proving generic architecture
- Self-Refine β Iterative failure reflection (paper: Self-Refine)
- Prompt Optimizer β LLM classification auto-improves (paper: DSPy)
- VialOS Beta β
--betaflag for VialOS Runtime integration - Budget Intelligence β Predict agent task costs from Gene Map history (v3)
- Gene Registry Cloud β Shared knowledge across agents (PostgreSQL)
- Executable Strategy Gen β LLM generates runnable fix code (paper: DYSTIL)
- CI/CD Adapter β Third vertical: deploy failures, flaky tests
- arXiv Paper β "Vial: A Self-Evolving Repair Framework for Autonomous Agents"
Helix implements ideas from these papers:
| Paper | What We Took | Module |
|---|---|---|
| Reflexion | Verbal reinforcement from failures | Negative Knowledge |
| ExpeL | Experience-conditioned strategy selection | Conditional Genes |
| Voyager | Skill library that grows over time | Auto Strategy Gen |
| Self-Refine | Iterative refinement with self-feedback | Self-Refine loop |
| DSPy | Self-improving LLM pipelines | Prompt Optimizer |
| Mem0 | Scalable long-term memory | Gene Dream |
Contributions welcome. The easiest way to contribute is to write a new PlatformAdapter for a domain you care about.
git clone https://github.com/adrianhihi/helix
cd helix
npm install
npm run build
npm run test # 526+ tests should passSee CONTRIBUTING.md for guidelines.
MIT
- npm: @helix-agent/core
- PyPI: helix-agent-sdk
- Docker: adrianhihi/helix-server
- awesome-mpp β Listed in the MPP ecosystem registry

