Getting started (agent)
Set up and run the agent that executes a Hourglass strategy — create a wallet, get the mandate signed, discover it, and swap.
A strategy has two sides: the Safe signs a mandate, and an agent runs it. This guide is the agent side. You operate the agent — Hourglass never holds your keys and never runs it for you.
To automate all of this, install the Hourglass agent skill in your LLM tooling. It walks an agent through every step below (wallet, funding, discovery, execution). This guide is the human-readable version of the same flow.
Before you start
- A Safe on Base (8453) or Ethereum (1) mainnet, funded with the token you want to DCA (e.g. USDC). The strategy rail runs on mainnet — the Uniswap router and liquidity live there, not on testnets.
- A Uniswap Trading API key (from the Uniswap developer portal). Agent-side only; never ship it to a browser.
Steps
- Create the agent wallet. Generate a fresh keypair and record the address.
cast wallet new, or any wallet library. The private key stays secret and only ever pays gas. - Fund it with a little ETH on the mandate's chain. A few dollars covers many redeems. The agent never self-funds — you top it up.
- Give the address to the Safe operator. They paste it into the Strategy tab as the Agent address, set the recurring buy and the per-swap cap, and sign the mandate (a multisig action). Everything is locked in the UI until an agent address is entered.
- Wait for publication. Once signed, the mandate is published on Intuition (see discovery) so the agent can find it.
- Discover the mandate. The agent reads the delegations addressed to it from the Intuition graph. If none appear yet, the mandate isn't published — wait and retry.
- Execute the recurring buy. For each mandate, the agent builds the swap (Uniswap Trading API, CLASSIC routing) and redeems it — approve + swap in one atomic transaction, run as the Safe. Repeat on the mandate's cadence with a scheduler you own.
What the agent can and cannot do
- Can: swap the funding token for the target token, up to the per-swap cap, through the Uniswap Universal Router only.
- Cannot: spend more than the cap, call any other contract, or move funds out
of the Safe. The
erc20BalanceChangecaveat reverts anything over the cap; thefunctionCallscope reverts any other contract or method.
Hard rules
Request CLASSIC routing from the Trading API (not BEST_PRICE) so the swap is a
router execute(...) tx the delegation can redeem — a gasless UniswapX order has no
on-chain tx to redeem. And approve directly to the Universal Router (legacy),
not Permit2, which the mandate does not whitelist.
Revoking
To stop the agent, the Safe owners disable the delegation (a multisig action) — see revoke. The mandate has no separate off-switch; the multisig is the kill switch.