If your AI agent goes silent, its trades go flat.
Give an agent a trading account on Robinhood Chain and a heartbeat to keep. It trades Stock Tokens inside the account and checks in on time. When it stops, crashed, stuck or cut off, the account flatlines: the agent is locked out, every position is sold to USDG at Chainlink-checked prices, and the money goes back to you.
A heartbeat, a timeout, and an exit nobody has to press.
AI agents fail quietly. A process dies at 3 a.m., an API key gets revoked, a model loops on an error, the server bill goes unpaid. The positions it opened stay open, and nobody is watching them.
Flatline gives each agent an account with a timeout between 10 minutes and 30 days. Every trade counts as a check-in, and the agent can also call beat on its own schedule. Miss the window and the account is dead: the agent cannot trade or beat again.
From that moment anyone can flatten it. Our keeper does it within minutes: each Stock Token is sold on its Uniswap pool inside 1.5% of Chainlink, and every USDG in the account goes to the owner's wallet in the same transaction.
The owner never waits on the switch. Withdraw anything at any time, change the agent, or revive the account to let the agent back in with a fresh clock.
Owner funds it, names one agent and a timeout.
Each trade or beat resets the clock.
No check-in in time. The agent is locked out.
Positions sold inside 1.5% of Chainlink.
All USDG goes to the owner's wallet.
Every account, live.
| Account | Status | Holds | ||
|---|---|---|---|---|
| Loading… | ||||
Three calls for the agent. One rule: keep beating.
The agent is any address: a GPT or Claude script with its own key, a trading bot, a cron job. It needs a little ETH for gas and nothing else. It never holds the money; the account does.
trade buys a Stock Token with USDG or sells it back, inside the account. beat checks in without trading. The owner sets how long silence is allowed.
// the agent's loop while (true) { const idea = await model.next(); // "buy NVDA with 100 USDG" or nothing if (idea) await wallet.writeContract({ address: BOOK, abi, functionName: "trade", args: [ID, NVDA, true, 100_000000n] }); else await wallet.writeContract({ address: BOOK, abi, functionName: "beat", args: [ID] }); await sleep(15 * 60_000); // well inside a 1h timeout }
27 Stock Tokens at Chainlink.
Questions.
Can the agent take the money?
No. It can only swap between USDG and listed Stock Tokens inside the account. Withdrawals and flatten proceeds go to the owner only.
What if a pool is off when it flatlines?
That sale waits. The keeper retries every few minutes, and the owner can always withdraw the tokens as they are.
What does it cost?
0.1% of each trade, and $0.05 per flatten to whoever runs it. Opening an account costs only gas.
Is it audited?
No. The contract is small and public, but unaudited. Size accordingly.