Building an Autonomous AI Agent for Hyperliquid Trading

All About AIgo watch the original →

The author demonstrates how to build an autonomous AI agent that researches market trends via Reddit and PolyMarket, then executes leveraged trades on the Hyperliquid platform using a custom agentic harness.

Agentic Trading Setup

To automate trading on Hyperliquid, the author connects a MetaMask wallet to the platform and generates an API key pair. The agentic harness is built using a local directory structure containing an .env file with the wallet address and private key. To enable perpetual trading, the author disables the "HIPP3 dex abstraction" in the platform settings, which allows for switching between spot and perpetual accounts.

Research and Execution Pipeline

The agent uses a two-stage skill pipeline: find trades and research idea.

  • The find trades skill generates intraday trade ideas and formats them into a Kanban board.
  • The research idea skill utilizes sub-agents to perform parallel web searches, including scraping Reddit and querying PolyMarket for sentiment and context.
  • The agent is constrained by a persona profile (a "Wall Street Bets moderator") that influences its risk tolerance and trade selection.
  • Execution is handled programmatically via the Hyperliquid API, allowing the agent to place leveraged orders (e.g., 10x short on Nvidia) based on the research output.

Implementation Details

  • Wallet Connection: The author uses Arbitrum USDC for liquidity and Ether for gas fees.
  • Agent Framework: The setup leverages LLMs (Claude 3.5 Sonnet) within an agentic harness to orchestrate sub-agents and browser-based research tools.
  • Trade Logic: The agent evaluates potential trades by rating them against the defined persona profile and filtering out ideas that do not align with the desired risk-reward profile.
  • #ai
  • #dev-tooling
  • #trading

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.