The Keel agent runbook.
Keel is a strategy platform for systematic trading on Hyperliquid perpetuals: agents compose typed strategies, run deterministic backtests on real market history, and hand results to humans for review. It is not a high-frequency-trading venue and not a prediction-market tool. This page is the operational runbook: pick a surface, connect it, and get from zero to a verified backtest.
One product, one default path per situation.
Every surface drives the same strategy engine and the same server-side strategy state. Start from the default for your situation; the alternatives stay available.
| You are… | Default path (shown first) | Also works |
|---|---|---|
| Using Claude/ChatGPT on web or phone | Hosted endpoint — paste the URL (directory one-click coming) | CLI + local MCP |
| Working in Claude Code / Cursor / terminal | pipx install keel-trade (CLI + local MCP) | hosted endpoint |
| Going live with a strategy | Keel web app (connect account, review sizing, go live) | reads on every surface |
| Building your own agent/scripts | SDK + API key | CLI |
| Just browsing/running strategies | Web app + library | hosted endpoint |
Surfaces are places to use Keel, not separate products. The hosted endpoint is one remote MCP — a 23-tool research/backtest/read surface you add by pasting the URL today; a one-click directory listing is coming. Going live is a handoff into the Keel web app on every surface.
Per-client setup, one row each.
Find your client, run its row. Nothing else is required — auth happens in the browser the first time a tool needs it.
Claude (web / phone / desktop)
Hosted endpoint — paste the URL (directory one-click coming)
Settings → Connectors → Add custom connector →
https://mcp.usekeel.io/mcp
Sign in with your Keel account when prompted.
(The one-click Claude directory listing is coming.)ChatGPT (Developer Mode)
Hosted endpoint — Developer Mode connector
Enable Developer Mode: Settings → Connectors → Advanced → Developer mode
(a paid ChatGPT plan; Business/Enterprise needs an admin to allow it)
Add a custom MCP connector →
https://mcp.usekeel.io/mcp
Sign in with your Keel account when prompted.Claude Code
CLI + local MCP (default) or hosted endpoint
# Local (file-based work, workspaces):
pipx install keel-trade
claude mcp add keel -- keel mcp serve
# Hosted (no local install):
claude mcp add --transport http keel https://mcp.usekeel.io/mcp
# then run /mcp to complete the browser OAuth flowCodex
CLI + local MCP
pipx install keel-trade
codex mcp add keel -- keel mcp serveCursor
CLI + local MCP
pipx install keel-trade
// .cursor/mcp.json
{
"mcpServers": {
"keel": { "command": "keel", "args": ["mcp", "serve"] }
}
}Windsurf / generic MCP clients
CLI + local MCP
pipx install keel-trade
command: keel
args: ["mcp", "serve"]Claude Desktop
One-click MCPB bundle
Download and drag onto Claude Desktop:
https://github.com/keel-trade/keel-trade/releases/latest/download/keel-trade-latest.mcpbYour own agent / scripts
SDK + API key
REST API with an API key from app.usekeel.io/settings
Docs: usekeel.io/docs/api-reference
Or drive the CLI: keel status --format jsonThe deterministic runbook.
Every command and expected output below was executed verbatim against the Keel platform before publishing. Total time: a few minutes.
Install and check the CLI
pipx install keel-trade
keel --versionuv tool install keel-trade also works. Python 3.11+.
Authenticate
keel auth loginOpens your browser for OAuth 2.1 + PKCE. Headless environments: keel auth login --key <token> with an API key from app settings. Failure branch: if any later command errors with an auth error, re-run keel auth login.
Confirm the session
keel status --format json
# → "authenticated": true, plus your org, plan, and the active toolsetsDiscover components
keel components search momentum --format json
keel components describe-batch ROC ForecastScaler --format json
# → search returns matching components; describe-batch returns exact param schemasWrite strategy.py and validate it
keel strategy compose --source-file strategy.py --dry-run --format json
# → "validation": {"ok": true, "errors": [], "warnings": []}Failure branch: a warning with code UNRESOLVED_UNIVERSE (universe modes like top_volume) is fixed by keel universe resolve strategy.py — it resolves the asset list and writes it back into the file.
Save the strategy
keel strategy compose --source-file strategy.py --name my-momentum --format json
# → "strategy_id": "str_01…" plus the strategy URL in the Keel appRun the backtest
keel backtest run str_01… --start-date 2025-06-01 --format json
# → "run_id": "btr_01…" — waits up to ~90s; --start-date defaults to
# 2024-08-15 (earliest cached HL data), --end-date to today (UTC)Failure branch: if the run is still in progress when the wait ends, the status is running — pass the run_id to keel backtest watch (next step); nothing is lost.
Watch until terminal, then summarize
keel backtest watch btr_01… --format json
keel backtest summarize btr_01… --format json
# → "status": "completed", then summary_metrics:
# sharpe_ratio / total_return / max_drawdown / win_rateOpen the tearsheet
keel open backtest btr_01…
# → View in Keel: https://app.usekeel.io/backtests/btr_01…?tab=tearsheetGlobals(target_timeframe="1d")
Universe(mode="manual", symbols=["BTC", "ETH", "SOL"])
Execution(rebalance="every_bar")
Pipeline([
PriceDataLoader(timeframe="15min"),
TargetTimeframeResampler(),
ROC(period=14),
CrossSectionalZScore(),
ForecastScaler(avg_abs_target=10.0),
ForecastCapper(limit=20.0),
ForecastWeightNormalizer(target_leverage=1.0),
], name="my_momentum")A cross-sectional momentum strategy over BTC/ETH/SOL: 14-bar rate of change, z-scored across assets, scaled and capped into target weights. Simple on purpose — swap components via keel components search.
Connected in a chat client? One prompt does the same.
On the hosted endpoint (or the CLI), the agent drives the identical tool flow — status, component search, compose, backtest, summarize.
Build a simple momentum strategy on BTC, ETH, and SOL,
backtest it from June 2025, and give me the Keel link.keel_status
keel_components_search
keel_components_detail_batch
keel_strategy_compose (dry_run, then save)
keel_backtest_run → keel_backtest_watch
keel_backtest_summarize
keel_open_in_app (the link you asked for)/mcp); a plan-limit error carries the exact numbers from keel_plan_status; a validation error names the failing component and parameter — fix and re-compose. The agent reads all three from the structured error envelope.