Skip to content

Unblock hosted agent cost E2E and MCP-safe trade - #59

Open
JaeLeex wants to merge 5 commits into
mainfrom
jl/hosted-cost-metering-20260701
Open

Unblock hosted agent cost E2E and MCP-safe trade#59
JaeLeex wants to merge 5 commits into
mainfrom
jl/hosted-cost-metering-20260701

Conversation

@JaeLeex

@JaeLeex JaeLeex commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add cost metering harness (modules/cost_metering.py), MCP-safe trade flags, and web-auth pair/role binding needed for funded cost experiments.
  • Keeps agent-cli runtime-only: no hosted subscription gating here.

Validation

  • python3 -m pytest tests/test_cost_metering.py tests/test_trade_command.py tests/test_mcp_money_tools.py — 14/14 pass

Product framing

  • This PR supports Hosted Runtime COGS measurement.
  • BYO MCP Access remains free/included and does not require these ledgers.

Stack

Docs

Made with Cursor

JaeLeex and others added 5 commits March 26, 2026 16:51
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant