# Repository Briefing: usehelix/helix
> Source: https://repoforai.com/repo/usehelix/helix (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/usehelix/helix
- **Official Docs / Website**: https://tryhelix.dev/
- **Category**: Agents & Frameworks (智能体与框架)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: C (48/100 · Maintenance 12/35 · Adoption 5/25 · Releases 11/20 · License 20/20)
- **Latest Release**: v2.7.0 (2026-04-03) — https://github.com/usehelix/helix/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Docker, Self-Hosted, CLI, API
- **Momentum**: 817 ★ total (+0 24h / +0 7d) · 5 forks
- **Topics**: `agent`, `agentic-ai`, `agentic-ai-self-evolving`, `ai`, `ai-agents`, `blockchain`, `coinbase`, `docker-image`, `llms`, `multi-agent-systems`, `payments`, `privy`
- **When to Use**: Best for: Teams running agents with recurring payment or API failures that need different recovery actions and can validate retries before enabling them. Skip if: You only need error reporting or deterministic backoff, or cannot safely reconcile ambiguous payment outcomes before retrying.

## Overview
```text
### Architecture & Core Mechanics
Helix is a TypeScript monorepo that adds payment-specific recovery to a generic self-healing engine. `@helix-agent/core` wraps an async function and handles failures through six PCEC stages: Perceive, Construct, Evaluate, Commit, Verify, and Gene. The SQLite-backed Gene Map records repair outcomes and uses Q-value scoring to rank strategies on subsequent failures. The generic Vial core exposes `PlatformAdapter` so service-specific error classification and patterns can be added without replacing the pipeline.

The payment layer covers Coinbase, Tempo, Privy, and Generic HTTP; `@vial/adapter-api` is a separate vertical for general API failures. The root manifest includes both Coinbase SDKs (`@coinbase/cdp-sdk` and `@coinbase/coinbase-sdk`), `@privy-io/node`, `@x402/core`, `@x402/evm`, and `@circle-fin/x402-batching`. This is an execution-layer SDK: agents retain their own orchestration and choose which calls Helix can diagnose or retry.

### Key Capabilities & Differentiators
The adapter catalog contains 40 payment patterns and 21 API patterns. Payment coverage includes CDP, ERC-4337, x402, Tempo MPP, and embedded-wallet errors; the API adapter recognizes rate limits, server failures, timeouts, connection errors, and authentication failures. Recovery actions include refreshing a nonce, applying backoff, renewing a session through a callback, and adjusting gas. The v2.6.0 Self-Refine loop excludes strategies that have already failed and stops after three distinct failures rather than blindly repeating them.

A 12-hour A/B test over 1,083 Base mainnet transactions measured 99.9% for Helix versus 81.9% for blind retry. The warm Gene Map benchmark measured 1.1 ms versus 2,140 ms and $0.00 versus $0.49 per repair in that comparison. These results characterize the tested workloads, not arbitrary contracts, providers, or error mixes. The Budget Predictor remains on the roadmap; cost ceilings are a current execution control, not a substitute for pre-execution cost prediction.

### Trade-offs & Limitations
Compared with simple backoff, Helix can select a repair specific to the failure and retain evidence of what worked. Compared with Sentry or Datadog, it changes execution rather than just helping operators see and investigate failures, so it belongs alongside observability. That additional control is most useful for recurring, well-understood failures; for a small API client with an adequate idempotent retry policy, adapters, stored state, and strategy tuning may add more complexity than value.

`observe` diagnoses without changing the call, `auto` can adjust parameters and retry, and `full` also permits fund-movement strategies. Recipient and calldata constraints, cost ceilings, and strategy allowlists narrow the risk but do not provide exactly-once execution. Before enabling automatic payment repair, test idempotency and reconcile ambiguous outcomes such as timeouts after submission. MIT permits commercial adoption; wallet-provider terms and transaction-data handling still require a separate review.

### Hardware & Deployment Guide
For in-process use, install `@helix-agent/core` in the Node application; a Python SDK is also available as `helix-agent-sdk`. For a separate service, run `npx @helix-agent/core serve --port 7842 --mode observe` or deploy the Compose service using `adrianhihi/helix-server:latest`. Compose defaults to observe mode, maps port 7842, mounts `helix-data` at `/app/data`, and probes `/health`; the REST surface includes `POST /repair`.

The Compose setup declares no separate database or local model service. Persist the SQLite data, pin a tested image rather than relying on `latest`, and review access to the mapped port and handling of `HELIX_ADMIN_KEY` and `HELIX_LLM_API_KEY`. Warm Gene Map lookup does not require an LLM call, but live payments still rely on external services. v2.5.0 extracted the generic engine as `@vial-agent/core`; v2.7.0 adds opt-in VialOS Runtime integration via `--beta`, exposing `/vial/status` and adding runtime metadata to `/health` without making beta a prerequisite for stable use.
```

## Key Capabilities
```text
- Execution: `wrap()` routes async failures through diagnosis, strategy selection, execution, verification, and memory.
- Procedural memory: SQLite Gene Map uses Q-value scoring to reuse successful strategies without another LLM diagnosis.
- Adapter coverage: 40 payment error patterns across Coinbase, Tempo, Privy, and Generic HTTP, plus 21 in the separate API adapter.
- Execution controls: `observe`, `auto`, and `full` separate diagnosis, automatic retry or parameter changes, and fund-movement strategies.
- Benchmark: On 1,083 Base mainnet transactions, the 12-hour A/B test measured 99.9% versus 81.9% for blind retry.
- Self-hosting: Docker Compose exposes port 7842, persists `/app/data` in `helix-data`, and probes `/health`.
```

## Quick Start / Clone
```bash
npm install @helix-agent/core
```
