What an AI agent actually does on Hyperliquid.
On Hyperliquid, an AI agent like Claude or Cursor — wired to Keel via MCP — composes typed strategy graphs, runs deterministic backtests against real HL funding and price, and hands the compiled artifact to live execution. The strategy runs deterministically; the agent is not in the trade-execution loop.
Three frames. Only one of them works.
Most pitches for AI agents on Hyperliquid fall into two camps: an autonomous wallet bot, or a one-off Python script. The first breaks on contact with funding mechanics. Neither is what Keel ships.
Connect Claude to your wallet, give it an HL API key, let it trade. The LLM hallucinates fills it never received, sizes positions by vibes, has no deterministic backtest in its head, and ignores funding because nothing in the prompt forced it to model carry. Two weeks in, the portfolio is a random walk with worse fees.
The agent helps you build a strategy; the compiled strategy is what trades. Claude composes a typed graph through MCP, Keel runs a deterministic backtest, the artifact deploys to live execution on its own schedule.
Ask Claude to "write a Python script that trades Hyperliquid" and you get a one-off file that hits the REST API, hardcodes a personal key, has no portfolio sim, no live-parity guarantee, and no path back to a research loop. The script runs once, breaks on the second restart, and rewrites itself differently every prompt.
pipx install keel-trade ships a maintained MCP binary, a typed DSL, a deterministic engine, and OAuth auth. The agent calls real tools — same surface a human uses through the CLI — and the strategy artifact is versioned in the Keel database.
LLMs are strong at composition, summarization, and code. They are weak at deterministic execution, risk math, and reasoning under live latency. The right surface gives the agent what it is good at and keeps it out of the runtime.
Claude composes a strategy in the Keel DSL — typed components, validated at compose time. The engine compiles the graph and runs a deterministic backtest. You ship the compiled artifact to live; the agent is out of the loop once the strategy is running.
Under the hood
Structured strategy engine
Strategies are composable pipelines of typed components. The system validates every connection at edit time — errors caught before you backtest, not after you deploy.
AI built on the same system
AI doesn’t generate code — it composes from the same components you use. It understands valid connections, constraints, and trade-offs. Every strategy it builds is structurally valid.
Detailed backtest reports
Sharpe, Sortino, max drawdown, win rate, trade-by-trade logs. Compare runs side by side. Real fee and slippage modeling.
Version control for strategies
Every edit creates a new version. Compare any two versions side by side. Tag releases, restore previous versions, fork strategies. Your full history, always recoverable.
Auditable execution logs
Every live run is logged — what the strategy calculated, what orders executed, what filled. Full transparency.
Non-custodial by design
Your keys never touch our servers. Keel uses Hyperliquid’s native delegation. Sign once, revoke anytime.
Compose, backtest, deploy.
The three things an AI agent on Hyperliquid actually does through Keel. Each step is a real MCP tool call against a real engine — not a Claude monologue.
The agent composes a strategy
Install the binary, register the stdio MCP with your agent, then prompt for a strategy. The agent calls component-search and compose tools.
The engine runs the numbers
The agent calls keel_backtest_run with --wait. The engine simulates against real Hyperliquid funding and price. Share URL comes back.
You stage; the artifact runs
Opt into the live scope, arm the agent session against a specific HL account, then deploy. Compiled artifact trades; agent steps out.
A real run, composed by the agent.
Claude called keel_components_search, keel_strategy_compose, and keel_backtest_run through the MCP. The engine ran the numbers against real Hyperliquid funding and price. Every metric below comes from that single flow.
Funding-carry on Hyperliquid perps
A real backtest. Claude composed it via MCP, the engine ran it against real Hyperliquid funding and price, the share URL is live. Period: 2024-08-15 → 2026-04-30 (20 mo).
Verified Keel backtest. Past performance is not indicative of future returns.
Common questions
What does 'AI agent on Hyperliquid' actually mean?
An MCP-capable assistant — Claude Code, Cursor, Windsurf, Codex — that drives the Keel toolset to compose a typed strategy graph, run a deterministic backtest on real Hyperliquid funding and price, and stage the compiled artifact for live deployment. It is not an autonomous trading bot. The agent helps you build a strategy; the strategy, once compiled, runs on its own schedule.
Which agents work with Keel?
Anything that speaks Model Context Protocol over stdio. The shipped path covers Claude Code, Cursor, Windsurf, Codex, and the Gemini and Copilot CLIs. The install is the same binary in each case — pipx install keel-trade, then the host-specific registration (claude mcp add for Claude Code, .cursor/mcp.json for Cursor, the matching mcp.json for Windsurf and Codex). Keel detects the host via CLAUDECODE, CURSOR_AGENT, GEMINI_CLI and similar env vars and emits agent-friendly JSON automatically.
Does the agent trade my account live?
No. Live trading on Hyperliquid through Keel is gated by two locks: an OAuth live scope you opt into with keel auth login --scope live, and a local arming step (keel arm live set --account <id>) that binds the agent session to a specific HL account. Even with both, the agent only stages the deployment — the compiled strategy artifact is what trades on its own schedule. Live execution is non-custodial via Hyperliquid native delegation. Pause or stop anytime from the web app or the CLI.
Can I use an agent to discover new strategies?
Yes — this is the use case the MCP is built for. The agent calls keel_components_search to find signals and regime detectors in the 182-component library, drafts a typed pipeline through keel_strategy_compose, runs keel_backtest_run --wait against real Hyperliquid history, and iterates. The loop is fast because the engine is deterministic — Claude sees identical numbers across reruns and can reason about parameter changes against a stable baseline.
Is Hyperliquid the only venue Keel supports?
Yes. Keel is Hyperliquid-native — the data cache, the execution path, the fee schedule, the funding accounting, and the typed component library are all built around HL perps. That is deliberate: every other agent-driven research stack (QuantConnect, Lumibot, AlphaSquared) skips Hyperliquid, and HL is where systematic crypto trading actually clears.
How is this different from autonomous wallet bots like Senpi or Katoshi?
Autonomous-agent products put the agent in the execution loop — the LLM decides when to enter, when to exit, how much to size, in real time. That works for narrative meme trades and breaks for systematic alpha: the LLM hallucinates, sizes inconsistently, and has no deterministic backtest in its head. Keel takes the agent out of the loop. Claude composes a strategy, Keel compiles and runs it. The agent helps you build; the compiled strategy is what trades.
Keep exploring
Trading with Claude Code on Hyperliquid
Step-by-step tutorial — install Keel MCP in Claude Code, compose a strategy, backtest, deploy.
MCP for Hyperliquid
The category guide — why MCP × HL matters, the MCP tools, comparison to wrapper servers.
Backtest Hyperliquid strategies
The backtest-engine pillar. Real fees, real funding, ~220 perps, decomposed P&L.