Unblock hosted agent cost E2E and MCP-safe trade - #59
Open
JaeLeex wants to merge 5 commits into
Open
Conversation
Telegram-native interface for deploying, monitoring, and controlling autonomous trading agents on Hyperliquid — like wallet bots but for agents. New module: tg_bot/ (12 files) - /start: wallet create/import with encrypted keystore - /deploy: strategy selection keyboard (18 strategies), instrument picker, risk presets (conservative/default/aggressive), mainnet double-confirm - /status /pause /resume /stop /balance: agent lifecycle control - /apex: multi-strategy APEX orchestration mode - NotifyingEngine: TradingEngine subclass pushing fills, PnL, risk alerts to Telegram via async queue with throttling - EngineBridge: thread-safe bridge (async bot <-> blocking engine thread) CLI: `hl telegram start [--mainnet] [--dry-run]` Deploy: RUN_MODE=telegram in Railway, Dockerfile installs telegram dep
Design PR — spec document + code skeleton (type stubs, interfaces, config schemas) for integrating all 8 perpetual on-chain agent jobs into the hl CLI. - New `hl jobs` command group (list/info/register/run/status/claim/deregister) - JobEngine ABC with KeeperEngine, CooperativeEngine, ManagedEngine - JobEngineFactory dispatches on job category (keeper/operator/cooperative/managed) - Strategy interfaces: KeeperStrategy, CooperativeStrategy, ManagedStrategy - EventSubscriber ABC with ChainEventSubscriber (WebSocket) and LogPollingSubscriber - CustodyGuard for pre-signing tx validation (defense-in-depth) - JOB_REGISTRY with all 8 jobs pre-registered - JobConfig dataclass with YAML loading - LaTeX specification at docs/agent_cli_jobs_spec.tex
Use OpenRouter as the hosted Railway inference default and make the LLM strategy route OpenRouter models through the OpenAI-compatible API. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Add safe MCP trading, joinable cost/fill ledgers, cache metrics, and web-auth maker/taker role binding so funded testnet costing can run through agent-cli. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
modules/cost_metering.py), MCP-safe trade flags, and web-auth pair/role binding needed for funded cost experiments.Validation
python3 -m pytest tests/test_cost_metering.py tests/test_trade_command.py tests/test_mcp_money_tools.py— 14/14 passProduct framing
Stack
mainjl/hedge-agent-mcp-smoke-test, same tip)Docs
Made with Cursor