EVClaw is an autonomous AGI trading skill for Hyperliquid:
- Perps trading
- HIP3 builder stocks
- Deterministic ops + OpenClaw agent supervision
It is designed to run on a fresh Linux VPS with no dependency on your private local file layout.
AI/operator runtime contract:
AGENTS.mdis the canonical context map for this repo.- Scheduled cron prompts read only
AGI_SUPERVISOR_MODEblock inAGENTS.md(insideCRON_CONTEXT) andTool.mdCRON_SAFE_TOOLS(notMANUAL_COMMANDS).
- Ingests market/tracker data from internet endpoints.
- Builds opportunities and ranks candidates.
- Uses OpenClaw agents for entry and exit decisions.
- Executes with one wallet identity:
HYPERLIQUID_ADDRESS+ delegated signerHYPERLIQUID_AGENT_PRIVATE_KEY. - Runs deterministic hourly/15m maintenance checks for safety.
cycle_trigger -> context builder -> entry gate -> executor -> position tracking -> exit producers -> exit decider -> executor close
Rules:
- Producers do not execute orders directly.
- Executor is limit-first/chase-limit workflow.
- DB is the source of truth for active trades and reconciliation.
- Linux VPS
python3(3.10+ recommended)pip+ virtualenvtmuxgit- OpenClaw installed and configured with a working LLM provider
- Lighter SDK is optional (only needed if you enable Lighter venue)
git clone <your-repo-url> EVClaw
cd EVClaw
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# edit .env with your values
./bootstrap.sh
# Required after install/update: ensure OpenClaw cron jobs are installed/active.
./scripts/install_openclaw_crons.sh
openclaw cron list --json
# Optional warm-start preview (dry-run):
# EVCLAW_ROOT="${EVCLAW_ROOT:-$PWD}" python3 "$EVCLAW_ROOT/scripts/import_learning_seed.py"
./start.shbootstrap.sh installs EVClaw into OpenClaw skills/ and also installs helper skills:
tradeexecutebest3hedgestats
Default target is ~/.openclaw/skills (override with EVCLAW_OPENCLAW_SKILLS_DIR).
bootstrap.sh also sets/provisions isolated OpenClaw agent IDs (no default routing):
evclaw-entry-gateevclaw-hip3-entry-gateevclaw-exit-deciderevclaw-hip3-exit-deciderevclaw-learning-reflector
Cron install is critical:
bootstrap.shattempts cron install automatically.- Always run
./scripts/install_openclaw_crons.shmanually after fresh setup or git update. - Verify
openclaw cron list --jsoncontains both:EVClaw AGI Trader Hourly (deterministic)EVClaw AGI Trader Hourly Report (system-event)
- If jobs are missing, deterministic safety checks and repo update notifications will not run.
This is optional and intentionally NOT part of bootstrap.sh.
Use it only when the user explicitly agrees.
Core learning state imports from learning_state_kv (patterns/adjustments), not a pattern_stats SQL table.
symbol_policy rows are optional and may be empty depending on source history/release.
Seed publishing is maintainer-managed. For most users, start fresh and do not import.
User side options:
EVCLAW_ROOT="/path/to/EVClaw"
# Recommended default for new users: start fresh (no import command needed).
# Optional import path (historical bootstrap): dry-run first.
# Dry-run (default): auto-downloads official release seed + verifies SHA256.
python3 "$EVCLAW_ROOT/scripts/import_learning_seed.py"
# Apply after explicit user approval.
python3 "$EVCLAW_ROOT/scripts/import_learning_seed.py" --applyCurrent official release seed note (v3, 2026-02-22):
learning_state_kv: populatedsymbol_policy: populated
OpenClaw agent instruction:
- Ask for explicit user consent before importing learning seed.
- Run dry-run first.
- Run
--applyonly after user confirms. - If using a custom seed file instead of official release, pass
--seed /path/to/seed.tgz. - Do not present import as mandatory; fresh start is the recommended default.
Pros:
- Better trading knowledge from real trade history.
Cons:
- Usually fewer trades than a fresh start profile.
- If many users import the same seed, behavior can become similar across users.
Optional maintenance: prune stale learning text/conclusions
EVCLAW_ROOT="/path/to/EVClaw"
# Dry-run (default), month window:
python3 "$EVCLAW_ROOT/scripts/prune_stale_learning.py"
# Week window:
python3 "$EVCLAW_ROOT/scripts/prune_stale_learning.py" --window week
# Apply (conclusions + notes_summary only):
python3 "$EVCLAW_ROOT/scripts/prune_stale_learning.py" --window month --apply
# Optional deeper cleanup (also delete stale reflections rows):
python3 "$EVCLAW_ROOT/scripts/prune_stale_learning.py" --window month --include-reflections --applyOptional maintenance: cleanup Python/npm caches (dry-run default)
EVCLAW_ROOT="/path/to/EVClaw"
python3 "$EVCLAW_ROOT/scripts/cleanup_runtime_artifacts.py"
python3 "$EVCLAW_ROOT/scripts/cleanup_runtime_artifacts.py" --apply
python3 "$EVCLAW_ROOT/scripts/cleanup_runtime_artifacts.py" --npm-cache
python3 "$EVCLAW_ROOT/scripts/cleanup_runtime_artifacts.py" --apply --npm-cache --npm-cache-cleanAt minimum set:
HYPERLIQUID_ADDRESSHYPERLIQUID_AGENT_PRIVATE_KEYHYPERLIQUID_ADDRESSis the main wallet address being traded.HYPERLIQUID_AGENT_PRIVATE_KEYis the delegated agent signer key authorized for that wallet.- Do not use your main wallet private key.
- Keep EVClaw agent IDs as dedicated IDs (defaults above), not
default.
Common network defaults:
- tracker SSE host:
tracker.evplus.ai:8443 - HL private node/info endpoint:
https://node2.evplus.ai/evclaw/info(as configured in.env) - Before first run, approve builder fee for your wallet:
https://atsetup.evplus.ai/
Tracker data contract (critical):
- Primary real-time feed (drives trading/interrupts):
https://tracker.evplus.ai:8443/sse/tracker?key=$HYPERLIQUID_ADDRESS - EVClaw default also appends
&profile=evclaw-liteon the same endpoint to reduce payload size. - Fallback: set
EVCLAW_SSE_PROFILE=fullto disable lite profile instantly. - HIP3 REST (context/enrichment endpoints):
https://tracker.evplus.ai/api/hip3/predator-state?key=$HYPERLIQUID_ADDRESS - HIP3 symbols REST:
https://tracker.evplus.ai/api/hip3-symbols?key=$HYPERLIQUID_ADDRESS - If you override
EVCLAW_TRACKER_HIP3_PREDATOR_URLorEVCLAW_TRACKER_HIP3_SYMBOLS_URL, include?key=<wallet>in the URL. - Do not use shortened links for HIP3 REST URLs. Use full endpoint URLs with
?key=....
Quick endpoint checks:
curl -ksS "https://tracker.evplus.ai/api/hip3/predator-state?key=$HYPERLIQUID_ADDRESS" | head -c 200
curl -ksS "https://tracker.evplus.ai/api/hip3-symbols?key=$HYPERLIQUID_ADDRESS" | head -c 200
curl -ksS "https://tracker.evplus.ai:8443/sse/tracker?key=$HYPERLIQUID_ADDRESS" --max-time 5 | head -c 200HIP3 runtime flow (AI quick map):
sse_consumer.pyconnects to SSE and mergeship3-datainto each symbol payload aship3_predator.cycle_trigger.pyconsumes HIP3 snapshots from SSE and runs candidate generation on that merged payload.compute_hip3_main()runs OR-driver semantics: FLOW pass or OFM pass can drive; direction conflict blocks.context_builder_v2.pyuses SSE payload first and only attempts REST enrichment ifhip3_predatoris missing.- REST fetch failures are debug-logged and non-fatal; they can still reduce enrichment quality.
Failure implication:
- If both FLOW and OFM gates fail,
compute_hip3_main()emits ablocked_reason(for examplemissing_flow_direction) and that symbol produces no HIP3 candidate in that snapshot.
Entry-gate safety controls (AI/operator quick map):
config.global_pause.enabled=trueblocks all new entries immediately.config.entry_gate_bypass_guardcontrols deterministic fallback risk:size_mult_cap(default0.5)max_entries_per_window+window_minuteshard_block_unreachable_after_minutes
- Trades/proposals carry
entry_gate_execution_type(llm,bypass,deterministic) and optionalentry_gate_bypass_reason. - Learning ignores bypass-tagged trades for signal/symbol adjustments and pattern updates.
HIP3 enablement (currently xyz:SYMBOL only):
EVCLAW_ENABLED_VENUES=hyperliquid,hip3EVCLAW_HIP3_TRADING_ENABLED=1EVCLAW_HIP3_DEXES=xyz- Symbols outside
xyz:*are not supported for HIP3 trading yet.
Node2 auth test (RIGHT way):
curl -X POST "https://node2.evplus.ai/evclaw/info?key=$HYPERLIQUID_ADDRESS" \
-H "Content-Type: application/json" \
--data '{"type":"meta"}'Wrong patterns (do not use):
POST /evclaw/metaPOST /evclaw/statusPOST /evclaw/infowithout?key=...- putting wallet address in JSON body instead of query
key
EVClaw supports 3 top-level trading modes:
conservativebalanced(default)aggressive
Behavior intent:
conservative: fewer trades, stricter entry filters, smaller risk and sizing.balanced: production baseline.aggressive: more trades, looser entry filters, higher risk and sizing.
Where to change mode:
- Edit
config.mode_controller.modeinskill.yaml.
For OpenClaw agents and human operators:
- First change only
config.mode_controller.mode. - Do not change individual sliders/overrides unless explicitly asked.
Example:
config:
mode_controller:
mode: aggressiveDefault runtime uses tmux sessions started by ./start.sh (wrapper over restart.sh).
Core sessions include:
evclaw-cycle-triggerevclaw-live-agentevclaw-live-monitorevclaw-exit-deciderevclaw-hip3-exit-deciderevclaw-exit-outcomeevclaw-decayevclaw-reviewevclaw-fill-reconcilerevclaw-learning-reflector
After bootstrap, these user-facing helper skills are available:
/trade <SYMBOL>/execute <PLAN_ID> chase|limit [ttl]/execute <long|short> <SYMBOL> <chase|limit> [size_usd] [ttl](asks missing size and requires explicit confirm)/best3/hedge/stats(live perps + builder/HIP3, DB fallback only when live fails)
Command split:
/execute <PLAN_ID> chase|limitis helper-skill manual plan execution.python3 cli.py execute --cycle-file ...is the low-level cycle executor path.
Operator note:
- This section is manual/interactive guidance.
- Scheduled cron jobs must use
AGENTS.mdAGI_SUPERVISOR_MODE+Tool.mdCRON_SAFE_TOOLSonly.
- Deterministic ops cron runs every 15 minutes for reconciliation/maintenance.
- OpenClaw hourly report cron posts a status summary to main chat.
- Hourly report cron also runs deterministic repo update check and asks user for explicit yes/no before any update action.
- Health/ops output is written to local runtime files and logs.
- Cycle/context/candidate artifacts are pruned every cycle by
cycle_trigger.py. - Retention is fixed in code to keep last
50files per artifact class (safety floor:20).
- If no trades appear, verify OpenClaw agent IDs and provider config.
- If SSE fails, verify tracker endpoint/key in
.env. - If SSE/node2 returns 401/403, approve builder fee for your wallet at
https://atsetup.evplus.ai/. Status guide: 401: missing/invalid walletkeyquery parameter.402: wallet has not approved builder fee yet (SSE path).403: wrong host/path/routing policy; re-check exact endpoint and port.- If HL auth fails, verify
HYPERLIQUID_ADDRESSandHYPERLIQUID_AGENT_PRIVATE_KEY. - If
HYPERLIQUID_APIappears in your.env, remove it and useHYPERLIQUID_AGENT_PRIVATE_KEY. - If you see
sr_limit_equity_missing, check thatevclaw-live-monitoris running (it writesmonitor_snapshotsused for SR-limit equity caps). - If processes are missing, run
./start.shagain and inspect tmux sessions. - If OpenClaw cron jobs are missing (
openclaw cron list --jsonshows no EVClaw jobs), run./scripts/install_openclaw_crons.shand re-check.
This is real-money trading software. Start with small size, confirm live behavior, and monitor continuously before scaling.