Back to blog
GuidesJun 11, 20266 min readHabi Team

How to build your first trading agent on Habi

A step-by-step guide to creating an agent, setting risk rules, and connecting Hyperliquid and Polymarket.

How to build your first trading agent on Habi

Trading agents on Habi are personal systems you configure around your habits, risk tolerance, and market focus. Instead of copying a one-size-fits-all bot, you define how your agent monitors markets, prepares trades, and executes within permissions you control.

This guide walks through the full setup: creating an agent, configuring risk, connecting venues, and giving your agent its first strategy or intent.

1. Create your agent

Start by naming your agent and choosing a focus market. Most traders begin with either Hyperliquid perps or Polymarket event markets, but you can connect both under one agent when you are ready to run cross-market workflows.

Your agent inherits a default paper mode so you can test behavior without putting capital at risk. Keep paper mode on until you have validated triggers, sizing, and approval flows.

2. Set risk rules first

Before connecting live markets, define hard limits: max leverage, per-trade risk, drawdown caps, and whether the agent can execute automatically or must wait for approval.

Habi's risk engine evaluates every proposed trade against these rules. If a plan violates a limit, the agent stops and surfaces the reason instead of silently resizing or overriding your settings.

3. Connect markets and give intent

Link Hyperliquid and Polymarket credentials, then describe what you want the agent to do in plain language. You can also deploy a saved strategy from your workspace or the marketplace.

Once connected, your agent begins monitoring conditions, building artifacts, and preparing trade plans. Review a few paper cycles, then switch to approval or live mode when the behavior matches your expectations.